Skip to content
Snippets Groups Projects
Commit b5a2c071 authored by Stefan Girke's avatar Stefan Girke
Browse files

provide missing steady state methods

parent d5a9b321
No related branches found
No related tags found
No related merge requests found
......@@ -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 ){}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment