Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
wenqing
ogs
Commits
3f8f9adc
Commit
3f8f9adc
authored
4 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[PL] Deduplicate code. Use initShapeMatrices.
parent
3e5f09ae
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
ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryConditionLocalAssembler.h
+7
-15
7 additions, 15 deletions
...tion/ConstraintDirichletBoundaryConditionLocalAssembler.h
ProcessLib/SurfaceFlux/SurfaceFluxLocalAssembler.h
+5
-15
5 additions, 15 deletions
ProcessLib/SurfaceFlux/SurfaceFluxLocalAssembler.h
with
12 additions
and
30 deletions
ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryConditionLocalAssembler.h
+
7
−
15
View file @
3f8f9adc
...
@@ -86,27 +86,19 @@ public:
...
@@ -86,27 +86,19 @@ public:
_surface_element_normal
(
MeshLib
::
calculateNormalizedSurfaceNormal
(
_surface_element_normal
(
MeshLib
::
calculateNormalizedSurfaceNormal
(
_surface_element
,
*
(
bulk_mesh
.
getElements
()[
_bulk_element_id
])))
_surface_element
,
*
(
bulk_mesh
.
getElements
()[
_bulk_element_id
])))
{
{
auto
const
fe
=
NumLib
::
createIsoparametricFiniteElement
<
auto
const
shape_matrices
=
ShapeFunction
,
ShapeMatricesType
>
(
_surface_element
);
initShapeMatrices
<
ShapeFunction
,
ShapeMatricesType
,
GlobalDim
,
NumLib
::
ShapeMatrixType
::
N_J
>
(
_surface_element
,
is_axially_symmetric
,
_integration_method
);
auto
const
bulk_face_id
=
bulk_ids
[
_surface_element
.
getID
()].
second
;
auto
const
n_integration_points
=
auto
const
n_integration_points
=
_integration_method
.
getNumberOfPoints
();
_integration_method
.
getNumberOfPoints
();
auto
const
bulk_face_id
=
bulk_ids
[
_surface_element
.
getID
()].
second
;
std
::
vector
<
typename
ShapeMatricesType
::
ShapeMatrices
,
Eigen
::
aligned_allocator
<
typename
ShapeMatricesType
::
ShapeMatrices
>>
shape_matrices
;
shape_matrices
.
reserve
(
n_integration_points
);
_ip_data
.
reserve
(
n_integration_points
);
_ip_data
.
reserve
(
n_integration_points
);
for
(
unsigned
ip
=
0
;
ip
<
n_integration_points
;
++
ip
)
for
(
unsigned
ip
=
0
;
ip
<
n_integration_points
;
++
ip
)
{
{
shape_matrices
.
emplace_back
(
ShapeFunction
::
DIM
,
GlobalDim
,
ShapeFunction
::
NPOINTS
);
fe
.
template
computeShapeFunctions
<
NumLib
::
ShapeMatrixType
::
N_J
>(
_integration_method
.
getWeightedPoint
(
ip
).
getCoords
(),
shape_matrices
[
ip
],
GlobalDim
,
is_axially_symmetric
);
auto
const
&
wp
=
_integration_method
.
getWeightedPoint
(
ip
);
auto
const
&
wp
=
_integration_method
.
getWeightedPoint
(
ip
);
auto
bulk_element_point
=
MeshLib
::
getBulkElementPoint
(
auto
bulk_element_point
=
MeshLib
::
getBulkElementPoint
(
bulk_mesh
,
_bulk_element_id
,
bulk_face_id
,
wp
);
bulk_mesh
,
_bulk_element_id
,
bulk_face_id
,
wp
);
...
...
This diff is collapsed.
Click to expand it.
ProcessLib/SurfaceFlux/SurfaceFluxLocalAssembler.h
+
5
−
15
View file @
3f8f9adc
...
@@ -73,25 +73,15 @@ public:
...
@@ -73,25 +73,15 @@ public:
_bulk_element_id
(
bulk_element_ids
[
surface_element
.
getID
()]),
_bulk_element_id
(
bulk_element_ids
[
surface_element
.
getID
()]),
_bulk_face_id
(
bulk_face_ids
[
surface_element
.
getID
()])
_bulk_face_id
(
bulk_face_ids
[
surface_element
.
getID
()])
{
{
auto
const
fe
=
NumLib
::
createIsoparametricFiniteElement
<
auto
const
n_integration_points
=
ShapeFunction
,
ShapeMatricesType
>
(
_surface_element
);
std
::
size_t
const
n_integration_points
=
_integration_method
.
getNumberOfPoints
();
_integration_method
.
getNumberOfPoints
();
std
::
vector
<
auto
const
shape_matrices
=
typename
ShapeMatricesType
::
ShapeMatrices
,
NumLib
::
initShapeMatrices
<
ShapeFunction
,
ShapeMatricesType
,
Eigen
::
aligned_allocator
<
typename
ShapeMatricesType
::
ShapeMatrices
>>
GlobalDim
,
NumLib
::
ShapeMatrixType
::
N_J
>
(
shape_matrices
;
_surface_element
,
is_axially_symmetric
,
_integration_method
);
shape_matrices
.
reserve
(
n_integration_points
);
_detJ_times_integralMeasure
.
reserve
(
n_integration_points
);
for
(
std
::
size_t
ip
=
0
;
ip
<
n_integration_points
;
++
ip
)
for
(
std
::
size_t
ip
=
0
;
ip
<
n_integration_points
;
++
ip
)
{
{
shape_matrices
.
emplace_back
(
ShapeFunction
::
DIM
,
GlobalDim
,
ShapeFunction
::
NPOINTS
);
fe
.
template
computeShapeFunctions
<
NumLib
::
ShapeMatrixType
::
N_J
>(
_integration_method
.
getWeightedPoint
(
ip
).
getCoords
(),
shape_matrices
[
ip
],
GlobalDim
,
is_axially_symmetric
);
_detJ_times_integralMeasure
.
push_back
(
_detJ_times_integralMeasure
.
push_back
(
shape_matrices
[
ip
].
detJ
*
shape_matrices
[
ip
].
integralMeasure
);
shape_matrices
[
ip
].
detJ
*
shape_matrices
[
ip
].
integralMeasure
);
}
}
...
...
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