1#error "THIS FILE IS NOT BEING USED AND DOES NOT SEEM TO COMPILE!"
42#ifndef ELLIPT_DGFEMSCHEME_HH
43#define ELLIPT_DGFEMSCHEME_HH
49#include <dune/fem/space/discontinuousgalerkin.hh>
50#include <dune/fem/space/lagrange.hh>
52#include <dune/fem/solver/newtoninverseoperator.hh>
55#include <dune/fem/misc/l2norm.hh>
56#include <dune/fem/misc/h1norm.hh>
59#include <dune/fem/io/parameter.hh>
60#include <dune/fem/io/file/dataoutput.hh>
62#include <dune/fem/schemes/dgelliptic.hh>
64template <
class Model,
int polOrder, SolverType solver >
69 typedef Model ModelType ;
70 typedef typename ModelType::ExactSolutionType ExactSolutionType;
73 typedef typename ModelType::GridPartType GridPartType;
76 typedef typename GridPartType::GridType GridType;
82 typedef Dune::Fem::DiscontinuousGalerkinSpace< FunctionSpaceType, GridPartType, polOrder > DiscreteFunctionSpaceType;
86 typedef Solvers<DiscreteFunctionSpaceType,solver,false> UsedSolverType;
87 static_assert( UsedSolverType::solverConfigured,
"chosen solver is not configured" );
95 typedef DifferentiableDGEllipticOperator< LinearOperatorType, ModelType > EllipticOperatorType;
99 DGFemScheme( GridPartType &gridPart,
100 const ModelType& implicitModel,
102 const std::string &prefix)
103 : implicitModel_( implicitModel ),
104 gridPart_( gridPart ),
105 discreteSpace_( gridPart_ ),
106 solution_( prefix.c_str(), discreteSpace_ ),
107 rhs_(
"rhs", discreteSpace_ ),
108 implicitOperator_( implicitModel_, discreteSpace_, penalty ),
109 linearOperator_(
"assempled elliptic operator", discreteSpace_, discreteSpace_ ),
110 solverEps_(
Dune::Fem::Parameter::getValue< double >(
"poisson.solvereps", 1e-8 ) ),
112 exactSolution_( implicitModel_.exactSolution(gridPart_) )
118 DGFemScheme( GridPartType &gridPart,
119 const ModelType& implicitModel,
120 const std::string &prefix)
121 : DGFemScheme( gridPart, implicitModel,
122 Dune::Fem::Parameter::getValue<double>(
"dg.penalty"),
131 const ExactSolutionType& exactSolution()
const {
return exactSolution_; }
136 void solve (
bool assemble )
138 typedef typename UsedSolverType::LinearInverseOperatorType LinearInverseOperatorType;
142 invOp( rhs_, solution_ );
144 implicitOperator_.jacobian( solution_ , linearOperator_ );
145 LinearInverseOperatorType invOp( linearOperator_, solverEps_, solverEps_ );
146 invOp( rhs_, solution_ );
151 const ModelType& implicitModel_;
153 GridPartType &gridPart_;
155 DiscreteFunctionSpaceType discreteSpace_;
159 EllipticOperatorType implicitOperator_;
163 const double solverEps_ ;
164 const double penalty_;
165 const ExactSolutionType exactSolution_;
Inverse operator base on CG method. Uses a runtime parameter fem.preconditioning which enables diagon...
Definition: cginverseoperator.hh:408
@ dimRange
dimension of range vector space
Definition: functionspaceinterface.hh:48
A vector valued function space.
Definition: functionspace.hh:60
inverse operator based on a newton scheme
Definition: newtoninverseoperator.hh:357
forward declaration
Definition: discretefunction.hh:51
Dune namespace.
Definition: alignedallocator.hh:13
SparseRowLinearOperator.
Definition: spoperator.hh:25