OGS
ProcessLib::SurfaceFluxData Struct Referencefinal

Detailed Description

Definition at line 22 of file SurfaceFluxData.h.

#include <SurfaceFluxData.h>

Collaboration diagram for ProcessLib::SurfaceFluxData:
[legend]

Public Member Functions

 SurfaceFluxData (MeshLib::Mesh &surfaceflux_mesh, std::string &&surfaceflux_property_vector_name)
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)

Static Public Member Functions

static std::unique_ptr< ProcessLib::SurfaceFluxDatacreateSurfaceFluxData (BaseLib::ConfigTree const &calculatesurfaceflux_config, std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes)

Private Attributes

MeshLib::Meshsurface_mesh
std::string const property_vector_name

Constructor & Destructor Documentation

◆ SurfaceFluxData()

ProcessLib::SurfaceFluxData::SurfaceFluxData ( MeshLib::Mesh & surfaceflux_mesh,
std::string && surfaceflux_property_vector_name )

Definition at line 14 of file SurfaceFluxData.cpp.

16 : surface_mesh(surfaceflux_mesh),
17 property_vector_name(std::move(surfaceflux_property_vector_name))
18{
19 // set the initial surface flux into the mesh
20 auto* const surfaceflux_pv = MeshLib::getOrCreateMeshProperty<double>(
22 // initialise the PropertyVector pv with zero values
23 std::fill(surfaceflux_pv->begin(), surfaceflux_pv->end(), 0.0);
24}
PropertyVector< T > * getOrCreateMeshProperty(Mesh &mesh, std::string const &property_name, MeshItemType const item_type, int const number_of_components)
std::string const property_vector_name

References MeshLib::Cell, MeshLib::getOrCreateMeshProperty(), property_vector_name, and surface_mesh.

Member Function Documentation

◆ createSurfaceFluxData()

std::unique_ptr< ProcessLib::SurfaceFluxData > ProcessLib::SurfaceFluxData::createSurfaceFluxData ( BaseLib::ConfigTree const & calculatesurfaceflux_config,
std::vector< std::unique_ptr< MeshLib::Mesh > > const & meshes )
static
Input File Parameter
prj__processes__process__calculatesurfaceflux__mesh
Input File Parameter
prj__processes__process__calculatesurfaceflux__property_name

Definition at line 27 of file SurfaceFluxData.cpp.

30{
31 auto mesh_name =
33 calculatesurfaceflux_config.getConfigParameter<std::string>("mesh");
34 auto surfaceflux_pv_name =
36 calculatesurfaceflux_config.getConfigParameter<std::string>(
37 "property_name");
38 if (mesh_name.empty())
39 {
40 return nullptr;
41 }
42
43 DBUG(
44 "Read surfaceflux meta data:\n\tmesh:'{:s}'\n\tproperty name: "
45 "'{:s}'\n",
46 mesh_name, surfaceflux_pv_name);
47
48 auto& surfaceflux_mesh = MeshLib::findMeshByName(meshes, mesh_name);
49
50 return std::make_unique<SurfaceFluxData>(surfaceflux_mesh,
51 std::move(surfaceflux_pv_name));
52}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
Mesh & findMeshByName(std::vector< std::unique_ptr< Mesh > > const &meshes, std::string_view const name)
Definition Mesh.cpp:354

References DBUG(), MeshLib::findMeshByName(), and BaseLib::ConfigTree::getConfigParameter().

Referenced by ProcessLib::ComponentTransport::createComponentTransportProcess(), ProcessLib::HT::createHTProcess(), ProcessLib::LiquidFlow::createLiquidFlowProcess(), and ProcessLib::SteadyStateDiffusion::createSteadyStateDiffusion().

◆ integrate()

void ProcessLib::SurfaceFluxData::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 )

Definition at line 54 of file SurfaceFluxData.cpp.

59{
60 auto* const surfaceflux_pv = MeshLib::getOrCreateMeshProperty<double>(
62 // initialise the PropertyVector pv with zero values
63 std::fill(surfaceflux_pv->begin(), surfaceflux_pv->end(), 0.0);
64 auto surfaceflux_process =
65 ProcessLib::SurfaceFlux(surface_mesh,
66 p.getProcessVariables(process_id)[0]
67 .get()
68 .getNumberOfGlobalComponents(),
69 integration_order);
70
71 surfaceflux_process.integrate(
72 x, *surfaceflux_pv, t, bulk_mesh, active_element_ids,
73 [&p](std::size_t const element_id, MathLib::Point3d const& pnt,
74 double const t, std::vector<GlobalVector*> const& x)
75 { return p.getFlux(element_id, pnt, t, x); });
76}

References MeshLib::Cell, ProcessLib::Process::getFlux(), MeshLib::getOrCreateMeshProperty(), ProcessLib::Process::getProcessVariables(), property_vector_name, and surface_mesh.

Member Data Documentation

◆ property_vector_name

std::string const ProcessLib::SurfaceFluxData::property_vector_name
private

Definition at line 38 of file SurfaceFluxData.h.

Referenced by SurfaceFluxData(), and integrate().

◆ surface_mesh

MeshLib::Mesh& ProcessLib::SurfaceFluxData::surface_mesh
private

Definition at line 37 of file SurfaceFluxData.h.

Referenced by SurfaceFluxData(), and integrate().


The documentation for this struct was generated from the following files: