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

[NL] Remove internal integration method object.

parent aa9ad35a
No related branches found
No related tags found
No related merge requests found
......@@ -55,28 +55,22 @@ public:
/**
* Constructor without specifying a mesh element. resetMeshElement() must be called afterwards.
*
* @param integration_order default 2.
*/
explicit TemplateIsoparametric(std::size_t integration_order=2)
explicit TemplateIsoparametric()
: _ele(nullptr)
{
this->_integration.setIntegrationOrder(integration_order);
}
/**
* Construct this object for the given mesh element.
*
* @param e Mesh element object
* @param integration_order default 2.
*/
TemplateIsoparametric(const MeshElementType &e, std::size_t integration_order=2)
TemplateIsoparametric(const MeshElementType &e)
: _ele(&e)
{
this->_integration.setIntegrationOrder(integration_order);
}
///
~TemplateIsoparametric() {}
/// return current mesh element
......@@ -88,9 +82,6 @@ public:
this->_ele = &e;
}
/// return an integration method
const IntegrationMethod& getIntegrationMethod() const {return _integration;}
/**
* compute shape functions
*
......@@ -118,7 +109,6 @@ public:
private:
const MeshElementType* _ele;
IntegrationMethod _integration;
};
} // NumLib
......
......@@ -197,7 +197,7 @@ TYPED_TEST(NumLibFemIsoQuad4Test, CheckMassMatrix)
// evaluate a mass matrix M = int{ N^T D N }dA_e
NodalMatrix M(e_nnodes, e_nnodes);
ShapeMatricesType shape(dim, e_nnodes);
IntegrationMethod q = fe.getIntegrationMethod();
IntegrationMethod q = IntegrationMethod(2);
for (std::size_t i=0; i<q.getNPoints(); i++) {
shape.setZero();
auto wp = q.getWeightedPoint(i);
......@@ -222,7 +222,7 @@ TYPED_TEST(NumLibFemIsoQuad4Test, CheckLaplaceMatrix)
// evaluate a Laplace matrix K = int{ dNdx^T D dNdx }dA_e
NodalMatrix K(e_nnodes, e_nnodes);
ShapeMatricesType shape(dim, e_nnodes);
IntegrationMethod q = fe.getIntegrationMethod();
IntegrationMethod q = IntegrationMethod(2);
for (std::size_t i=0; i<q.getNPoints(); i++) {
shape.setZero();
auto wp = q.getWeightedPoint(i);
......@@ -247,7 +247,7 @@ TYPED_TEST(NumLibFemIsoQuad4Test, CheckMassLaplaceMatrices)
NodalMatrix M(e_nnodes, e_nnodes);
NodalMatrix K(e_nnodes, e_nnodes);
ShapeMatricesType shape(dim, e_nnodes);
IntegrationMethod q = fe.getIntegrationMethod();
IntegrationMethod q = IntegrationMethod(2);
for (std::size_t i=0; i<q.getNPoints(); i++) {
shape.setZero();
auto wp = q.getWeightedPoint(i);
......@@ -268,12 +268,12 @@ TYPED_TEST(NumLibFemIsoQuad4Test, CheckGaussIntegrationLevel)
typedef typename FeQUAD4Type::IntegrationMethod IntegrationMethod;
// create a finite element object with gauss quadrature level 2
FeQUAD4Type fe(*this->unitSquareQuad, 2);
FeQUAD4Type fe(*this->unitSquareQuad);
// evaluate a mass matrix
NodalMatrix M(e_nnodes, e_nnodes);
ShapeMatricesType shape(dim, e_nnodes);
IntegrationMethod q = fe.getIntegrationMethod();
IntegrationMethod q = IntegrationMethod(2);
for (std::size_t i=0; i<q.getNPoints(); i++) {
shape.setZero();
auto wp = q.getWeightedPoint(i);
......
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