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
Özgür Ozan Sen
ogs
Commits
dc16b31c
Commit
dc16b31c
authored
2 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
Revert "[cli] Removed vtkMPIController dependency in cli."
This reverts commit
325168f0
.
parent
039a5acc
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
Applications/ApplicationsLib/Simulation.cpp
+11
-1
11 additions, 1 deletion
Applications/ApplicationsLib/Simulation.cpp
Applications/ApplicationsLib/Simulation.h
+8
-0
8 additions, 0 deletions
Applications/ApplicationsLib/Simulation.h
with
19 additions
and
1 deletion
Applications/ApplicationsLib/Simulation.cpp
+
11
−
1
View file @
dc16b31c
...
@@ -25,9 +25,16 @@
...
@@ -25,9 +25,16 @@
#include
"ProcessLib/TimeLoop.h"
#include
"ProcessLib/TimeLoop.h"
Simulation
::
Simulation
(
int
argc
,
char
*
argv
[])
Simulation
::
Simulation
(
int
argc
,
char
*
argv
[])
:
linear_solver_library_setup
(
argc
,
argv
),
test_definition
{
std
::
nullopt
}
:
linear_solver_library_setup
(
argc
,
argv
),
#if defined(USE_PETSC)
controller
(
vtkSmartPointer
<
vtkMPIController
>::
New
()),
#endif
test_definition
{
std
::
nullopt
}
{
{
#if defined(USE_PETSC)
#if defined(USE_PETSC)
controller
->
Initialize
(
&
argc
,
&
argv
,
1
);
vtkMPIController
::
SetGlobalController
(
controller
);
{
// Can be called only after MPI_INIT.
{
// Can be called only after MPI_INIT.
int
mpi_rank
;
int
mpi_rank
;
MPI_Comm_rank
(
PETSC_COMM_WORLD
,
&
mpi_rank
);
MPI_Comm_rank
(
PETSC_COMM_WORLD
,
&
mpi_rank
);
...
@@ -161,4 +168,7 @@ Simulation::~Simulation()
...
@@ -161,4 +168,7 @@ Simulation::~Simulation()
InSituLib
::
Finalize
();
InSituLib
::
Finalize
();
}
}
#endif
#endif
#if defined(USE_PETSC)
controller
->
Finalize
(
1
);
#endif
}
}
This diff is collapsed.
Click to expand it.
Applications/ApplicationsLib/Simulation.h
+
8
−
0
View file @
dc16b31c
...
@@ -10,6 +10,11 @@
...
@@ -10,6 +10,11 @@
*
*
*/
*/
#ifdef USE_PETSC
#include
<vtkMPIController.h>
#include
<vtkSmartPointer.h>
#endif
#include
"Applications/ApplicationsLib/LinearSolverLibrarySetup.h"
#include
"Applications/ApplicationsLib/LinearSolverLibrarySetup.h"
#include
"Applications/ApplicationsLib/TestDefinition.h"
#include
"Applications/ApplicationsLib/TestDefinition.h"
...
@@ -39,6 +44,9 @@ public:
...
@@ -39,6 +44,9 @@ public:
private:
private:
ApplicationsLib
::
LinearSolverLibrarySetup
linear_solver_library_setup
;
ApplicationsLib
::
LinearSolverLibrarySetup
linear_solver_library_setup
;
#if defined(USE_PETSC)
vtkSmartPointer
<
vtkMPIController
>
controller
;
#endif
std
::
unique_ptr
<
ProjectData
>
project_data
;
std
::
unique_ptr
<
ProjectData
>
project_data
;
std
::
optional
<
ApplicationsLib
::
TestDefinition
>
test_definition
;
std
::
optional
<
ApplicationsLib
::
TestDefinition
>
test_definition
;
};
};
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