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
c5cce237
Commit
c5cce237
authored
4 years ago
by
renchao.lu
Browse files
Options
Downloads
Patches
Plain Diff
[PL] Improve LocalAssemblerInterface::postTimeStep.
parent
e1ab4cd1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ProcessLib/LocalAssemblerInterface.cpp
+15
-4
15 additions, 4 deletions
ProcessLib/LocalAssemblerInterface.cpp
ProcessLib/LocalAssemblerInterface.h
+4
-4
4 additions, 4 deletions
ProcessLib/LocalAssemblerInterface.h
with
19 additions
and
8 deletions
ProcessLib/LocalAssemblerInterface.cpp
+
15
−
4
View file @
c5cce237
...
@@ -131,11 +131,22 @@ void LocalAssemblerInterface::preTimestep(
...
@@ -131,11 +131,22 @@ void LocalAssemblerInterface::preTimestep(
void
LocalAssemblerInterface
::
postTimestep
(
void
LocalAssemblerInterface
::
postTimestep
(
std
::
size_t
const
mesh_item_id
,
std
::
size_t
const
mesh_item_id
,
NumLib
::
LocalToGlobalIndexMap
const
&
dof_table
,
GlobalVector
const
&
x
,
std
::
vector
<
NumLib
::
LocalToGlobalIndexMap
const
*>
const
&
dof_table
s
,
double
const
t
,
double
const
dt
)
std
::
vector
<
GlobalVector
*>
const
&
x
,
double
const
t
,
double
const
dt
)
{
{
auto
const
indices
=
NumLib
::
getIndices
(
mesh_item_id
,
dof_table
);
std
::
vector
<
double
>
local_x_vec
;
auto
const
local_x
=
x
.
get
(
indices
);
auto
const
n_processes
=
x
.
size
();
for
(
std
::
size_t
process_id
=
0
;
process_id
<
n_processes
;
++
process_id
)
{
auto
const
indices
=
NumLib
::
getIndices
(
mesh_item_id
,
*
dof_tables
[
process_id
]);
assert
(
!
indices
.
empty
());
auto
const
local_solution
=
x
[
process_id
]
->
get
(
indices
);
local_x_vec
.
insert
(
std
::
end
(
local_x_vec
),
std
::
begin
(
local_solution
),
std
::
end
(
local_solution
));
}
auto
const
local_x
=
MathLib
::
toVector
(
local_x_vec
);
postTimestepConcrete
(
local_x
,
t
,
dt
);
postTimestepConcrete
(
local_x
,
t
,
dt
);
}
}
...
...
This diff is collapsed.
Click to expand it.
ProcessLib/LocalAssemblerInterface.h
+
4
−
4
View file @
c5cce237
...
@@ -89,10 +89,10 @@ public:
...
@@ -89,10 +89,10 @@ public:
GlobalVector
const
&
x
,
double
const
t
,
GlobalVector
const
&
x
,
double
const
t
,
double
const
delta_t
);
double
const
delta_t
);
virtual
void
postTimestep
(
std
::
size_t
const
mesh_item_id
,
virtual
void
postTimestep
(
NumLib
::
LocalToGlobalIndexMap
const
&
dof_table
,
std
::
size_t
const
mesh_item_id
,
GlobalVector
const
&
x
,
double
const
t
,
std
::
vector
<
NumLib
::
LocalToGlobalIndexMap
const
*>
const
&
dof_tables
,
double
const
dt
);
std
::
vector
<
GlobalVector
*>
const
&
x
,
double
const
t
,
double
const
dt
);
void
postNonLinearSolver
(
std
::
size_t
const
mesh_item_id
,
void
postNonLinearSolver
(
std
::
size_t
const
mesh_item_id
,
NumLib
::
LocalToGlobalIndexMap
const
&
dof_table
,
NumLib
::
LocalToGlobalIndexMap
const
&
dof_table
,
...
...
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