24 std::string&& surfaceflux_property_vector_name)
29 auto*
const surfaceflux_pv = MeshLib::getOrCreateMeshProperty<double>(
32 std::fill(surfaceflux_pv->begin(), surfaceflux_pv->end(), 0.0);
37 std::vector<std::unique_ptr<MeshLib::Mesh>>
const& meshes)
42 auto surfaceflux_pv_name =
46 if (mesh_name.empty())
52 "Read surfaceflux meta data:\n\tmesh:'{:s}'\n\tproperty name: "
54 mesh_name, surfaceflux_pv_name);
57 meshes.begin(), meshes.end(),
58 [&mesh_name](
auto const& m) { return mesh_name == m->getName(); },
59 "Expected to find a mesh named " + mesh_name +
60 " for the surfaceflux calculation.");
62 return std::make_unique<SurfaceFluxData>(
66 void integrate(std::vector<GlobalVector*>
const& x,
double const t,
67 Process const& p,
int const process_id,
69 std::vector<std::size_t>
const& active_element_ids)
71 auto*
const surfaceflux_pv = MeshLib::getOrCreateMeshProperty<double>(
74 std::fill(surfaceflux_pv->begin(), surfaceflux_pv->end(), 0.0);
75 auto surfaceflux_process =
77 p.getProcessVariables(process_id)[0]
79 .getNumberOfGlobalComponents(),
82 surfaceflux_process.integrate(
83 x, *surfaceflux_pv, t, bulk_mesh, active_element_ids,
85 double const t, std::vector<GlobalVector*>
const& x) {
86 return p.getFlux(element_id, pnt, t, x);
void DBUG(char const *fmt, Args const &... args)
T getConfigParameter(std::string const ¶m) const
std::iterator_traits< InputIt >::reference findElementOrError(InputIt begin, InputIt end, Predicate predicate, std::string const &error="")
std::string const property_vector_name
SurfaceFluxData(MeshLib::Mesh &surfaceflux_mesh, std::string &&surfaceflux_property_vector_name)
static std::unique_ptr< ProcessLib::SurfaceFluxData > createSurfaceFluxData(BaseLib::ConfigTree const &calculatesurfaceflux_config, std::vector< std::unique_ptr< MeshLib::Mesh >> const &meshes)
void integrate(std::vector< GlobalVector * > const &x, double const t, Process const &p, int const process_id, int const integration_order, MeshLib::Mesh const &bulk_mesh, std::vector< std::size_t > const &active_element_ids)
MeshLib::Mesh & surface_mesh