AMDiS 2.11-git
The Adaptive Multi-Dimensional Simulation Toolbox
 
Loading...
Searching...
No Matches
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.
 
Flag oneIteration (AdaptInfo &adaptInfo, Flag toDo) override
 Implementation of ProblemIterationInterface::oneIteration.
 
void endIteration (AdaptInfo &adaptInfo) override
 Implementation of ProblemIterationInterface::endIteration.
 
ProblemStatBaseproblem (int n=0) override
 Returns problemStat.
 
int numProblems () const override
 Implementation of ProblemIterationInterface::numProblems.
 
ProblemStatBaseproblem (std::string const &name) override
 Returns the problem with the given name.
 
std::string const & name () const override
 Returns the name of the problem.
 
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.
 

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.
 
int norm_ = 1
 Type of norm to use for estimating the error.
 

Member Function Documentation

◆ beginIteration()

template<class ProblemType >
void beginIteration ( AdaptInfo )
inlineoverridevirtual

◆ endIteration()

template<class ProblemType >
void endIteration ( AdaptInfo adaptInfo)
inlineoverridevirtual

◆ name()

template<class ProblemType >
std::string const & name ( ) const
inlineoverridevirtual

Returns the name of the problem.

Implements ProblemIterationInterface.

References NewtonIteration< ProblemType >::name_.

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

◆ numProblems()

template<class ProblemType >
int numProblems ( ) const
inlineoverridevirtual

◆ oneIteration()

template<class Problem >
Flag oneIteration ( AdaptInfo adaptInfo,
Flag  toDo 
)
overridevirtual

◆ problem() [1/2]

template<class ProblemType >
ProblemStatBase & problem ( int  n = 0)
inlineoverridevirtual

Returns problemStat.

Implements ProblemIterationInterface.

References NewtonIteration< ProblemType >::prob_.

◆ problem() [2/2]

template<class ProblemType >
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()

template<class ProblemType >
template<class Range = void, class... Indices>
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_

template<class ProblemType >
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_

template<class ProblemType >
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: