123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335 |
-
-
-
-
-
-
- #ifndef __DIPOLESOURCE_H
- #define __DIPOLESOURCE_H
-
- #include "LemmaObject.h"
- #include "layeredearthem.h"
-
-
-
- #ifdef LEMMAUSEVTK
- #include "vtkActor.h"
- #include "vtkLineSource.h"
- #include "vtkSphereSource.h"
- #include "vtkPolyDataMapper.h"
- #include "vtkTubeFilter.h"
- #include "vtkRegularPolygonSource.h"
- #include "vtkProperty.h"
- #endif
-
- namespace Lemma {
-
- class KernelEM1DManager;
- class ReceiverPoints;
- class HankelTransform;
-
-
-
-
-
-
-
- class DipoleSource : public LemmaObject {
-
- public:
-
-
-
- friend std::ostream &operator<<(std::ostream &stream,
- const DipoleSource &ob);
-
-
-
-
-
-
- static DipoleSource* New();
-
-
-
-
- DipoleSource* Clone();
-
-
-
- void Delete();
-
-
-
-
-
-
-
- void SetKernels(const int& ifreq, const FIELDCALCULATIONS& Fields, ReceiverPoints* Receivers, const int& irec,
- LayeredEarthEM* Earth );
-
-
- virtual void ReSetKernels(const int& ifreq, const FIELDCALCULATIONS& Fields, ReceiverPoints* Receivers, const int& irec,
- LayeredEarthEM* Earth );
-
-
- virtual void UpdateFields(const int& ifreq, HankelTransform* Hankel, const Real& wavef);
-
-
-
-
-
- void SetLocation(const Vector3r &posin);
-
-
-
- void SetLocation(const Real &xp, const Real &yp, const Real &zp);
-
-
-
- void SetPolarisation(const Vector3r &dir);
-
-
-
- void SetPolarisation(const Real& x, const Real& y, const Real& z );
-
-
-
- void SetPolarisation(const DipoleSourcePolarisation &pol);
-
-
-
-
- void SetType(const DipoleSourceType &stype);
-
-
- void SetMoment(const Real &moment);
-
-
- void SetPhase(const Real &phase);
-
-
- void SetPolarity(const DipoleSourcePolarity& pol);
-
-
- void SetNumberOfFrequencies(const int &nfreq);
-
-
-
-
- void SetFrequency(const int &ifreq, const Real &freq);
-
-
-
-
- void SetFrequencies(const VectorXr& freqs);
-
-
-
-
-
-
- Vector3r GetPolarisation();
-
-
- Vector3r GetLocation();
-
-
-
- Real GetLocation(const int &coordinate);
-
-
- DipoleSourceType GetDipoleSourceType();
-
-
- DipoleSourceType GetType();
-
-
- KernelEM1DManager* GetKernelManager();
-
-
-
-
-
- Real GetMoment();
-
-
- Real GetAngularFrequency(const int &ifreq);
-
-
- Real GetFrequency(const int &ifreq);
-
-
- VectorXr GetFrequencies( );
-
-
- Real GetPhase();
-
-
- int GetNumberOfFrequencies();
-
- #ifdef LEMMAUSEVTK
-
-
-
- vtkActor* GetVtkActor();
- #endif
-
- protected:
-
-
-
-
- DipoleSource (const std::string &name);
-
-
- ~DipoleSource ();
-
-
-
- void Release();
-
-
-
-
- DipoleSourceType Type;
-
-
-
-
-
-
-
-
- int irec;
- int lays;
- int layr;
-
-
- Real Phase;
-
-
- Real Moment;
-
- Real xxp;
- Real yyp;
- Real rho;
- Real sp;
- Real cp;
- Real scp;
- Real sps;
- Real cps;
- Real c2p;
- Real kernelFreq;
-
- FIELDCALCULATIONS FieldsToCalculate;
-
- VectorXcr f;
- VectorXi ik;
-
-
- Vector3r Location;
-
-
- Vector3r Phat;
-
-
- VectorXr Freqs;
-
-
- KernelEM1DManager* KernelManager;
-
-
- ReceiverPoints* Receivers;
-
-
- LayeredEarthEM* Earth;
-
- };
-
-
-
- class NullDipoleSource : public std::runtime_error {
- public:
-
-
- NullDipoleSource ( );
- };
-
-
-
- class NonValidDipoleTypeAssignment : public std::runtime_error {
- public:
- NonValidDipoleTypeAssignment( );
- };
-
-
-
- class NonValidDipoleType : public std::runtime_error {
- public:
-
-
- NonValidDipoleType( );
-
-
- NonValidDipoleType( LemmaObject *ptr );
- };
-
-
-
- class NonValidDipolePolarisation : public std::runtime_error {
- public:
- NonValidDipolePolarisation( );
- };
-
-
-
- class NonValidDipolePolarity : public std::runtime_error {
- public:
- NonValidDipolePolarity( );
- };
-
-
-
- class NonValidDipolePolarisationAssignment : public std::runtime_error {
- public:
- NonValidDipolePolarisationAssignment( );
- };
-
-
-
- class NonValidLocationCoordinate : public std::runtime_error {
- public:
- NonValidLocationCoordinate( );
- };
-
- }
-
- #endif
|