|
dune-pdelab 2.10-git
|
A local operator to take the weighted sum of other local operators. More...
#include <dune/pdelab/localoperator/weightedsum.hh>

Classes | |
| struct | WeightedContainer |
Protected Types | |
| using | Base = CombinedOperator< WeightedSumLocalOperator< K, Args... >, Args... > |
| using | ArgPtrs = typename Base::ArgPtrs |
| using | ArgRefs = typename Base::ArgRefs |
| using | Weights = FieldVector< K, sizeof...(Args)> |
Protected Member Functions | |
| template<typename... FArgs> | |
| void | getWeights (FieldVector< K, sizeof...(FArgs)> &aweights, std::tuple< FArgs... > fargs) const |
| template<typename... FArgs> | |
| void | setWeights (const FieldVector< K, sizeof...(FArgs)> &aweights, std::tuple< FArgs... > fargs) const |
| template<typename F , typename... FArgs> | |
| void | applyLops (F &&f, FArgs &... fargs) const |
| void | applyLops (FArgs &... args) const |
Protected Attributes | |
| friend | Base |
| Weights | weights |
| ArgPtrs | lops |
Construction and modification | |
| WeightedSumLocalOperator (ArgPtrs &&lops, const Weights &weights_) | |
| WeightedSumLocalOperator (const Weights &weights_=Weights(1)) | |
| construct a WeightedSumLocalOperator | |
| WeightedSumLocalOperator (Args &... lops_, const Weights &weights_=Weights(1)) | |
| WeightedSumLocalOperator (Args &&... lops_, const Weights &weights_=Weights(1)) | |
| void | setWeight (K w, std::size_t i) |
| set the weight for the i'th component of the sum | |
| K | getWeight (std::size_t i) |
| get the weight for the i'th component of the sum | |
Construction and modification | |
| void | setSummand (typename std::tuple_element_t< i, ArgRefs > summand) |
| set the i'th component of the sum | |
| std::tuple_element_t< i, ArgRefs > | getSummand () |
| get the i'th component of the sum | |
Methods for selective assembly | |
| bool | skip_entity (const EG &eg) const |
| whether to assembly methods associated with a given entity | |
| bool | skip_intersection (const IG &ig) const |
| whether to assembly methods associated with a given intersection | |
Methods for the sparsity pattern | |
| void | pattern_volume (const LFSU &lfsu, const LFSV &lfsv, LocalPattern &pattern) const |
| get an element's contribution to the sparsity pattern | |
| void | pattern_volume_post_skeleton (const LFSU &lfsu, const LFSV &lfsv, LocalPattern &pattern) const |
| get an element's contribution to the sparsity pattern after the intersections have been handled | |
| void | pattern_skeleton (const LFSU &lfsu_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const LFSV &lfsv_n, LocalPattern &pattern_sn, LocalPattern &pattern_ns) const |
| get an internal intersection's contribution to the sparsity pattern | |
| void | pattern_boundary (const LFSU &lfsu_s, const LFSV &lfsv_s, LocalPattern &pattern_ss) const |
| get a boundary intersection's contribution to the sparsity pattern | |
Methods for the residual – non-constant parts | |
| void | alpha_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, R &r) const |
| get an element's contribution to alpha | |
| void | alpha_volume_post_skeleton (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, R &r) const |
| get an element's contribution to alpha after the intersections have been handled | |
| void | alpha_skeleton (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const X &x_n, const LFSV &lfsv_n, R &r_s, R &r_n) const |
| get an internal intersections's contribution to alpha | |
| void | alpha_boundary (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, R &r_s) const |
| get a boundary intersections's contribution to alpha | |
Methods for the residual – constant parts | |
| void | lambda_volume (const EG &eg, const LFSV &lfsv, R &r) const |
| get an element's contribution to lambda | |
| void | lambda_volume_post_skeleton (const EG &eg, const LFSV &lfsv, R &r) const |
| get an element's contribution to lambda after the intersections have been handled | |
| void | lambda_skeleton (const IG &ig, const LFSV &lfsv_s, const LFSV &lfsv_n, R &r_s, R &r_n) const |
| get an internal intersections's contribution to lambda | |
| void | lambda_boundary (const IG &ig, const LFSV &lfsv_s, R &r_s) const |
| get a boundary intersections's contribution to lambda | |
Methods for the application of the jacobian | |
| void | jacobian_apply_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Y &y) const |
| apply an element's jacobian | |
| void | jacobian_apply_volume_post_skeleton (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Y &y) const |
| apply an element's jacobian after the intersections have been handled | |
| void | jacobian_apply_skeleton (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const X &x_n, const LFSV &lfsv_n, Y &y_s, Y &y_n) const |
| apply an internal intersections's jacobians | |
| void | jacobian_apply_boundary (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, Y &y_s) const |
| apply a boundary intersections's jacobian | |
Methods to extract the jacobian | |
| void | jacobian_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, LocalMatrix &mat) const |
| get an element's jacobian | |
| void | jacobian_volume_post_skeleton (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, LocalMatrix &mat) const |
| get an element's jacobian after the intersections have been handled | |
| void | jacobian_skeleton (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const X &x_n, const LFSV &lfsv_n, LocalMatrix &mat_ss, LocalMatrix &mat_sn, LocalMatrix &mat_ns, LocalMatrix &mat_nn) const |
| apply an internal intersections's jacobians | |
| void | jacobian_boundary (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, LocalMatrix &mat_ss) const |
| get a boundary intersections's jacobian | |
Methods for instationary problems | |
| void | setTime (RealType t) |
| set time for subsequent evaluation | |
| RealType | getTime () const |
| get current time | |
| void | preStep (RealType time, RealType dt, int stages) |
| to be called once before each time step | |
| void | postStep () |
| to be called once at the end of each time step | |
| void | preStage (RealType time, int r) |
| to be called once before each stage | |
| int | getStage () const |
| get current stage | |
| void | postStage () |
| to be called once at the end of each stage | |
| RealType | suggestTimestep (RealType dt) const |
| to be called after stage 1 | |
| typedef std::tuple_element< 0, std::tuple< Args... > >::type::RealType | RealType |
| Export type used for time values. | |
Control flags | |
| enum | |
| Whether to do selective cell assembly, i.e. whether or not skip_entity() should be called. More... | |
| enum | |
| Whether to do selective intersection assembly, i.e. whether or not skip_intersection() should be called. More... | |
| enum | |
| Whether to assemble the pattern on the elements, i.e. whether or not pattern_volume() should be called. More... | |
| enum | |
| Whether to assemble the pattern on the elements after the skeleton has been handled, i.e. whether or not pattern_volume_post_skeleton() should be called. More... | |
| enum | |
| Whether to assemble the pattern on the interior intersections, i.e. whether or not pattern_skeleton() should be called. More... | |
| enum | |
| Whether to assemble the pattern on the boundary intersections, i.e. whether or not pattern_boundary() should be called. More... | |
| enum | |
| Whether to call the local operator's alpha_volume(), jacobian_apply_volume() and jacobian_volume(). More... | |
| enum | |
| Whether to call the local operator's alpha_volume_post_skeleton(), jacobian_apply_volume_post_skeleton() and jacobian_volume_post_skeleton(). More... | |
| enum | |
| Whether to call the local operator's alpha_skeleton(), jacobian_apply_skeleton() and jacobian_skeleton(). More... | |
| enum | |
| Whether to call the local operator's alpha_boundary(), jacobian_apply_boundary() and jacobian_boundary(). More... | |
| enum | |
| Whether to call the local operator's lambda_volume(). More... | |
| enum | |
| Whether to call the local operator's lambda_volume_post_skeleton(). More... | |
| enum | |
| Whether to call the local operator's lambda_skeleton(). More... | |
| enum | |
| Whether to call the local operator's lambda_boundary(). More... | |
| enum | |
| Whether to visit the skeleton methods from both sides. More... | |
| enum | |
| Whether this is a linear operator. More... | |
Detailed Description
class Dune::PDELab::WeightedSumLocalOperator< K, Args >
A local operator to take the weighted sum of other local operators.
If the weight for one summand is zero, calls to that local operators evaluation and pattern methods are eliminated at run-time.
- Template Parameters
-
K Type of the scaling factors. Args variadic list of local operators
Member Typedef Documentation
◆ RealType
|
inherited |
Export type used for time values.
Member Enumeration Documentation
◆ anonymous enum
|
inherited |
Whether to do selective cell assembly, i.e. whether or not skip_entity() should be called.
◆ anonymous enum
|
inherited |
Whether to do selective intersection assembly, i.e. whether or not skip_intersection() should be called.
◆ anonymous enum
|
inherited |
Whether to assemble the pattern on the elements, i.e. whether or not pattern_volume() should be called.
◆ anonymous enum
|
inherited |
Whether to assemble the pattern on the elements after the skeleton has been handled, i.e. whether or not pattern_volume_post_skeleton() should be called.
◆ anonymous enum
|
inherited |
Whether to assemble the pattern on the interior intersections, i.e. whether or not pattern_skeleton() should be called.
◆ anonymous enum
|
inherited |
Whether to assemble the pattern on the boundary intersections, i.e. whether or not pattern_boundary() should be called.
◆ anonymous enum
|
inherited |
Whether to call the local operator's alpha_volume(), jacobian_apply_volume() and jacobian_volume().
◆ anonymous enum
|
inherited |
Whether to call the local operator's alpha_volume_post_skeleton(), jacobian_apply_volume_post_skeleton() and jacobian_volume_post_skeleton().
◆ anonymous enum
|
inherited |
Whether to call the local operator's alpha_skeleton(), jacobian_apply_skeleton() and jacobian_skeleton().
◆ anonymous enum
|
inherited |
Whether to call the local operator's alpha_boundary(), jacobian_apply_boundary() and jacobian_boundary().
◆ anonymous enum
|
inherited |
Whether to call the local operator's lambda_volume().
◆ anonymous enum
|
inherited |
Whether to call the local operator's lambda_volume_post_skeleton().
◆ anonymous enum
|
inherited |
Whether to call the local operator's lambda_skeleton().
◆ anonymous enum
|
inherited |
Whether to call the local operator's lambda_boundary().
◆ anonymous enum
|
inherited |
Whether to visit the skeleton methods from both sides.
◆ anonymous enum
|
inherited |
Whether this is a linear operator.
Member Function Documentation
◆ alpha_boundary()
|
inlineinherited |
get a boundary intersections's contribution to alpha
- Note
- Summands with zero weight don't contribute to the residual, and the calls to the evaluation methods are eliminated at run-time.
◆ alpha_skeleton()
|
inlineinherited |
get an internal intersections's contribution to alpha
- Note
- Summands with zero weight don't contribute to the residual, and the calls to the evaluation methods are eliminated at run-time.
◆ alpha_volume()
|
inlineinherited |
get an element's contribution to alpha
- Note
- Summands with zero weight don't contribute to the residual, and the calls to the evaluation methods are eliminated at run-time.
◆ alpha_volume_post_skeleton()
|
inlineinherited |
get an element's contribution to alpha after the intersections have been handled
- Note
- Summands with zero weight don't contribute to the residual, and the calls to the evaluation methods are eliminated at run-time.
◆ applyLops()
|
inlineprotectedinherited |
◆ getStage()
|
inlineinherited |
get current stage
◆ getSummand()
|
inlineinherited |
get the i'th component of the sum
◆ getTime()
|
inlineinherited |
get current time
◆ jacobian_apply_boundary()
|
inlineinherited |
apply a boundary intersections's jacobian
- Note
- Summands with zero weight don't contribute to the jacobian, and the calls to the evaluation methods are eliminated at run-time.
◆ jacobian_apply_skeleton()
|
inlineinherited |
apply an internal intersections's jacobians
- Note
- Summands with zero weight don't contribute to the jacobian, and the calls to the evaluation methods are eliminated at run-time.
◆ jacobian_apply_volume()
|
inlineinherited |
apply an element's jacobian
- Note
- Summands with zero weight don't contribute to the jacobian, and the calls to the evaluation methods are eliminated at run-time.
◆ jacobian_apply_volume_post_skeleton()
|
inlineinherited |
apply an element's jacobian after the intersections have been handled
- Note
- Summands with zero weight don't contribute to the jacobian, and the calls to the evaluation methods are eliminated at run-time.
◆ jacobian_boundary()
|
inlineinherited |
get a boundary intersections's jacobian
- Note
- Summands with zero weight don't contribute to the jacobian, and the calls to the evaluation methods are eliminated at run-time.
◆ jacobian_skeleton()
|
inlineinherited |
apply an internal intersections's jacobians
- Note
- Summands with zero weight don't contribute to the jacobian, and the calls to the evaluation methods are eliminated at run-time.
◆ jacobian_volume()
|
inlineinherited |
get an element's jacobian
- Note
- Summands with zero weight don't contribute to the jacobian, and the calls to the evaluation methods are eliminated at run-time.
◆ jacobian_volume_post_skeleton()
|
inlineinherited |
get an element's jacobian after the intersections have been handled
- Note
- Summands with zero weight don't contribute to the jacobian, and the calls to the evaluation methods are eliminated at run-time.
◆ lambda_boundary()
|
inlineinherited |
get a boundary intersections's contribution to lambda
- Note
- Summands with zero weight don't contribute to the residual, and the calls to the evaluation methods are eliminated at run-time.
◆ lambda_skeleton()
|
inlineinherited |
get an internal intersections's contribution to lambda
- Note
- Summands with zero weight don't contribute to the residual, and the calls to the evaluation methods are eliminated at run-time.
◆ lambda_volume()
|
inlineinherited |
get an element's contribution to lambda
- Note
- Summands with zero weight don't contribute to the residual, and the calls to the evaluation methods are eliminated at run-time.
◆ lambda_volume_post_skeleton()
|
inlineinherited |
get an element's contribution to lambda after the intersections have been handled
- Note
- Summands with zero weight don't contribute to the residual, and the calls to the evaluation methods are eliminated at run-time.
◆ pattern_boundary()
|
inlineinherited |
get a boundary intersection's contribution to the sparsity pattern
- Note
- Summands with zero weight don't contribute to the sparsity pattern, and the calls to the pattern methods are eliminated at run-time.
◆ pattern_skeleton()
|
inlineinherited |
get an internal intersection's contribution to the sparsity pattern
- Note
- Summands with zero weight don't contribute to the sparsity pattern, and the calls to the pattern methods are eliminated at run-time.
◆ pattern_volume()
|
inlineinherited |
get an element's contribution to the sparsity pattern
- Note
- Summands with zero weight don't contribute to the sparsity pattern, and the calls to the pattern methods are eliminated at run-time.
◆ pattern_volume_post_skeleton()
|
inlineinherited |
get an element's contribution to the sparsity pattern after the intersections have been handled
- Note
- Summands with zero weight don't contribute to the sparsity pattern, and the calls to the pattern methods are eliminated at run-time.
◆ postStage()
|
inlineinherited |
to be called once at the end of each stage
◆ postStep()
|
inlineinherited |
to be called once at the end of each time step
◆ preStage()
|
inlineinherited |
to be called once before each stage
◆ preStep()
|
inlineinherited |
to be called once before each time step
◆ setSummand()
|
inlineinherited |
set the i'th component of the sum
◆ setTime()
|
inlineinherited |
set time for subsequent evaluation
◆ skip_entity()
|
inlineinherited |
whether to assembly methods associated with a given entity
◆ skip_intersection()
|
inlineinherited |
whether to assembly methods associated with a given intersection
◆ suggestTimestep()
|
inlineinherited |
to be called after stage 1
- Note
- This operator simply chains suggestTimestep() methods of all the component local operators together and hopes that the result will be meaningful.
Member Data Documentation
◆ lops
|
protectedinherited |
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8