Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
yezhigangzju
ogs
Commits
e1ab4cd1
Commit
e1ab4cd1
authored
Nov 21, 2020
by
renchao.lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PL/CT] Add postTimeStep interface.
parent
86443d72
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
16 deletions
+14
-16
ProcessLib/ComponentTransport/ComponentTransportProcess.cpp
ProcessLib/ComponentTransport/ComponentTransportProcess.cpp
+13
-15
ProcessLib/ComponentTransport/ComponentTransportProcess.h
ProcessLib/ComponentTransport/ComponentTransportProcess.h
+1
-1
No files found.
ProcessLib/ComponentTransport/ComponentTransportProcess.cpp
View file @
e1ab4cd1
...
...
@@ -289,30 +289,28 @@ void ComponentTransportProcess::computeSecondaryVariableConcrete(
void
ComponentTransportProcess
::
postTimestepConcreteProcess
(
std
::
vector
<
GlobalVector
*>
const
&
x
,
const
double
t
,
const
double
/*delta_t*/
,
const
double
dt
,
int
const
process_id
)
{
// For the monolithic scheme, process_id is always zero.
if
(
_use_monolithic_scheme
&&
process_id
!=
0
)
{
OGS_FATAL
(
"The condition of process_id = 0 must be satisfied for "
"monolithic ComponentTransportProcess, which is a single process."
);
}
if
(
!
_use_monolithic_scheme
&&
process_id
!=
0
)
if
(
process_id
!=
0
)
{
DBUG
(
"This is the transport part of the staggered "
"ComponentTransportProcess."
);
return
;
}
std
::
vector
<
NumLib
::
LocalToGlobalIndexMap
const
*>
dof_tables
;
dof_tables
.
reserve
(
x
.
size
());
std
::
generate_n
(
std
::
back_inserter
(
dof_tables
),
x
.
size
(),
[
&
]()
{
return
_local_to_global_index_map
.
get
();
});
ProcessLib
::
ProcessVariable
const
&
pv
=
getProcessVariables
(
process_id
)[
0
];
GlobalExecutor
::
executeSelectedMemberOnDereferenced
(
&
ComponentTransportLocalAssemblerInterface
::
postTimestep
,
_local_assemblers
,
pv
.
getActiveElementIDs
(),
dof_tables
,
x
,
t
,
dt
);
if
(
!
_surfaceflux
)
// computing the surfaceflux is optional
{
return
;
}
ProcessLib
::
ProcessVariable
const
&
pv
=
getProcessVariables
(
process_id
)[
0
];
_surfaceflux
->
integrate
(
x
,
t
,
*
this
,
process_id
,
_integration_order
,
_mesh
,
pv
.
getActiveElementIDs
());
}
...
...
ProcessLib/ComponentTransport/ComponentTransportProcess.h
View file @
e1ab4cd1
...
...
@@ -133,7 +133,7 @@ public:
void
postTimestepConcreteProcess
(
std
::
vector
<
GlobalVector
*>
const
&
x
,
const
double
t
,
const
double
d
elta_
t
,
const
double
dt
,
int
const
process_id
)
override
;
private:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment