Skip to content
Snippets Groups Projects
Commit 27bcadf2 authored by Gaetan Bricteux's avatar Gaetan Bricteux
Browse files

fix saveTri

parent ecaab377
No related branches found
No related tags found
No related merge requests found
......@@ -624,7 +624,7 @@ void MElement::writeMSH(FILE *fp, double version, bool binary, int num,
int par = (parentNum) ? 1 : 0;
int dom = (dom1Num) ? 2 : 0;
bool poly = (type == MSH_POLYG_ || type == MSH_POLYH_ || type == MSH_POLYG_B);
bool polyb = (type == MSH_LIN_B );
bool polyl = (type == MSH_LIN_B || type == MSH_LIN_C);
// if poly loop over children
if(CTX::instance()->mesh.saveTri && poly){
......@@ -634,9 +634,10 @@ void MElement::writeMSH(FILE *fp, double version, bool binary, int num,
}
return;
}
else if (CTX::instance()->mesh.saveTri && polyb){
MLine *l = (MLine*)this;
else if(CTX::instance()->mesh.saveTri && polyl){
MLine *l = new MLine(getVertex(0), getVertex(1));
l->writeMSH(fp, version, binary, num, elementary, physical, 0, 0, 0, ghosts);
delete l;
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment