Skip to content

Commit

Permalink
Merge pull request #12959 from peterrum/ConstraintKinds_memory_consum…
Browse files Browse the repository at this point in the history
…ption

ConstraintKinds: implement memory_consumption()
  • Loading branch information
peterrum committed Nov 17, 2021
2 parents f17195c + 3e09a9a commit 2890a38
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/deal.II/matrix_free/hanging_nodes_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ namespace internal



/**
* Return the memory consumption in bytes of this enum class.
*/
inline std::size_t
memory_consumption(const ConstraintKinds &)
{
return sizeof(ConstraintKinds);
}



/**
* Global operator which returns an object in which all bits are set which
* are either set in the first or the second argument. This operator exists
Expand Down
2 changes: 2 additions & 0 deletions source/matrix_free/dof_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,8 @@ namespace internal
memory +=
(row_starts.capacity() * sizeof(std::pair<unsigned int, unsigned int>));
memory += MemoryConsumption::memory_consumption(dof_indices);
memory +=
MemoryConsumption::memory_consumption(hanging_node_constraint_masks);
memory += MemoryConsumption::memory_consumption(row_starts_plain_indices);
memory += MemoryConsumption::memory_consumption(plain_dof_indices);
memory += MemoryConsumption::memory_consumption(constraint_indicator);
Expand Down

0 comments on commit 2890a38

Please sign in to comment.