OGS
ProcessLib::ProcessOutputData Class Referencefinal

Detailed Description

Holds all data of a process that are needed for output.

Definition at line 27 of file ProcessOutputData.h.

#include <ProcessOutputData.h>

Collaboration diagram for ProcessLib::ProcessOutputData:
[legend]

Public Member Functions

 ProcessOutputData (std::vector< std::reference_wrapper< const std::vector< std::reference_wrapper< ProcessVariable > > > > &&process_variables_of_all_processes, const SecondaryVariableCollection &secondary_variables, const std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > *integration_point_writers, std::vector< const NumLib::LocalToGlobalIndexMap * > &&bulk_mesh_dof_tables_of_all_processes, std::vector< const NumLib::LocalToGlobalIndexMap * > &&output_mesh_dof_tables_of_all_processes, std::vector< std::unique_ptr< NumLib::LocalToGlobalIndexMap > > &&container_that_owns_output_mesh_dof_tables, MeshLib::Mesh &output_mesh)
 
std::vector< std::reference_wrapper< ProcessVariable > > const & getProcessVariables (int const process_id) const
 
SecondaryVariableCollection const & getSecondaryVariables () const
 
std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > const * getIntegrationPointWriters () const
 
NumLib::LocalToGlobalIndexMap const & getBulkMeshDofTable (int const process_id) const
 
NumLib::LocalToGlobalIndexMap const & getOutputMeshDofTable (int const process_id) const
 
std::vector< const NumLib::LocalToGlobalIndexMap * > const & getOutputMeshDofTablesOfAllProcesses () const
 
MeshLib::MeshgetOutputMesh () const
 

Private Attributes

std::vector< std::reference_wrapper< const std::vector< std::reference_wrapper< ProcessVariable > > > > process_variables_of_all_processes_
 
SecondaryVariableCollection const & secondary_variables_
 
std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > const * integration_point_writers_
 
std::vector< NumLib::LocalToGlobalIndexMap const * > bulk_mesh_dof_tables_of_all_processes_
 
std::vector< NumLib::LocalToGlobalIndexMap const * > output_mesh_dof_tables_of_all_processes_
 
std::vector< std::unique_ptr< NumLib::LocalToGlobalIndexMap > > container_that_owns_output_mesh_dof_tables_
 
MeshLib::Meshoutput_mesh_
 

Constructor & Destructor Documentation

◆ ProcessOutputData()

ProcessLib::ProcessOutputData::ProcessOutputData ( std::vector< std::reference_wrapper< const std::vector< std::reference_wrapper< ProcessVariable > > > > && process_variables_of_all_processes,
const SecondaryVariableCollection & secondary_variables,
const std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > * integration_point_writers,
std::vector< const NumLib::LocalToGlobalIndexMap * > && bulk_mesh_dof_tables_of_all_processes,
std::vector< const NumLib::LocalToGlobalIndexMap * > && output_mesh_dof_tables_of_all_processes,
std::vector< std::unique_ptr< NumLib::LocalToGlobalIndexMap > > && container_that_owns_output_mesh_dof_tables,
MeshLib::Mesh & output_mesh )

Definition at line 162 of file ProcessOutputData.cpp.

177 std::move(process_variables_of_all_processes)),
178 secondary_variables_(secondary_variables),
179 integration_point_writers_(integration_point_writers),
181 std::move(bulk_mesh_dof_tables_of_all_processes)),
183 std::move(output_mesh_dof_tables_of_all_processes)),
185 std::move(container_that_owns_output_mesh_dof_tables)),
186 output_mesh_(output_mesh)
187{
188 auto const n_proc_pvs = process_variables_of_all_processes_.size();
189 auto const n_proc_bulk = bulk_mesh_dof_tables_of_all_processes_.size();
190 auto const n_proc_out = output_mesh_dof_tables_of_all_processes_.size();
191 auto const n_proc_own = container_that_owns_output_mesh_dof_tables_.size();
192
193 if (n_proc_pvs != n_proc_bulk)
194 {
195 OGS_FATAL(
196 "Mismatch in number of processes (PVs vs. bulk mesh d.o.f. "
197 "tables): {} != {}",
198 n_proc_pvs, n_proc_bulk);
199 }
200
201 if (n_proc_pvs != n_proc_out)
202 {
203 OGS_FATAL(
204 "Mismatch in number of processes (PVs vs. output mesh d.o.f. "
205 "tables): {} != {}",
206 n_proc_pvs, n_proc_out);
207 }
208
209 // n_proc_own is nonzero only for submesh output
210 if (n_proc_own != 0 && n_proc_pvs != n_proc_own)
211 {
212 OGS_FATAL(
213 "Mismatch in number of processes (PVs vs. output mesh d.o.f. "
214 "tables, owning): {} != {}",
215 n_proc_pvs, n_proc_own);
216 }
217}
#define OGS_FATAL(...)
Definition Error.h:26
std::vector< std::unique_ptr< NumLib::LocalToGlobalIndexMap > > container_that_owns_output_mesh_dof_tables_
SecondaryVariableCollection const & secondary_variables_
std::vector< NumLib::LocalToGlobalIndexMap const * > output_mesh_dof_tables_of_all_processes_
std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > const * integration_point_writers_
std::vector< std::reference_wrapper< const std::vector< std::reference_wrapper< ProcessVariable > > > > process_variables_of_all_processes_
std::vector< NumLib::LocalToGlobalIndexMap const * > bulk_mesh_dof_tables_of_all_processes_

References bulk_mesh_dof_tables_of_all_processes_, container_that_owns_output_mesh_dof_tables_, OGS_FATAL, output_mesh_dof_tables_of_all_processes_, and process_variables_of_all_processes_.

Member Function Documentation

◆ getBulkMeshDofTable()

NumLib::LocalToGlobalIndexMap const & ProcessLib::ProcessOutputData::getBulkMeshDofTable ( int const process_id) const
inline

Definition at line 62 of file ProcessOutputData.h.

64 {
66 }

References bulk_mesh_dof_tables_of_all_processes_.

◆ getIntegrationPointWriters()

std::vector< std::unique_ptr< MeshLib::IntegrationPointWriter > > const * ProcessLib::ProcessOutputData::getIntegrationPointWriters ( ) const
inline

Definition at line 57 of file ProcessOutputData.h.

58 {
60 }

References integration_point_writers_.

◆ getOutputMesh()

MeshLib::Mesh & ProcessLib::ProcessOutputData::getOutputMesh ( ) const
inline

Definition at line 80 of file ProcessOutputData.h.

80{ return output_mesh_; }

References output_mesh_.

◆ getOutputMeshDofTable()

NumLib::LocalToGlobalIndexMap const & ProcessLib::ProcessOutputData::getOutputMeshDofTable ( int const process_id) const
inline

Definition at line 68 of file ProcessOutputData.h.

70 {
72 }

References output_mesh_dof_tables_of_all_processes_.

◆ getOutputMeshDofTablesOfAllProcesses()

std::vector< const NumLib::LocalToGlobalIndexMap * > const & ProcessLib::ProcessOutputData::getOutputMeshDofTablesOfAllProcesses ( ) const
inline

◆ getProcessVariables()

std::vector< std::reference_wrapper< ProcessVariable > > const & ProcessLib::ProcessOutputData::getProcessVariables ( int const process_id) const
inline

Definition at line 46 of file ProcessOutputData.h.

47 {
48 return process_variables_of_all_processes_[process_id].get();
49 }

References process_variables_of_all_processes_.

Referenced by ProcessLib::addProcessDataToMesh().

◆ getSecondaryVariables()

SecondaryVariableCollection const & ProcessLib::ProcessOutputData::getSecondaryVariables ( ) const
inline

Definition at line 51 of file ProcessOutputData.h.

52 {
54 }

References secondary_variables_.

Member Data Documentation

◆ bulk_mesh_dof_tables_of_all_processes_

std::vector<NumLib::LocalToGlobalIndexMap const*> ProcessLib::ProcessOutputData::bulk_mesh_dof_tables_of_all_processes_
private

D.o.f. tables for the full simulation domain of the Process this ProcessOutputData is associated with.

Each element of the container corresponds to a specific process_id of the Process.

Definition at line 106 of file ProcessOutputData.h.

Referenced by ProcessOutputData(), and getBulkMeshDofTable().

◆ container_that_owns_output_mesh_dof_tables_

std::vector<std::unique_ptr<NumLib::LocalToGlobalIndexMap> > ProcessLib::ProcessOutputData::container_that_owns_output_mesh_dof_tables_
private

Actual data backing the pointers in output_mesh_dof_tables_of_all_processes_.

This container is populated in the case of submesh output only.

Definition at line 123 of file ProcessOutputData.h.

Referenced by ProcessOutputData().

◆ integration_point_writers_

std::vector<std::unique_ptr<MeshLib::IntegrationPointWriter> > const* ProcessLib::ProcessOutputData::integration_point_writers_
private

The list of integration point writers or nullptr if there are no integration point writers defined on the output_mesh_.

The latter is the case for output on submeshes.

Definition at line 98 of file ProcessOutputData.h.

Referenced by getIntegrationPointWriters().

◆ output_mesh_

MeshLib::Mesh& ProcessLib::ProcessOutputData::output_mesh_
private

The mesh to which output shall be written.

This can be the entire simulation domain of the Process this ProcessOutputData is associated with or a submesh thereof.

Definition at line 129 of file ProcessOutputData.h.

Referenced by getOutputMesh().

◆ output_mesh_dof_tables_of_all_processes_

std::vector<NumLib::LocalToGlobalIndexMap const*> ProcessLib::ProcessOutputData::output_mesh_dof_tables_of_all_processes_
private

D.o.f tables for the given output_mesh_.

In the case of submesh output these d.o.f. tables are different from the bulk_mesh_dof_tables_of_all_processes_.

Each element of the container corresponds to a specific process_id of the Process this ProcessOutputData is associated with.

Definition at line 116 of file ProcessOutputData.h.

Referenced by ProcessOutputData(), getOutputMeshDofTable(), and getOutputMeshDofTablesOfAllProcesses().

◆ process_variables_of_all_processes_

std::vector<std::reference_wrapper< const std::vector<std::reference_wrapper<ProcessVariable> > > > ProcessLib::ProcessOutputData::process_variables_of_all_processes_
private

Process variables of all processes.

Each element of the container corresponds to a specific process_id of the Process.

Definition at line 89 of file ProcessOutputData.h.

Referenced by ProcessOutputData(), and getProcessVariables().

◆ secondary_variables_

SecondaryVariableCollection const& ProcessLib::ProcessOutputData::secondary_variables_
private

Definition at line 91 of file ProcessOutputData.h.

Referenced by getSecondaryVariables().


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