gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
18 return "Plugin(Curl) computes the curl of the field "
19 "in the view `View'.\n\n"
20 "If `View' < 0, the plugin is run on the current view.\n\n"
21 "Plugin(Curl) creates one new list-based view.";
43 Msg::Error(
"Curl plugin cannot be run on multi-mesh views");
51 for(
int ent = 0; ent < data1->
getNumEntities(firstNonEmptyStep); ent++) {
52 for(
int ele = 0; ele < data1->
getNumElements(firstNonEmptyStep, ent);
54 if(data1->
skipElement(firstNonEmptyStep, ent, ele))
continue;
56 if(numComp != 3)
continue;
57 int type = data1->
getType(firstNonEmptyStep, ent, ele);
58 int numNodes = data1->
getNumNodes(firstNonEmptyStep, ent, ele);
59 std::vector<double> *out = data2->
incrementList(3, type, numNodes);
61 double x[8], y[8],
z[8], val[8 * 3];
62 for(
int nod = 0; nod < numNodes; nod++)
63 data1->
getNode(firstNonEmptyStep, ent, ele, nod, x[nod], y[nod],
65 int dim = data1->
getDimension(firstNonEmptyStep, ent, ele);
69 for(
int nod = 0; nod < numNodes; nod++) out->push_back(x[nod]);
70 for(
int nod = 0; nod < numNodes; nod++) out->push_back(y[nod]);
71 for(
int nod = 0; nod < numNodes; nod++) out->push_back(
z[nod]);
74 for(
int nod = 0; nod < numNodes; nod++)
75 for(
int comp = 0; comp < numComp; comp++)
76 data1->
getValue(step, ent, ele, nod, comp,
77 val[numComp * nod + comp]);
78 for(
int nod = 0; nod < numNodes; nod++) {
93 double time = data1->
getTime(i);
94 data2->
Time.push_back(time);
StringXNumber * getOption(int iopt)
virtual bool skipElement(int step, int ent, int ele, bool checkVisibility=false, int samplingRate=1)
virtual int getNumTimeSteps()=0
virtual int getNode(int step, int ent, int ele, int nod, double &x, double &y, double &z)
static void Error(const char *fmt,...)
std::vector< double > * incrementList(int numComp, int type, int numNodes=0)
void f(int n, double u, double *val)
virtual void getValue(int step, int ent, int ele, int idx, double &val)
virtual bool hasMultipleMeshes()
virtual int getNumEntities(int step=-1)
virtual void setFileName(const std::string &val)
std::string getHelp() const
virtual int getDimension(int step, int ent, int ele)
virtual double getTime(int step)
virtual int getType(int step, int ent, int ele)
virtual bool hasTimeStep(int step)
virtual int getNumNodes(int step, int ent, int ele)
bool finalize(bool computeMinMax=true, const std::string &interpolationScheme="")
virtual void setName(const std::string &val)
GMSH_Plugin * GMSH_RegisterCurlPlugin()
element * create(int numNodes, int dimension, double *x, double *y, double *z, bool copy=false)
virtual int getNumComponents(int step, int ent, int ele)
virtual PView * getView(int index, PView *view)
virtual PViewData * getPossiblyAdaptiveData(PView *view)
std::vector< double > Time
virtual void getNode(int num, double &u, double &v, double &w)=0
virtual int getNumElements(int step=-1, int ent=-1)
virtual std::string getName()
void interpolateCurl(double val[], double u, double v, double w, double f[3], int stride=3)
StringXNumber CurlOptions_Number[]
virtual PViewDataList * getDataList(PView *view, bool showError=true)
virtual int getFirstNonEmptyTimeStep(int start=0)