Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mpp
Mpp
Compare Revisions
55170bb97335cabdee7b033276e0ee204ae03121...a4ede4c940afce202537b28f4392a77e155e748b
Commits (1)
[285-select-plotting-data] added CreateUnique functions
· a4ede4c9
niklas.baumgarten
authored
Jul 13, 2021
a4ede4c9
Hide whitespace changes
Inline
Side-by-side
src/lib5_solvers/timeintegrator/TimeIntegrator.cpp
View file @
a4ede4c9
...
...
@@ -81,7 +81,7 @@ void NonLinearTimeIntegrator::PrintInfo() const {
TimeIntegrator
*
TimeIntegratorCreator
::
Create
()
{
try
{
switch
(
type
)
{
switch
(
type
)
{
case
EXPLICIT_EULER
:
return
new
GenericExplicitEuler
(
linearSolvers
.
at
(
0
));
case
HEUN
:
...
...
@@ -119,9 +119,13 @@ TimeIntegrator *TimeIntegratorCreator::Create() {
}
}
std
::
unique_ptr
<
TimeIntegrator
>
TimeIntegratorCreator
::
CreateUnique
()
{
return
std
::
unique_ptr
<
TimeIntegrator
>
(
Create
());
}
NonLinearTimeIntegrator
*
TimeIntegratorCreator
::
CreateNonLinearTimeIntegrator
()
{
try
{
switch
(
type
)
{
switch
(
type
)
{
case
IMPLICIT_EULER
:
return
new
ImplicitEuler
(
nonLinearSolvers
.
at
(
0
));
default:
Exit
(
to_string
(
type
)
+
" TimeIntegrator not implemented"
)
...
...
@@ -132,3 +136,8 @@ NonLinearTimeIntegrator *TimeIntegratorCreator::CreateNonLinearTimeIntegrator()
}
}
std
::
unique_ptr
<
NonLinearTimeIntegrator
>
TimeIntegratorCreator
::
CreateUniqueNonLinearTimeIntegrator
()
{
return
std
::
unique_ptr
<
NonLinearTimeIntegrator
>
(
CreateNonLinearTimeIntegrator
());
}
src/lib5_solvers/timeintegrator/TimeIntegrator.hpp
View file @
a4ede4c9
...
...
@@ -140,7 +140,11 @@ public:
TimeIntegrator
*
Create
();
std
::
unique_ptr
<
TimeIntegrator
>
CreateUnique
();
NonLinearTimeIntegrator
*
CreateNonLinearTimeIntegrator
();
std
::
unique_ptr
<
NonLinearTimeIntegrator
>
CreateUniqueNonLinearTimeIntegrator
();
};
#endif //TIMEINTEGRATOR_HPP