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

fix regression in periodic lines (missing abs())

parent 0af53aef
No related branches found
No related tags found
No related merge requests found
...@@ -314,7 +314,8 @@ int GModel::importGEOInternals() ...@@ -314,7 +314,8 @@ int GModel::importGEOInternals()
add(f); add(f);
} }
else{ else{
if(s->Typ == MSH_SURF_PLAN) f->computeMeanPlane(); // recompute in case geom has changed if(s->Typ == MSH_SURF_PLAN)
f->computeMeanPlane(); // recompute in case geom has changed
f->resetMeshAttributes(); f->resetMeshAttributes();
} }
if(!s->Visible) f->setVisibility(0); if(!s->Visible) f->setVisibility(0);
...@@ -387,7 +388,7 @@ int GModel::importGEOInternals() ...@@ -387,7 +388,7 @@ int GModel::importGEOInternals()
int iTarget = peIter->first; int iTarget = peIter->first;
GEO_Internals::MasterEdge& me = peIter->second; GEO_Internals::MasterEdge& me = peIter->second;
int iSource = me.tag; int iSource = me.tag;
GEdge* target = getEdgeByTag(iTarget); GEdge* target = getEdgeByTag(abs(iTarget));
GEdge* source = getEdgeByTag(abs(iSource)); GEdge* source = getEdgeByTag(abs(iSource));
if(!target) if(!target)
Msg::Error("Unknown target line for periodic connection from %d to %d", Msg::Error("Unknown target line for periodic connection from %d to %d",
...@@ -395,11 +396,13 @@ int GModel::importGEOInternals() ...@@ -395,11 +396,13 @@ int GModel::importGEOInternals()
if(!source) if(!source)
Msg::Error("Unknown source line for periodic connection from %d to %d", Msg::Error("Unknown source line for periodic connection from %d to %d",
iTarget, iSource); iTarget, iSource);
if(target && source){
if(me.affineTransform.size() == 16) if(me.affineTransform.size() == 16)
target->setMeshMaster(source, me.affineTransform); target->setMeshMaster(source, me.affineTransform);
else else
target->setMeshMaster(source, me.tag > 0 ? 1 : -1); target->setMeshMaster(source, me.tag > 0 ? 1 : -1);
} }
}
std::map<int,GEO_Internals::MasterFace>::iterator pfIter = std::map<int,GEO_Internals::MasterFace>::iterator pfIter =
_geo_internals->periodicFaces.begin(); _geo_internals->periodicFaces.begin();
...@@ -415,11 +418,13 @@ int GModel::importGEOInternals() ...@@ -415,11 +418,13 @@ int GModel::importGEOInternals()
if(!source) if(!source)
Msg::Error("Unknown source surface for periodic connection from %d to %d", Msg::Error("Unknown source surface for periodic connection from %d to %d",
iTarget, iSource); iTarget, iSource);
if(target && source){
if(mf.affineTransform.size() == 16) if(mf.affineTransform.size() == 16)
target->setMeshMaster(source,mf.affineTransform); target->setMeshMaster(source,mf.affineTransform);
else else
target->setMeshMaster(source,mf.edgeCounterparts); target->setMeshMaster(source,mf.edgeCounterparts);
} }
}
Msg::Debug("Gmsh model (GModel) imported:"); Msg::Debug("Gmsh model (GModel) imported:");
Msg::Debug("%d Vertices", vertices.size()); Msg::Debug("%d Vertices", vertices.size());
......
2.13.0: new ONELAB 1.2 protocol with suppport for lists; new boundary recovery 2.13.0: new ONELAB 1.2 protocol with native support for lists; new 3D boundary
code; better adaptive visualization of quads and hexahedra; minor fixes. recovery code; better adaptive visualization of quads and hexahedra; minor
fixes.
2.12.0 (March 5, 2016): improved interactive definition of physical groups and 2.12.0 (March 5, 2016): improved interactive definition of physical groups and
handling of ONELAB clients; improved full quad algorithm; added support for list handling of ONELAB clients; improved full quad algorithm; added support for list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment