Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
iMSTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
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
Ben Boeckel
iMSTK
Commits
9bf0c5bb
Commit
9bf0c5bb
authored
8 years ago
by
Sreekanth Arikatla
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Adds time step size to the time integrator
Adds time step size to the time integrator and the corresponding API
parent
98387bdd
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
Base/TimeIntegrators/imstkTimeIntegrator.cpp
+10
-5
10 additions, 5 deletions
Base/TimeIntegrators/imstkTimeIntegrator.cpp
Base/TimeIntegrators/imstkTimeIntegrator.h
+14
-4
14 additions, 4 deletions
Base/TimeIntegrators/imstkTimeIntegrator.h
with
24 additions
and
9 deletions
Base/TimeIntegrators/imstkTimeIntegrator.cpp
+
10
−
5
View file @
9bf0c5bb
...
...
@@ -23,12 +23,10 @@ limitations under the License.
#include
<g3log/g3log.hpp>
namespace
imstk
{
TimeIntegrator
::
TimeIntegrator
(
const
TimeIntegrator
::
Type
type
)
namespace
imstk
{
this
->
setType
(
type
);
}
TimeIntegrator
::
TimeIntegrator
(
const
TimeIntegrator
::
Type
type
,
double
dT
)
:
m_type
(
type
),
m_dT
(
dT
){
}
void
TimeIntegrator
::
setType
(
const
TimeIntegrator
::
Type
type
)
...
...
@@ -65,4 +63,11 @@ TimeIntegrator::setCoefficients(const TimeIntegrator::Type type)
break
;
}
}
void
TimeIntegrator
::
setTimestepSize
(
const
double
dT
)
{
m_dT
=
dT
;
}
}
This diff is collapsed.
Click to expand it.
Base/TimeIntegrators/imstkTimeIntegrator.h
+
14
−
4
View file @
9bf0c5bb
...
...
@@ -43,14 +43,15 @@ class TimeIntegrator
ForwardEuler
,
BackwardEuler
,
NewmarkBeta
,
CentralDifference
CentralDifference
,
none
};
public
:
///
/// \brief Constructor
///
TimeIntegrator
(
const
TimeIntegrator
::
Type
type
);
TimeIntegrator
(
const
TimeIntegrator
::
Type
type
,
double
dT
);
///
/// \brief Destructor
...
...
@@ -68,6 +69,15 @@ public:
///
void
setCoefficients
(
const
TimeIntegrator
::
Type
type
);
///
/// \brief Set the time step size
///
void
setTimestepSize
(
const
double
dT
);
double
getTimestepSize
()
const
{
return
m_dT
;
}
protected
:
TimeIntegrator
::
Type
m_type
;
///> Type of the time integrator
...
...
@@ -76,9 +86,9 @@ protected:
std
::
array
<
double
,
3
>
m_gamma
;
std
::
array
<
double
,
3
>
m_beta
;
double
dT
;
///> Delta T
double
m_
dT
;
///> Delta T
};
}
}
// imstk
#endif // ifndef imstkTimeIntegrator_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