Skip to content
Snippets Groups Projects
Commit cde24cd0 authored by Koen Hillewaert's avatar Koen Hillewaert
Browse files

solved incompatibility issue with old periodicity conventions for Argo

parent 62e04ba7
No related branches found
No related tags found
No related merge requests found
...@@ -707,7 +707,7 @@ int GModel::_readMSH2(const std::string &name) ...@@ -707,7 +707,7 @@ int GModel::_readMSH2(const std::string &name)
if(feof(fp)) if(feof(fp))
break; break;
if(!strncmp(&str[1], "Periodic",8)) { if(!strncmp(&str[1], "Periodic",8) && strlen(&str[1]) == 8) {
readMSHPeriodicNodes(fp,this); readMSHPeriodicNodes(fp,this);
break; break;
} }
......
...@@ -6610,9 +6610,11 @@ void addPeriodicFace(int iTarget, int iSource, ...@@ -6610,9 +6610,11 @@ void addPeriodicFace(int iTarget, int iSource,
else{ else{
GFace *target = GModel::current()->getFaceByTag(abs(iTarget)); GFace *target = GModel::current()->getFaceByTag(abs(iTarget));
GFace *source = GModel::current()->getFaceByTag(abs(iSource)); GFace *source = GModel::current()->getFaceByTag(abs(iSource));
if (!target) Msg::Error("Could not find edge %d for periodic copy from %d", if (!target || !master) {
iTarget,iSource); Msg::Error("Could not find edge slave %d or master %d for periodic copy",
target->setMeshMaster(source, affineTransform); iTarget,iSource);
}
else target->setMeshMaster(source, affineTransform);
} }
} }
...@@ -6626,7 +6628,7 @@ void addPeriodicFace(int iTarget, int iSource, ...@@ -6626,7 +6628,7 @@ void addPeriodicFace(int iTarget, int iSource,
for (; sIter != edgeCounterparts.end(); ++sIter) { for (; sIter != edgeCounterparts.end(); ++sIter) {
Msg::Info("%d - %d", sIter->first, sIter->second); Msg::Info("%d - %d", sIter->first, sIter->second);
} }
if (target) { if (target) {
GEO_Internals::MasterFace& mf = GEO_Internals::MasterFace& mf =
GModel::current()->getGEOInternals()->periodicFaces[iTarget]; GModel::current()->getGEOInternals()->periodicFaces[iTarget];
...@@ -6637,10 +6639,11 @@ void addPeriodicFace(int iTarget, int iSource, ...@@ -6637,10 +6639,11 @@ void addPeriodicFace(int iTarget, int iSource,
else{ else{
GFace *target = GModel::current()->getFaceByTag(abs(iTarget)); GFace *target = GModel::current()->getFaceByTag(abs(iTarget));
GFace *source = GModel::current()->getFaceByTag(abs(iSource)); GFace *source = GModel::current()->getFaceByTag(abs(iSource));
if (!target || !source) if (!target || !source) {
Msg::Error("Could not find surface %d or %d for periodic copy", Msg::Error("Could not find surface slave %d or master %d for periodic copy",
iTarget,iSource); iTarget,iSource);
target->setMeshMaster(source, edgeCounterparts); }
else target->setMeshMaster(source, edgeCounterparts);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment