AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
NewtonIteration< ProblemType > Class Template Reference

Inherits ProblemIterationInterface.

Public Member Functions

 NewtonIteration (std::string name, Problem &prob)
 Constructs a nonlinear iteration scheme.
 
void beginIteration (AdaptInfo &) override
 Implementation of ProblemIterationInterface::beginIteration. More...
 
Flag oneIteration (AdaptInfo &adaptInfo, Flag toDo) override
 Implementation of ProblemIterationInterface::oneIteration. More...
 
void endIteration (AdaptInfo &adaptInfo) override
 Implementation of ProblemIterationInterface::endIteration. More...
 
ProblemStatBaseproblem (int n=0) override
 Returns problemStat. More...
 
int numProblems () const override
 Implementation of ProblemIterationInterface::numProblems. More...
 
ProblemStatBaseproblem (std::string const &name) override
 Returns the problem with the given name. More...
 
std::string const & name () const override
 Returns the name of the problem. More...
 
std::shared_ptr< SolutionVector const > stepSolutionVector () const
 Returns const-ref of stepSolution_.
 
template<class Range = void, class... Indices>
auto stepSolution (Indices... ii) const
 Return a const view to a stepSolution component. More...
 
virtual void beginIteration (AdaptInfo &)
 Called before each adaption loop iteration. More...
 
virtual Flag oneIteration (AdaptInfo &adaptInfo, Flag toDo=FULL_ITERATION)=0
 Determines the execution order of the single adaption steps. If adapt is true, mesh adaption will be performed. This allows to avoid mesh adaption, e.g. in timestep adaption loops of timestep adaptive strategies. More...
 
virtual void endIteration (AdaptInfo &)
 Called after each adaption loop iteration. More...
 
virtual int numProblems () const =0
 Returns number of managed problems. More...
 
virtual ProblemStatBaseproblem (int number=0)=0
 Returns the problem with the given number. If only one problem is managed by this master problem, the number hasn't to be given. More...
 
virtual ProblemStatBaseproblem (std::string const &name)=0
 Returns the problem with the given name. More...
 
virtual std::string const & name () const =0
 Returns the name of the problem. More...
 

Protected Attributes

std::string name_
 Name of the newton problem, used to access initfile parameters.
 
Problem * prob_
 Problem containing the Jacobian operators and objective function.
 
std::shared_ptr< SolutionVector > stepSolution_
 Solution of the update step.
 
int buildCycle_ = 1
 Build matrix every i'th iteration. More...
 
int norm_ = 1
 Type of norm to use for estimating the error. More...
 

Member Function Documentation

◆ beginIteration()

void beginIteration ( AdaptInfo )
inlineoverridevirtual

◆ endIteration()

void endIteration ( AdaptInfo adaptInfo)
inlineoverridevirtual

◆ name()

std::string const & name ( ) const
inlineoverridevirtual

Returns the name of the problem.

Implements ProblemIterationInterface.

References NewtonIteration< ProblemType >::name_.

Referenced by NewtonIteration< ProblemType >::problem().

◆ numProblems()

int numProblems ( ) const
inlineoverridevirtual

◆ oneIteration()

Flag oneIteration ( AdaptInfo adaptInfo,
Flag  toDo 
)
overridevirtual

◆ problem() [1/2]

ProblemStatBase & problem ( int  n = 0)
inlineoverridevirtual

Returns problemStat.

Implements ProblemIterationInterface.

References NewtonIteration< ProblemType >::prob_.

◆ problem() [2/2]

ProblemStatBase & problem ( std::string const &  name)
inlineoverridevirtual

Returns the problem with the given name.

Implements ProblemIterationInterface.

References NewtonIteration< ProblemType >::name(), and NewtonIteration< ProblemType >::prob_.

◆ stepSolution()

auto stepSolution ( Indices...  ii) const
inline

Return a const view to a stepSolution component.

Template Parameters
RangeThe range type return by evaluating the view in coordinates. If not specified, it is automatically selected using RangeType_t template.

References NewtonIteration< ProblemType >::stepSolution_.

Member Data Documentation

◆ buildCycle_

int buildCycle_ = 1
protected

Build matrix every i'th iteration.

0 ........ build matrix only once i >= 1 ... rebuild matrix in i'th solver iteration [default: 1]

Referenced by NewtonIteration< ProblemType >::NewtonIteration().

◆ norm_

int norm_ = 1
protected

Type of norm to use for estimating the error.

1... L2-norm 2... H1-norm [default: 1]

Referenced by NewtonIteration< ProblemType >::NewtonIteration().


The documentation for this class was generated from the following files: