#ifndef PLANE_WAVE_MESH_H #define PLANE_WAVE_MESH_H #include "face.h" #include "node.h" #include "vtkwriter.h" #include "Constants.h" #include #include #include "../dgtd-performance.hpp" // #include "surface_mesh.h" class PlaneWaveMesh /*: public SurfaceMesh*/{ friend class FemGrp; friend class vtr; private: char PW_Name[STRLEN]; fp_t theta_; fp_t phi_; vtr e_; fp_t imp_; int faceCNT; // number of faces in the surface mesh int objCNT; // number of material properties in the surface mesh int nodeCNT; // number of nodes in the surface mesh node** ndArray; // node pointers face** fcArray; // pointers to all the faces in the surface mesh int* objMAP; // material properties map* globToLocMap_; // global to local (2D) node mapping fp_t xmin, xmax, ymin, ymax, zmin, zmax; // bounding box coordinates public: // constructor / destructor PlaneWaveMesh(); ~PlaneWaveMesh(); // modifiers void allocGlobToLocMap(){globToLocMap_ = new map;} void setName(const char* name){strncpy(PW_Name, name, STRLEN);} void setTheta(const fp_t theta){theta_ = theta;} void setPhi(const fp_t phi){phi_ = phi;} void setE(const vtr& e){e_ = e;} void setImp(const fp_t imp){imp_ = imp;} void setObjCnt(int objCnt){objCNT = objCnt;} void setFace(face* Face, int n){fcArray[n] = Face;} void setNode(node* Node, int n){ndArray[n] = Node;} void setFaceCnt(int faceCnt); void setNodeCnt(int nodeCnt); // accessors char* getName(){return PW_Name;} fp_t getTheta(){return theta_;} fp_t getPhi(){return phi_;} vtr& getE(){return e_;} fp_t getImp(){return imp_;} int getFaceCnt(){return faceCNT;} face** getFaceArray(){return fcArray;} face* getFace(int n){return fcArray[n];} int getNodeCnt(){return nodeCNT;} node** getNodeArray(){return ndArray;} node* getNode(int n){return ndArray[n];} map& getGlobToLocMap(){return *globToLocMap_;} // setup utilities void makeObjMap(); // Visualization void writeVtk(char* fileName); // To return bounding box coordinates void computeBoundingBox(); fp_t getXmin() const { return xmin; } fp_t getXmax() const { return xmax; } fp_t getYmin() const { return ymin; } fp_t getYmax() const { return ymax; } fp_t getZmin() const { return zmin; } fp_t getZmax() const { return zmax; } protected: int getObjMap(int); void insertObj(int); }; #endif