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
fd0fc30c
Commit
fd0fc30c
authored
9 months ago
by
wenqing
Browse files
Options
Downloads
Patches
Plain Diff
[M/Bbar] using std::optional as the return type
of the function to comput B_dil_bar matrix, and some other minor changes
parent
ee66e627
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/Deformation/LinearBMatrix.h
+12
-9
12 additions, 9 deletions
ProcessLib/Deformation/LinearBMatrix.h
ProcessLib/SmallDeformation/SmallDeformationFEM.h
+5
-6
5 additions, 6 deletions
ProcessLib/SmallDeformation/SmallDeformationFEM.h
with
17 additions
and
15 deletions
ProcessLib/Deformation/LinearBMatrix.h
+
12
−
9
View file @
fd0fc30c
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include
<Eigen/Core>
#include
<Eigen/Core>
#include
<cmath>
#include
<cmath>
#include
<optional>
#include
"MeshLib/Elements/Elements.h"
#include
"MeshLib/Elements/Elements.h"
#include
"NumLib/Fem/Integration/GenericIntegrationMethod.h"
#include
"NumLib/Fem/Integration/GenericIntegrationMethod.h"
...
@@ -140,7 +141,7 @@ template <int DisplacementDim, int NPOINTS, typename BBarMatrixType,
...
@@ -140,7 +141,7 @@ template <int DisplacementDim, int NPOINTS, typename BBarMatrixType,
void
applyBbar
(
BBarMatrixType
const
&
B_bar
,
BMatrixType
&
B
,
void
applyBbar
(
BBarMatrixType
const
&
B_bar
,
BMatrixType
&
B
,
const
bool
is_axially_symmetric
)
const
bool
is_axially_symmetric
)
{
{
if
(
DisplacementDim
==
3
)
if
constexpr
(
DisplacementDim
==
3
)
{
{
for
(
int
i
=
0
;
i
<
NPOINTS
;
++
i
)
for
(
int
i
=
0
;
i
<
NPOINTS
;
++
i
)
{
{
...
@@ -163,6 +164,7 @@ void applyBbar(BBarMatrixType const& B_bar, BMatrixType& B,
...
@@ -163,6 +164,7 @@ void applyBbar(BBarMatrixType const& B_bar, BMatrixType& B,
return
;
return
;
}
}
// 2D or axisymmetry
for
(
int
i
=
0
;
i
<
NPOINTS
;
++
i
)
for
(
int
i
=
0
;
i
<
NPOINTS
;
++
i
)
{
{
auto
B_i_0
=
B
.
col
(
i
);
auto
B_i_0
=
B
.
col
(
i
);
...
@@ -186,22 +188,23 @@ void applyBbar(BBarMatrixType const& B_bar, BMatrixType& B,
...
@@ -186,22 +188,23 @@ void applyBbar(BBarMatrixType const& B_bar, BMatrixType& B,
/// Fills a B matrix, or a B bar matrix if required.
/// Fills a B matrix, or a B bar matrix if required.
template
<
int
DisplacementDim
,
int
NPOINTS
,
typename
BBarMatrixType
,
template
<
int
DisplacementDim
,
int
NPOINTS
,
typename
BBarMatrixType
,
typename
BMatrixType
,
typename
N_Type
,
typename
DNDX_Type
>
typename
BMatrixType
,
typename
N_Type
,
typename
DNDX_Type
>
BMatrixType
computeBMatrixPossiblyWithBbar
(
DNDX_Type
const
&
dNdx
,
BMatrixType
computeBMatrixPossiblyWithBbar
(
N
_Type
const
&
N
,
DNDX
_Type
const
&
dNdx
,
BBarMatrix
Type
const
&
B_dil_bar
,
N_
Type
const
&
N
,
const
double
radius
,
std
::
optional
<
BBarMatrixType
>
const
&
B_dil_bar
,
const
bool
is_axially_symmetric
,
const
double
radius
,
const
bool
use_b_bar
)
const
bool
is_axially_symmetric
)
{
{
auto
B
=
computeBMatrix
<
DisplacementDim
,
NPOINTS
,
BMatrixType
,
N_Type
,
auto
B
=
computeBMatrix
<
DisplacementDim
,
NPOINTS
,
BMatrixType
,
N_Type
,
DNDX_Type
>
(
dNdx
,
N
,
radius
,
is_axially_symmetric
);
DNDX_Type
>
(
dNdx
,
N
,
radius
,
is_axially_symmetric
);
if
(
!
use_b_bar
)
if
(
!
B_dil_bar
)
{
{
return
B
;
return
B
;
}
}
detail
::
applyBbar
<
DisplacementDim
,
NPOINTS
,
BBarMatrixType
,
BMatrixType
>
(
detail
::
applyBbar
<
DisplacementDim
,
NPOINTS
,
BBarMatrixType
,
BMatrixType
>
(
B_dil_bar
,
B
,
is_axially_symmetric
);
*
B_dil_bar
,
B
,
is_axially_symmetric
);
return
B
;
return
B
;
}
}
...
...
This diff is collapsed.
Click to expand it.
ProcessLib/SmallDeformation/SmallDeformationFEM.h
+
5
−
6
View file @
fd0fc30c
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include
<limits>
#include
<limits>
#include
<memory>
#include
<memory>
#include
<optional>
#include
<vector>
#include
<vector>
#include
"LocalAssemblerInterface.h"
#include
"LocalAssemblerInterface.h"
...
@@ -211,11 +212,11 @@ public:
...
@@ -211,11 +212,11 @@ public:
"implemented."
);
"implemented."
);
}
}
BBarMatrixType
getDilatationalBBarMatrix
()
const
std
::
optional
<
BBarMatrixType
>
getDilatationalBBarMatrix
()
const
{
{
if
(
!
(
this
->
process_data_
.
use_b_bar
))
if
(
!
(
this
->
process_data_
.
use_b_bar
))
{
{
return
{}
;
return
std
::
nullopt
;
}
}
return
LinearBMatrix
::
computeDilatationalBbar
<
return
LinearBMatrix
::
computeDilatationalBbar
<
...
@@ -271,8 +272,7 @@ public:
...
@@ -271,8 +272,7 @@ public:
auto
const
B
=
LinearBMatrix
::
computeBMatrixPossiblyWithBbar
<
auto
const
B
=
LinearBMatrix
::
computeBMatrixPossiblyWithBbar
<
DisplacementDim
,
ShapeFunction
::
NPOINTS
,
BBarMatrixType
,
DisplacementDim
,
ShapeFunction
::
NPOINTS
,
BBarMatrixType
,
typename
BMatricesType
::
BMatrixType
>
(
typename
BMatricesType
::
BMatrixType
>
(
dNdx
,
N
,
B_dil_bar
,
x_coord
,
this
->
is_axially_symmetric_
,
dNdx
,
N
,
B_dil_bar
,
x_coord
,
this
->
is_axially_symmetric_
);
this
->
process_data_
.
use_b_bar
);
auto
const
CD
=
updateConstitutiveRelations
(
auto
const
CD
=
updateConstitutiveRelations
(
B
,
u
,
u_prev
,
x_position
,
t
,
dt
,
constitutive_setting
,
medium
,
B
,
u
,
u_prev
,
x_position
,
t
,
dt
,
constitutive_setting
,
medium
,
...
@@ -321,8 +321,7 @@ public:
...
@@ -321,8 +321,7 @@ public:
auto
const
B
=
LinearBMatrix
::
computeBMatrixPossiblyWithBbar
<
auto
const
B
=
LinearBMatrix
::
computeBMatrixPossiblyWithBbar
<
DisplacementDim
,
ShapeFunction
::
NPOINTS
,
BBarMatrixType
,
DisplacementDim
,
ShapeFunction
::
NPOINTS
,
BBarMatrixType
,
typename
BMatricesType
::
BMatrixType
>
(
typename
BMatricesType
::
BMatrixType
>
(
dNdx
,
N
,
B_dil_bar
,
x_coord
,
this
->
is_axially_symmetric_
,
dNdx
,
N
,
B_dil_bar
,
x_coord
,
this
->
is_axially_symmetric_
);
this
->
process_data_
.
use_b_bar
);
updateConstitutiveRelations
(
updateConstitutiveRelations
(
B
,
local_x
,
local_x_prev
,
x_position
,
t
,
dt
,
B
,
local_x
,
local_x_prev
,
x_position
,
t
,
dt
,
...
...
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