Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs-feliks
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
Feliks Kiszkurno
ogs-feliks
Commits
621e26fd
Commit
621e26fd
authored
11 years ago
by
Norihiro Watanabe
Committed by
Dmitri Naumov
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add TemplateIsoparametric
parent
529983bb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NumLib/Fem/FiniteElement/TemplateIsoparametric.h
+127
-0
127 additions, 0 deletions
NumLib/Fem/FiniteElement/TemplateIsoparametric.h
with
127 additions
and
0 deletions
NumLib/Fem/FiniteElement/TemplateIsoparametric.h
0 → 100644
+
127
−
0
View file @
621e26fd
/**
* \author Norihiro Watanabe
* \date 2013-08-13
*
* \copyright
* Copyright (c) 2013, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#ifndef TEMPLATEISOPARAMETRIC_H_
#define TEMPLATEISOPARAMETRIC_H_
#include
<cassert>
#include
"../CoordinatesMapping/ShapeMatrices.h"
#include
"../CoordinatesMapping/NaturalCoordinatesMapping.h"
namespace
NumLib
{
/**
* \brief Template class for isoparametric elements
*
* \tparam T_ELEMENT Mesh element class
* \tparam T_SHAPE Shape function
* \tparam T_INTEGRAL Integration method
* \tparam T_NODAL_VECTOR Nodal vector class
* \tparam T_DIM_NODAL_MATRIX Matrix class for a size of dim * nnodes
* \tparam T_DIM_MATRIX Matrix class for a size of dim * dim
*/
template
<
class
T_MESH_ELEMENT
,
class
T_SHAPE
,
class
T_INTEGRAL
,
class
T_NODAL_VECTOR
,
class
T_DIM_NODAL_MATRIX
,
class
T_DIM_MATRIX
>
class
TemplateIsoparametric
{
public:
typedef
T_MESH_ELEMENT
MeshElementType
;
typedef
T_SHAPE
ShapeFunctionType
;
typedef
T_INTEGRAL
IntegrationType
;
typedef
T_NODAL_VECTOR
NodalVectorType
;
typedef
T_DIM_NODAL_MATRIX
DimNodalMatrixType
;
typedef
T_DIM_MATRIX
DimMatrixType
;
typedef
ShapeMatrices
<
NodalVectorType
,
DimNodalMatrixType
,
DimMatrixType
>
ShapeMatricesType
;
typedef
NaturalCoordinatesMapping
<
MeshElementType
,
ShapeFunctionType
,
ShapeMatricesType
>
NaturalCoordsMappingType
;
/**
* Constructor without specifying a mesh element. resetMeshElement() must be called afterwards.
*
* @param integration_points_level the sampling level (default 2)
*/
explicit
TemplateIsoparametric
(
std
::
size_t
integration_points_level
=
2
)
:
_ele
(
nullptr
)
{
this
->
_integration
.
setSamplingLevel
(
integration_points_level
);
}
/**
* Construct this object for the given mesh element.
*
* @param e Mesh element object
* @param integration_points_level the sampling level (default 2)
*/
TemplateIsoparametric
(
const
MeshElementType
&
e
,
std
::
size_t
integration_points_level
=
2
)
:
_ele
(
&
e
)
{
this
->
resetMeshElement
(
e
);
this
->
_integration
.
setSamplingLevel
(
integration_points_level
);
}
///
~
TemplateIsoparametric
()
{}
/// return current mesh element
const
MeshElementType
*
getMeshElement
()
const
{
return
_ele
;}
/// reset a mesh element
void
resetMeshElement
(
const
MeshElementType
&
e
)
{
this
->
_ele
=
&
e
;
}
/// return an integration method
const
IntegrationType
&
getIntegrationMethod
()
const
{
return
_integration
;}
/**
* compute shape functions
*
* @param natural_pt position in natural coordinates
* @param shape evaluated shape function matrices
*/
void
computeShapeFunctions
(
const
double
*
natural_pt
,
ShapeMatricesType
&
shape
)
const
{
NaturalCoordsMappingType
::
computeShapeMatrices
(
*
_ele
,
natural_pt
,
shape
);
}
/**
* compute shape functions
*
* @tparam T_SHAPE_MATRIX_TYPE shape matrix types to be calculated
* @param natural_pt position in natural coordinates
* @param shape evaluated shape function matrices
*/
template
<
ShapeMatrixType
T_SHAPE_MATRIX_TYPE
>
void
computeShapeFunctions
(
const
double
*
natural_pt
,
ShapeMatricesType
&
shape
)
const
{
NaturalCoordsMappingType
::
template
computeShapeMatrices
<
T_SHAPE_MATRIX_TYPE
>(
*
_ele
,
natural_pt
,
shape
);
}
private
:
const
MeshElementType
*
_ele
;
IntegrationType
_integration
;
};
}
// NumLib
#endif //TEMPLATEISOPARAMETRIC_H_
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