|
dune-fem 2.12-git
|
Loading...
Searching...
No Matches
timestepcontrol.hh
Go to the documentation of this file.
22 : public Dune::Fem::LocalParameter< ImplicitRungeKuttaSolverParameters, ImplicitRungeKuttaSolverParameters >
43 ImplicitRungeKuttaSolverParameters ( const std::string keyPrefix, const Dune::Fem::ParameterReader ¶meter = Dune::Fem::Parameter::container() )
86 return parameter().getValue< double >( keyPrefix_ + "cflMax" , std::numeric_limits< double >::max() );
154 const std::string names [] = { "ImplicitEuler", "CrankNicolson", "DIRK23", "DIRK34", "SDIRK22" };
182 explicit ImplicitRungeKuttaTimeStepControl ( TimeProviderType &timeProvider, const Dune::Fem::ParameterReader ¶meter = Dune::Fem::Parameter::container() )
203 void reduceTimeStep ( double helmholtzEstimate, double sourceTermEstimate, const Monitor &monitor )
206 DUNE_THROW( Dune::InvalidStateException, "ImplicitRungeKuttaSolver must be initialized before first solve." );
209 parameters().cflFactor( helmholtzEstimate, sourceTermEstimate, monitor.linearSolverIterations_, false, factor );
216 if( (verbose_ >= ImplicitRungeKuttaSolverParameters::noConvergenceVerbosity) && (Dune::Fem::MPIManager::rank() == 0) )
230 void timeStepEstimate ( double helmholtzEstimate, double sourceTermEstimate, const Monitor &monitor )
233 DUNE_THROW( Dune::InvalidStateException, "ImplicitRungeKuttaSolver must be initialized before first solve." );
238 parameters().cflFactor( helmholtzEstimate, sourceTermEstimate, monitor.linearSolverIterations_, true, factor );
239 if( !((factor >= std::numeric_limits< double >::min()) && (factor <= std::numeric_limits< double >::max())) )
245 timeProvider_.provideTimeStepEstimate( std::min( sourceTermEstimate, cfl_ * helmholtzEstimate ) );
247 if( (cfl_ != oldCfl) && (verbose_ >= ImplicitRungeKuttaSolverParameters::cflVerbosity) && (Dune::Fem::MPIManager::rank() == 0) )
312 PIDTimeStepControl ( TimeProviderType &timeProvider, const Dune::Fem::ParameterReader ¶meter = Dune::Fem::Parameter::container() )
327 void timeStepEstimate ( double helmholtzEstimate, double sourceTermEstimate, const Monitor &monitor )
330 DUNE_THROW( Dune::InvalidStateException, "ImplicitRungeKuttaSolver must be initialized before first solve." );
335 double dtEst = pidTimeStepControl( std::min( sourceTermEstimate, helmholtzEstimate ), monitor );
347 if( (verbose_ >= ImplicitRungeKuttaSolverParameters::cflVerbosity) && (Dune::Fem::MPIManager::rank() == 0) )
#define DUNE_THROW(E,...)
DErrType derr
STL namespace.
Definition multistep.hh:17
static ParameterContainer & container()
Definition io/parameter.hh:199
Definition io/parameter.hh:576
int getEnum(const std::string &key, const std::string(&values)[n]) const
Definition reader.hh:227
T getValue(const std::string &key) const
get mandatory parameter
Definition reader.hh:161
Definition timestepcontrol.hh:23
virtual double cflMax() const
Definition timestepcontrol.hh:84
double initialDeltaT(double dt) const
Definition timestepcontrol.hh:89
virtual int maxLinearIterations() const
Definition timestepcontrol.hh:149
virtual double tolerance() const
tolerance for the non-linear solver (should be larger than the tolerance for the linear solver
Definition timestepcontrol.hh:62
ImplicitRungeKuttaSolverParameters(const Dune::Fem::ParameterReader ¶meter=Dune::Fem::Parameter::container())
Definition timestepcontrol.hh:51
virtual int verbose() const
verbosity level ( none, noconv, cfl, full )
Definition timestepcontrol.hh:73
virtual ~ImplicitRungeKuttaSolverParameters()
Definition timestepcontrol.hh:56
const int maxIter_
Definition timestepcontrol.hh:36
virtual double cflStart() const
Definition timestepcontrol.hh:79
@ cflVerbosity
Definition timestepcontrol.hh:25
@ noConvergenceVerbosity
Definition timestepcontrol.hh:24
@ fullVerbosity
Definition timestepcontrol.hh:25
@ noVerbosity
Definition timestepcontrol.hh:24
ImplicitRungeKuttaSolverParameters(const std::string keyPrefix, const Dune::Fem::ParameterReader ¶meter=Dune::Fem::Parameter::container())
Definition timestepcontrol.hh:43
virtual void initTimeStepEstimate(const double dtEstExpl, const double dtEstImpl, double &dtEst, double &cfl) const
Definition timestepcontrol.hh:137
const int minIter_
Definition timestepcontrol.hh:33
const std::string keyPrefix_
Definition timestepcontrol.hh:29
const double sigma_
Definition timestepcontrol.hh:38
virtual bool cflFactor(const double imOpTimeStepEstimate, const double exOpTimeStepEstimate, const int numberOfLinearIterations, bool converged, double &factor) const
return multiplication factor for the current cfl number
Definition timestepcontrol.hh:104
virtual int iterations() const
Definition timestepcontrol.hh:67
Dune::Fem::ParameterReader parameter_
Definition timestepcontrol.hh:40
const Dune::Fem::ParameterReader & parameter() const
Definition timestepcontrol.hh:58
virtual int selectedSolver(const int order) const
return number of selected solver (default = order of solver)
Definition timestepcontrol.hh:152
Definition timestepcontrol.hh:166
TimeProviderType & timeProvider_
Definition timestepcontrol.hh:265
ImplicitRungeKuttaSolverParameters ParameterType
Definition timestepcontrol.hh:171
void initialTimeStepSize(double helmholtzEstimate, double sourceTermEstimate)
Definition timestepcontrol.hh:194
ImplicitRungeKuttaTimeStepControl(TimeProviderType &timeProvider, const Dune::Fem::ParameterReader ¶meter=Dune::Fem::Parameter::container())
Definition timestepcontrol.hh:182
void reduceTimeStep(double helmholtzEstimate, double sourceTermEstimate, const Monitor &monitor)
Definition timestepcontrol.hh:203
Dune::Fem::TimeProviderBase TimeProviderType
Definition timestepcontrol.hh:170
bool computeError() const
Definition timestepcontrol.hh:256
const ParameterType & parameters() const
Definition timestepcontrol.hh:259
void timeStepEstimate(double helmholtzEstimate, double sourceTermEstimate, const Monitor &monitor)
Definition timestepcontrol.hh:230
std::shared_ptr< const ParameterType > parameters_
Definition timestepcontrol.hh:266
double timeStepSize() const
Definition timestepcontrol.hh:192
double time() const
Definition timestepcontrol.hh:191
ImplicitRungeKuttaTimeStepControl(TimeProviderType &timeProvider, const ParameterType ¶meters)
Definition timestepcontrol.hh:173
bool initialized_
Definition timestepcontrol.hh:269
PIDTimeStepControl(TimeProviderType &timeProvider, const Dune::Fem::ParameterReader ¶meter=Dune::Fem::Parameter::container())
Definition timestepcontrol.hh:312
PIDTimeStepControl(TimeProviderType &timeProvider, const ParameterType ¶meters)
Definition timestepcontrol.hh:300
BaseType::ParameterType ParameterType
Definition timestepcontrol.hh:298
Dune::Fem::TimeProviderBase TimeProviderType
Definition timestepcontrol.hh:297
double pidTimeStepControl(const double dt, const Monitor &monitor)
Definition timestepcontrol.hh:362
void timeStepEstimate(double helmholtzEstimate, double sourceTermEstimate, const Monitor &monitor)
Definition timestepcontrol.hh:327
double time() const
obtain the current time
Definition timeprovider.hh:94
void provideTimeStepEstimate(const double dtEstimate)
set time step estimate to minimum of given value and internal time step estiamte
Definition timeprovider.hh:142
double deltaT() const
obtain the size of the current time step
Definition timeprovider.hh:113
void invalidateTimeStep()
count current time step a not valid
Definition timeprovider.hh:158
T empty(T... args)
T endl(T... args)
T forward(T... args)
T max(T... args)
T min(T... args)
T pow(T... args)
T resize(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8