Skip to content
Snippets Groups Projects
Commit db1fcac6 authored by Ling Wu's avatar Ling Wu
Browse files

complete getMSHType of general elements

parent 939b3904
No related branches found
No related tags found
No related merge requests found
......@@ -567,6 +567,9 @@ class MHexahedronN : public MHexahedron {
virtual int getTypeForMSH() const
{
// (p+1)^3
if(_order == 1 && _vs.size() + 8 == 8) return MSH_HEX_8;
if(_order == 2 && _vs.size() + 8 == 20) return MSH_HEX_20;
if(_order == 2 && _vs.size() + 8 == 27) return MSH_HEX_27;
if(_order == 3 && _vs.size() + 8 == 64 ) return MSH_HEX_64;
if(_order == 4 && _vs.size() + 8 == 125) return MSH_HEX_125;
if(_order == 5 && _vs.size() + 8 == 216) return MSH_HEX_216;
......
......@@ -385,6 +385,7 @@ class MQuadrangleN : public MQuadrangle {
}
virtual int getTypeForMSH() const
{
if(_order==1 && _vs.size() + 4 == 4) return MSH_QUA_4;
if(_order==2 && _vs.size() + 4 == 8) return MSH_QUA_8;
if(_order==2 && _vs.size() + 4 == 9) return MSH_QUA_9;
if(_order==3 && _vs.size() + 4 == 12) return MSH_QUA_12;
......
......@@ -367,6 +367,8 @@ class MTetrahedronN : public MTetrahedron {
virtual int getTypeForMSH() const
{
// (p+1)*(p+2)*(p+3)/6
if(_order == 1 && _vs.size() + 4 == 4) return MSH_TET_4;
if(_order == 2 && _vs.size() + 4 == 10) return MSH_TET_10;
if(_order == 3 && _vs.size() + 4 == 20) return MSH_TET_20;
if(_order == 4 && _vs.size() + 4 == 34) return MSH_TET_34;
if(_order == 4 && _vs.size() + 4 == 35) return MSH_TET_35;
......
......@@ -310,6 +310,7 @@ class MTriangleN : public MTriangle {
}
virtual int getTypeForMSH() const
{
if(_order == 1 && _vs.size() == 0) return MSH_TRI_3;
if(_order == 2 && _vs.size() == 3) return MSH_TRI_6;
if(_order == 3 && _vs.size() == 6) return MSH_TRI_9;
if(_order == 3 && _vs.size() == 7) return MSH_TRI_10;
......
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