OGS
anonymous_namespace{AssemblyMixin.cpp} Namespace Reference

Functions

std::vector< std::reference_wrapper< MeshLib::PropertyVector< double > > > createResiduumVectors (MeshLib::Mesh &mesh, std::vector< std::string > const &residuum_names, std::vector< std::reference_wrapper< ProcessLib::ProcessVariable > > pvs)
 

Function Documentation

◆ createResiduumVectors()

std::vector< std::reference_wrapper< MeshLib::PropertyVector< double > > > anonymous_namespace{AssemblyMixin.cpp}::createResiduumVectors ( MeshLib::Mesh & mesh,
std::vector< std::string > const & residuum_names,
std::vector< std::reference_wrapper< ProcessLib::ProcessVariable > > pvs )

Definition at line 21 of file AssemblyMixin.cpp.

26{
27 auto const num_residua = residuum_names.size();
28
29 std::vector<std::reference_wrapper<MeshLib::PropertyVector<double>>>
30 residuum_vectors;
31 residuum_vectors.reserve(num_residua);
32
33 for (std::size_t i = 0; i < num_residua; ++i)
34 {
35 auto const& residuum_name = residuum_names[i];
36 auto const& pv = pvs[i].get();
37
38 residuum_vectors.emplace_back(*MeshLib::getOrCreateMeshProperty<double>(
39 mesh, residuum_name, MeshLib::MeshItemType::Node,
40 pv.getNumberOfGlobalComponents()));
41 }
42
43 return residuum_vectors;
44}

References MeshLib::Node.