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
Chaofan Chen
ogs
Commits
2cd6be7d
Commit
2cd6be7d
authored
9 years ago
by
Christoph Lehmann
Browse files
Options
Downloads
Patches
Plain Diff
[NL] changed to new ConfigTree
parent
b6675867
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
NumLib/TimeStepping/Algorithms/FixedTimeStepping.cpp
+9
-25
9 additions, 25 deletions
NumLib/TimeStepping/Algorithms/FixedTimeStepping.cpp
NumLib/TimeStepping/Algorithms/FixedTimeStepping.h
+2
-2
2 additions, 2 deletions
NumLib/TimeStepping/Algorithms/FixedTimeStepping.h
with
11 additions
and
27 deletions
NumLib/TimeStepping/Algorithms/FixedTimeStepping.cpp
+
9
−
25
View file @
2cd6be7d
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include
<limits>
#include
<limits>
#include
<cassert>
#include
<cassert>
#include
"BaseLib/ConfigTree.h"
#include
"BaseLib/ConfigTree
New
.h"
#include
"logog/include/logog.hpp"
#include
"logog/include/logog.hpp"
namespace
NumLib
namespace
NumLib
...
@@ -32,31 +32,15 @@ FixedTimeStepping::FixedTimeStepping(double t0, double tn, double dt)
...
@@ -32,31 +32,15 @@ FixedTimeStepping::FixedTimeStepping(double t0, double tn, double dt)
{}
{}
FixedTimeStepping
*
FixedTimeStepping
*
FixedTimeStepping
::
newInstance
(
BaseLib
::
ConfigTree
const
&
config
)
FixedTimeStepping
::
newInstance
(
BaseLib
::
ConfigTree
New
const
&
config
)
{
{
assert
(
config
.
get
<
std
::
string
>
(
"type"
)
==
"FixedTimeStepping"
);
config
.
checkConfParam
(
"type"
,
"FixedTimeStepping"
);
auto
const
t_initial
=
config
.
get_optional
<
double
>
(
"t_initial"
);
auto
const
t_initial
=
config
.
getConfParam
<
double
>
(
"t_initial"
);
auto
const
t_end
=
config
.
get_optional
<
double
>
(
"t_end"
);
auto
const
t_end
=
config
.
getConfParam
<
double
>
(
"t_end"
);
auto
const
dt
=
config
.
get_optional
<
double
>
(
"dt"
);
auto
const
dt
=
config
.
getConfParam
<
double
>
(
"dt"
);
if
(
!
t_initial
)
return
new
FixedTimeStepping
(
t_initial
,
t_end
,
dt
);
{
ERR
(
"could not find required parameter t_initial."
);
return
nullptr
;
}
if
(
!
t_end
)
{
ERR
(
"could not find required parameter t_end."
);
return
nullptr
;
}
if
(
!
dt
)
{
ERR
(
"could not find required parameter dt."
);
return
nullptr
;
}
return
new
FixedTimeStepping
(
*
t_initial
,
*
t_end
,
*
dt
);
}
}
const
TimeStep
FixedTimeStepping
::
getTimeStep
()
const
const
TimeStep
FixedTimeStepping
::
getTimeStep
()
const
...
...
This diff is collapsed.
Click to expand it.
NumLib/TimeStepping/Algorithms/FixedTimeStepping.h
+
2
−
2
View file @
2cd6be7d
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
#include
<vector>
#include
<vector>
#include
"BaseLib/ConfigTree.h"
#include
"BaseLib/ConfigTree
New
.h"
#include
"ITimeStepAlgorithm.h"
#include
"ITimeStepAlgorithm.h"
namespace
NumLib
namespace
NumLib
...
@@ -64,7 +64,7 @@ public:
...
@@ -64,7 +64,7 @@ public:
*
*
* Currently this function only covers uniform timestep size.
* Currently this function only covers uniform timestep size.
*/
*/
static
FixedTimeStepping
*
newInstance
(
BaseLib
::
ConfigTree
const
&
config
);
static
FixedTimeStepping
*
newInstance
(
BaseLib
::
ConfigTree
New
const
&
config
);
virtual
~
FixedTimeStepping
()
{}
virtual
~
FixedTimeStepping
()
{}
...
...
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