Skip to content
Snippets Groups Projects
Commit f7aa3ebe authored by Karsten Rink's avatar Karsten Rink
Browse files

added node ording test to validation method of element types

parent 682a5368
No related branches found
No related tags found
No related merge requests found
...@@ -170,6 +170,7 @@ ElementErrorCode TemplateHex<NNODES,CELLHEXTYPE>::validate() const ...@@ -170,6 +170,7 @@ ElementErrorCode TemplateHex<NNODES,CELLHEXTYPE>::validate() const
error_code |= quad->validate(); error_code |= quad->validate();
delete quad; delete quad;
} }
error_code[ElementErrorFlag::NodeOrder] = !this->testElementNodeOrder();
return error_code; return error_code;
} }
......
...@@ -179,6 +179,7 @@ ElementErrorCode TemplatePrism<NNODES,CELLPRISMTYPE>::validate() const ...@@ -179,6 +179,7 @@ ElementErrorCode TemplatePrism<NNODES,CELLPRISMTYPE>::validate() const
error_code.set(ElementErrorFlag::NodeOrder); error_code.set(ElementErrorFlag::NodeOrder);
delete quad; delete quad;
} }
error_code[ElementErrorFlag::NodeOrder] = !this->testElementNodeOrder();
return error_code; return error_code;
} }
......
...@@ -174,7 +174,10 @@ ElementErrorCode TemplatePyramid<NNODES,CELLPYRAMIDTYPE>::validate() const ...@@ -174,7 +174,10 @@ ElementErrorCode TemplatePyramid<NNODES,CELLPYRAMIDTYPE>::validate() const
const MeshLib::Quad* base (dynamic_cast<const MeshLib::Quad*>(this->getFace(4))); const MeshLib::Quad* base (dynamic_cast<const MeshLib::Quad*>(this->getFace(4)));
if (base) if (base)
{
error_code |= base->validate(); error_code |= base->validate();
error_code[ElementErrorFlag::NodeOrder] = !this->testElementNodeOrder();
}
else else
error_code.set(ElementErrorFlag::NodeOrder); error_code.set(ElementErrorFlag::NodeOrder);
delete base; delete base;
......
...@@ -129,6 +129,7 @@ ElementErrorCode TemplateQuad<NNODES,CELLQUADTYPE>::validate() const ...@@ -129,6 +129,7 @@ ElementErrorCode TemplateQuad<NNODES,CELLQUADTYPE>::validate() const
if (!error_code[ElementErrorFlag::ZeroVolume]) if (!error_code[ElementErrorFlag::ZeroVolume])
error_code[ElementErrorFlag::NonConvex] = (!(GeoLib::dividedByPlane(*_nodes[0], *_nodes[2], *_nodes[1], *_nodes[3]) && error_code[ElementErrorFlag::NonConvex] = (!(GeoLib::dividedByPlane(*_nodes[0], *_nodes[2], *_nodes[1], *_nodes[3]) &&
GeoLib::dividedByPlane(*_nodes[1], *_nodes[3], *_nodes[0], *_nodes[2]))); GeoLib::dividedByPlane(*_nodes[1], *_nodes[3], *_nodes[0], *_nodes[2])));
error_code[ElementErrorFlag::NodeOrder] = !this->testElementNodeOrder();
return error_code; return error_code;
} }
......
...@@ -149,6 +149,7 @@ ElementErrorCode TemplateTet<NNODES,CELLTETTYPE>::validate() const ...@@ -149,6 +149,7 @@ ElementErrorCode TemplateTet<NNODES,CELLTETTYPE>::validate() const
{ {
ElementErrorCode error_code; ElementErrorCode error_code;
error_code[ElementErrorFlag::ZeroVolume] = this->hasZeroVolume(); error_code[ElementErrorFlag::ZeroVolume] = this->hasZeroVolume();
error_code[ElementErrorFlag::NodeOrder] = !this->testElementNodeOrder();
return error_code; return error_code;
} }
......
...@@ -85,6 +85,7 @@ ElementErrorCode TemplateTri<NNODES,CELLTRITYPE>::validate() const ...@@ -85,6 +85,7 @@ ElementErrorCode TemplateTri<NNODES,CELLTRITYPE>::validate() const
{ {
ElementErrorCode error_code; ElementErrorCode error_code;
error_code[ElementErrorFlag::ZeroVolume] = this->hasZeroVolume(); error_code[ElementErrorFlag::ZeroVolume] = this->hasZeroVolume();
error_code[ElementErrorFlag::NodeOrder] = !this->testElementNodeOrder();
return error_code; return error_code;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment