123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
-
-
-
-
-
- #ifndef COUPLING_INC
- #define COUPLING_INC
-
- #pragma once
- #include "LemmaObject.h"
- #include "LayeredEarthEM.h"
- #include "PolygonalWireAntenna.h"
- #include "EMEarth1D.h"
-
- #ifdef LEMMAUSEVTK
-
-
-
- #include "vtkHyperTreeGrid.h"
- #include "vtkHyperTreeCursor.h"
- #include "vtkXMLHyperTreeGridWriter.h"
- #include "vtkDoubleArray.h"
- #endif
-
- namespace Lemma {
-
-
-
- class Coupling : public LemmaObject {
-
- friend std::ostream &operator<<(std::ostream &stream, const Coupling &ob);
-
- public:
-
-
-
-
-
- explicit Coupling ( const ctor_key& );
-
-
-
- Coupling ( const YAML::Node& node, const ctor_key& );
-
-
-
- virtual ~Coupling ();
-
-
-
- virtual YAML::Node Serialize() const;
-
-
-
- static std::shared_ptr< Coupling > NewSP();
-
-
-
- static std::shared_ptr<Coupling> DeSerialize(const YAML::Node& node);
-
-
-
-
-
-
-
- inline std::shared_ptr<LayeredEarthEM> GetSigmaModel ( ) {
- return SigmaModel;
- }
-
-
-
- inline void SetLayeredEarthEM ( std::shared_ptr< LayeredEarthEM > value ) {
- SigmaModel = value;
- return ;
- }
-
-
-
- inline void SetIntegrationSize ( const Vector3r& size ) {
- Size = size;
- return ;
- }
-
-
-
- inline void SetIntegrationOrigin ( const Vector3r& origin ) {
- Origin = origin;
- return ;
- }
-
-
-
- inline void PushCoil( const std::string& label, std::shared_ptr<PolygonalWireAntenna> ant ) {
- TxRx[label] = ant;
- }
-
-
-
- Complex Calculate (const std::vector< std::string >& tx, const std::vector< std::string >& rx,
- bool vtkOutput=false );
-
-
-
- inline void SetTolerance(const Real& ttol) {
- tol = ttol;
- }
-
- inline void SetPulseDuration(const Real& taup) {
- Taup = taup;
- }
-
-
-
-
- virtual inline std::string GetName() const {
- return CName;
- }
-
- protected:
-
-
-
-
- Coupling( const Coupling& ) = delete;
-
- private:
-
-
-
- Complex f( const Vector3r& r, const Real& volume , const Vector3cr& Ht, const Vector3cr& Hr);
-
- void IntegrateOnOctreeGrid( bool vtkOutput=false );
-
-
-
- void EvaluateKids( const Vector3r& size, const int& level, const Vector3r& cpos,
- const Complex& parentVal );
-
- #ifdef LEMMAUSEVTK6
-
-
- void EvaluateKids2( const Vector3r& size, const int& level, const Vector3r& cpos,
- const Complex& parentVal, vtkHyperOctree* octree, vtkHyperOctreeCursor* curse );
-
- void GetPosition( vtkHyperOctreeCursor* Cursor, Real* p );
- #endif
-
-
-
- int ilay;
- int nleaves;
- int minLevel=4;
- int maxLevel=8;
-
- Real VOLSUM;
- Real tol=1e-11;
- Real Taup = .020;
-
- Complex SUM;
-
- Vector3r Size;
- Vector3r Origin;
-
- std::shared_ptr< LayeredEarthEM > SigmaModel = nullptr;
- std::shared_ptr< FieldPoints > cpoints;
-
- std::map< std::string , std::shared_ptr< PolygonalWireAntenna > > TxRx;
- std::map< std::string , std::shared_ptr< EMEarth1D > > EMEarths;
-
- #ifdef LEMMAUSEVTK
- std::map< int, Complex > LeafDict;
- std::map< int, int > LeafDictIdx;
- std::map< int, Real > LeafDictErr;
- #endif
-
-
- static constexpr auto CName = "Coupling";
-
- };
- }
-
-
-
-
- #endif
|