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
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
Yuhao Liu
ogs
Commits
826bd18d
Commit
826bd18d
authored
8 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[NL] Pass time to ODESystem::getKnownSolutions();
parent
2f5915bc
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NumLib/ODESolver/ODESystem.h
+5
-1
5 additions, 1 deletion
NumLib/ODESolver/ODESystem.h
NumLib/ODESolver/TimeDiscretizedODESystem.h
+2
-1
2 additions, 1 deletion
NumLib/ODESolver/TimeDiscretizedODESystem.h
ProcessLib/Process.h
+2
-2
2 additions, 2 deletions
ProcessLib/Process.h
with
9 additions
and
4 deletions
NumLib/ODESolver/ODESystem.h
+
5
−
1
View file @
826bd18d
...
@@ -65,8 +65,12 @@ public:
...
@@ -65,8 +65,12 @@ public:
using
Index
=
typename
MathLib
::
MatrixVectorTraits
<
Matrix
>::
Index
;
using
Index
=
typename
MathLib
::
MatrixVectorTraits
<
Matrix
>::
Index
;
virtual
std
::
vector
<
ProcessLib
::
DirichletBc
<
Index
>
>
const
*
getKnownSolutions
()
const
//! Provides known solutions (Dirichlet boundary conditions) vector for
//! the ode system at the given time \c t.
virtual
std
::
vector
<
ProcessLib
::
DirichletBc
<
Index
>>
const
*
getKnownSolutions
(
double
const
t
)
const
{
{
(
void
)
t
;
return
nullptr
;
// by default there are no known solutions
return
nullptr
;
// by default there are no known solutions
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
NumLib/ODESolver/TimeDiscretizedODESystem.h
+
2
−
1
View file @
826bd18d
...
@@ -310,7 +310,8 @@ public:
...
@@ -310,7 +310,8 @@ public:
void
applyKnownSolutionsPicard
(
Matrix
&
A
,
Vector
&
rhs
,
Vector
&
x
)
override
void
applyKnownSolutionsPicard
(
Matrix
&
A
,
Vector
&
rhs
,
Vector
&
x
)
override
{
{
auto
const
*
known_solutions
=
_ode
.
getKnownSolutions
();
auto
const
*
known_solutions
=
_ode
.
getKnownSolutions
(
_time_disc
.
getCurrentTime
());
if
(
known_solutions
)
{
if
(
known_solutions
)
{
for
(
auto
const
&
bc
:
*
known_solutions
)
{
for
(
auto
const
&
bc
:
*
known_solutions
)
{
...
...
This diff is collapsed.
Click to expand it.
ProcessLib/Process.h
+
2
−
2
View file @
826bd18d
...
@@ -213,8 +213,8 @@ public:
...
@@ -213,8 +213,8 @@ public:
// VectoMatrixAssembler since that will work for all kinds of processes.
// VectoMatrixAssembler since that will work for all kinds of processes.
}
}
std
::
vector
<
DirichletBc
<
Index
>
>
const
*
getKnownSolutions
(
)
std
::
vector
<
DirichletBc
<
Index
>>
const
*
getKnownSolutions
(
const
override
final
double
const
/*t*/
)
const
override
final
{
{
return
&
_dirichlet_bcs
;
return
&
_dirichlet_bcs
;
}
}
...
...
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