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
Chaofan Chen
ogs
Commits
aa73fe50
Commit
aa73fe50
authored
2 years ago
by
Christoph Lehmann
Browse files
Options
Downloads
Patches
Plain Diff
[PL] Use reflection for IP data output
parent
3648c73d
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
ProcessLib/ThermoRichardsMechanics/LocalAssemblerInterface.h
+12
-48
12 additions, 48 deletions
ProcessLib/ThermoRichardsMechanics/LocalAssemblerInterface.h
with
12 additions
and
48 deletions
ProcessLib/ThermoRichardsMechanics/LocalAssemblerInterface.h
+
12
−
48
View file @
aa73fe50
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
#include
"NumLib/Extrapolation/ExtrapolatableElement.h"
#include
"NumLib/Extrapolation/ExtrapolatableElement.h"
#include
"NumLib/Fem/Integration/GenericIntegrationMethod.h"
#include
"NumLib/Fem/Integration/GenericIntegrationMethod.h"
#include
"ProcessLib/LocalAssemblerInterface.h"
#include
"ProcessLib/LocalAssemblerInterface.h"
#include
"ProcessLib/Reflection/ReflectionSetIPData.h"
#include
"ProcessLib/ThermoRichardsMechanics/ConstitutiveSetting.h"
#include
"ProcessLib/ThermoRichardsMechanics/ConstitutiveSetting.h"
#include
"ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsProcessData.h"
#include
"ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsProcessData.h"
#include
"ProcessLib/Utils/SetOrGetIntegrationPointData.h"
namespace
ProcessLib
::
ThermoRichardsMechanics
namespace
ProcessLib
::
ThermoRichardsMechanics
{
{
...
@@ -66,56 +66,20 @@ struct LocalAssemblerInterface : public ProcessLib::LocalAssemblerInterface,
...
@@ -66,56 +66,20 @@ struct LocalAssemblerInterface : public ProcessLib::LocalAssemblerInterface,
element_
.
getID
());
element_
.
getID
());
}
}
if
(
name
==
"sigma_ip"
)
if
(
name
==
"sigma_ip"
&&
process_data_
.
initial_stress
!=
nullptr
)
{
{
if
(
process_data_
.
initial_stress
!=
nullptr
)
OGS_FATAL
(
{
"Setting initial conditions for stress from integration "
OGS_FATAL
(
"point data and from a parameter '{:s}' is not possible "
"Setting initial conditions for stress from integration "
"simultaneously."
,
"point data and from a parameter '{:s}' is not possible "
process_data_
.
initial_stress
->
name
);
"simultaneously."
,
process_data_
.
initial_stress
->
name
);
}
return
ProcessLib
::
setIntegrationPointKelvinVectorData
<
DisplacementDim
>
(
values
,
current_states_
,
[](
auto
&
cs
)
->
auto
&
{
return
cs
.
s_mech_data
.
sigma_eff
;
});
}
}
if
(
name
==
"saturation_ip"
)
// TODO this logic could be pulled out of the local assembler into the
{
// process. That might lead to a slightly better performance due to less
return
ProcessLib
::
setIntegrationPointScalarData
(
// string comparisons.
values
,
current_states_
,
return
ProcessLib
::
Reflection
::
reflectSetIPData
<
DisplacementDim
>
(
[](
auto
&
state
)
->
auto
&
{
return
state
.
S_L_data
.
S_L
;
});
name
,
values
,
current_states_
);
}
if
(
name
==
"porosity_ip"
)
{
return
ProcessLib
::
setIntegrationPointScalarData
(
values
,
current_states_
,
[](
auto
&
state
)
->
auto
&
{
return
state
.
poro_data
.
phi
;
});
}
if
(
name
==
"transport_porosity_ip"
)
{
return
ProcessLib
::
setIntegrationPointScalarData
(
values
,
current_states_
,
[](
auto
&
state
)
->
auto
&
{
return
state
.
transport_poro_data
.
phi
;
});
}
if
(
name
==
"swelling_stress_ip"
)
{
return
ProcessLib
::
setIntegrationPointKelvinVectorData
<
DisplacementDim
>
(
values
,
current_states_
,
[](
auto
&
cs
)
->
auto
&
{
return
cs
.
swelling_data
.
sigma_sw
;
});
}
if
(
name
==
"epsilon_ip"
)
{
return
ProcessLib
::
setIntegrationPointKelvinVectorData
<
DisplacementDim
>
(
values
,
current_states_
,
[](
auto
&
cs
)
->
auto
&
{
return
cs
.
eps_data
.
eps
;
});
}
return
0
;
}
}
// TODO move to NumLib::ExtrapolatableElement
// TODO move to NumLib::ExtrapolatableElement
...
...
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