20 const auto& ref_ff = *ff_ctx.ref_ff;
21 const auto& sdm = ref_ff.GetSpatialDiscretization();
22 const auto& grid = sdm.Grid();
24 const auto& uk_man = ref_ff.GetUnknownManager();
28 const auto field_data = ref_ff.GetGhostedFieldVector();
33 if (not ff_ctx.interpolation_points_has_ass_cell[p])
continue;
35 const auto cell_local_index = ff_ctx.interpolation_points_ass_cell[p];
36 const auto& cell = grid.local_cells[cell_local_index];
37 const auto& cell_mapping = sdm.GetCellMapping(cell);
38 const size_t num_nodes = cell_mapping.NumNodes();
40 std::vector<double> shape_function_vals(num_nodes, 0.0);
43 double point_value = 0.0;
44 for (
size_t i=0; i<num_nodes; ++i)
46 const int64_t imap = sdm.MapDOFLocal(cell, i, uk_man, uid, cid);
48 point_value += shape_function_vals[i]*field_data[imap];
50 ff_ctx.interpolation_points_values[p] = point_value;
std::vector< chi_physics::FieldFunctionGridBasedPtr > field_functions_
unsigned int ref_component_
std::vector< chi_mesh::Vector3 > interpolation_points_
std::vector< FieldFunctionContext > ff_contexts_