DUNE-ACFEM (2.5.1)

ellipticfemscheme.hh
1#ifndef __ELLIPTIC_FEMSCHEME_HH__
2#define __ELLIPTIC_FEMSCHEME_HH__
3
4// iostream includes
5#include <iostream>
6
7// include grid part
8#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
9
10// include discrete function space
11#include <dune/fem/space/lagrange.hh>
12
13// adaptation ...
14#include <dune/fem/function/adaptivefunction.hh>
15#include <dune/fem/space/common/adaptmanager.hh>
16
17// include discrete function
18#include <dune/fem/function/blockvectorfunction.hh>
19
20// Newton's iteration
21#include <dune/fem/solver/newtoninverseoperator.hh>
22
23// lagrange interpolation
24#include <dune/fem/space/common/interpolate.hh>
25
26// include norms
27#include <dune/fem/misc/l2norm.hh>
28#include <dune/fem/misc/h1norm.hh>
29
30// include parameter handling
31#include <dune/fem/io/parameter.hh>
32
33// include output
34#include <dune/fem/io/file/dataoutput.hh>
35
36// local includes
37#include "../algorithms/femschemeinterface.hh"
38#include "../models/modelinterface.hh"
39#include "../operators/ellipticoperator.hh"
40#include "../operators/functionals/l2innerproductfunctional.hh"
41#include "../operators/functionals/l2boundaryfunctional.hh"
42#include "../operators/functionals/functionalexpression.hh"
43#include "../operators/constraints/dirichletconstraints.hh"
44#include "../functions/gridfunctionexpression.hh"
45#include "../functions/boundaryfunctionexpression.hh"
46
47#include "../estimators/ellipticestimator.hh"
48#include "../algorithms/marking.hh"
49#include "../common/dataoutput.hh"
50
51// Select an appropriate solver, depending on ModelType and solver-family (ISTL, PESC ...)
52#include "../common/solverselector.hh"
53
54namespace Dune {
55
56 namespace ACFem {
57
90 template<class DiscreteFunction, class Model, class InitialGuess>
92 : public AdaptiveFemScheme
93 {
94 public:
96 typedef DiscreteFunction DiscreteFunctionType;
97
99 typedef typename DiscreteFunctionType::GridType GridType;
100
102 typedef typename DiscreteFunctionType::GridPartType GridPartType;
103
105 typedef typename DiscreteFunctionType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType;
106
110
111 typedef typename ModelType::OperatorPartsType OperatorPartsType;
112
114 typedef typename DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType;
115
118 typedef typename SolverSelectorType::LinearOperatorType LinearOperatorType;
119 typedef typename SolverSelectorType::LinearInverseOperatorType LinearInverseOperatorType;
120
122 typedef
123 Fem::NewtonInverseOperator<LinearOperatorType, LinearInverseOperatorType>
125
128 typedef Fem::RestrictProlongDefault<DiscreteFunctionType> RestrictionProlongationType;
129
131 typedef Fem::AdaptationManager<GridType, RestrictionProlongationType> AdaptationManagerType;
132
135
138
140 typedef
141 decltype(std::declval<DirichletBoundaryFunctionType>()
142 /
143 std::declval<typename DirichletWeightFunctionType::GridFunctionType>())
145
148
151
153 typedef DifferentiableEllipticOperator<LinearOperatorType, OperatorPartsType, ConstraintsOperatorType> OperatorType;
154
166 typedef typename ModelType::BulkForcesFunctionType BulkForcesFunctionType;
167 typedef
168 L2InnerProductFunctional<DiscreteFunctionSpaceType, BulkForcesFunctionType>
169 BulkForcesFunctional;
170 typedef typename ModelType::NeumannBoundaryFunctionType BoundaryFluxFunctionType;
171 typedef
172 L2BoundaryFunctional<DiscreteFunctionSpaceType, BoundaryFluxFunctionType, typename ModelType::NeumannIndicatorType>
173 BoundaryFluxFunctional;
175
178
180 typedef MarkingStrategy<EstimatorType> MarkingStrategyType;
181
183 typedef InitialGuess InitialGuessType;
184
187 typedef
188 typename GridFunctionConverter<InitialGuessType, GridPartType>::WrappedGridFunctionType
190
192 typedef
193 std::tuple<DiscreteFunctionType *, const InitialGuessFunctionType *>
195
197 typedef DataOutput<GridType, IOTupleType> DataOutputType;
198
199 protected:
216 const ModelType& model,
217 const InitialGuessType& initialGuess,
218 const std::string& name = "ellipt")
219 : grid_(solution.space().gridPart().grid()),
220 model_(model),
221 name_(name),
222 gridPart_(solution.space().gridPart()),
223 discreteSpace_(solution.space()),
224 solution_(solution),
225 // estimator
226 estimator_(model_(), discreteSpace_),
227 markingStrategy_(estimator_),
228 // restriction/prolongation operator
229 restrictProlong_(0),
230 // adaptation manager
231 adaptationManager_(0),
232 // create Dirichlet contraints
233 boundaryValues_(model_().dirichletBoundaryFunction(gridPart_)),
234 boundaryWeight_(model_().dirichletWeightFunction(gridPart_)),
235 constraints_(discreteSpace_,
236 boundaryValues_ / boundaryWeight_.function(),
237 model_().dirichletIndicator()),
238 // the elliptic operator (implicit)
239 operator_(model_().operatorParts(), constraints_),
240 // create linear operator (domainSpace,rangeSpace)
241 linearOperator_("assembled elliptic operator", discreteSpace_, discreteSpace_),
242 solverEps_(Fem::Parameter::getValue<double>(name + ".solvereps", 1e-8)),
243 sequence_(-1),
244 // the right-hand-side
245 bulkForces_(model_().bulkForcesFunction(gridPart_)),
246 boundaryFlux_(model_().neumannBoundaryFunction(gridPart_)),
247 // exact solution, if any
248 initialGuess_(wrapToGridFunction("Initial Guess/Exact Solution", initialGuess, gridPart_, discreteSpace_.order()+1)),
249 // io tuple
250 ioTuple_(&solution_, &initialGuess_()),
251 // DataOutputType
252 dataOutput_(0)
253 {}
254
255#if 0
256 // too complicated
258 : grid_(other.grid_),
259 model_(other.model_),
260 gridPart_(other.gridPart_),
261 discreteSpace_(other.discreteSpace_),
262 solution_(other.solution_),
263 // estimator
264 estimator_(other.estimator_),
265 markingStrategy_(estimator_),
266 // restriction/prolongation operator
267 restrictProlong_(0),
268 // adaptation manager
269 adaptationManager_(0),
270 // create Dirichlet contraints
271 boundaryValues_(model_().dirichletBoundaryFunction(gridPart_)),
272 boundaryWeight_(model_().dirichletWeightFunction(gridPart_)),
273 constraints_(other.constraints_),
274 // the elliptic operator (implicit)
275 operator_(model_().operatorParts(), constraints_),
276 // create linear operator (domainSpace,rangeSpace)
277 linearOperator_("assembled elliptic operator", discreteSpace_, discreteSpace_),
278 solverEps_(other.solverEps_),
279 sequence_(-1),
280 // the right-hand-side
281 bulkForces_(model_().bulkForcesFunction(gridPart_)),
282 boundaryFlux_(model_().neumannBoundaryFunction(gridPart_)),
283 // exact solution, if any
284 initialGuess_(other.initialGuess_),
285 // io tuple
286 ioTuple_(&solution_, &initialGuess_),
287 // DataOutputType
288 dataOutput_(0)
289 {}
290#endif
291
292 public:
293
294 virtual ~EllipticFemSchemeBase() {
295 if (dataOutput_) {
296 delete dataOutput_;
297 }
298 if (adaptationManager_) {
299 delete adaptationManager_;
300 }
301 if (restrictProlong_) {
302 delete restrictProlong_;
303 }
304 }
305
307 virtual void initialize()
308 {
309 if (std::is_same<
312 solution_.clear();
313 } else {
314 // apply natural interpolation
315 interpolate(initialGuess_(), solution_);
316 }
317 }
318
320 virtual void solve(bool forceMatrixAssembling = true)
321 {
322 // set Dirichlet constraints in solution
323 constraints_.constrain(solution_);
324
325 // right hand side, if present
326 DiscreteFunctionType rhs("rhs", discreteSpace_);
327
328 // If we have a RHS _function_ then also take that into
329 // account. Note that it would be comparatively cheap to
330 // omit the enclosing if-claus, because the default
331 // configuration results into an efficient no-op. There is
332 // also no point to optimize further into the case
333 // Forces-but-no-Neumann or Neumann-but-no-forces for the
334 // same reason.
335 auto rhsFunctional =
336 BulkForcesFunctional(discreteSpace_, bulkForces_)
337 +
338 BoundaryFluxFunctional(discreteSpace_, boundaryFlux_, model_().neumannIndicator())
339 +
340 model_().forcesFunctional(discreteSpace_);
341
342 if (!isZero(rhsFunctional)) { // avoid copying thousands of zero values
343 rhsFunctional.coefficients(rhs);
344 constraints_.zeroConstrain(rhs);
345 } else {
346 rhs.clear();
347 }
348
349 if (OperatorPartsType::isLinear) {
350 linearSolve(rhs, forceMatrixAssembling);
351 } else {
352 nonLinearSolve(rhs);
353 }
354 }
355
356 protected:
357
360 {
361 assert(!OperatorPartsType::isLinear);
362
363 NonLinearInverseOperatorType newton(operator_);
364
365 newton(rhs, solution_);
366
367 assert(newton.converged());
368 }
369
374 virtual void linearSolve(DiscreteFunctionType& rhs, bool forceMatrixAssembling)
375 {
376 assert(OperatorPartsType::isLinear);
377
378 // if sequence number is outdated update linear operator
379 if (sequence_ != discreteSpace_.sequence() || forceMatrixAssembling) {
380 // assemble linear operator (i.e. setup matrix) The jacobian
381 // incorporates the constraints defined by the constraint class.
382 operator_.jacobian(solution_ , linearOperator_);
383
384 // update sequence number
385 sequence_ = discreteSpace_.sequence();
386 }
387
388 // inverse operator using linear operator
389 LinearInverseOperatorType solver(linearOperator_, solverEps_, solverEps_);
390
391 // Apply the affine linear operator to the start value. This
392 // computes the initial residual. In the linear case, Lagrange space,
393 // Dirichlet data g, this computes
394 //
395 // update_ = A u - g
396 //
397 // where it is allowed that A is affine-linear, without having
398 // to apply a non-linear solver for this trivial non-linearity
399 DiscreteFunctionType update("update", discreteSpace_);
400 operator_(solution_, update);
401 rhs -= update; // rhs = rhs - A u ...
402
403 // Zero initial values for the update_ vector are ok, because
404 // the information about the previous solution is already is
405 // contained in residual_.
406 update.clear();
407
408 solver(rhs, update);
409 solution_ += update; // ... so u = u + invA(rhs - Au)
410 }
411
412 public:
413
415 virtual bool mark (const double tolerance)
416 {
417 return markingStrategy_.mark(tolerance);
418 }
419
421 virtual double estimate()
422 {
423 return estimator_.estimate(solution_);
424 }
425
427 virtual void adapt()
428 {
429 // there can only one adaptation manager per grid, and the
430 // RestrictionProlongationType which determines which
431 // functions are restricted/prolongated is built into the
432 // AdaptationManagerType. In order to allow for override by
433 // derived classes, allocation that adaptationManager_
434 // dynamically (and thus not at all, if ThisType::adapt() is
435 // never called.
436
437 if (!adaptationManager_) {
438 // restriction/prolongation operator
439 restrictProlong_ = new RestrictionProlongationType(solution_);
440
441 // adaptation manager
442 adaptationManager_ = new AdaptationManagerType(grid_, *restrictProlong_);
443 }
444
445 // apply adaptation and load balancing
446 adaptationManager_->adapt();
447 if (adaptationManager_->loadBalance()) {
448 // TODO: re-initialize stuff as needed.
449 }
450 }
451
453 virtual int output()
454 {
455 if (!dataOutput_) {
456 // NOTE: this should allocated dynamically, otherwise a
457 // derived class has problems to define completely different
458 // IO-schemes Also DataOutputType likes to already generate
459 // some files during construction, so make sure this never happens
460 dataOutput_ = new DataOutputType(grid_, ioTuple_, DataOutputParameters());
461 }
462
463 if (!dataOutput_->willWrite()) {
464 return -1;
465 }
466
467 // write data
468 dataOutput_->write();
469
470 return dataOutput_->writeStep() - 1;
471 }
472
474 virtual double residual() const
475 {
476 // right hand side, if present
477 DiscreteFunctionType rhs("rhs", discreteSpace_);
478 auto rhsFunctional =
479 BulkForcesFunctional(discreteSpace_, bulkForces_)
480 +
481 BoundaryFluxFunctional(discreteSpace_, boundaryFlux_, model_().neumannIndicator())
482 +
483 model_().forcesFunctional(discreteSpace_);
484
485 if (!isZero(rhsFunctional)) { // avoid copying thousands of zero values
486 rhsFunctional.coefficients(rhs);
487 constraints_.zeroConstrain(rhs);
488 } else {
489 rhs.clear();
490 }
491 DiscreteFunctionType update("update", discreteSpace_);
492 operator_(solution_, update);
493 rhs -= update; // rhs = rhs - A u ...
494 return std::sqrt(rhs.scalarProductDofs(rhs));
495 }
496
498 virtual double error() const
499 {
500 // can also use L2-norm
501 typedef Fem::H1Norm< GridPartType > NormType;
502
503 // the DiscreteFunctionSpaceAdapter sets the order per default
504 // to 111 == \infty. We set therefore the order just high
505 // enough that we see the asymptotic error. If the polynomial
506 // order it D, then the error should decay with (h^D). In
507 // principle it should thus suffice to use a quadrature of
508 // degree D.
509 NormType norm(gridPart_, 2*discreteSpace_.order());
510 return norm.distance(initialGuess_(), solution_);
511 }
512
513 virtual size_t size() const
514 {
515 // NOTE: slaveDofs.size() is always one TOO LARGE.
516 size_t numberOfDofs = discreteSpace_.blockMapper().size() - discreteSpace_.slaveDofs().size() + 1;
517
518 numberOfDofs = grid_.comm().sum(numberOfDofs);
519
520 return numberOfDofs;
521 }
522
523 protected:
524 GridType& grid_; // hierarchical grid
525 ExpressionStorage<ModelImplementationType> model_; // the mathematical model
526
527 const std::string name_;
528
529 GridPartType& gridPart_; // grid part(view), here the leaf grid the discrete space is build with
530
531 const DiscreteFunctionSpaceType& discreteSpace_; // discrete function space
532 DiscreteFunctionType& solution_; // the unknown
533
534 EstimatorType estimator_; // residual error estimator
535 MarkingStrategyType markingStrategy_;
536
537 RestrictionProlongationType *restrictProlong_ ; // local restriction/prolongation object
538 AdaptationManagerType *adaptationManager_ ; // adaptation manager handling adaptation
539
540 DirichletBoundaryFunctionType boundaryValues_;
541 DirichletWeightFunctionType boundaryWeight_;
542 ConstraintsOperatorType constraints_; // dirichlet boundary constraints
543
544 OperatorType operator_; // the affine-linear operator.
545
546 LinearOperatorType linearOperator_; // the linear operator (i.e. jacobian of the operator)
547
548 const double solverEps_ ; // eps for linear solver
549 mutable int sequence_; // sequence number
550
551 BulkForcesFunctionType bulkForces_;
552 BoundaryFluxFunctionType boundaryFlux_;
553
555 IOTupleType ioTuple_; // tuple with pointers
556 DataOutputType *dataOutput_; // data output class
557 };
558
560 template<class DiscreteFunction,
561 class Model,
562 class InitialGuess = ZeroGridFunction<typename Model::FunctionSpaceType,
563 typename Model::GridPartType> >
564 class EllipticFemScheme;
565
567 template<class DiscreteFunction, class Model, class InitialGuess>
569 : public EllipticFemSchemeBase<DiscreteFunction, Model, InitialGuess>
570 {
572 public:
574 typedef typename BaseType::ModelType ModelType;
576
579 const ModelType& model,
580 const InitialGuessType& initialGuess,
581 const std::string& name = "ellipt")
582 : BaseType(solution, model, initialGuess, name)
583 {}
584 };
585
587 template<class DiscreteFunction, class Model>
588 class EllipticFemScheme<DiscreteFunction,
589 Model,
590 ZeroGridFunction<typename Model::FunctionSpaceType,
591 typename Model::GridPartType> >
592 : public EllipticFemSchemeBase<DiscreteFunction, Model,
593 ZeroGridFunction<typename Model::FunctionSpaceType,
594 typename Model::GridPartType> >
595 {
596 public:
597 typedef
600 private:
602 public:
603 typedef typename BaseType::DiscreteFunctionType DiscreteFunctionType;
604 typedef typename BaseType::ModelType ModelType;
605
607 EllipticFemScheme(DiscreteFunctionType& solution,
608 const ModelType& model,
609 const InitialGuessType& initialGuess,
610 const std::string& name = "ellipt")
611 : BaseType(solution, model, initialGuess, name)
612 {}
613
627 EllipticFemScheme(DiscreteFunctionType& solution,
628 const ModelType& model,
629 const std::string& name = "ellipt")
630 : BaseType(solution, model, InitialGuessType(solution.space().gridPart()), name)
631 {}
632 };
633
634#if 0
635 // too complicated, the scheme is rather not copy constructible ATM
636
638 template<class DiscreteFunction, class Model, class InitialGuess>
639 EllipticFemScheme<DiscreteFunction, Model, InitialGuess>
640 ellipticFemScheme(DiscreteFunction& solution,
641 const Model&model,
642 const InitialGuess& initialGuess)
643 {
644 typedef EllipticFemScheme<DiscreteFunction, Model, InitialGuess> ReturnType;
645
646 return ReturnType(solution, model, initialGuess);
647 }
648
650 template<class DiscreteFunction, class Model>
651 EllipticFemScheme<DiscreteFunction,
652 Model,
653 ZeroGridFunction<typename Model::FunctionSpaceType,
654 typename Model::GridPartType> >
655 ellipticFemScheme(DiscreteFunction& solution, const Model& model)
656 {
657 typedef
658 EllipticFemScheme<DiscreteFunction,
659 Model,
660 ZeroGridFunction<typename Model::FunctionSpaceType,
661 typename Model::GridPartType> >
662 ReturnType;
663
664 return ReturnType(solution, model);
665 }
666#endif
667
669
670 } // ACFem::
671
672} // Dune::
673
674#endif // __ELLIPTIC_FEMSCHEME_HH__
Abstract space adaptative FEM scheme.
Definition: femschemeinterface.hh:60
Potentially overwrite some parameters.
Definition: dataoutput.hh:37
void zeroConstrain(DiscreteFunctionType &w) const
Unconditionally set the values of all masked DoFs to zero.
Definition: bulkblockconstraints.hh:250
void constrain(DiscreteFunctionType &w) const
The solution operator; unconditionally install the given constraints into the argument.
Definition: bulkblockconstraints.hh:224
RangeFieldType estimate(const DiscreteFunctionType &uh)
calculate estimator
Definition: ellipticestimator.hh:194
Adaptive fem-scheme for "elliptic" problems.
Definition: ellipticfemscheme.hh:93
ModelType::DirichletIndicatorType DirichletIndicatorType
types for various data
Definition: ellipticfemscheme.hh:147
Fem::AdaptationManager< GridType, RestrictionProlongationType > AdaptationManagerType
type of adaptation manager handling adapation and DoF compression
Definition: ellipticfemscheme.hh:131
DiscreteFunctionType::GridType GridType
type of hierarchic grid
Definition: ellipticfemscheme.hh:99
Fem::NewtonInverseOperator< LinearOperatorType, LinearInverseOperatorType > NonLinearInverseOperatorType
Non-linear solver.
Definition: ellipticfemscheme.hh:124
virtual double estimate()
calculate error estimator
Definition: ellipticfemscheme.hh:421
ModelType::DirichletWeightFunctionType DirichletWeightFunctionType
type of Dirichlet weight function
Definition: ellipticfemscheme.hh:137
DirichletConstraints< LinearOperatorType, EffectiveDirichletFunctionType, DirichletIndicatorType > ConstraintsOperatorType
type of Dirichlet constraints
Definition: ellipticfemscheme.hh:150
DataOutput< GridType, IOTupleType > DataOutputType
type of data writer
Definition: ellipticfemscheme.hh:197
virtual void adapt()
do the adaptation for a given marking
Definition: ellipticfemscheme.hh:427
virtual size_t size() const
return some measure about the number of DOFs in use
Definition: ellipticfemscheme.hh:513
DiscreteFunction DiscreteFunctionType
Type of the discrete solution function.
Definition: ellipticfemscheme.hh:96
ModelType::DirichletBoundaryFunctionType DirichletBoundaryFunctionType
type of Dirichlet boundary values
Definition: ellipticfemscheme.hh:134
EllipticEstimator< DiscreteFunctionSpaceType, ModelImplementationType > EstimatorType
type of error estimator
Definition: ellipticfemscheme.hh:177
DiscreteFunctionType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of the discrete function space
Definition: ellipticfemscheme.hh:105
virtual double error() const
calculate L2/H1 error
Definition: ellipticfemscheme.hh:498
decltype(std::declval< DirichletBoundaryFunctionType >()/std::declval< typename DirichletWeightFunctionType::GridFunctionType >()) EffectiveDirichletFunctionType
type of effective Dirichlet values
Definition: ellipticfemscheme.hh:144
EllipticFemSchemeBase(DiscreteFunctionType &solution, const ModelType &model, const InitialGuessType &initialGuess, const std::string &name="ellipt")
Constructor for the elliptic fem-scheme.
Definition: ellipticfemscheme.hh:215
SolverSelector< DiscreteFunctionType, OperatorPartsType > SolverSelectorType
choose type of discrete function, Matrix implementation and solver implementation
Definition: ellipticfemscheme.hh:117
DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType
type of function space
Definition: ellipticfemscheme.hh:114
virtual void initialize()
initialize solution
Definition: ellipticfemscheme.hh:307
Model ModelImplementationType
type of the mathematical model
Definition: ellipticfemscheme.hh:108
GridFunctionConverter< InitialGuessType, GridPartType >::WrappedGridFunctionType InitialGuessFunctionType
The wrapped InitialGuessType (no-op if already instrumented with LocalFunction)
Definition: ellipticfemscheme.hh:189
Fem::RestrictProlongDefault< DiscreteFunctionType > RestrictionProlongationType
type of restriction/prolongation projection for adaptive simulations (use default here,...
Definition: ellipticfemscheme.hh:128
virtual void solve(bool forceMatrixAssembling=true)
Solve the system.
Definition: ellipticfemscheme.hh:320
std::tuple< DiscreteFunctionType *, const InitialGuessFunctionType * > IOTupleType
type of input/output tuple
Definition: ellipticfemscheme.hh:194
InitialGuess InitialGuessType
Initial guess/exact solution.
Definition: ellipticfemscheme.hh:183
DifferentiableEllipticOperator< LinearOperatorType, OperatorPartsType, ConstraintsOperatorType > OperatorType
define differential operator
Definition: ellipticfemscheme.hh:153
virtual int output()
data I/O
Definition: ellipticfemscheme.hh:453
virtual void linearSolve(DiscreteFunctionType &rhs, bool forceMatrixAssembling)
Perform only one step of the Newton scheme for the affine-linear case.
Definition: ellipticfemscheme.hh:374
DiscreteFunctionType::GridPartType GridPartType
type of the grid view
Definition: ellipticfemscheme.hh:102
MarkingStrategy< EstimatorType > MarkingStrategyType
type of marking strategy
Definition: ellipticfemscheme.hh:180
virtual double residual() const
calculate residual (in small l^2)
Definition: ellipticfemscheme.hh:474
virtual void nonLinearSolve(DiscreteFunctionType &rhs)
Run the full Newton-scheme ...
Definition: ellipticfemscheme.hh:359
virtual bool mark(const double tolerance)
mark elements for adaptation
Definition: ellipticfemscheme.hh:415
EllipticFemScheme(DiscreteFunctionType &solution, const ModelType &model, const std::string &name="ellipt")
Constructor for the elliptic fem-scheme.
Definition: ellipticfemscheme.hh:627
EllipticFemScheme(DiscreteFunctionType &solution, const ModelType &model, const InitialGuessType &initialGuess, const std::string &name="ellipt")
Constructor for the elliptic fem-scheme.
Definition: ellipticfemscheme.hh:607
Constructor for the elliptic fem-scheme.
Definition: ellipticfemscheme.hh:570
EllipticFemScheme(DiscreteFunctionType &solution, const ModelType &model, const InitialGuessType &initialGuess, const std::string &name="ellipt")
Constructor for the elliptic fem-scheme.
Definition: ellipticfemscheme.hh:578
Interface class for second order elliptic models.
Definition: modelinterface.hh:192
TraitsType::DirichletBoundaryFunctionType DirichletBoundaryFunctionType
A BoundarySupportedFunction which must be sub-ordinate to the DirichletIndicatorType.
Definition: modelinterface.hh:241
TraitsType::DirichletIndicatorType DirichletIndicatorType
A BoundarySupportedFunction which must be sub-ordinate to the DirichletIndicatorType.
Definition: modelinterface.hh:243
TraitsType::BulkForcesFunctionType BulkForcesFunctionType
A function modelling "force" terms in the bulk-phase.
Definition: modelinterface.hh:226
TraitsType::DirichletWeightFunctionType DirichletWeightFunctionType
A BoundarySupportedFunction which must be sub-ordinate to the DirichletIndicatorType.
Definition: modelinterface.hh:242
TraitsType::NeumannBoundaryFunctionType NeumannBoundaryFunctionType
A function modelling "force" terms in the bulk-phase.
Definition: modelinterface.hh:227
A grid-function always returning 0.
Definition: constantfunction.hh:352
constexpr bool isZero(Expression &&)
Specialize to evaluate to true for zero expressions.
Definition: expressionoperations.hh:469
static auto wrapToGridFunction(const std::string &name, const FunctionImp &f, const GridPart &g, unsigned order=111)
Possibly wrap a function into a GridFunctionWrapper.
Definition: gridfunctionwrapper.hh:342
Select one appropriate (linear) solver depending on whether the model is symmetric and/or semidefinit...
Definition: solverselector.hh:90
A grid-function tight to zero.
Definition: constantfunction.hh:324
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Aug 13, 22:30, 2024)