Skip to content

Commit 3bad070

Browse files
committed
add RPE
1 parent 7d443e6 commit 3bad070

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

include/aspect/mesh_deformation/external_tool_interface.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,7 @@ namespace aspect
181181

182182
std::vector<Point<dim>> evaluation_points;
183183

184-
// Timo: Replace by whatever type you need here
185-
class X {};
186-
std::unique_ptr<X> remote_point_evaluator;
184+
std::unique_ptr<Utilities::MPI::RemotePointEvaluation<dim, dim>> remote_point_evaluator;
187185
};
188186
}
189187
}

source/mesh_deformation/external_tool_interface.cc

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,11 @@ namespace aspect
8383
// for later function calls describe the same number of points.
8484
this->evaluation_points = evaluation_points;
8585

86-
// Then also invalidate the previous evaluator:
87-
remote_point_evaluator.reset();
88-
89-
// Timo:
90-
// TODO: Implement set-up phase via MPIRemotePointEvaluation
91-
86+
// Set up RemotePointEvaluation with a Mapping of the undeformed mesh:
87+
remote_point_evaluator = std::make_unique<Utilities::MPI::RemotePointEvaluation<dim, dim>>();
88+
// TODO: does this need to be a higher order mapping for spherical problems?
89+
static MappingQ<dim> mapping(1);
90+
remote_point_evaluator->reinit(this->evaluation_points, this->get_triangulation(), mapping);
9291

9392
// Finally, also ensure that upon mesh refinement, all of the
9493
// information set herein is invalidated:
@@ -97,8 +96,7 @@ namespace aspect
9796
{
9897
this->evaluation_points.clear();
9998
this->remote_point_evaluator.reset();
100-
}
101-
);
99+
});
102100
}
103101

104102

0 commit comments

Comments
 (0)