23 std::size_t
const node_id,
24 std::size_t
const global_component_id);
30 std::size_t
const node_id,
31 std::size_t
const global_component_id);
36 std::size_t
const mesh_item_id,
44 std::vector<GlobalIndexType>& indices);
51 LocalToGlobalIndexMap
const& dof_table,
MeshLib::Mesh const& mesh);
58 template <
typename Functor>
66 std::fill(begin(output_vector), end(output_vector),
67 std::numeric_limits<double>::quiet_NaN());
69 int const n_components =
71 for (
int component = 0; component < n_components; ++component)
73 auto const& mesh_subset =
74 local_to_global_index_map.
getMeshSubset(variable_id, component);
75 auto const mesh_id = mesh_subset.
getMeshID();
76 for (
auto const& node : mesh_subset.getNodes())
78 auto const node_id = node->getID();
81 output_vector.
getComponent(node_id, component) = mapFunction(
83 l, variable_id, component)]);
Global vector based on Eigen vector.
std::size_t getMeshID() const
return this mesh ID
PROP_VAL_TYPE & getComponent(std::size_t tuple_index, int component)
Returns the value for the given component stored in the given tuple.
MathLib::RowColumnIndices< GlobalIndexType > RowColumnIndices
GlobalIndexType getGlobalIndex(MeshLib::Location const &l, int const variable_id, int const component_id) const
int getNumberOfVariableComponents(int variable_id) const
MeshLib::MeshSubset const & getMeshSubset(int const variable_id, int const component_id) const
void setLocalAccessibleVector(PETScVector const &x)
VecNormType
Norm type. Not declared as class type in order to use the members as integers.
double getNodalValue(GlobalVector const &x, MeshLib::Mesh const &mesh, NumLib::LocalToGlobalIndexMap const &dof_table, std::size_t const node_id, std::size_t const global_component_id)
double norm(GlobalVector const &x, unsigned const global_component, MathLib::VecNormType norm_type, LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh)
double getNonGhostNodalValue(GlobalVector const &x, MeshLib::Mesh const &mesh, NumLib::LocalToGlobalIndexMap const &dof_table, std::size_t const node_id, std::size_t const global_component_id)
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
NumLib::LocalToGlobalIndexMap::RowColumnIndices getRowColumnIndices(std::size_t const id, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< GlobalIndexType > &indices)
void transformVariableFromGlobalVector(GlobalVector const &input_vector, int const variable_id, NumLib::LocalToGlobalIndexMap const &local_to_global_index_map, MeshLib::PropertyVector< double > &output_vector, Functor mapFunction)