Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MostafaMollaali
dynamic
Commits
a3aea857
Commit
a3aea857
authored
11 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[NL] Remove internal integration method object.
parent
aa9ad35a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NumLib/Fem/FiniteElement/TemplateIsoparametric.h
+2
-12
2 additions, 12 deletions
NumLib/Fem/FiniteElement/TemplateIsoparametric.h
Tests/NumLib/TestFeQuad4.cpp
+5
-5
5 additions, 5 deletions
Tests/NumLib/TestFeQuad4.cpp
with
7 additions
and
17 deletions
NumLib/Fem/FiniteElement/TemplateIsoparametric.h
+
2
−
12
View file @
a3aea857
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Tests/NumLib/TestFeQuad4.cpp
+
5
−
5
View file @
a3aea857
...
...
@@ -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
.
get
IntegrationMethod
();
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
.
get
IntegrationMethod
();
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
.
get
IntegrationMethod
();
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
.
get
IntegrationMethod
();
IntegrationMethod
q
=
IntegrationMethod
(
2
);
for
(
std
::
size_t
i
=
0
;
i
<
q
.
getNPoints
();
i
++
)
{
shape
.
setZero
();
auto
wp
=
q
.
getWeightedPoint
(
i
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment