![]() |
OGS
|
Definition in file AddProcessDataToMesh.cpp.
#include "AddProcessDataToMesh.h"#include <span>#include "InfoLib/GitInfo.h"#include "MeshLib/Utils/IntegrationPointWriter.h"#include "MeshLib/Utils/getOrCreateMeshProperty.h"#include "NumLib/TimeStepping/Time.h"#include "ProcessLib/Output/SecondaryVariable.h"#include "ProcessLib/ProcessVariable.h"#include "MeshLib/NodePartitionedMesh.h"#include "NumLib/DOF/LocalToGlobalIndexMap.h"Go to the source code of this file.
Namespaces | |
| namespace | ProcessLib |
Functions | |
| static void | addOgsVersion (MeshLib::Mesh &mesh) |
| static void | addSecondaryVariableNodes (NumLib::Time const &t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, ProcessLib::SecondaryVariable const &var, std::string const &output_name, MeshLib::Mesh &mesh) |
| static void | addSecondaryVariableResiduals (NumLib::Time const &t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, ProcessLib::SecondaryVariable const &var, std::string const &output_name, MeshLib::Mesh &mesh) |
| static std::vector< double > | copySolutionVector (GlobalVector const &x) |
| MeshLib::PropertyVector< std::size_t > const * | getBulkNodeIdMapForPetscIfNecessary (MeshLib::Mesh const &mesh, NumLib::LocalToGlobalIndexMap const &dof_table, NumLib::LocalToGlobalIndexMap const &bulk_mesh_dof_table) |
| static GlobalIndexType | getIndexForComponentInSolutionVector (std::size_t const mesh_id, std::size_t const node_id, bool const is_ghost_node, int const global_component_id, GlobalVector const &x, NumLib::LocalToGlobalIndexMap const &dof_table, NumLib::LocalToGlobalIndexMap const &bulk_mesh_dof_table, MeshLib::PropertyVector< std::size_t > const *const bulk_node_id_map) |
| static bool | isGhostNode (MeshLib::Mesh const &mesh, std::size_t const node_id) |
| static std::set< std::string > | addPrimaryVariablesToMesh (MeshLib::Mesh &mesh, GlobalVector const &x, std::vector< std::reference_wrapper< ProcessLib::ProcessVariable > > const &process_variables, std::set< std::string > const &output_variables, NumLib::LocalToGlobalIndexMap const &dof_table, NumLib::LocalToGlobalIndexMap const &bulk_mesh_dof_table) |
| static void | addSecondaryVariablesToMesh (ProcessLib::SecondaryVariableCollection const &secondary_variables, std::set< std::string > &names_of_already_output_variables, NumLib::Time const &t, std::vector< GlobalVector * > const &xs, MeshLib::Mesh &mesh, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, bool const output_residuals) |
| void | ProcessLib::addProcessDataToMesh (NumLib::Time const &t, std::vector< GlobalVector * > const &xs, int const process_id, ProcessOutputData const &process_output_data, bool const output_secondary_variables, OutputDataSpecification const &process_output) |
|
static |
Copies the ogs_version string containing the release number and the git hash.
Definition at line 28 of file AddProcessDataToMesh.cpp.
References MeshLib::getOrCreateMeshProperty(), MeshLib::IntegrationPoint, GitInfoLib::GitInfo::OGS_VERSION, and GitInfoLib::GitInfo::ogs_version.
Referenced by ProcessLib::addProcessDataToMesh().
|
static |
Adds data for the given process_variables to the given mesh, if they occur in output_variables.
| mesh | the mesh the data is added to. |
| x | the global solution vector providing the data. |
| process_variables | the primary variables comprising x. |
| output_variables | the names of variables that can be added to the mesh. |
| dof_table | the d.o.f. table related to the passed mesh and solution vector x. |
| bulk_mesh_dof_table | the d.o.f. table related to the entire simulation domain and the passed solution vector x. |
mesh and the full simulation domain are the same. But if output should be written to a sub mesh, they will differ. In that case, also the two d.o.f. tables will be different from each other.dof_table must correspond to the mesh, to the solution vector x and to the process_variables. I.e., if there are, e.g., two primary variables in x, there must also be two variables in the dof_table and two entries in process_variables and so on.dof_table must correspond to the bulk_mesh_dof_table, i.e., the former must have been derived from the latter. In particular, both must have the same number of variables and components.mesh. Definition at line 240 of file AddProcessDataToMesh.cpp.
References copySolutionVector(), DBUG(), getBulkNodeIdMapForPetscIfNecessary(), getIndexForComponentInSolutionVector(), MeshLib::MeshSubset::getMeshID(), NumLib::LocalToGlobalIndexMap::getMeshSubset(), MeshLib::Mesh::getName(), NumLib::LocalToGlobalIndexMap::getNumberOfGlobalComponents(), NumLib::LocalToGlobalIndexMap::getNumberOfVariables(), MeshLib::getOrCreateMeshProperty(), isGhostNode(), MeshLib::Node, NumLib::MeshComponentMap::nop, and OGS_FATAL.
Referenced by ProcessLib::addProcessDataToMesh().
|
static |
Definition at line 37 of file AddProcessDataToMesh.cpp.
References DBUG(), ProcessLib::SecondaryVariableFunctions::eval_field, ProcessLib::SecondaryVariable::fcts, MeshLib::Mesh::getNumberOfNodes(), MeshLib::getOrCreateMeshProperty(), ProcessLib::SecondaryVariable::name, MeshLib::Node, ProcessLib::SecondaryVariableFunctions::num_components, and OGS_FATAL.
Referenced by addSecondaryVariablesToMesh().
|
static |
Definition at line 83 of file AddProcessDataToMesh.cpp.
References MeshLib::Cell, DBUG(), ProcessLib::SecondaryVariableFunctions::eval_residuals, ProcessLib::SecondaryVariable::fcts, MeshLib::Mesh::getNumberOfElements(), MeshLib::getOrCreateMeshProperty(), ProcessLib::SecondaryVariable::name, ProcessLib::SecondaryVariableFunctions::num_components, and OGS_FATAL.
Referenced by addSecondaryVariablesToMesh().
|
static |
Definition at line 347 of file AddProcessDataToMesh.cpp.
References addSecondaryVariableNodes(), addSecondaryVariableResiduals(), and ProcessLib::SecondaryVariableCollection::get().
Referenced by ProcessLib::addProcessDataToMesh().
|
static |
Definition at line 134 of file AddProcessDataToMesh.cpp.
References MathLib::EigenVector::copyValues().
Referenced by addPrimaryVariablesToMesh().
| MeshLib::PropertyVector< std::size_t > const * getBulkNodeIdMapForPetscIfNecessary | ( | MeshLib::Mesh const & | mesh, |
| NumLib::LocalToGlobalIndexMap const & | dof_table, | ||
| NumLib::LocalToGlobalIndexMap const & | bulk_mesh_dof_table ) |
Definition at line 141 of file AddProcessDataToMesh.cpp.
References MeshLib::getBulkIDString(), MeshLib::Node, and OGS_FATAL.
Referenced by addPrimaryVariablesToMesh().
|
static |
Definition at line 171 of file AddProcessDataToMesh.cpp.
References NumLib::LocalToGlobalIndexMap::getLocalIndex(), MathLib::EigenVector::getRangeBegin(), MathLib::EigenVector::getRangeEnd(), and MeshLib::Node.
Referenced by addPrimaryVariablesToMesh().
|
static |
Definition at line 200 of file AddProcessDataToMesh.cpp.
References isGhostNode().
Referenced by addPrimaryVariablesToMesh(), and isGhostNode().