Skip to content

Commit

Permalink
Merge pull request #446 from SCOREC/joshia5-periodic-gface
Browse files Browse the repository at this point in the history
Fix logic checking periodic model faces
  • Loading branch information
cwsmith authored Sep 9, 2024
2 parents 2d470f9 + 2e031e0 commit 7cd7647
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ma/maSnap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -477,14 +477,16 @@ static void interpolateParametricCoordinatesOnRegularFace(
{
double range[2];
int dim = m->getModelType(g);
bool gface_isPeriodic = 0;
for (int d=0; d < dim; ++d) {
bool isPeriodic = m->getPeriodicRange(g,d,range);
if ((dim == 2) && (isPeriodic > 0)) gface_isPeriodic = 1;
p[d] = interpolateParametricCoordinate(t,a[d],b[d],range,isPeriodic, 0);
}

/* check if the new point is inside the model.
* otherwise re-run the above loop with last option
* in "interpolateParametricCoordinae" being 1.
* in "interpolateParametricCoordinate" being 1.
* Notes
* 1) we are assuming manifold surfaces
* 2) we only check for faces that are periodic
Expand All @@ -494,6 +496,8 @@ static void interpolateParametricCoordinatesOnRegularFace(
// this need to be done for faces, only
if (dim != 2)
return;
if (!gface_isPeriodic)
return;

Vector x;
bool ok;
Expand Down

0 comments on commit 7cd7647

Please sign in to comment.