Skip to content

Commit

Permalink
Merge branch 'SmallFixes' into 'master'
Browse files Browse the repository at this point in the history
Small fixes

See merge request ogs/ogs!5152
  • Loading branch information
bilke committed Nov 15, 2024
2 parents 5297907 + ae5e090 commit 1076069
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions MeshLib/Elements/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ inline std::vector<Node*> getBaseNodes(std::vector<Element*> const& elements)

BaseLib::makeVectorUnique(base_nodes, MeshLib::idsComparator<Node*>);

base_nodes.shrink_to_fit();
return base_nodes;
}

Expand Down
1 change: 1 addition & 0 deletions MeshLib/Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ bool isBaseNode(Node const& node,

auto const n_base_nodes = e->getNumberOfBaseNodes();
auto const local_index = getNodeIDinElement(*e, &node);
assert(local_index <= e->getNumberOfNodes());
return local_index < n_base_nodes;
}

Expand Down
4 changes: 1 addition & 3 deletions NumLib/DOF/MeshComponentMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,9 @@ void MeshComponentMap::createSerialMeshComponentMap(
for (auto const& c : components)
{
std::size_t const mesh_id = c.getMeshID();
auto const& mesh_subset_nodes = c.getNodes();
// mesh items are ordered first by node, cell, ....
for (std::size_t j = 0; j < mesh_subset_nodes.size(); j++)
for (auto const node_id : c.getNodes() | MeshLib::views::ids)
{
auto const node_id = mesh_subset_nodes[j]->getID();
_dict.insert(
Line(Location(mesh_id, MeshLib::MeshItemType::Node, node_id),
comp_id, global_index++));
Expand Down
4 changes: 2 additions & 2 deletions NumLib/TimeStepping/Algorithms/CreateFixedTimeStepping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ FixedTimeSteppingParameters parseFixedTimeStepping(
*n_steps);
}
// Create the RepeatDtPair
std::size_t const t_step = static_cast<std::size_t>(
(t_end - t_initial) / static_cast<double>(*n_steps));
double const t_step =
(t_end - t_initial) / static_cast<double>(*n_steps);
std::vector const repeat_pairs = {
RepeatDtPair{static_cast<std::size_t>(*n_steps), t_step}};
return {t_initial, t_end, repeat_pairs};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

namespace ProcessLib::RichardsMechanics
{
/// Data whose state must be tracked by the TRM process.
/// Data whose state must be tracked by the process.
template <int DisplacementDim>
using StatefulData = std::tuple<
StrainData<DisplacementDim>,
Expand Down

0 comments on commit 1076069

Please sign in to comment.