Commit 9a2cd71e authored by Amaury Johnen's avatar Amaury Johnen

fix plugin Distance not able to write pos file when high-order elements

parent e4a51023
Pipeline #2989 passed with stage
in 15 minutes and 23 seconds
......@@ -121,7 +121,7 @@ void GMSH_DistancePlugin::printView(std::vector<GEntity *> _entities,
if(_entities[ii]->dim() == _maxDim) {
for(unsigned int i = 0; i < _entities[ii]->getNumMeshElements(); i++) {
MElement *e = _entities[ii]->getMeshElement(i);
int numNodes = e->getNumVertices();
int numNodes = e->getNumPrimaryVertices();
if(e->getNumChildren())
numNodes = e->getNumChildren() * e->getChild(0)->getNumVertices();
std::vector<double> x(numNodes), y(numNodes), z(numNodes);
......@@ -525,7 +525,7 @@ PView *GMSH_DistancePlugin::execute(PView *v)
it != allElems.end(); it++) {
MElement *e = *it;
int numNodes = e->getNumVertices();
int numNodes = e->getNumPrimaryVertices();
if(e->getType() == TYPE_POLYG)
numNodes = e->getNumChildren() * e->getChild(0)->getNumVertices();
std::vector<double> x(numNodes), y(numNodes), z(numNodes);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment