Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
waves
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
Aerospace and Mechanical Engineering
waves
Commits
ef820fe4
Commit
ef820fe4
authored
5 years ago
by
Kim Liegeois
Browse files
Options
Downloads
Patches
Plain Diff
Katropton: solve multiple definitions error
parent
c2b1138e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!51
Update trilinos and update mrstlnos->katropton
Pipeline
#939
passed
5 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
katropton/src/LinearSolver.h
+40
-57
40 additions, 57 deletions
katropton/src/LinearSolver.h
with
40 additions
and
57 deletions
katropton/src/LinearSolver.h
+
40
−
57
View file @
ef820fe4
...
...
@@ -90,9 +90,26 @@ public:
#endif
public:
/**
* @brief LinearSolver constructor
*
* Arguments:
* <ul>
* <li> _pbl: A Problem object,
* <li> _solverList: an RCP to a ParameterList object which describes the solver,
* <li> _numPrimalDPN: the number of degrees of freedom per node (without taking into account the Lagrange multipliers),
* <li> _minimum_ensemble_size: the used ensemble size (1, 8, 16, 24, or 32),
* </ul>
*/
LinearSolver
(
Problem
&
_pbl
,
Teuchos
::
RCP
<
Teuchos
::
ParameterList
>
_solverList
,
int
_numPrimalDPN
,
size_t
_minimum_ensemble_size
);
size_t
_minimum_ensemble_size
)
:
pbl
(
_pbl
),
solverList
(
_solverList
),
numPrimalDPN
(
_numPrimalDPN
),
minimum_ensemble_size
(
_minimum_ensemble_size
)
{
dhook
=
NULL
;
}
virtual
~
LinearSolver
()
{}
...
...
@@ -104,9 +121,19 @@ public:
static
fwk
::
Timers
tms
;
return
tms
;
}
void
setGUI
(
DisplayHook
&
hook
);
/**
* @brief Set the GUI.
*/
void
setGUI
(
DisplayHook
&
hook
)
{
dhook
=
&
hook
;
}
protected
:
/**
* @brief Write results on disk in VTK format.
*/
template
<
typename
scalar
>
void
writeResults
(
Teuchos
::
RCP
<
Tpetra
::
Vector
<
scalar
,
Map
::
local_ordinal_type
,
Map
::
global_ordinal_type
>>
xPost
,
...
...
@@ -116,64 +143,20 @@ protected:
bool
final_result
,
bool
write_txt
,
Teuchos
::
RCP
<
Map
>
map
,
Teuchos
::
RCP
<
RandomField
<
scalar
,
Kokkos
::
DefaultExecutionSpace
>>
random_field
);
};
/**
* @brief LinearSolver constructor
*
* Arguments:
* <ul>
* <li> _pbl: A Problem object,
* <li> _solverList: an RCP to a ParameterList object which describes the solver,
* <li> _numPrimalDPN: the number of degrees of freedom per node (without taking into account the Lagrange multipliers),
* <li> _minimum_ensemble_size: the used ensemble size (1, 8, 16, 24, or 32),
* </ul>
*/
LinearSolver
::
LinearSolver
(
Problem
&
_pbl
,
Teuchos
::
RCP
<
Teuchos
::
ParameterList
>
_solverList
,
int
_numPrimalDPN
,
size_t
_minimum_ensemble_size
)
:
pbl
(
_pbl
),
solverList
(
_solverList
),
numPrimalDPN
(
_numPrimalDPN
),
minimum_ensemble_size
(
_minimum_ensemble_size
)
{
dhook
=
NULL
;
}
/**
* @brief Write results on disk in VTK format.
*/
template
<
typename
scalar
>
void
LinearSolver
::
writeResults
(
Teuchos
::
RCP
<
Tpetra
::
Vector
<
scalar
,
Map
::
local_ordinal_type
,
Map
::
global_ordinal_type
>>
xPost
,
size_t
numNodes
,
std
::
string
name
,
size_t
ast
,
bool
final_result
,
bool
write_txt
,
Teuchos
::
RCP
<
Map
>
map
,
Teuchos
::
RCP
<
RandomField
<
scalar
,
Kokkos
::
DefaultExecutionSpace
>>
random_field
)
{
LinearSolver
::
getTimers
()[
"write results"
].
start
();
typedef
Map
::
local_ordinal_type
LocalOrdinal
;
typedef
Map
::
global_ordinal_type
GlobalOrdinal
;
writeResultsVTK
<
scalar
,
LocalOrdinal
,
GlobalOrdinal
>
(
pbl
,
xPost
,
map
,
random_field
,
name
,
ast
,
final_result
,
write_txt
);
Teuchos
::
RCP
<
RandomField
<
scalar
,
Kokkos
::
DefaultExecutionSpace
>>
random_field
)
{
LinearSolver
::
getTimers
()[
"write results"
].
start
();
LinearSolver
::
getTimers
()[
"write results"
].
stop
()
;
}
typedef
Map
::
local_ordinal_type
LocalOrdinal
;
typedef
Map
::
global_ordinal_type
GlobalOrdinal
;
/**
* @brief Set the GUI.
*/
void
LinearSolver
::
setGUI
(
DisplayHook
&
hook
)
{
dhook
=
&
hook
;
}
writeResultsVTK
<
scalar
,
LocalOrdinal
,
GlobalOrdinal
>
(
pbl
,
xPost
,
map
,
random_field
,
name
,
ast
,
final_result
,
write_txt
);
LinearSolver
::
getTimers
()[
"write results"
].
stop
();
}
};
}
// namespace katropton
#endif //KATROPTON_LINEARSOLVER_H
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