Skip to content
Snippets Groups Projects
Commit 60a897ac authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[NL] DOF; Fix variable offsets for derived table.

The variable component offsets are absolute and the derived
DOF table must have all the bulk DOF table global component
offset for each variable.
parent 1e44809e
No related branches found
No related tags found
No related merge requests found
......@@ -189,12 +189,12 @@ LocalToGlobalIndexMap::LocalToGlobalIndexMap(
LocalToGlobalIndexMap::LocalToGlobalIndexMap(
std::vector<MeshLib::MeshSubset>&& mesh_subsets,
std::vector<int> const& global_component_ids,
std::vector<int> const& variable_component_offsets,
std::vector<MeshLib::Element*> const& elements,
NumLib::MeshComponentMap&& mesh_component_map)
: _mesh_subsets(std::move(mesh_subsets)),
_mesh_component_map(std::move(mesh_component_map)),
_variable_component_offsets(
to_cumulative(std::vector<int>(1, 1))) // Single variable only.
_variable_component_offsets(variable_component_offsets)
{
// Each subset in the mesh_subsets represents a single component.
if (_mesh_subsets.size() != global_component_ids.size())
......@@ -247,9 +247,9 @@ LocalToGlobalIndexMap* LocalToGlobalIndexMap::deriveBoundaryConstrainedMap(
all_mesh_subsets.emplace_back(new_mesh_subset);
all_mesh_subsets.emplace_back(std::move(new_mesh_subset));
return new LocalToGlobalIndexMap(std::move(all_mesh_subsets),
global_component_ids, elements,
std::move(mesh_component_map));
return new LocalToGlobalIndexMap(
std::move(all_mesh_subsets), global_component_ids,
_variable_component_offsets, elements, std::move(mesh_component_map));
}
std::size_t LocalToGlobalIndexMap::dofSizeWithGhosts() const
......
......@@ -153,6 +153,7 @@ private:
explicit LocalToGlobalIndexMap(
std::vector<MeshLib::MeshSubset>&& mesh_subsets,
std::vector<int> const& global_component_ids,
std::vector<int> const& variable_component_offsets,
std::vector<MeshLib::Element*> const& elements,
NumLib::MeshComponentMap&& mesh_component_map);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment