You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
2.4 KiB
90 lines
2.4 KiB
// PORTMESH.H
|
|
#ifndef PORTMESH_H
|
|
#define PORTMESH_H
|
|
#include "counter.h"
|
|
#include "node.h"
|
|
#include "path.h"
|
|
#include "edge.h"
|
|
#include "face.h"
|
|
#include "tree.h"
|
|
#include "coord.h"
|
|
#include "material.h"
|
|
#include "array.h"
|
|
#include <map>
|
|
#include "vtkwriter.h"
|
|
|
|
class portMesh{
|
|
friend class FemGrp;
|
|
|
|
private:
|
|
char portName[StrLenShort];
|
|
int faceCNT;
|
|
int edgeCNT;
|
|
int nodeCNT;
|
|
int objCNT;
|
|
int* objMAP;
|
|
fp_t modeIMP;
|
|
fp_t magE;
|
|
fp_t impZ;
|
|
fp_t gamma;
|
|
Path vline;
|
|
Coordinate coord;
|
|
face** fcArray;
|
|
node** ndArray;
|
|
map<int, int>* globToLocMap_; // global to local (2D) node mapping
|
|
Tree<edge> portEdgeTree;
|
|
vtr PortDirection_vtr;
|
|
|
|
public:
|
|
// constructor
|
|
portMesh();
|
|
~portMesh();
|
|
|
|
Tree<edge> *getportEdgeTreePtr(){return &portEdgeTree;}
|
|
void insertportEdge(edge eg){portEdgeTree.insertNode(eg);}
|
|
|
|
// Set Functions
|
|
void allocGlobToLocMap(){globToLocMap_ = new map<int, int>;}
|
|
void setMagE(fp_t cval){magE= cval;}
|
|
void setmodeIMP(fp_t rval){modeIMP = rval;}
|
|
void setImpZ(fp_t cval){impZ= cval;}
|
|
void setName(char *buffer){sprintf(portName, "%s", buffer);}
|
|
void setNodeCnt(int nodeCnt);
|
|
void setFaceCnt(int faceCnt);
|
|
|
|
// Get functions
|
|
map<int, int>& getGlobToLocMap(){return *globToLocMap_;}
|
|
int getEdgeCnt(){return edgeCNT;}
|
|
int getFaceCnt(){return faceCNT;}
|
|
fp_t getmagE(){return magE;}
|
|
fp_t getmodeIMP(){return modeIMP;}
|
|
fp_t getimpZ(){return impZ;}
|
|
char* getName(){return portName;}
|
|
int getobjMAP(int );
|
|
node** getNodeArray(){return ndArray;}
|
|
face** getFaceArray(){return fcArray;}
|
|
vtr getPortDirection(){return PortDirection_vtr;}
|
|
|
|
void allocFaceArray(){fcArray = new face*[faceCNT];}
|
|
|
|
void makeObjMap();
|
|
void makeCoordSystem();
|
|
void makeRHS(fp_t, int, int *, portCounter); // this is for guiding ports
|
|
void makeRHS_E();
|
|
void makeRHS_H();
|
|
|
|
void writeMesh(Material *, fp_t); // write out 2d mesh
|
|
void writeMesh(Material* propMat);
|
|
|
|
// vline operations
|
|
void readVline(fp_t );
|
|
void readVline(fp_t , fp_t& , fp_t& , fp_t& );
|
|
void writeVtk();
|
|
private:
|
|
vtr findFaceNormal(face& Face);
|
|
void findNodes(node** vNode, node** eNode);
|
|
void insertOBJ(int );
|
|
};
|
|
#endif
|
|
|
|
|
|
|