dune-pdelab  2.5-dev
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Dune::PDELab::NewtonLineSearch< GOS, TrlV, TstV > Class Template Referenceabstract

#include <dune/pdelab/newton/newton.hh>

Inheritance diagram for Dune::PDELab::NewtonLineSearch< GOS, TrlV, TstV >:
Inheritance graph

Public Types

enum  Strategy { noLineSearch, hackbuschReusken, hackbuschReuskenAcceptBest }
 
typedef NewtonResult< RFType > Result
 

Public Member Functions

 NewtonLineSearch (const GridOperator &go, TrialVector &u_)
 
 NewtonLineSearch (const GridOperator &go)
 
void setLineSearchStrategy (Strategy strategy)
 
void setLineSearchStrategy (std::string strategy)
 
void setLineSearchMaxIterations (unsigned int maxit)
 
void setLineSearchDampingFactor (RFType damping_factor)
 
virtual void line_search (TrialVector &z, TestVector &r) override
 
void setVerbosityLevel (unsigned int verbosity_level)
 
void setKeepMatrix (bool b)
 Set whether the jacobian matrix should be kept across calls to apply(). More...
 
bool keepMatrix () const
 Return whether the jacobian matrix is kept across calls to apply(). More...
 
void discardMatrix ()
 Discard the stored Jacobian matrix. More...
 

Protected Member Functions

Strategy strategyFromName (const std::string &s)
 
virtual bool terminate ()=0
 
virtual void prepare_step (Matrix &A, TestVector &r)=0
 
virtual void defect (TestVector &r)=0
 

Protected Attributes

const GridOperator & gridoperator_
 
TrialVector * u_
 
std::shared_ptr< TrialVector > z_
 
std::shared_ptr< TestVector > r_
 
std::shared_ptr< Matrix > A_
 
Result res_
 
unsigned int verbosity_level_
 
RFType prev_defect_
 
RFType linear_reduction_
 
bool reassembled_
 
RFType reduction_
 
RFType abs_limit_
 
bool keep_matrix_
 

Member Typedef Documentation

◆ Result

template<class GOS , class TrlV , class TstV >
typedef NewtonResult<RFType> Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::Result
inherited

Member Enumeration Documentation

◆ Strategy

template<class GOS , class TrlV , class TstV >
enum Dune::PDELab::NewtonLineSearch::Strategy
Enumerator
noLineSearch 

don't do any line search or damping

hackbuschReusken 

perform a linear search for the optimal damping parameter with multiples of damping

the strategy was described in [Hackbusch and Reusken, 1989]

hackbuschReuskenAcceptBest 

same as hackbuschReusken, but doesn't fail if the best update is still not good enough

Constructor & Destructor Documentation

◆ NewtonLineSearch() [1/2]

template<class GOS , class TrlV , class TstV >
Dune::PDELab::NewtonLineSearch< GOS, TrlV, TstV >::NewtonLineSearch ( const GridOperator &  go,
TrialVector &  u_ 
)
inline

◆ NewtonLineSearch() [2/2]

template<class GOS , class TrlV , class TstV >
Dune::PDELab::NewtonLineSearch< GOS, TrlV, TstV >::NewtonLineSearch ( const GridOperator &  go)
inline

Member Function Documentation

◆ defect()

template<class GOS , class TrlV , class TstV >
virtual void Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::defect ( TestVector &  r)
protectedpure virtualinherited

◆ discardMatrix()

template<class GOS , class TrlV , class TstV >
void Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::discardMatrix ( )
inlineinherited

Discard the stored Jacobian matrix.

◆ keepMatrix()

template<class GOS , class TrlV , class TstV >
bool Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::keepMatrix ( ) const
inlineinherited

Return whether the jacobian matrix is kept across calls to apply().

◆ line_search()

template<class GOS , class TrlV , class TstV >
virtual void Dune::PDELab::NewtonLineSearch< GOS, TrlV, TstV >::line_search ( TrialVector &  z,
TestVector &  r 
)
inlineoverridevirtual

◆ prepare_step()

template<class GOS , class TrlV , class TstV >
virtual void Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::prepare_step ( Matrix &  A,
TestVector &  r 
)
protectedpure virtualinherited

◆ setKeepMatrix()

template<class GOS , class TrlV , class TstV >
void Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::setKeepMatrix ( bool  b)
inlineinherited

Set whether the jacobian matrix should be kept across calls to apply().

◆ setLineSearchDampingFactor()

template<class GOS , class TrlV , class TstV >
void Dune::PDELab::NewtonLineSearch< GOS, TrlV, TstV >::setLineSearchDampingFactor ( RFType  damping_factor)
inline

◆ setLineSearchMaxIterations()

template<class GOS , class TrlV , class TstV >
void Dune::PDELab::NewtonLineSearch< GOS, TrlV, TstV >::setLineSearchMaxIterations ( unsigned int  maxit)
inline

◆ setLineSearchStrategy() [1/2]

template<class GOS , class TrlV , class TstV >
void Dune::PDELab::NewtonLineSearch< GOS, TrlV, TstV >::setLineSearchStrategy ( Strategy  strategy)
inline

◆ setLineSearchStrategy() [2/2]

template<class GOS , class TrlV , class TstV >
void Dune::PDELab::NewtonLineSearch< GOS, TrlV, TstV >::setLineSearchStrategy ( std::string  strategy)
inline

◆ setVerbosityLevel()

template<class GOS , class TrlV , class TstV >
void Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::setVerbosityLevel ( unsigned int  verbosity_level)
inlineinherited

◆ strategyFromName()

template<class GOS , class TrlV , class TstV >
Strategy Dune::PDELab::NewtonLineSearch< GOS, TrlV, TstV >::strategyFromName ( const std::string &  s)
inlineprotected

helper function to get the different strategies from their name

◆ terminate()

template<class GOS , class TrlV , class TstV >
virtual bool Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::terminate ( )
protectedpure virtualinherited

Member Data Documentation

◆ A_

template<class GOS , class TrlV , class TstV >
std::shared_ptr<Matrix> Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::A_
protectedinherited

◆ abs_limit_

template<class GOS , class TrlV , class TstV >
RFType Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::abs_limit_
protectedinherited

◆ gridoperator_

template<class GOS , class TrlV , class TstV >
const GridOperator& Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::gridoperator_
protectedinherited

◆ keep_matrix_

template<class GOS , class TrlV , class TstV >
bool Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::keep_matrix_
protectedinherited

◆ linear_reduction_

template<class GOS , class TrlV , class TstV >
RFType Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::linear_reduction_
protectedinherited

◆ prev_defect_

template<class GOS , class TrlV , class TstV >
RFType Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::prev_defect_
protectedinherited

◆ r_

template<class GOS , class TrlV , class TstV >
std::shared_ptr<TestVector> Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::r_
protectedinherited

◆ reassembled_

template<class GOS , class TrlV , class TstV >
bool Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::reassembled_
protectedinherited

◆ reduction_

template<class GOS , class TrlV , class TstV >
RFType Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::reduction_
protectedinherited

◆ res_

template<class GOS , class TrlV , class TstV >
Result Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::res_
protectedinherited

◆ u_

template<class GOS , class TrlV , class TstV >
TrialVector* Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::u_
protectedinherited

◆ verbosity_level_

template<class GOS , class TrlV , class TstV >
unsigned int Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::verbosity_level_
protectedinherited

◆ z_

template<class GOS , class TrlV , class TstV >
std::shared_ptr<TrialVector> Dune::PDELab::NewtonBase< GOS, TrlV, TstV >::z_
protectedinherited

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