OGS
ProcessLib::SurfaceFluxData Struct Referencefinal

Detailed Description

Definition at line 29 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 21 of file SurfaceFluxData.cpp.

23 : surface_mesh(surfaceflux_mesh),
24 property_vector_name(std::move(surfaceflux_property_vector_name))
25{
26 // set the initial surface flux into the mesh
27 auto* const surfaceflux_pv = MeshLib::getOrCreateMeshProperty<double>(
29 // initialise the PropertyVector pv with zero values
30 std::fill(surfaceflux_pv->begin(), surfaceflux_pv->end(), 0.0);
31}
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 34 of file SurfaceFluxData.cpp.

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

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 61 of file SurfaceFluxData.cpp.

66{
67 auto* const surfaceflux_pv = MeshLib::getOrCreateMeshProperty<double>(
69 // initialise the PropertyVector pv with zero values
70 std::fill(surfaceflux_pv->begin(), surfaceflux_pv->end(), 0.0);
71 auto surfaceflux_process =
73 p.getProcessVariables(process_id)[0]
74 .get()
75 .getNumberOfGlobalComponents(),
76 integration_order);
77
78 surfaceflux_process.integrate(
79 x, *surfaceflux_pv, t, bulk_mesh, active_element_ids,
80 [&p](std::size_t const element_id, MathLib::Point3d const& pnt,
81 double const t, std::vector<GlobalVector*> const& x)
82 { return p.getFlux(element_id, pnt, t, x); });
83}

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

Member Data Documentation

◆ property_vector_name

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

Definition at line 45 of file SurfaceFluxData.h.

Referenced by SurfaceFluxData(), and integrate().

◆ surface_mesh

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

Definition at line 44 of file SurfaceFluxData.h.

Referenced by SurfaceFluxData(), and integrate().


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