DUNE-ACFEM (unstable)

Dune::ACFem::EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional > Class Template Reference

Adaptive fem-scheme for "elliptic" problems. More...

#include <dune/acfem/algorithms/ellipticfemscheme.hh>

+ Collaboration diagram for Dune::ACFem::EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional >:

Public Types

typedef DiscreteFunction DiscreteFunctionType
 Type of the discrete solution function.
 
typedef DiscreteFunctionType::GridType GridType
 type of hierarchic grid
 
typedef DiscreteFunctionType::GridPartType GridPartType
 type of the grid view
 
typedef DiscreteFunctionType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
 type of the discrete function space
 
using ModelType = Model
 type of the provided model
 
using DiscreteModelType = DiscreteModel< Model, DiscreteFunctionSpaceType >
 In the DG-case the resulting ModelType will a NitscheDirichletBoundaryModel. More...
 
typedef DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType
 type of function space
 
typedef SolverSelector< DiscreteFunctionType, DiscreteModelTypeSolverSelectorType
 choose type of discrete function, Matrix implementation and solver implementation
 
typedef Fem::NewtonInverseOperator< LinearOperatorType, LinearInverseOperatorType > NonLinearInverseOperatorType
 Non-linear solver.
 
typedef Fem::RestrictProlongDefault< DiscreteFunctionTypeRestrictionProlongationType
 type of restriction/prolongation projection for adaptive simulations (use default here, i.e. More...
 
typedef Fem::AdaptationManager< GridType, RestrictionProlongationTypeAdaptationManagerType
 type of adaptation manager handling adapation and DoF compression
 
typedef DirichletConstraints< DiscreteFunctionSpaceType, DiscreteModelTypeConstraintsOperatorType
 type of constraints operator
 
typedef DifferentiableEllipticOperator< LinearOperatorType, DiscreteModelType, const ConstraintsOperatorType & > OperatorType
 type of error estimator define differential operator
 
typedef MarkingStrategy< GridPartTypeMarkingStrategyType
 type of marking strategy
 
typedef InitialGuess InitialGuessType
 Initial guess/exact solution.
 
typedef std::tuple< DiscreteFunctionType *, InitialGuessType * > IOTupleType
 type of input/output tuple
 
typedef DataOutput< GridType, IOTupleTypeDataOutputType
 type of data writer
 

Public Member Functions

 EllipticFemScheme (DiscreteFunctionType &solution, const ModelType &model, const InitialGuessType &initialGuess, const RHSFunctionalType &rhsFunctional, const std::string &name)
 Constructor for the elliptic fem-scheme. More...
 
 EllipticFemScheme (const EllipticFemScheme &other)
 Copy-constructor. More...
 
virtual std::string name () const
 name of the Fem Scheme
 
virtual void initialize ()
 initialize solution
 
virtual void solve (bool forceMatrixAssembling=true)
 Solve the system. More...
 
virtual bool mark (const double tolerance)
 mark elements for adaptation
 
virtual double estimate ()
 calculate error estimator
 
virtual void adapt ()
 do the adaptation for a given marking
 
virtual int output ()
 data I/O
 
virtual bool converged () const
 check whether solver has converged
 
virtual double residual () const
 calculate residual (in small l^2)
 
virtual double error () const
 calculate L2/H1 error
 
virtual size_t size () const
 return some measure about the number of DOFs in use
 

Protected Member Functions

virtual void nonLinearSolve (DiscreteFunctionType &rhs)
 Run the full Newton-scheme ...
 
virtual void linearSolve (DiscreteFunctionType &rhs, bool forceMatrixAssembling)
 Perform only one step of the Newton scheme for the affine-linear case. More...
 

Detailed Description

template<class DiscreteFunction, class Model, class InitialGuess, class RHSFunctional>
class Dune::ACFem::EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional >

Adaptive fem-scheme for "elliptic" problems.

The quotes are due to the fact, that neither the EllipticFemScheme nor the EllipticOperator used in the scheme make any assumptions on the ellipticity except for the solvers which are used inside. But even here in principle the EllipticOperator has the possibility to flag that it is indefinite.

This scheme provides the necessary modules

ESTIMATE - MARK - ADAPT - SOLVE - DATA I/O

which then can be used by an adaptive algorithm for stationary problems, see the exeternal Dune module ellipt-dot-c for an example.

Parameters
[in]DiscreteFunctionType of the discrte function for solution and test functions.
[in]ModelA model satisfying the ModelInterface which describes the operator at a local basis by providing "operator germs", i.e. half of the integrants which constitute the discrete bilinear forms.
[in]InitialGuessAn initial guess in order to start an iterative solver. This can be used in order to pass an "exact solution" for experimental convergence tests.

Member Typedef Documentation

◆ RestrictionProlongationType

template<class DiscreteFunction , class Model , class InitialGuess , class RHSFunctional >
typedef Fem::RestrictProlongDefault<DiscreteFunctionType> Dune::ACFem::EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional >::RestrictionProlongationType

type of restriction/prolongation projection for adaptive simulations (use default here, i.e.

LagrangeInterpolation)

Constructor & Destructor Documentation

◆ EllipticFemScheme() [1/2]

template<class DiscreteFunction , class Model , class InitialGuess , class RHSFunctional >
Dune::ACFem::EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional >::EllipticFemScheme ( DiscreteFunctionType solution,
const ModelType model,
const InitialGuessType initialGuess,
const RHSFunctionalType &  rhsFunctional,
const std::string &  name 
)
inline

Constructor for the elliptic fem-scheme.

Parameters
[in]solutionMutable reference to an existing discrete function in order to store the solution.
[in]modelA const reference to something satisfying the ModelInterface.
[in]initialGuessAn initial guess for an iterative solver or an exact solution for experimental convergence tests. EllipticFemScheme::error() will compute the H1-distance from thise function.
[in]nameFancy prefix name for parameters and debugging.

◆ EllipticFemScheme() [2/2]

template<class DiscreteFunction , class Model , class InitialGuess , class RHSFunctional >
Dune::ACFem::EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional >::EllipticFemScheme ( const EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional > &  other)
inline

Copy-constructor.

Todo:
We really also should implement a move constructor for the generator functions.

Member Function Documentation

◆ linearSolve()

template<class DiscreteFunction , class Model , class InitialGuess , class RHSFunctional >
virtual void Dune::ACFem::EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional >::linearSolve ( DiscreteFunctionType rhs,
bool  forceMatrixAssembling 
)
inlineprotectedvirtual

Perform only one step of the Newton scheme for the affine-linear case.

This implies that an affine linear case is really allowed.

Referenced by Dune::ACFem::EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional >::solve().

◆ solve()

template<class DiscreteFunction , class Model , class InitialGuess , class RHSFunctional >
virtual void Dune::ACFem::EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional >::solve ( bool  forceMatrixAssembling = true)
inlinevirtual

Solve the system.

Parameters
[in]forceMatrixAssemblingIf the solve step requires assembling of matrices, then by default the application may give a hint to the FemScheme that this might not be necessary. The actual implementation can then decide if it caches the assembled matrix from the last solve() invocation and reuses it. If forceAssemble is true then the implementation has to discard and cached assembled matrices and recompute them.

Implements Dune::ACFem::BasicFemScheme.

References Dune::ACFem::EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional >::linearSolve(), and Dune::ACFem::EllipticFemScheme< DiscreteFunction, Model, InitialGuess, RHSFunctional >::nonLinearSolve().


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 25, 22:37, 2024)