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
Dmitri Naumov
ogs
Commits
a08b0e51
Commit
a08b0e51
authored
6 years ago
by
wenqing
Browse files
Options
Downloads
Patches
Plain Diff
[HT] Enabled more flexible process order within the staggered coupling
parent
1acc4362
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/HT/HTProcess.cpp
+21
-24
21 additions, 24 deletions
ProcessLib/HT/HTProcess.cpp
ProcessLib/HT/HTProcess.h
+4
-1
4 additions, 1 deletion
ProcessLib/HT/HTProcess.h
with
25 additions
and
25 deletions
ProcessLib/HT/HTProcess.cpp
+
21
−
24
View file @
a08b0e51
...
@@ -153,8 +153,8 @@ void HTProcess::assembleWithJacobianConcreteProcess(
...
@@ -153,8 +153,8 @@ void HTProcess::assembleWithJacobianConcreteProcess(
ProcessLib
::
ProcessVariable
const
&
pv
=
getProcessVariables
(
process_id
)[
0
];
ProcessLib
::
ProcessVariable
const
&
pv
=
getProcessVariables
(
process_id
)[
0
];
GlobalExecutor
::
executeSelectedMemberDereferenced
(
GlobalExecutor
::
executeSelectedMemberDereferenced
(
_global_assembler
,
&
VectorMatrixAssembler
::
assembleWithJacobian
,
_global_assembler
,
&
VectorMatrixAssembler
::
assembleWithJacobian
,
_local_assemblers
,
pv
.
getActiveElementIDs
(),
dof_tables
,
t
,
x
,
_local_assemblers
,
pv
.
getActiveElementIDs
(),
dof_tables
,
t
,
x
,
xdot
,
xdot
,
dxdot_dx
,
dx_dx
,
M
,
K
,
b
,
Jac
,
_coupled_solutions
);
dxdot_dx
,
dx_dx
,
M
,
K
,
b
,
Jac
,
_coupled_solutions
);
}
}
void
HTProcess
::
preTimestepConcreteProcess
(
GlobalVector
const
&
x
,
void
HTProcess
::
preTimestepConcreteProcess
(
GlobalVector
const
&
x
,
...
@@ -193,8 +193,7 @@ void HTProcess::setCoupledTermForTheStaggeredSchemeToLocalAssemblers()
...
@@ -193,8 +193,7 @@ void HTProcess::setCoupledTermForTheStaggeredSchemeToLocalAssemblers()
ProcessLib
::
ProcessVariable
const
&
pv
=
getProcessVariables
(
process_id
)[
0
];
ProcessLib
::
ProcessVariable
const
&
pv
=
getProcessVariables
(
process_id
)[
0
];
GlobalExecutor
::
executeSelectedMemberOnDereferenced
(
GlobalExecutor
::
executeSelectedMemberOnDereferenced
(
&
HTLocalAssemblerInterface
::
setStaggeredCoupledSolutions
,
&
HTLocalAssemblerInterface
::
setStaggeredCoupledSolutions
,
_local_assemblers
,
pv
.
getActiveElementIDs
(),
_local_assemblers
,
pv
.
getActiveElementIDs
(),
_coupled_solutions
);
_coupled_solutions
);
}
}
std
::
tuple
<
NumLib
::
LocalToGlobalIndexMap
*
,
bool
>
std
::
tuple
<
NumLib
::
LocalToGlobalIndexMap
*
,
bool
>
...
@@ -221,29 +220,27 @@ HTProcess::getDOFTableForExtrapolatorData() const
...
@@ -221,29 +220,27 @@ HTProcess::getDOFTableForExtrapolatorData() const
manage_storage
);
manage_storage
);
}
}
void
HTProcess
::
setCoupledSolutionsOfPreviousTimeStep
()
void
HTProcess
::
setCoupledSolutionsOfPreviousTimeStepPerProcess
(
const
int
process_id
)
{
{
const
auto
number_of_coupled_solutions
=
const
auto
&
x_t0
=
_xs_previous_timestep
[
process_id
];
_coupled_solutions
->
coupled_xs
.
size
();
if
(
x_t0
==
nullptr
)
_coupled_solutions
->
coupled_xs_t0
.
clear
();
_coupled_solutions
->
coupled_xs_t0
.
reserve
(
number_of_coupled_solutions
);
const
int
process_id
=
_coupled_solutions
->
process_id
;
for
(
std
::
size_t
i
=
0
;
i
<
number_of_coupled_solutions
;
i
++
)
{
{
const
auto
&
x_t0
=
_xs_previous_timestep
[
process_id
];
OGS_FATAL
(
if
(
x_t0
==
nullptr
)
"Memory is not allocated for the global vector of the solution of "
{
"the previous time step for the staggered scheme.
\n
It can be done "
OGS_FATAL
(
"by overriding Process::preTimestepConcreteProcess (ref. "
"Memory is not allocated for the global vector "
"HTProcess::preTimestepConcreteProcess) "
);
"of the solution of the previous time step for the ."
"staggered scheme.
\n
It can be done by overriding "
"Process::preTimestepConcreteProcess"
"(ref. HTProcess::preTimestepConcreteProcess) "
);
}
MathLib
::
LinAlg
::
setLocalAccessibleVector
(
*
x_t0
);
_coupled_solutions
->
coupled_xs_t0
.
emplace_back
(
x_t0
.
get
());
}
}
_coupled_solutions
->
coupled_xs_t0
[
process_id
]
=
x_t0
.
get
();
}
void
HTProcess
::
setCoupledSolutionsOfPreviousTimeStep
()
{
_coupled_solutions
->
coupled_xs_t0
.
resize
(
2
);
setCoupledSolutionsOfPreviousTimeStepPerProcess
(
_heat_transport_process_id
);
setCoupledSolutionsOfPreviousTimeStepPerProcess
(
_hydraulic_process_id
);
}
}
Eigen
::
Vector3d
HTProcess
::
getFlux
(
std
::
size_t
element_id
,
Eigen
::
Vector3d
HTProcess
::
getFlux
(
std
::
size_t
element_id
,
...
...
This diff is collapsed.
Click to expand it.
ProcessLib/HT/HTProcess.h
+
4
−
1
View file @
a08b0e51
...
@@ -101,8 +101,11 @@ private:
...
@@ -101,8 +101,11 @@ private:
double
const
dt
,
double
const
dt
,
const
int
process_id
)
override
;
const
int
process_id
)
override
;
void
setCoupledSolutionsOfPreviousTimeStepPerProcess
(
const
int
process_id
);
/// Set the solutions of the previous time step to the coupled term.
/// Set the solutions of the previous time step to the coupled term.
/// It only performs for the staggered scheme.
/// It is only for the staggered scheme, and it must be called within
/// the coupling loop because that the coupling term is only created there.
void
setCoupledSolutionsOfPreviousTimeStep
();
void
setCoupledSolutionsOfPreviousTimeStep
();
/**
/**
...
...
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