25 #include "libmesh/point_locator_base.h" 26 #include "libmesh/enum_point_locator_type.h" 49 "Factor to inflate or deflate the source app bounding boxes");
51 "fixed_bounding_box_size",
52 "fixed_bounding_box_size >= 0",
53 "Override source app bounding box size(s) for searches. App bounding boxes will still be " 54 "centered on the same coordinates. Only non-zero components passed will override.");
56 "extrapolation_constant",
58 "Constant to use when no source app can provide a valid value for a target location.");
59 MooseEnum extrap_options(
"none nearest-valid-target",
"none");
62 "Post treatment to apply to the field after the transfer");
65 params.
addParam<std::vector<SubdomainName>>(
67 "Subdomain restriction to transfer from (defaults to all the origin app domain)");
68 params.
addParam<std::vector<SubdomainName>>(
69 "to_blocks",
"Subdomain restriction to transfer to, (defaults to all the target app domain)");
72 params.
addParam<std::vector<BoundaryName>>(
74 "The boundary we are transferring from (if not specified, whole domain is used).");
75 params.
addParam<std::vector<BoundaryName>>(
77 "The boundary we are transferring to (if not specified, whole domain is used).");
78 MooseEnum nodes_or_sides(
"nodes sides",
"sides");
81 "Whether elemental variable boundary restriction is considered by " 82 "element side or element nodes");
85 params.
addParam<MeshDivisionName>(
"from_mesh_division",
86 "Mesh division object on the origin application");
87 params.
addParam<MeshDivisionName>(
"to_mesh_division",
88 "Mesh division object on the target application");
89 MooseEnum mesh_division_uses(
"spatial_restriction matching_division matching_subapp_index none",
93 "How to use the source mesh division in the transfer. See object " 94 "documentation for description of each option");
97 "How to use the target mesh division in the transfer. See object " 98 "documentation for description of each option");
101 params.
addParam<std::vector<unsigned int>>(
"source_variable_components",
102 std::vector<unsigned int>(),
103 "The source array or vector variable component(s).");
104 params.
addParam<std::vector<unsigned int>>(
"target_variable_components",
105 std::vector<unsigned int>(),
106 "The target array or vector variable component(s).");
112 "Whether or not to send a point to all the domains. If true, all the processors will be " 113 "checked for a given point." 114 "The code will be slow if this flag is on but it will give a better solution.");
118 "Whether or not to error in the case that a target point is not found in the source domain.");
119 params.
addParam<
bool>(
"use_bounding_boxes",
121 "When set to false, bounding boxes will not be used to restrict the source " 122 "of the transfer. Either source applications must be set using the " 123 "from_mesh_division parameter, or a greedy search must be used.");
127 "When True, transfers from a child application will work by finding the nearest (using " 128 "the `position` + mesh centroid) sub-app and query that app for the value to transfer.");
130 "use_nearest_position",
131 "Name of the the Positions object (in main app) such that transfers to/from a child " 132 "application will work by finding the nearest position to a target and query only the " 133 "app / points closer to this position than to any other position for the value to transfer.");
135 "from_app_must_contain_point",
137 "Wether on not the origin mesh must contain the point to evaluate data at. If false, this " 138 "allows for interpolation between origin app meshes. Origin app bounding boxes are still " 139 "considered so you may want to increase them with 'fixed_bounding_box_size'");
140 params.
addParam<
bool>(
"search_value_conflicts",
142 "Whether to look for potential conflicts between two valid and different " 143 "source values for any target point");
145 "value_conflicts_output",
147 "Maximum number of conflicts to output if value-conflicts, from equidistant sources to a " 148 "given transfer target location, search is turned on");
151 "to_blocks from_blocks to_boundaries from_boundaries elemental_boundary_restriction " 152 "from_mesh_division from_mesh_division_usage to_mesh_division to_mesh_division_usage",
153 "Transfer spatial restriction");
155 "greedy_search use_bounding_boxes use_nearest_app use_nearest_position " 156 "search_value_conflicts",
159 "Extrapolation behavior");
166 "ElementSideNeighborLayers",
171 obj_params.
get<
MooseEnum>(
"post_transfer_extrapolation") ==
"nearest-valid-target")
172 rm_params.
set<
unsigned short>(
"layers") = 2;
173 rm_params.
set<
bool>(
"use_displaced_mesh") = obj_params.
get<
bool>(
"displaced_target_mesh");
181 _from_var_components(getParam<
std::vector<unsigned
int>>(
"source_variable_components")),
182 _to_var_components(getParam<
std::vector<unsigned
int>>(
"target_variable_components")),
183 _use_bounding_boxes(getParam<bool>(
"use_bounding_boxes")),
184 _use_nearest_app(getParam<bool>(
"use_nearest_app")),
185 _nearest_positions_obj(
186 isParamValid(
"use_nearest_position")
187 ? &_fe_problem.getPositionsObject(getParam<PositionsName>(
"use_nearest_position"))
189 _source_app_must_contain_point(getParam<bool>(
"from_app_must_contain_point")),
190 _from_mesh_division_behavior(getParam<
MooseEnum>(
"from_mesh_division_usage")),
191 _to_mesh_division_behavior(getParam<
MooseEnum>(
"to_mesh_division_usage")),
192 _elemental_boundary_restriction_on_sides(
193 getParam<
MooseEnum>(
"elemental_boundary_restriction") ==
"sides"),
194 _greedy_search(getParam<bool>(
"greedy_search")),
195 _search_value_conflicts(getParam<bool>(
"search_value_conflicts")),
196 _already_output_search_value_conflicts(false),
197 _search_value_conflicts_max_log(getParam<unsigned
int>(
"value_conflicts_output")),
198 _post_transfer_extrapolation(getParam<
MooseEnum>(
"post_transfer_extrapolation")),
199 _error_on_miss(getParam<bool>(
"error_on_miss")),
200 _default_extrapolation_value(getParam<
Real>(
"extrapolation_constant")),
201 _bbox_factor(getParam<
Real>(
"bbox_factor")),
202 _fixed_bbox_size(isParamValid(
"fixed_bounding_box_size")
203 ? getParam<
std::vector<
Real>>(
"fixed_bounding_box_size")
208 paramError(
"variable",
"The number of variables to transfer to and from should be equal");
213 "This parameter must be equal to the number of source variables");
216 "This parameter must be equal to the number of target variables");
222 paramError(
"use_nearest_app",
"Cannot use nearest-app and nearest-position together");
225 "Should have a 'from_multiapp' when using the nearest-app informed search");
226 auto pos_params =
_app.
getFactory().getValidParams(
"MultiAppPositions");
227 pos_params.set<std::vector<MultiAppName>>(
"multiapps") = {
getFromMultiApp()->name()};
237 "Extrapolation (nearest-source options, outside-app source) parameters have " 238 "been passed, but no subapp bounding box expansion parameters have been passed.");
243 "Cannot pass additional bounding box parameters (sizes, expansion, etc) if we are " 244 "not using bounding boxes");
259 const auto & block_names = getParam<std::vector<SubdomainName>>(
"from_blocks");
261 for (
const auto & b : block_names)
263 paramError(
"from_blocks",
"The block '", b,
"' was not found in the mesh");
265 if (!block_names.empty())
267 const auto ids = from_moose_mesh.getSubdomainIDs(block_names);
274 const auto & boundary_names = getParam<std::vector<BoundaryName>>(
"from_boundaries");
275 for (
const auto & bn : boundary_names)
277 paramError(
"from_boundaries",
"The boundary '", bn,
"' was not found in the mesh");
279 if (!boundary_names.empty())
281 const auto boundary_ids = from_moose_mesh.getBoundaryIDs(boundary_names);
288 const auto & mesh_div_name = getParam<MeshDivisionName>(
"from_mesh_division");
294 mooseInfo(
"'from_mesh_division_usage' is set to use a spatial restriction but the " 295 "'from_mesh_division' for source app of global index " +
297 " covers the entire mesh. Do not expect any restriction from a mesh " 298 "division that covers the entire mesh");
303 "Source mesh division cannot match target mesh division if no target mesh " 304 "division is specified");
309 "Cannot match source mesh division index to target subapp index if there is " 310 "only one target: the parent app (not a subapp)");
313 mooseWarning(
"Attempting to match target subapp index with the number of source mesh " 314 "divisions, which is " +
316 " while there are " + std::to_string(
getToMultiApp()->numGlobalApps()) +
322 "We do not support using target subapp index for source division behavior and " 323 "matching the division index for the target mesh division behavior.");
326 paramError(
"from_mesh_division_usage",
"User must specify a 'from_mesh_division_usage'");
330 "'from_mesh_division' must be specified if the usage method is specified");
339 const auto & block_names = getParam<std::vector<SubdomainName>>(
"to_blocks");
340 for (
const auto & b : block_names)
342 paramError(
"to_blocks",
"The block '", b,
"' was not found in the mesh");
344 if (!block_names.empty())
346 const auto ids = to_moose_mesh.getSubdomainIDs(block_names);
353 const auto & boundary_names = getParam<std::vector<BoundaryName>>(
"to_boundaries");
354 for (
const auto & bn : boundary_names)
356 paramError(
"to_boundaries",
"The boundary '", bn,
"' was not found in the mesh");
358 if (!boundary_names.empty())
360 const auto boundary_ids = to_moose_mesh.getBoundaryIDs(boundary_names);
367 const auto & mesh_div_name = getParam<MeshDivisionName>(
"to_mesh_division");
373 mooseInfo(
"'to_mesh_division_usage' is set to use a spatial restriction but the " 374 "'to_mesh_division' for target application of global index " +
376 " covers the entire mesh. Do not expect any restriction from a mesh " 377 "division that covers the entire mesh");
383 "Target mesh division cannot match source mesh division if no source mesh " 384 "division is specified");
387 mooseWarning(
"Source and target mesh divisions do not have the same number of bins. If " 388 "this is what you expect, please reach out to a MOOSE or app developer to " 389 "ensure appropriate use");
395 "to_mesh_division_usage",
396 "Cannot match target mesh division index to source subapp index if there is only one " 397 "source: the parent app (not a subapp)");
399 mooseWarning(
"Attempting to match source subapp index with the number of target mesh " 400 "divisions, which is " +
402 " while there are " + std::to_string(
getFromMultiApp()->numGlobalApps()) +
406 "from_mesh_division_usage",
407 "We do not support using source subapp index for the target division behavior and " 408 "matching the division index for the source mesh division behavior.");
411 paramError(
"to_mesh_division_usage",
"User must specify a 'to_mesh_division_usage'");
415 "'to_mesh_division' must be specified if usage method '" +
430 paramError(
"source_variable_components",
"Component must be passed for an array variable");
433 "Component passed is larger than size of variable");
446 paramError(
"target_variable_components",
"Component must be passed for an array variable");
449 "Component passed is larger than size of variable");
483 "MultiAppGeneralFieldTransfer::execute()_" +
name(), 5,
"Transfer execution " +
name());
533 mooseAssert(i <
_var_size,
"The variable of index " << i <<
" does not exist");
549 auto gather_functor =
551 const std::vector<std::pair<Point, unsigned int>> & incoming_locations,
552 std::vector<std::pair<Real, Real>> & outgoing_vals)
554 outgoing_vals.resize(
555 incoming_locations.size(),
566 auto action_functor = [
this, &i, &dofobject_to_valsvec, &interp_caches, &distance_caches](
568 const std::vector<std::pair<Point, unsigned int>> & my_outgoing_points,
569 const std::vector<std::pair<Real, Real>> & incoming_vals)
579 dofobject_to_valsvec,
586 const std::pair<Real, Real> * ex =
nullptr;
587 libMesh::Parallel::pull_parallel_vector_data(
588 comm(), outgoing_points, gather_functor, action_functor, ex);
603 std::set<processor_id_type> & processors)
630 for (
unsigned int i_from = from0; i_from < from0 +
_froms_per_proc[i_proc]; ++i_from)
634 processors.insert(i_proc);
637 mooseAssert(i_from <
getFromMultiApp()->numGlobalApps(),
"We should not reach this");
642 "Should only be one source processor when using more processors than source apps");
656 if (
distance < nearest_max_distance)
660 unsigned int from0 = 0;
664 for (
unsigned int i_from = from0; i_from < from0 +
_froms_per_proc[i_proc]; ++i_from)
671 processors.insert(i_proc);
682 processors.insert(i_proc);
697 if (target_div == saved_target_div)
700 saved_target_div = target_div;
707 processors.insert(i_proc);
713 mooseError(
"No algorithm were selected to find which processes may send value data " 714 "for a each target point. Please either specify using bounding boxes, " 715 "greedy search, or to_mesh_division-based parameters");
720 "Cannot find a source application to provide a value at point: ",
723 "It must be that mismatched meshes, between the source and target application, are being " 724 "used.\nIf you are using the bounding boxes or nearest-app heuristics, or mesh-divisions, " 725 "please consider using the greedy_search to confirm. Then consider choosing a different " 726 "transfer type.\nThis check can be turned off by setting 'error_on_miss' to false. The " 727 "'extrapolation_constant' parameter will be used to set the local value at missed points.");
733 const unsigned int problem_id,
736 std::set<processor_id_type> processors;
744 for (
const auto pid : processors)
747 unsigned int required_source_division = 0;
761 outgoing_points[pid].push_back(std::pair<Point, unsigned int>(
point, required_source_division));
792 auto sys_num = to_sys->
number();
799 const auto & to_mesh = to_moose_mesh.getMesh();
802 if (fe_type.order >
CONSTANT && !is_nodal)
807 const std::vector<unsigned int> varvec(1, var_num);
813 request_gather(*to_sys, f, &g, nullsetter, varvec);
817 mooseError(
"Higher order discontinuous elemental variables are not supported for " 819 "restricted transfers");
824 mooseError(
"Higher order variable support not implemented for target mesh division " 825 "unless the mesh is fully covered / indexed in the mesh division. This must be " 826 "set programmatically in the MeshDivision object used.");
831 ? to_mesh.active_local_elements_begin()
832 : to_mesh.active_local_subdomain_set_elements_begin(
_to_blocks);
835 ? to_mesh.active_local_elements_end()
836 : to_mesh.active_local_subdomain_set_elements_end(
_to_blocks);
840 request_gather.
project(to_elem_range);
847 (*
_to_transforms[global_i_to])(p), point_id++, i_to, outgoing_points);
851 mooseError(
"We don't currently support variables with gradient degrees of freedom");
855 for (
const auto & node : to_mesh.local_node_ptr_range())
858 if (node->n_dofs(sys_num, var_num) < 1)
879 (*
_to_transforms[global_i_to])(*node), node->id(), i_to, outgoing_points);
884 for (
const auto & elem :
885 as_range(to_mesh.local_elements_begin(), to_mesh.local_elements_end()))
888 if (elem->n_dofs(sys_num, var_num) < 1)
920 unsigned int local_start = 0;
926 local_bboxes[i_from] =
_from_bboxes[local_start + i_from];
932 const unsigned int var_index,
933 std::vector<PointInfo> & pointInfoVec,
934 const std::vector<std::pair<Point, unsigned int>> & point_requests,
935 const std::vector<std::pair<Real, Real>> & incoming_vals,
940 mooseAssert(pointInfoVec.size() == incoming_vals.size(),
941 "Number of dof objects does not equal to the number of incoming values");
944 for (
const auto & pointinfo : pointInfoVec)
947 const auto problem_id = pointinfo.problem_id;
948 const auto dof_object_id = pointinfo.dof_object_id;
957 if (fe_type.order >
CONSTANT && !is_nodal)
960 InterpCache & value_cache = interp_caches[problem_id];
961 InterpCache & distance_cache = distance_caches[problem_id];
963 point_requests[val_offset].first);
964 const Number val = incoming_vals[val_offset].first;
967 if (!distance_cache.
hasKey(p))
974 value_cache.
hasKey(p) != 0 && !MooseUtils::absoluteFuzzyEqual(value_cache[p], val) &&
975 MooseUtils::absoluteFuzzyEqual(distance_cache[p], incoming_vals[val_offset].second))
976 registerConflict(problem_id, dof_object_id, p, incoming_vals[val_offset].second,
false);
981 MooseUtils::absoluteFuzzyGreaterThan(distance_cache[p], incoming_vals[val_offset].second))
986 value_cache[p] = val;
987 distance_cache[p] = incoming_vals[val_offset].second;
999 const DofObject * dof_object_ptr =
nullptr;
1000 const auto sys_num = to_sys.number();
1003 dof_object_ptr = to_mesh.
node_ptr(dof_object_id);
1006 dof_object_ptr = to_mesh.
elem_ptr(dof_object_id);
1011 mooseAssert(dof_object_ptr->
n_dofs(sys_num, var_num) == 1,
1012 "Unexpectedly found " << dof_object_ptr->
n_dofs(sys_num, var_num)
1013 <<
"dofs instead of 1");
1016 auto & dofobject_to_val = dofobject_to_valsvec[problem_id];
1019 auto values_ptr = dofobject_to_val.find(dof_object_id);
1021 if (values_ptr == dofobject_to_val.end())
1024 auto & val = dofobject_to_val[dof_object_id];
1026 val.interp = incoming_vals[val_offset].first;
1030 val.distance = incoming_vals[val_offset].second;
1034 auto & val = values_ptr->second;
1038 incoming_vals[val_offset].first,
1040 incoming_vals[val_offset].second))
1046 "Registration of received equi-distant value conflict");
1047 registerConflict(problem_id, dof_object_id, p, incoming_vals[val_offset].second,
false);
1058 (MooseUtils::absoluteFuzzyGreaterThan(val.distance, incoming_vals[val_offset].second) ||
1060 MooseUtils::absoluteFuzzyEqual(val.distance, incoming_vals[val_offset].second))))
1062 val.interp = incoming_vals[val_offset].first;
1064 val.distance = incoming_vals[val_offset].second;
1087 const unsigned int var_index,
1099 const auto potential_conflict = *conflict_it;
1100 bool overlap_found =
false;
1103 const unsigned int problem_id = std::get<0>(potential_conflict);
1104 const dof_id_type dof_object_id = std::get<1>(potential_conflict);
1105 const Point p = std::get<2>(potential_conflict);
1116 if (fe_type.order >
CONSTANT && !is_nodal)
1118 auto cached_distance = distance_caches[problem_id].find(p);
1119 if (cached_distance == distance_caches[problem_id].end())
1120 mooseError(
"Conflict point was not found in the map of all origin-target distances");
1122 if (MooseUtils::absoluteFuzzyEqual(cached_distance->second,
distance))
1123 overlap_found =
true;
1126 else if (MooseUtils::absoluteFuzzyEqual(
1127 dofobject_to_valsvec[problem_id].
find(dof_object_id)->second.distance,
distance))
1128 overlap_found =
true;
1140 const unsigned int var_index,
1155 std::vector<std::tuple<Point, Real>> potential_conflicts;
1163 const auto potential_conflict = *conflict_it;
1164 const unsigned int i_from = std::get<0>(potential_conflict);
1165 Point p = std::get<2>(potential_conflict);
1176 potential_conflicts.push_back(std::make_tuple(p,
distance));
1180 std::sort(potential_conflicts.begin(), potential_conflicts.end());
1181 potential_conflicts.erase(unique(potential_conflicts.begin(),
1182 potential_conflicts.end(),
1186 std::abs(std::get<1>(l) - std::get<1>(r)) < TOLERANCE;
1188 potential_conflicts.end());
1190 std::vector<std::tuple<Point, Real>> real_conflicts;
1191 real_conflicts.reserve(potential_conflicts.size());
1194 for (
auto conflict_it = potential_conflicts.begin(); conflict_it != potential_conflicts.end();
1198 auto potential_conflict = *conflict_it;
1199 const Point p = std::get<0>(potential_conflict);
1204 bool target_found =
false;
1205 bool conflict_real =
false;
1220 if (fe_type.order >
CONSTANT && !is_nodal)
1223 auto cached_distance = distance_caches[i_to].find(local_p);
1224 if (cached_distance != distance_caches[i_to].end())
1226 target_found =
true;
1229 if (MooseUtils::absoluteFuzzyEqual(cached_distance->second,
distance))
1230 conflict_real =
true;
1238 auto pl =
_to_problems[i_to]->mesh().getPointLocator();
1239 pl->enable_out_of_mesh_mode();
1242 auto node = pl->locate_node(local_p);
1245 dof_object_id = node->id();
1249 auto elem = (*pl)(local_p);
1251 dof_object_id = elem->id();
1253 pl->disable_out_of_mesh_mode();
1260 if (dofobject_to_valsvec[i_to].
find(dof_object_id) == dofobject_to_valsvec[i_to].end())
1263 target_found =
true;
1266 if (MooseUtils::absoluteFuzzyEqual(
1267 dofobject_to_valsvec[i_to].
find(dof_object_id)->second.distance,
distance))
1268 conflict_real =
true;
1272 if (target_found && conflict_real)
1273 real_conflicts.push_back(potential_conflict);
1286 const auto potential_conflict = *conflict_it;
1287 const unsigned int i_from = std::get<0>(potential_conflict);
1288 Point p = std::get<2>(potential_conflict);
1297 if (std::find_if(real_conflicts.begin(),
1298 real_conflicts.end(),
1303 }) == real_conflicts.end())
1312 const unsigned int var_index,
1325 unsigned int num_outputs = 0;
1326 std::string local_conflicts_string =
"";
1327 std::string potential_reasons =
1328 "Are some points in target mesh equidistant from the sources " 1329 "(nodes/centroids/apps/positions, depending on transfer) in origin mesh(es)?\n";
1331 potential_reasons +=
"Are multiple subapps overlapping?\n";
1334 const unsigned int problem_id = std::get<0>(conflict);
1335 Point p = std::get<2>(conflict);
1338 std::string origin_domain_message;
1347 origin_domain_message =
"In source child app " + std::to_string(app_id) +
" mesh,";
1357 origin_domain_message =
"In target app mesh,";
1360 origin_domain_message =
"In reference (post-coordinate collapse) mesh,";
1363 origin_domain_message =
"In source parent app mesh,";
1366 local_conflicts_string += origin_domain_message +
" point: (" + std::to_string(p(0)) +
1367 ", " + std::to_string(p(1)) +
", " + std::to_string(p(2)) +
1368 "), equi-distance: " + std::to_string(std::get<3>(conflict)) +
1371 local_conflicts_string +=
1372 "Maximum output of the search for value conflicts has been reached. Further conflicts " 1373 "will not be output.\nIncrease 'search_value_conflicts_max_log' to output more.";
1379 ", multiple valid values from equidistant points were " 1380 "found in the origin mesh for source " +
1382 " target points.\n" + potential_reasons +
"Conflicts detected at :\n" +
1383 local_conflicts_string);
1389 unsigned int num_outputs = 0;
1390 std::string received_conflicts_string =
"";
1391 std::string potential_reasons =
1392 "Are some points in target mesh equidistant from the sources " 1393 "(nodes/centroids/apps/positions, depending on transfer) in origin mesh(es)?\n";
1395 potential_reasons +=
"Are multiple subapps overlapping?\n";
1399 const unsigned int problem_id = std::get<0>(conflict);
1400 const Point p = std::get<2>(conflict);
1403 std::string target_domain_message;
1407 target_domain_message =
"In target child app " + std::to_string(app_id) +
" mesh,";
1410 target_domain_message =
"In target parent app mesh,";
1413 received_conflicts_string += target_domain_message +
" point: (" + std::to_string(p(0)) +
1414 ", " + std::to_string(p(1)) +
", " + std::to_string(p(2)) +
1415 "), equi-distance: " + std::to_string(std::get<3>(conflict)) +
1418 received_conflicts_string +=
1419 "Maximum output of the search for value conflicts has been reached. Further conflicts " 1420 "will not be output.\nIncrease 'search_value_conflicts_max_log' to output more.";
1423 ", multiple valid values from equidistant points were " 1424 "received for target variable '" +
1426 " target points.\n" + potential_reasons +
"Conflicts detected at :\n" +
1427 received_conflicts_string);
1433 mooseInfo(
"Automated diagnosis did not detect floating point indetermination in transfer");
1436 "Automated diagnosis did not detect any floating point indetermination in " 1437 "the transfer. You may consider turning it off using `search_value_conflicts=false` " 1438 "to improve performance/scalability.");
1449 const unsigned int var_index,
1458 auto & dofobject_to_val = dofobject_to_valsvec[problem_id];
1470 auto sys_num = to_sys->
number();
1475 if (fe_type.order >
CONSTANT && !is_nodal)
1485 const std::vector<unsigned int> varvec(1, var_num);
1491 set_solution(*to_sys, f,
nullptr, setter, varvec);
1495 ? to_mesh.active_local_elements_begin()
1496 : to_mesh.active_local_subdomain_set_elements_begin(
_to_blocks);
1499 ? to_mesh.active_local_elements_end()
1500 : to_mesh.active_local_subdomain_set_elements_end(
_to_blocks);
1504 set_solution.
project(active_local_elem_range);
1508 for (
const auto & val_pair : dofobject_to_val)
1510 const auto dof_object_id = val_pair.first;
1514 dof_object = to_mesh.
node_ptr(dof_object_id);
1516 dof_object = to_mesh.
elem_ptr(dof_object_id);
1518 const auto dof = dof_object->
dof_number(sys_num, var_num, 0);
1519 const auto val = val_pair.second.interp;
1524 const auto target_location =
1528 const auto info_msg =
"\nThis check can be turned off by setting 'error_on_miss' to " 1529 "false. The 'extrapolation_constant' parameter will be used to set " 1530 "the local value at missed points.";
1535 " could be located. Node details:\n",
1536 _to_meshes[problem_id]->nodePtr(dof_object_id)->get_info(),
1543 " could be located. Element details:\n",
1544 _to_meshes[problem_id]->elemPtr(dof_object_id)->get_info(),
1565 to_sys->
solution->set(dof, missing_value);
1581 const std::vector<BoundingBox> & local_bboxes,
1583 const unsigned int only_from_mesh_div,
1584 Real & distance)
const 1592 const auto transformed_pt =
1611 Point nearest_position_source;
1622 mooseError(
"Rotation and scaling currently unsupported with nearest positions transfer.");
1625 const Real distance_to_position_nearest_source = (pt - nearest_position_source).
norm();
1626 const Real distance_to_nearest_position = (pt - nearest_position).
norm();
1632 if (!MooseUtils::absoluteFuzzyEqual(distance_to_position_nearest_source,
1633 distance_to_nearest_position))
1637 distance = distance_to_position_nearest_source;
1643 !
inMesh(pl, transformed_pt))
1651 const unsigned int var_index,
1662 auto & dofobject_to_val = dofobject_to_valsvec[problem_id];
1674 auto sys_num = to_sys->
number();
1686 if (fe_type.order >
CONSTANT && !is_nodal)
1688 "Nearest-valid-target is not implemented for higher order elemental variables");
1689 const auto & node_to_elem_map =
1692 for (
const auto & val_pair : dofobject_to_val)
1694 const auto dof_object_id = val_pair.first;
1699 dof_object = to_mesh.
node_ptr(dof_object_id);
1701 dof_object = to_mesh.
elem_ptr(dof_object_id);
1702 const auto dof = dof_object->
dof_number(sys_num, var_num, 0);
1703 const auto val = val_pair.second.interp;
1706 Real nearest_value = 0.;
1712 const auto node = to_mesh.
node_ptr(dof_object_id);
1716 for (
const auto & elem_id : libmesh_map_find(node_to_elem_map, node->id()))
1718 const auto elem = to_mesh.
elem_ptr(elem_id);
1719 for (
const auto & elem_node : elem->node_ref_range())
1728 if (distance_sq < min_distance_sq && elem_node.id() != node->id())
1730 if (
auto it = dofobject_to_val.find(elem_node.id());
1731 it != dofobject_to_val.end() &&
1734 min_distance_sq = distance_sq;
1735 min_dist_id = elem_node.id();
1736 nearest_value = it->second.interp;
1738 else if (elem_node.n_dofs(sys_num, var_num) > 0)
1740 const auto other_dof = elem_node.dof_number(sys_num, var_num, 0);
1750 min_distance_sq = distance_sq;
1751 min_dist_id = elem_node.id();
1752 nearest_value = sol_val;
1766 const auto elem = to_mesh.
elem_ptr(dof_object_id);
1768 for (
const auto neigh : elem->neighbor_ptr_range())
1772 Real distance_sq = (neigh->vertex_average() - elem->vertex_average()).
norm_sq();
1773 if (distance_sq < min_distance_sq)
1775 if (
auto it = dofobject_to_val.find(neigh->id());
1776 it != dofobject_to_val.end() &&
1779 min_distance_sq = distance_sq;
1780 min_dist_id = neigh->id();
1781 nearest_value = it->second.interp;
1784 else if (neigh->n_dofs(sys_num, var_num) > 0)
1786 const auto other_dof = neigh->dof_number(sys_num, var_num, 0);
1794 nearest_value = sol_val;
1795 min_distance_sq = distance_sq;
1796 min_dist_id = neigh->id();
1812 to_sys->
solution->set(dof, nearest_value);
1818 flagSolutionWarning(
1819 "Search for the valid target nearest from a target point for which no " 1820 "values were found (and thus extrapolation is required) failed. This warning will " 1821 "not be repeated on the console for further failures.");
1838 return (elem !=
nullptr);
1843 const Elem * elem)
const 1851 const Elem * elem)
const 1859 const Node * node)
const 1861 const auto & node_blocks =
mesh.getNodeBlockIds(*node);
1862 std::set<SubdomainID> u;
1863 std::set_intersection(
blocks.begin(),
1865 node_blocks.begin(),
1867 std::inserter(u, u.begin()));
1877 return (elem !=
nullptr);
1883 const Node * node)
const 1886 std::vector<BoundaryID> vec_to_fill;
1888 std::set<BoundaryID> vec_to_fill_set(vec_to_fill.begin(), vec_to_fill.end());
1889 std::set<BoundaryID> u;
1890 std::set_intersection(boundaries.begin(),
1892 vec_to_fill_set.begin(),
1893 vec_to_fill_set.end(),
1894 std::inserter(u, u.begin()));
1901 const Elem * elem)
const 1905 std::vector<BoundaryID> vec_to_fill;
1906 std::vector<BoundaryID> vec_to_fill_temp;
1911 vec_to_fill.insert(vec_to_fill.end(), vec_to_fill_temp.begin(), vec_to_fill_temp.end());
1917 vec_to_fill.insert(vec_to_fill.end(), vec_to_fill_temp.begin(), vec_to_fill_temp.end());
1919 std::set<BoundaryID> vec_to_fill_set(vec_to_fill.begin(), vec_to_fill.end());
1922 std::set<BoundaryID> u;
1923 std::set_intersection(boundaries.begin(),
1925 vec_to_fill_set.begin(),
1926 vec_to_fill_set.end(),
1927 std::inserter(u, u.begin()));
1933 const std::set<SubdomainID> & block_restriction,
1940 if (block_restriction.empty())
1941 elem = (*pl)(
point);
1943 elem = (*pl)(
point, &block_restriction);
1952 const Point & pt,
const unsigned int i_local,
const unsigned int only_from_this_mesh_div)
const 1966 source_mesh_div != only_from_this_mesh_div)
1971 source_mesh_div != only_from_this_mesh_div)
1985 paramError(
"skip_coordinate_collapsing",
"Coordinate collapsing not implemented");
1996 Real distance_to_position_at_index = (pt - nearest_position_at_index).
norm();
1997 const Real distance_to_nearest_position = (pt - nearest_position).
norm();
1999 if (!MooseUtils::absoluteFuzzyEqual(distance_to_position_at_index,
2000 distance_to_nearest_position))
2003 else if (nearest_position == nearest_position_at_index)
2010 nearest_position_at_index,
2011 " detected near point ",
2021 std::array<Point, 2> source_points = {{bbox.first, bbox.second}};
2023 std::array<Point, 8> all_points;
2024 for (
unsigned int x = 0; x < 2; x++)
2025 for (
unsigned int y = 0; y < 2; y++)
2026 for (
unsigned int z = 0; z < 2; z++)
2027 all_points[x + 2 * y + 4 * z] =
2028 Point(source_points[x](0), source_points[y](1), source_points[z](2));
2030 Real max_distance = 0.;
2032 for (
unsigned int i = 0; i < 8; i++)
2039 return max_distance;
2045 std::array<Point, 2> source_points = {{bbox.first, bbox.second}};
2047 std::array<Point, 8> all_points;
2048 for (
unsigned int x = 0; x < 2; x++)
2049 for (
unsigned int y = 0; y < 2; y++)
2050 for (
unsigned int z = 0; z < 2; z++)
2051 all_points[x + 2 * y + 4 * z] =
2052 Point(source_points[x](0), source_points[y](1), source_points[z](2));
2056 for (
unsigned int i = 0; i < 8; i++)
2063 return min_distance;
2066 std::vector<BoundingBox>
2069 std::vector<std::pair<Point, Point>> bb_points(
_from_meshes.size());
2070 const Real min_r = std::numeric_limits<Real>::lowest();
2077 bool at_least_one =
false;
2080 for (
const auto & elem :
as_range(from_mesh.getMesh().local_elements_begin(),
2081 from_mesh.getMesh().local_elements_end()))
2091 at_least_one =
true;
2104 if ((from_mesh.getUniqueCoordSystem() ==
Moose::COORD_RZ) && (LIBMESH_DIM == 3))
2124 bb_points[j] =
static_cast<std::pair<Point, Point>
>(bbox);
2131 std::vector<BoundingBox> bboxes(bb_points.size());
2132 for (
const auto i :
make_range(bb_points.size()))
2133 bboxes[i] =
static_cast<BoundingBox>(bb_points[i]);
2140 for (
const auto j :
make_range(bboxes.size()))
2142 const auto current_width = (bboxes[j].second - bboxes[j].first)(i);
2150 std::vector<unsigned int>
2153 std::vector<unsigned int> global_app_start_per_proc(1, -1);
2157 return global_app_start_per_proc;
2163 mooseAssert(var_index <
_from_var_names.size(),
"No source variable at this index");
2170 mooseAssert(var_index <
_from_var_names.size(),
"No source variable at this index");
2180 mooseAssert(var_index <
_to_var_names.size(),
"No target variable at this index");
2196 const auto bbox = to_mesh->getInflatedProcessorBoundingBox();
2202 return max_dimension;
2208 Real current_distance,
2209 Real new_distance)
const 2216 !MooseUtils::absoluteFuzzyEqual(current_value, new_value))
2218 if (MooseUtils::absoluteFuzzyEqual(current_distance, new_distance))
std::vector< BoundingBox > _from_bboxes
Bounding boxes for all source applications.
void mooseInfo(Args &&... args) const
std::vector< std::unique_ptr< MultiAppCoordTransform > > _to_transforms
virtual bool isNodal() const
Is this variable nodal.
const MooseEnum _post_transfer_extrapolation
How to post treat after the transfer.
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
void examineReceivedValueConflicts(const unsigned int var_index, const DofobjectToInterpValVec &dofobject_to_valsvec, const InterpCaches &distance_caches)
Remove potential value conflicts that did not materialize because another source was closer Several e...
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
const libMesh::FEType & feType() const
Get the type of finite element object.
const Point & getNearestPosition(const Point &target, bool initial) const
Find the nearest Position for a given point.
void cacheOutgoingPointInfo(const Point point, const dof_id_type dof_object_id, const unsigned int problem_id, ProcessorToPointVec &outgoing_points)
static void transformBoundingBox(libMesh::BoundingBox &box, const MultiAppCoordTransform &transform)
Transform a bounding box according to the transformations in the provided coordinate transformation o...
const std::shared_ptr< MultiApp > getFromMultiApp() const
Get the MultiApp to transfer data from.
bool hasBoundaryName(const MeshBase &input_mesh, const BoundaryName &name)
Whether a particular boundary name exists in the mesh.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
bool _source_app_must_contain_point
Whether the source app mesh must actually contain the points for them to be considered or whether the...
const bool _skip_coordinate_collapsing
Whether to skip coordinate collapsing (transformations of coordinates between applications using diff...
Point getPointInSourceAppFrame(const Point &p, unsigned int local_i_from, const std::string &phase) const
Get the source app point from a point in the reference frame.
void registerConflict(unsigned int problem, dof_id_type dof_id, Point p, Real dist, bool local)
Register a potential value conflict, e.g.
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
Transfers a functor (can be variable, function, functor material property, spatial UO...
const InputParameters & parameters() const
Get the parameters of the object.
virtual void evaluateInterpValues(const unsigned int var_index, const std::vector< std::pair< Point, unsigned int >> &incoming_points, std::vector< std::pair< Real, Real >> &outgoing_vals)=0
void locatePointReceivers(const Point point, std::set< processor_id_type > &processors)
std::vector< std::unique_ptr< libMesh::PointLocatorBase > > _from_point_locators
Point locators, useful to examine point location with regards to domain restriction.
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
const std::vector< VariableName > _from_var_names
Name of variables transferring from.
virtual void execute() override
Execute the transfer.
MultiAppGeneralFieldTransfer(const InputParameters ¶meters)
std::vector< FEProblemBase * > _to_problems
processor_id_type rank() const
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
const Parallel::Communicator & comm() const
bool acceptPointMeshDivision(const Point &pt, const unsigned int i_local, const unsigned int only_from_this_mesh_div) const
Whether a point lies inside the mesh division delineated by the MeshDivision object.
virtual void postExecute()
Add some extra work if necessary after execute().
std::vector< unsigned int > getGlobalStartAppPerProc() const
Get global index for the first app each processes owns Requires a global communication, must be called on every domain simultaneously.
FEProblemBase & _fe_problem
const std::shared_ptr< MultiApp > getToMultiApp() const
Get the MultiApp to transfer data to.
void boundary_ids(const Node *node, std::vector< boundary_id_type > &vec_to_fill) const
static InputParameters validParams()
This class provides an interface for common operations on field variables of both FE and FV types wit...
const Point & getPosition(unsigned int index, bool initial) const
Getter for a single position at a known index.
const Parallel::Communicator & _communicator
std::vector< Real > _fixed_bbox_size
Set the bounding box sizes manually.
MooseVariableFieldBase * getToVariable(unsigned int var_index) const
Return a pointer to a target variable.
std::vector< const MeshDivision * > _from_mesh_divisions
Division of the origin mesh.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
std::vector< const MeshDivision * > _to_mesh_divisions
Division of the target mesh.
unsigned int _var_size
The number of variables to transfer.
std::vector< Point > & points_requested()
const BoundaryInfo & get_boundary_info() const
const Real _default_extrapolation_value
Value to use when no received data is valid for a target location.
bool inMesh(const libMesh::PointLocatorBase *const pl, const Point &pt) const
bool closestToPosition(unsigned int pos_index, const Point &pt) const
Whether a point is closest to a position at the index specified than any other position.
bool hasFromMultiApp() const
Whether the transfer owns a non-null from_multi_app.
const Positions & getPositionsObject(const std::string &name) const
Get the Positions object by its name.
const std::vector< unsigned int > _from_var_components
Origin array/vector variable components.
Real distance(const Point &p)
virtual void getAppInfo() override
This method will fill information into the convenience member variables (_to_problems, _from_meshes, etc.)
Point getPointInTargetAppFrame(const Point &p, unsigned int local_i_to, const std::string &phase) const
Get the target app point from a point in the reference frame.
VariableName getToVarName(unsigned int var_index)
Get the target variable name, with the suffix for array/vector variables.
std::set< BoundaryID > _from_boundaries
Origin boundary(ies) restriction.
void outputValueConflicts(const unsigned int var_index, const DofobjectToInterpValVec &dofobject_to_valsvec, const InterpCaches &distance_caches)
Report on conflicts between overlapping child apps, equidistant origin points etc.
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
auto max(const L &left, const R &right)
std::vector< unsigned int > _to_local2global_map
Given local app index, returns global app index.
const Positions * _nearest_positions_obj
unsigned int variable_number(std::string_view var) const
Real bboxMinDistance(const Point &p, const BoundingBox &bbox) const
Compute minimum distance.
unsigned int getGlobalTargetAppIndex(unsigned int i_to) const
Return the global app index from the local index in the "to-multiapp" transfer direction.
bool _displaced_target_mesh
True if displaced mesh is used for the target mesh, otherwise false.
void extractOutgoingPoints(const unsigned int var_index, ProcessorToPointVec &outgoing_points)
std::set< SubdomainID > _to_blocks
Target block(s) restriction.
unsigned int n_dofs(const unsigned int s, const unsigned int var=libMesh::invalid_uint) const
processor_id_type size() const
std::unordered_map< processor_id_type, std::vector< std::pair< Point, unsigned int > > > ProcessorToPointVec
A map from pid to a set of points.
Point getMaxToProblemsBBoxDimensions() const
Obtains the max dimensions to scale all points in the mesh.
virtual void initialSetup() override
Method called at the beginning of the simulation for checking integrity or doing one-time setup...
uint8_t processor_id_type
void mooseWarning(Args &&... args) const
dof_id_type dof_object_id
virtual void prepareEvaluationOfInterpValues(const unsigned int var_index)=0
const std::vector< unsigned int > _to_var_components
Target array/vector variable components.
processor_id_type n_processors() const
Real bboxMaxDistance(const Point &p, const BoundingBox &bbox) const
Compute max distance.
unsigned int getNearestPositionIndex(const Point &target, bool initial) const
Find the nearest Position index for a given point.
unsigned int number() const
const std::string & name() const
Get the name of the class.
libMesh::EquationSystems & getEquationSystem(FEProblemBase &problem, bool use_displaced) const
Returns the Problem's equation system, displaced or not Be careful! If you transfer TO a displaced sy...
std::vector< MooseMesh * > _from_meshes
std::vector< std::tuple< unsigned int, dof_id_type, Point, Real > > _local_conflicts
Keeps track of all local equidistant points to requested points, creating an indetermination in which...
const bool _use_bounding_boxes
Whether to use bounding boxes to determine the applications that may receive point requests then send...
Value request recording base class.
bool acceptPointInOriginMesh(unsigned int i_from, const std::vector< BoundingBox > &local_bboxes, const Point &pt, const unsigned int mesh_div, Real &distance) const
void project(const ConstElemRange &range)
virtual unsigned int n_nodes() const=0
bool isOutOfMeshValue(Number val)
std::set< BoundaryID > _to_boundaries
Target boundary(ies) restriction.
std::vector< unsigned int > _froms_per_proc
Number of source/from applications per processor. This vector is indexed by processor id...
std::vector< std::tuple< unsigned int, dof_id_type, Point, Real > > _received_conflicts
Keeps track of all received conflicts.
const Point & min() const
VariableName getFromVarName(unsigned int var_index) const
Get the source variable name, with the suffix for array/vector variables.
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
std::vector< std::unordered_map< dof_id_type, InterpInfo > > DofobjectToInterpValVec
A vector, indexed by to-problem id, of maps from dof object to interpolation values.
Real _bbox_factor
How much we should relax bounding boxes.
bool _error_on_miss
Error out when some points can not be located.
const std::vector< AuxVariableName > _to_var_names
Name of variables transferring to.
static libMesh::System * find_sys(libMesh::EquationSystems &es, const std::string &var_name)
Small helper function for finding the system containing the variable.
std::unique_ptr< NumericVector< Number > > solution
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
std::vector< unsigned int > getFromsPerProc()
Return the number of "from" domains that each processor owns.
virtual void init() override
Transfers variables on possibly different meshes while conserving a user defined property (Postproces...
bool _search_value_conflicts
Whether to look for conflicts between origin points, multiple valid values for a target point...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
unsigned int getGlobalSourceAppIndex(unsigned int i_from) const
Return the global app index from the local index in the "from-multiapp" transfer direction.
MooseApp & _app
The MOOSE application this is associated with.
An unordered map indexed by Point, eg 3 floating point numbers Because floating point rounding errors...
void transferVariable(unsigned int i)
Performs the transfer for the variable of index i.
std::string stringify(const T &t)
conversion to string
unsigned int INVALID_DIVISION_INDEX
Invalid subdomain id to return when outside the mesh division.
void examineLocalValueConflicts(const unsigned int var_index, const DofobjectToInterpValVec &dofobject_to_valsvec, const InterpCaches &distance_caches)
Remove potential value conflicts that did not materialize because another source was closer Several e...
bool detectConflict(Real value_1, Real value_2, Real distance_1, Real distance_2) const
Detects whether two source values are valid and equidistant for a desired target location.
bool hasSubdomainName(const MeshBase &input_mesh, const SubdomainName &name)
Whether a particular subdomain name exists in the mesh.
std::vector< BoundingBox > getRestrictedFromBoundingBoxes() const
Get from bounding boxes for given domains and boundaries.
void correctSolutionVectorValues(const unsigned int var_index, const DofobjectToInterpValVec &dofobject_to_valsvec, const InterpCaches &interp_caches)
SimpleRange< NodeRefIter > node_ref_range()
virtual std::string getDataSourceName(unsigned int var_index) const
Return a human-readable description of the data source (variable, functor, user object, etc.) used for conflict warning messages.
virtual const Elem * elem_ptr(const dof_id_type i) const=0
virtual unsigned int n_sides() const=0
virtual void addReporter(const std::string &type, const std::string &name, InputParameters ¶meters)
Add a Reporter object to the simulation.
bool absolute_fuzzy_equals(const T &var1, const T2 &var2, const Real tol=TOLERANCE *TOLERANCE)
const FEType & variable_type(const unsigned int i) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
subdomain_id_type subdomain_id() const
bool _already_output_search_value_conflicts
Whether we already output the search value conflicts.
const MooseEnum & _to_mesh_division_behavior
How to use the target mesh divisions to restrict the transfer.
virtual void postExecute() override
Add some extra work if necessary after execute().
const Node * node_ptr(const unsigned int i) const
std::vector< std::unique_ptr< MultiAppCoordTransform > > _from_transforms
IntRange< T > make_range(T beg, T end)
bool hasToMultiApp() const
Whether the transfer owns a non-null to_multi_app.
Value request response base class.
bool _displaced_source_mesh
True if displaced mesh is used for the source mesh, otherwise false.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
std::set< SubdomainID > _from_blocks
Origin block(s) restriction.
std::vector< unsigned int > _from_local2global_map
Given local app index, returns global app index.
const unsigned int _search_value_conflicts_max_log
How many conflicts are output to console.
std::vector< InterpCache > InterpCaches
A vector of such caches, indexed by to_problem.
static InputParameters validParams()
std::unique_ptr< NumericVector< Number > > current_local_solution
void extractLocalFromBoundingBoxes(std::vector< BoundingBox > &local_bboxes)
void extendBoundingBoxes(const Real factor, std::vector< libMesh::BoundingBox > &bboxes) const
Extends bounding boxes to avoid missing points.
std::vector< MooseVariableFieldBase * > _to_variables
The target variables.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
ProcessorToPointInfoVec _processor_to_pointInfoVec
A map from processor to pointInfo vector.
const bool _elemental_boundary_restriction_on_sides
Whether elemental variable boundary restriction is considered by element side or element nodes...
virtual void initialSetup() override
Method called at the beginning of the simulation for checking integrity or doing one-time setup...
void prepareToTransfer()
Initialize supporting attributes like bounding boxes, processor app indexes etc.
virtual const Node * node_ptr(const dof_id_type i) const=0
processor_id_type processor_id() const
virtual void getAppInfo()
This method will fill information into the convenience member variables (_to_problems, _from_meshes, etc.)
auto min(const L &left, const R &right)
const DofMap & get_dof_map() const
void setSolutionVectorValues(const unsigned int var_index, const DofobjectToInterpValVec &dofobject_to_valsvec, const InterpCaches &interp_caches)
unsigned int hasKey(Point p)
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
bool onBoundaries(const std::set< BoundaryID > &boundaries, const MooseMesh &mesh, const Node *node) const
std::vector< FEProblemBase * > _from_problems
void ErrorVector unsigned int
auto index_range(const T &sizable)
std::vector< MooseMesh * > _to_meshes
bool _greedy_search
Whether or not a greedy strategy will be used If true, all the partitions will be checked for a given...
void cacheIncomingInterpVals(processor_id_type pid, const unsigned int var_index, std::vector< PointInfo > &pointInfoVec, const std::vector< std::pair< Point, unsigned int >> &point_requests, const std::vector< std::pair< Real, Real >> &incoming_vals, DofobjectToInterpValVec &dofobject_to_valsvec, InterpCaches &interp_caches, InterpCaches &distance_caches)
std::vector< unsigned int > _global_app_start_per_proc
First app each processor owns, indexed by processor If no app on the processor, will have a -1 for th...
const MooseEnum & _from_mesh_division_behavior
How to use the origin mesh divisions to restrict the transfer.
bool inBlocks(const std::set< SubdomainID > &blocks, const Elem *elem) const
const bool _use_nearest_app
Whether to keep track of the distance from the requested point to the app position.
const RemoteElem * remote_elem
const ExecFlagType EXEC_INITIAL