123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
-
-
-
-
-
-
- #ifndef DCSURVEY
- #define DCSURVEY
-
- #include "LemmaObject.h"
- #include "DCIPElectrode.h"
-
- #ifdef LEMMAUSEVTK
- #include <vtkDataSet.h>
- #endif
-
- namespace Lemma {
-
- #define EINFINITY -9999
-
-
-
- class DCSurvey : public LemmaObject {
-
- friend std::ostream &operator<<(std::ostream &stream,
- const DCSurvey &ob);
-
- public:
-
-
-
-
-
- static std::shared_ptr<DCSurvey> NewSP();
-
-
-
- YAML::Node Serialize() const;
-
-
-
- static std::shared_ptr<DCSurvey> DeSerialize(const YAML::Node& node);
-
-
- explicit DCSurvey (const ctor_key& key);
-
-
- DCSurvey (const YAML::Node& node, const ctor_key& key);
-
-
- virtual ~DCSurvey ();
-
-
-
-
-
-
-
- int PoundElectrode( std::shared_ptr<DCIPElectrode> Electrode, const std::string& label = "NULL", const int& nodeID=-1 );
-
-
-
- std::shared_ptr<DCIPElectrode> PoundElectrode( const Vector3r& loc, const std::string& label = "NULL", const int& nodeID=-1 );
-
- #ifdef LEMMAUSEVTK
- std::shared_ptr<DCIPElectrode> PoundElectrode( const int& nodeID, vtkDataSet* Mesh, const std::string& label = "NULL" );
- #endif
-
-
-
- void PullElectrodes();
-
-
-
- int AddInjection( std::shared_ptr<DCIPElectrode> A, std::shared_ptr<DCIPElectrode> B, const Real& J);
-
-
-
- int AddInjection( std::shared_ptr<DCIPElectrode> A, const Real& J );
-
-
-
- int AddInjection( const int& iA, const int& iB, const Real& J );
-
-
-
- int AddInjection( const int& iA, const Real& J );
-
-
-
- void AddMeasurement( const int& iJ, std::shared_ptr<DCIPElectrode> M, std::shared_ptr<DCIPElectrode> N );
-
-
-
- void AddMeasurement( const int& ij, const std::string& M, const std::string& N);
-
-
-
- void GetA( const int& ij, int& ii, Real& jj );
-
-
-
- void GetB( const int& ij, int& ii, Real& jj );
-
-
-
-
-
-
- protected:
-
-
-
- private:
-
-
-
-
- static constexpr auto CName = "DCSurvey";
-
-
- DCSurvey ( const DCSurvey& ) = delete;
-
-
- std::vector< std::shared_ptr<DCIPElectrode> > Electrodes;
-
-
- std::vector<std::string> OrderedElectrodeLabels;
-
-
- std::map<std::string, std::pair< std::shared_ptr<DCIPElectrode>, int> > ElectrodeLabelMap;
-
-
- std::vector<int> A_Electrodes;
-
-
- std::vector<int> B_Electrodes;
-
-
- std::vector<Real> J_Electrodes;
-
-
- std::vector< std::vector<int> > M_Electrodes;
-
-
- std::vector< std::vector<int> > N_Electrodes;
-
- };
-
-
- }
-
- #endif
|