Skip to content
Snippets Groups Projects
Commit d556c635 authored by Christoph Lehmann's avatar Christoph Lehmann
Browse files

[T] only create mesh once

parent f0ea6074
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "MathLib/LinAlg/LinAlg.h" #include "MathLib/LinAlg/LinAlg.h"
#include "MeshLib/MeshGenerators/MeshGenerator.h" #include "MeshLib/MeshGenerators/MeshGenerator.h"
#include "MeshLib/IO/writeMeshToFile.h"
#include "NumLib/DOF/DOFTableUtil.h" #include "NumLib/DOF/DOFTableUtil.h"
#include "NumLib/DOF/MatrixProviderUser.h" #include "NumLib/DOF/MatrixProviderUser.h"
...@@ -31,7 +32,6 @@ ...@@ -31,7 +32,6 @@
namespace namespace
{ {
template<typename ShapeMatrices> template<typename ShapeMatrices>
void interpolateNodalValuesToIntegrationPoints( void interpolateNodalValuesToIntegrationPoints(
std::vector<double> const& local_nodal_values, std::vector<double> const& local_nodal_values,
...@@ -45,7 +45,7 @@ void interpolateNodalValuesToIntegrationPoints( ...@@ -45,7 +45,7 @@ void interpolateNodalValuesToIntegrationPoints(
} }
} }
} } // anonymous namespace
class LocalAssemblerDataInterface : public NumLib::ExtrapolatableElement class LocalAssemblerDataInterface : public NumLib::ExtrapolatableElement
{ {
...@@ -171,6 +171,7 @@ public: ...@@ -171,6 +171,7 @@ public:
{ {
auto const extrapolatables = auto const extrapolatables =
NumLib::makeExtrapolatable(_local_assemblers, method); NumLib::makeExtrapolatable(_local_assemblers, method);
_extrapolator->extrapolate(extrapolatables); _extrapolator->extrapolate(extrapolatables);
_extrapolator->calculateResiduals(extrapolatables); _extrapolator->calculateResiduals(extrapolatables);
...@@ -234,19 +235,18 @@ TEST(NumLib, DISABLED_Extrapolation) ...@@ -234,19 +235,18 @@ TEST(NumLib, DISABLED_Extrapolation)
* x. * x.
*/ */
const double mesh_length = 1.0;
const std::size_t mesh_elements_in_each_direction = 5;
// generate mesh
std::unique_ptr<MeshLib::Mesh> mesh(
MeshLib::MeshGenerator::generateRegularHexMesh(
mesh_length, mesh_elements_in_each_direction));
for (unsigned integration_order : {2, 3, 4}) for (unsigned integration_order : {2, 3, 4})
{ {
namespace LinAlg = MathLib::LinAlg; namespace LinAlg = MathLib::LinAlg;
const double mesh_length = 1.0;
const double mesh_elements_in_each_direction = 5.0;
// generate mesh
std::unique_ptr<MeshLib::Mesh> mesh(
MeshLib::MeshGenerator::generateRegularHexMesh(
mesh_length, mesh_elements_in_each_direction));
auto const nnodes = mesh->getNumberOfNodes(); auto const nnodes = mesh->getNumberOfNodes();
auto const nelements = mesh->getNumberOfElements(); auto const nelements = mesh->getNumberOfElements();
DBUG("number of nodes: %lu, number of elements: %lu", nnodes, nelements); DBUG("number of nodes: %lu, number of elements: %lu", nnodes, nelements);
......
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