Skip to content
Snippets Groups Projects
Commit a7655294 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

pp

parent fedfe41d
No related branches found
No related tags found
No related merge requests found
...@@ -205,6 +205,7 @@ PView *GMSH_MathEvalPlugin::execute(PView *view) ...@@ -205,6 +205,7 @@ PView *GMSH_MathEvalPlugin::execute(PView *view)
int otherNumComp = (!otherData || octree) ? 9 : int otherNumComp = (!otherData || octree) ? 9 :
otherData->getNumComponents(timeBeg, ent, ele); otherData->getNumComponents(timeBeg, ent, ele);
std::vector<double> *out = data2->incrementList(numComp2, type, numNodes); std::vector<double> *out = data2->incrementList(numComp2, type, numNodes);
std::vector<double> v(std::max(9, numComp), 0.);
std::vector<double> w(std::max(9, otherNumComp), 0.); std::vector<double> w(std::max(9, otherNumComp), 0.);
std::vector<double> x(numNodes), y(numNodes), z(numNodes); std::vector<double> x(numNodes), y(numNodes), z(numNodes);
for(int nod = 0; nod < numNodes; nod++) for(int nod = 0; nod < numNodes; nod++)
...@@ -216,10 +217,8 @@ PView *GMSH_MathEvalPlugin::execute(PView *view) ...@@ -216,10 +217,8 @@ PView *GMSH_MathEvalPlugin::execute(PView *view)
if(!data1->hasTimeStep(step)) continue; if(!data1->hasTimeStep(step)) continue;
int step2 = (otherTimeStep < 0) ? step : otherTimeStep; int step2 = (otherTimeStep < 0) ? step : otherTimeStep;
for(int nod = 0; nod < numNodes; nod++){ for(int nod = 0; nod < numNodes; nod++){
std::vector<double> v(std::max(9, numComp), 0.);
for(int comp = 0; comp < numComp; comp++) for(int comp = 0; comp < numComp; comp++)
data1->getValue(step, ent, ele, nod, comp, v[comp]); data1->getValue(step, ent, ele, nod, comp, v[comp]);
values[0] = x[nod]; values[1] = y[nod]; values[2] = z[nod];
if(otherData){ if(otherData){
if(octree){ if(octree){
int qn = forceInterpolation ? numNodes : 0; int qn = forceInterpolation ? numNodes : 0;
...@@ -234,6 +233,7 @@ PView *GMSH_MathEvalPlugin::execute(PView *view) ...@@ -234,6 +233,7 @@ PView *GMSH_MathEvalPlugin::execute(PView *view)
for(int comp = 0; comp < otherNumComp; comp++) for(int comp = 0; comp < otherNumComp; comp++)
otherData->getValue(step2, ent, ele, nod, comp, w[comp]); otherData->getValue(step2, ent, ele, nod, comp, w[comp]);
} }
values[0] = x[nod]; values[1] = y[nod]; values[2] = z[nod];
for(int i = 0; i < 9; i++) values[3 + i] = v[i]; for(int i = 0; i < 9; i++) values[3 + i] = v[i];
for(int i = 0; i < 9; i++) values[12 + i] = w[i]; for(int i = 0; i < 9; i++) values[12 + i] = w[i];
if(f.eval(values, res)) if(f.eval(values, res))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment