OGS
ProcessLib::HeatTransportBHE::BHEMeshData Struct Reference

Detailed Description

Definition at line 32 of file HeatTransportBHE/BHE/MeshUtils.h.

#include <MeshUtils.h>

Public Member Functions

void updateElementSectionIndices (std::vector< BHE::BHETypes > const &bhes)

Public Attributes

std::vector< int > BHE_mat_IDs
std::vector< std::vector< MeshLib::Element * > > BHE_elements
std::vector< std::vector< MeshLib::Node * > > BHE_nodes
std::vector< std::vector< MeshLib::Node * > > BHE_topology_ordered_nodes
std::unordered_map< std::size_t, double > BHE_element_distances_from_wellhead
std::unordered_map< std::size_t, int > BHE_element_section_indices

Member Function Documentation

◆ updateElementSectionIndices()

void ProcessLib::HeatTransportBHE::BHEMeshData::updateElementSectionIndices ( std::vector< BHE::BHETypes > const & bhes)

Definition at line 302 of file HeatTransportBHE/BHE/MeshUtils.cpp.

304{
305 if (bhes.size() != BHE_elements.size())
306 {
307 OGS_FATAL(
308 "Mismatch between number of BHE definitions ({:d}) and BHE mesh "
309 "groups ({:d}) while creating per-element section indices.",
310 bhes.size(), BHE_elements.size());
311 }
312
313 for (std::size_t bhe_id = 0; bhe_id < bhes.size(); ++bhe_id)
314 {
315 for (auto const* const element : BHE_elements[bhe_id])
316 {
317 auto const element_id = element->getID();
318 auto const dist_it =
320 if (dist_it == BHE_element_distances_from_wellhead.end())
321 {
322 OGS_FATAL(
323 "Could not determine section index: no distance found for "
324 "element id {:d}.",
325 element_id);
326 }
327
328 double const distance_from_wellhead = dist_it->second;
329
330 BHE_element_section_indices[element_id] = visit(
331 [distance_from_wellhead](auto const& bhe)
332 {
333 return bhe.borehole_geometry.sections.getSectionIndex(
334 distance_from_wellhead);
335 },
336 bhes[bhe_id]);
337 }
338 }
339}
#define OGS_FATAL(...)
Definition Error.h:19
std::unordered_map< std::size_t, int > BHE_element_section_indices
std::vector< std::vector< MeshLib::Element * > > BHE_elements
std::unordered_map< std::size_t, double > BHE_element_distances_from_wellhead

References BHE_element_distances_from_wellhead, BHE_element_section_indices, BHE_elements, and OGS_FATAL.

Member Data Documentation

◆ BHE_element_distances_from_wellhead

std::unordered_map<std::size_t, double> ProcessLib::HeatTransportBHE::BHEMeshData::BHE_element_distances_from_wellhead

Definition at line 38 of file HeatTransportBHE/BHE/MeshUtils.h.

Referenced by updateElementSectionIndices().

◆ BHE_element_section_indices

std::unordered_map<std::size_t, int> ProcessLib::HeatTransportBHE::BHEMeshData::BHE_element_section_indices

Definition at line 39 of file HeatTransportBHE/BHE/MeshUtils.h.

Referenced by updateElementSectionIndices().

◆ BHE_elements

std::vector<std::vector<MeshLib::Element*> > ProcessLib::HeatTransportBHE::BHEMeshData::BHE_elements

Definition at line 35 of file HeatTransportBHE/BHE/MeshUtils.h.

Referenced by updateElementSectionIndices().

◆ BHE_mat_IDs

std::vector<int> ProcessLib::HeatTransportBHE::BHEMeshData::BHE_mat_IDs

Definition at line 34 of file HeatTransportBHE/BHE/MeshUtils.h.

◆ BHE_nodes

std::vector<std::vector<MeshLib::Node*> > ProcessLib::HeatTransportBHE::BHEMeshData::BHE_nodes

◆ BHE_topology_ordered_nodes

std::vector<std::vector<MeshLib::Node*> > ProcessLib::HeatTransportBHE::BHEMeshData::BHE_topology_ordered_nodes

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