123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
-
-
-
-
-
-
- #ifndef DCSURVEY
- #define DCSURVEY
-
- #include "LemmaObject.h"
- #include "DCIPElectrode.h"
-
- #ifdef HAVE_YAMLCPP
- #include "yaml-cpp/yaml.h"
- #endif
-
- #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 DCSurvey* New();
-
-
-
- void Delete();
-
-
-
-
-
-
-
- int PoundElectrode( DCIPElectrode* Electrode, const std::string& label = "NULL", const int& nodeID=-1 );
-
-
-
- DCIPElectrode* PoundElectrode( const Vector3r& loc, const std::string& label = "NULL", const int& nodeID=-1 );
-
- #ifdef LEMMAUSEVTK
- DCIPElectrode* PoundElectrode( const int& nodeID, vtkDataSet* Mesh, const std::string& label = "NULL" );
- #endif
-
-
-
- void PullElectrodes();
-
-
-
- int AddInjection( DCIPElectrode* A, DCIPElectrode* B, const Real& J);
-
-
-
- int AddInjection( 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, DCIPElectrode* M, 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 );
-
-
-
-
-
-
- #ifdef HAVE_YAMLCPP
- YAML::Node Serialize() const;
- static DCSurvey* DeSerialize(const YAML::Node& node);
- #endif
-
- protected:
-
-
-
-
- DCSurvey (const std::string& name);
-
- #ifdef HAVE_YAMLCPP
-
- DCSurvey (const YAML::Node& node);
- #endif
-
-
- ~DCSurvey ();
-
-
-
- void Release();
-
- private:
-
-
-
-
- std::vector<DCIPElectrode*> Electrodes;
-
-
- std::vector<std::string> OrderedElectrodeLabels;
-
-
- std::map<std::string, std::pair<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
|