Commit ff557d78 authored by webmanue's avatar webmanue
Browse files

assemble mass matrices via free functions

parent 3f7ce159
Pipeline #131596 passed with stages
in 12 minutes and 53 seconds
......@@ -29,7 +29,7 @@ DEFINE_CONST_ASSEMBLER_PLUGIN(AssembleConsistentMassMatrixPlugin,
std::vector<value_type> outputBuffer;
for (const auto &meshElement : this->assembler().meshElements()) {
const auto matrix = meshElement.instance().computeConsistentMassMatrix();
const auto matrix = compute_consistent_mass_matrix(meshElement.instance());
outputBuffer.resize(matrix.rows() * matrix.cols());
utilities::serialize(matrix, outputBuffer.begin());
......
......@@ -29,7 +29,7 @@ DEFINE_CONST_ASSEMBLER_PLUGIN(AssembleLumpedMassMatrixPlugin,
std::vector<value_type> outputBuffer;
for (const auto &meshElement : this->assembler().meshElements()) {
const auto matrix = meshElement.instance().computeLumpedMassMatrix();
const auto matrix = compute_lumped_mass_matrix(meshElement.instance());
outputBuffer.resize(matrix.rows() * matrix.cols());
utilities::serialize(matrix, outputBuffer.begin());
......
......@@ -50,6 +50,17 @@ template <class ValueType_> struct Element {
MOCK_METHOD2_T(updateInternalVariables,
void(const NodalDisplacements &, const double));
};
template <class ValueType_>
auto compute_consistent_mass_matrix(const Element<ValueType_> &element) {
return element.computeConsistentMassMatrix();
}
template <class ValueType_>
auto compute_lumped_mass_matrix(const Element<ValueType_> &element) {
return element.computeLumpedMassMatrix();
}
} // namespace test
} // namespace assembly
} // namespace ae108
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment