123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273 |
-
-
-
-
-
-
- #ifndef __FIELDPOINTS_H
- #define __FIELDPOINTS_H
-
- #ifdef LEMMAUSEVTK
- #include "vtkPointData.h"
- #include "vtkFieldData.h"
- #include "vtkGlyph3D.h"
- #include "vtkArrowSource.h"
- #include "vtkActor.h"
- #include "vtkPolyDataMapper.h"
- #include "vtkPoints.h"
- #include "vtkPolyData.h"
- #include "vtkDoubleArray.h"
- #include "vtkDataObject.h"
- #endif
-
- #include "LemmaObject.h"
-
-
- namespace Lemma {
-
-
-
-
-
-
-
-
-
- class FieldPoints : public LemmaObject {
-
- friend class EMEarth1D;
- friend class DipoleSource;
-
-
-
- friend std::ostream &operator<<(std::ostream &stream, const FieldPoints &ob);
-
- public:
-
-
-
-
-
-
- explicit FieldPoints ( const ctor_key& );
-
-
- FieldPoints (const YAML::Node& node, const ctor_key&);
-
-
- ~FieldPoints ();
-
-
-
- static std::shared_ptr<FieldPoints> NewSP();
-
-
-
- YAML::Node Serialize() const;
-
-
-
- static std::shared_ptr<FieldPoints> DeSerialize(const YAML::Node& node);
-
-
-
-
-
-
-
-
- virtual void SetNumberOfPoints(const int &nrec);
-
-
- void SetLocation(const int& nrec, const Vector3r& loc);
-
-
- void SetLocation(const int& nrec, const Real& xp, const Real& yp,
- const Real& zp);
-
-
-
-
- virtual std::string GetName() const ;
-
-
- int GetNumberOfPoints();
-
-
- Vector3Xr GetLocations();
-
-
- MatrixXr GetLocationsMat();
-
-
-
- Vector3Xcr GetEfield(const int &nfreq);
-
-
-
- MatrixXcr GetEfieldMat(const int &nfreq);
-
-
-
- MatrixXcr GetHfieldMat(const int &nfreq);
-
-
-
- Vector3Xcr GetHfield(const int &nfreq);
-
-
- std::vector<Vector3Xcr> GetHfield( );
-
-
- std::vector<Vector3Xcr> GetEfield( );
-
-
-
- Vector3cr GetEfield(const int &nfreq, const int& loc);
-
-
-
- Vector3cr GetHfield(const int &nfreq, const int& loc);
-
-
-
- Vector3cr GetBfield(const int &nfreq, const int& loc);
-
- #ifdef LEMMAUSEVTK
-
- vtkActor* GetVtkGlyphActor(const FIELDTYPE &ftype,
- const Real& clip, const Real &scale,
- const int &nfreq);
-
-
- vtkDataObject * GetVtkDataObject(const FIELDTYPE &ftype,
- const int& nbin,
- const int& start, const int& end,
- const FIELDCOMPONENT& fcomp,
- const SPATIALCOORDINANT& scord);
-
-
- vtkDataObject * GetVtkDataObjectFreq(const FIELDTYPE &ftype,
- const int& nrec,
- const int& fstart, const int& fend,
- const FIELDCOMPONENT& fcomp,
- const VectorXr& Freqs);
- #endif
-
-
- Vector3r GetLocation(const int& loc);
-
-
- Real GetLocationX(const int& loc);
-
-
- Real GetLocationY(const int& loc);
-
-
- Real GetLocationZ(const int& loc);
-
-
- void ClearFields();
-
-
- void MaskPoint(const int& i);
-
-
- void UnMaskPoint(const int& i);
-
-
- void UnMaskAllPoints();
-
-
- int GetMask(const int& i);
-
- protected:
-
-
-
-
- void SetNumberOfBinsH(const int& nbins);
-
-
- void SetNumberOfBinsE(const int& nbins);
-
-
- void ResizeEField();
-
-
- void ResizeHField();
-
-
- void SetEfield(const int &nfreq, const int& loc,
- const Complex &ex, const Complex &ey, const Complex &ez);
-
-
- void SetHfield(const int &nfreq, const int& loc,
- const Complex &hx, const Complex &hy, const Complex &hz);
-
-
-
- void AppendEfield(const int&nfreq, const int& loc,
- const Complex &ex, const Complex &ey, const Complex &ez);
-
-
-
- void AppendHfield(const int &nfreq, const int& loc,
- const Complex &hx, const Complex &hy, const Complex &hz);
-
-
-
- private:
-
-
- int NumberOfPoints;
-
-
- int NumberOfBinsE;
-
-
- int NumberOfBinsH;
-
-
-
- VectorXi Mask;
-
-
- Vector3Xr Locations;
-
-
-
- std::vector<Vector3Xcr> Efield;
-
-
- std::vector<Vector3Xcr> Hfield;
-
-
- static constexpr auto CName = "FieldPoints";
-
- };
- }
-
- #endif
|