Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dune-fem-dg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
dune-fem
dune-fem-dg
Commits
b5a2c071
Commit
b5a2c071
authored
9 years ago
by
Stefan Girke
Browse files
Options
Downloads
Patches
Plain Diff
provide missing steady state methods
parent
d5a9b321
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/fem-dg/algorithm/caller/adapt.hh
+76
-0
76 additions, 0 deletions
dune/fem-dg/algorithm/caller/adapt.hh
with
76 additions
and
0 deletions
dune/fem-dg/algorithm/caller/adapt.hh
+
76
−
0
View file @
b5a2c071
...
...
@@ -216,6 +216,33 @@ namespace Fem
}
}
/**
* \brief Prepare an initial refined grid.
*
* \param[in] alg pointer to the calling sub-algorithm
* \param[in] loop number of eoc loop
*/
template
<
class
SubAlgImp
>
void
initializeEnd
(
SubAlgImp
*
alg
,
int
loop
)
{
if
(
adaptive
()
)
{
// call initial adaptation
estimateMark
(
true
);
adapt
(
alg
,
loop
);
// setup problem again
alg
->
initialize
(
loop
);
// some info in verbose mode
if
(
Fem
::
Parameter
::
verbose
()
)
{
std
::
cout
<<
"Start adaptation: step "
<<
startCount
<<
", grid size: "
<<
alg
->
gridSize
()
<<
std
::
endl
;
}
}
}
/**
* \brief Calls the estimate, mark and adaptation routines to refine the grid.
*
...
...
@@ -233,6 +260,19 @@ namespace Fem
}
}
/**
* \brief Calls the estimate, mark and adaptation routines to refine the grid.
*
* \param[in] alg pointer to the calling sub-algorithm
* \param[in] loop number of eoc loop
*/
template
<
class
SubAlgImp
>
void
solveStart
(
SubAlgImp
*
alg
,
int
loop
)
{
estimateMark
(
false
);
adapt
(
alg
,
loop
);
}
/**
* \brief finalize all indicators
*
...
...
@@ -246,6 +286,17 @@ namespace Fem
ForLoopType
<
Finalize
>::
apply
(
tuple_
);
}
/**
* \brief finalize all indicators
*
* \param[in] alg pointer to the calling sub-algorithm
* \param[in] loop number of eoc loop
*/
template
<
class
SubAlgImp
>
void
finalizeStart
(
SubAlgImp
*
alg
,
int
loop
)
{
ForLoopType
<
Finalize
>::
apply
(
tuple_
);
}
/**
* \brief Returns true, if all sub-algorithms are adaptive.
...
...
@@ -300,6 +351,14 @@ namespace Fem
ForLoopType
<
SetAdaptation
>::
apply
(
tuple_
,
tp
);
}
/**
* \brief Set adaptation manager of sub-algorithms.
*/
void
setAdaptation
()
{
ForLoopType
<
SetAdaptation
>::
apply
(
tuple_
);
}
/**
* \brief Returns the adaptation time used by adaptation manager.
*/
...
...
@@ -363,6 +422,23 @@ namespace Fem
}
}
template
<
class
SubAlgImp
>
void
adapt
(
SubAlgImp
*
alg
,
int
loop
)
{
if
(
adaptive
()
)
{
//int sequence = getSequence( get<0>( tuple_ ) );
ForLoopType
<
PreAdapt
>::
apply
(
tuple_
);
adaptationManager
().
adapt
();
ForLoopType
<
PostAdapt
>::
apply
(
tuple_
);
//TODO think about it
//if( sequence != getSequence( get<0>( tuple_ ) ) )
// alg->postProcessing().solveEnd( alg, loop );
}
}
template
<
class
T
>
static
typename
enable_if
<
std
::
is_void
<
typename
std
::
remove_pointer
<
T
>::
type
::
AdaptIndicatorType
>::
value
,
int
>::
type
getSequence
(
T
){}
...
...
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