DUNE-ACFEM (2.5.1)

Dune::ACFem::SplittingFemSchemeBase< DiscreteFunction, ImplicitModel, ExplicitDataFunction, ExplicitModel, InitialGuessFunction > Class Template Reference

Basic fem-scheme class. More...

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

+ Collaboration diagram for Dune::ACFem::SplittingFemSchemeBase< DiscreteFunction, ImplicitModel, ExplicitDataFunction, ExplicitModel, InitialGuessFunction >:

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
 
typedef ImplicitModel ImplicitModelType
 type of the mathematical model
 
typedef ExplicitDataFunction ExplicitDataType
 Data for explicit model.
 
typedef InitialGuessFunction InitialGuessType
 Initial Guess.
 
typedef ImplicitModelType::FunctionSpaceType FunctionSpaceType
 type of function space (scalar functions, \(f: \Omega -> R\))
 
typedef Fem::NewtonInverseOperator< LinearOperatorType, LinearInverseOperatorType > NonLinearInverseOperatorType
 Non-linear solver.
 
typedef Dune::Fem::RestrictProlongDefault< DiscreteFunctionTypeRestrictionProlongationType
 type of restriction/prolongation projection for adaptive simulations (use default here, i.e. More...
 
typedef Dune::Fem::AdaptationManager< GridType, RestrictionProlongationTypeAdaptationManagerType
 type of adaptation manager handling adapation and DoF compression
 
typedef ImplicitModelType::DirichletIndicatorType DirichletIndicatorType
 types for various data
 
typedef ImplicitModelType::DirichletBoundaryFunctionType DirichletBoundaryFunctionType
 type of Dirichlet boundary values
 
typedef ImplicitModelType::DirichletWeightFunctionType DirichletWeightFunctionType
 type of Dirichlet weight function
 
typedef DirichletConstraints< LinearOperatorType, EffectiveDirichletFunctionType, DirichletIndicatorTypeConstraintsOperatorType
 type of Dirichlet constraints
 
typedef DifferentiableEmptyBlockConstraints< LinearOperatorType > EmptyConstraintsType
 empty constraints for the explicit operator (old solution is already constrained)
 
typedef DifferentiableEllipticOperator< LinearOperatorType, ImplicitModelType, ConstraintsOperatorTypeImplicitOperatorType
 define differential operator, implicit part
 
typedef EllipticOperator< ExplicitModelType, ExplicitDataFunctionType, DiscreteFunctionType, EmptyConstraintsTypeExplicitOperatorType
 explicit part of differential operator. More...
 
typedef InitialGuessFunctionType ExactSolutionFunctionType
 adapter to turn exact solution into a grid function (for visualization)
 
typedef std::tuple< DiscreteFunctionType *, const ExactSolutionFunctionType * > IOTupleType
 type of input/output tuple
 
typedef DataOutput< GridType, IOTupleTypeDataOutputType
 type of data writer (produces VTK data)
 
typedef Dune::Fem::CheckPointer< GridTypeCheckPointerType
 type of check-pointer (dumps unaltered simulation data)
 

Define the RHS functional.

The default for forces and Neumann is a ZeroGridFunction which will result in a ZeroFunctional which simply will do nothing.

For assembling, both will be added efficently together using FunctionalExpressions.

typedef SumModelType::BulkForcesFunctionType BulkForcesFunctionType
 
typedef L2InnerProductFunctional< DiscreteFunctionSpaceType, BulkForcesFunctionType > BulkForcesFunctional
 
typedef SumModelType::NeumannBoundaryFunctionType BoundaryFluxFunctionType
 
typedef L2BoundaryFunctional< DiscreteFunctionSpaceType, BoundaryFluxFunctionType, typename ImplicitModelType::NeumannIndicatorType > BoundaryFluxFunctional
 

Public Member Functions

 SplittingFemSchemeBase (DiscreteFunctionType &solution, const ModelInterface< ImplicitModelType > &implicitModel, const ExplicitDataType &explicitData, const ModelInterface< ExplicitModelType > &explicitModel, const InitialGuessType &initialGuess, const std::string name="femscheme")
 Constructor. More...
 
virtual void initialize ()
 initialize the solution
 
virtual void solve (bool forceMatrixAssembling=true)
 solve the system
 
virtual int output ()
 data I/O
 
virtual double residual () const
 calculate residual (in small l^2)
 
virtual double error () const
 Calculate L2/H1 error. More...
 
virtual size_t size () const
 return some measure about the number of DOFs in use
 

Public Attributes

decltype(std::declval< DirichletBoundaryFunctionType >()/std::declval< typename DirichletWeightFunctionType::GridFunctionType >()) typedef EffectiveDirichletFunctionType
 type of effective Dirichlet values
 

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 ImplicitModel, class ExplicitDataFunction, class ExplicitModel, class InitialGuessFunction>
class Dune::ACFem::SplittingFemSchemeBase< DiscreteFunction, ImplicitModel, ExplicitDataFunction, ExplicitModel, InitialGuessFunction >

Basic fem-scheme class.

The scheme takes an implicit model and explicit model, the unknown and a grid-function (s.t. with HasLocalFunction property) for the explicit model (which becomes part of the right-hand-side) and provides the method prescribed by the BasicFemScheme interface class, most promiently the solve() method.

Parameters
[in]DiscreteFunctionThe type of the discrete solution.
[in]ImplicitModelThe type of the implicit model.
[in]ExplicitDataFunctionThe point of evaluation for the operator defined by ExplicitModel
[in]ExplicitModelThe type of the explicit model.
[in]InitialGuessPossibly provide an initial guess for the solver. Also, the error() method will compute the distance to the initial guess.
[in]QuadratureTraitsSpecial quadrature rules, for instance to implement mass-lumping. Defaults to DefaultQuadratureTraits. The template argument of the template template-parameter is the GridPartType.

Member Typedef Documentation

◆ ExplicitOperatorType

template<class DiscreteFunction , class ImplicitModel , class ExplicitDataFunction , class ExplicitModel , class InitialGuessFunction >
typedef EllipticOperator<ExplicitModelType, ExplicitDataFunctionType, DiscreteFunctionType, EmptyConstraintsType> Dune::ACFem::SplittingFemSchemeBase< DiscreteFunction, ImplicitModel, ExplicitDataFunction, ExplicitModel, InitialGuessFunction >::ExplicitOperatorType

explicit part of differential operator.

Need not be differentiable as it is only needed for the RHS.

◆ RestrictionProlongationType

template<class DiscreteFunction , class ImplicitModel , class ExplicitDataFunction , class ExplicitModel , class InitialGuessFunction >
typedef Dune::Fem::RestrictProlongDefault<DiscreteFunctionType> Dune::ACFem::SplittingFemSchemeBase< DiscreteFunction, ImplicitModel, ExplicitDataFunction, ExplicitModel, InitialGuessFunction >::RestrictionProlongationType

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

LagrangeInterpolation)

Constructor & Destructor Documentation

◆ SplittingFemSchemeBase()

template<class DiscreteFunction , class ImplicitModel , class ExplicitDataFunction , class ExplicitModel , class InitialGuessFunction >
Dune::ACFem::SplittingFemSchemeBase< DiscreteFunction, ImplicitModel, ExplicitDataFunction, ExplicitModel, InitialGuessFunction >::SplittingFemSchemeBase ( DiscreteFunctionType solution,
const ModelInterface< ImplicitModelType > &  implicitModel,
const ExplicitDataType explicitData,
const ModelInterface< ExplicitModelType > &  explicitModel,
const InitialGuessType initialGuess,
const std::string  name = "femscheme" 
)
inline

Constructor.

Parameters
[in,out]solutionStorage for the discrete solution.
[in]implicitModelThe part of the operator to be applied at the end of the time interval.
[in]explicitDataThe grid-function the operator defined by explicitModel is applied to. This defaults to the ZeroGridFunction.
[in]explicitModelThe part of the operator to be applied to the old values. This defaults to the ZeroModel.
[in]initialGuessInitial guess. If present, initialize() will call the natural interpolation routine for the given discrete function space.
[in]nameName used for parameters and output.

Member Function Documentation

◆ error()

template<class DiscreteFunction , class ImplicitModel , class ExplicitDataFunction , class ExplicitModel , class InitialGuessFunction >
virtual double Dune::ACFem::SplittingFemSchemeBase< DiscreteFunction, ImplicitModel, ExplicitDataFunction, ExplicitModel, InitialGuessFunction >::error ( ) const
inlinevirtual

Calculate L2/H1 error.

This actually computes the distance to the initial value which optionally may be used for experimental convergence tests in order to pass an exact "solution". In this case initialGuess may be time-dependent and has to give the correct value at the start of the time-step.

Implements Dune::ACFem::BasicFemScheme.

◆ linearSolve()

template<class DiscreteFunction , class ImplicitModel , class ExplicitDataFunction , class ExplicitModel , class InitialGuessFunction >
virtual void Dune::ACFem::SplittingFemSchemeBase< DiscreteFunction, ImplicitModel, ExplicitDataFunction, ExplicitModel, InitialGuessFunction >::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::SplittingFemSchemeBase< DiscreteFunction, ImplicitModel, ExplicitDataFunction, ExplicitModel, InitialGuessFunction >::solve().


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 (May 1, 22:29, 2024)