dune-pdelab
2.4.1
|
A local operator to take the weighted sum of other local operators. More...
#include <dune/pdelab/localoperator/weightedsum.hh>
Construction and modification | |
WeightedSumLocalOperator (const Weights &weights_=Weights(1)) | |
construct a WeightedSumLocalOperator More... | |
WeightedSumLocalOperator (const ArgRefs &lops_, const Weights &weights_=Weights(1)) | |
construct a WeightedSumLocalOperator from a tuple of local operators More... | |
template<std::size_t i> | |
void | setSummand (typename tuple_element< i, Args >::type &summand) |
set the i'th component of the sum More... | |
template<std::size_t i> | |
tuple_element< i, Args >::type & | getSummand () |
get the i'th component of the sum More... | |
void | setWeight (K w, std::size_t i) |
set the weight for the i'th component of the sum More... | |
K | getWeight (std::size_t i) |
get the weight for the i'th component of the sum More... | |
Control flags | |
enum | { doPatternVolume } |
Whether to assemble the pattern on the elements, i.e. whether or not pattern_volume() should be called. More... | |
enum | { doPatternVolumePostSkeleton } |
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 | { doPatternSkeleton } |
Whether to assemble the pattern on the interior intersections, i.e. whether or not pattern_skeleton() should be called. More... | |
enum | { doPatternBoundary } |
Whether to assemble the pattern on the boundary intersections, i.e. whether or not pattern_boundary() should be called. More... | |
enum | { doAlphaVolume } |
Whether to call the local operator's alpha_volume(), jacobian_apply_volume() and jacobian_volume(). More... | |
enum | { doAlphaVolumePostSkeleton } |
Whether to call the local operator's alpha_volume_post_skeleton(), jacobian_apply_volume_post_skeleton() and jacobian_volume_post_skeleton(). More... | |
enum | { doAlphaSkeleton } |
Whether to call the local operator's alpha_skeleton(), jacobian_apply_skeleton() and jacobian_skeleton(). More... | |
enum | { doAlphaBoundary } |
Whether to call the local operator's alpha_boundary(), jacobian_apply_boundary() and jacobian_boundary(). More... | |
enum | { doLambdaVolume } |
Whether to call the local operator's lambda_volume(). More... | |
enum | { doLambdaVolumePostSkeleton } |
Whether to call the local operator's lambda_volume_post_skeleton(). More... | |
enum | { doLambdaSkeleton } |
Whether to call the local operator's lambda_skeleton(). More... | |
enum | { doLambdaBoundary } |
Whether to call the local operator's lambda_boundary(). More... | |
enum | { doSkeletonTwoSided } |
Whether to visit the skeleton methods from both sides. More... | |
Methods for the sparsity pattern | |
template<typename LFSU , typename LFSV , typename LocalPattern > | |
void | pattern_volume (const LFSU &lfsu, const LFSV &lfsv, LocalPattern &pattern) const |
get an element's contribution to the sparsity pattern More... | |
template<typename LFSU , typename LFSV , typename LocalPattern > | |
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 More... | |
template<typename LFSU , typename LFSV , typename LocalPattern > | |
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 More... | |
template<typename LFSU , typename LFSV , typename LocalPattern > | |
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 More... | |
Methods for the residual -- non-constant parts | |
template<typename EG , typename LFSU , typename X , typename LFSV , typename C > | |
void | alpha_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, C &r) const |
get an element's contribution to alpha More... | |
template<typename EG , typename LFSU , typename X , typename LFSV , typename C > | |
void | alpha_volume_post_skeleton (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, C &r) const |
get an element's contribution to alpha after the intersections have been handled More... | |
template<typename IG , typename LFSU , typename X , typename LFSV , typename C > | |
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, C &r_s, C &r_n) const |
get an internal intersections's contribution to alpha More... | |
template<typename IG , typename LFSU , typename X , typename LFSV , typename C > | |
void | alpha_boundary (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, C &r_s) const |
get a boundary intersections's contribution to alpha More... | |
Methods for the residual -- constant parts | |
template<typename EG , typename LFSV , typename C > | |
void | lambda_volume (const EG &eg, const LFSV &lfsv, C &r) const |
get an element's contribution to lambda More... | |
template<typename EG , typename LFSV , typename C > | |
void | lambda_volume_post_skeleton (const EG &eg, const LFSV &lfsv, C &r) const |
get an element's contribution to lambda after the intersections have been handled More... | |
template<typename IG , typename LFSV , typename C > | |
void | lambda_skeleton (const IG &ig, const LFSV &lfsv_s, const LFSV &lfsv_n, C &r_s, C &r_n) const |
get an internal intersections's contribution to lambda More... | |
template<typename IG , typename LFSV , typename C > | |
void | lambda_boundary (const IG &ig, const LFSV &lfsv_s, C &r_s) const |
get a boundary intersections's contribution to lambda More... | |
Methods for the application of the jacobian | |
template<typename EG , typename LFSU , typename X , typename LFSV , typename C > | |
void | jacobian_apply_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, C &r) const |
apply an element's jacobian More... | |
template<typename EG , typename LFSU , typename X , typename LFSV , typename C > | |
void | jacobian_apply_volume_post_skeleton (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, C &r) const |
apply an element's jacobian after the intersections have been handled More... | |
template<typename IG , typename LFSU , typename X , typename LFSV , typename C > | |
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, C &r_s, C &r_n) const |
apply an internal intersections's jacobians More... | |
template<typename IG , typename LFSU , typename X , typename LFSV , typename C > | |
void | jacobian_apply_boundary (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, C &r_s) const |
apply a boundary intersections's jacobian More... | |
Methods to extract the jacobian | |
template<typename EG , typename LFSU , typename X , typename LFSV , typename C > | |
void | jacobian_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, C &m) const |
get an element's jacobian More... | |
template<typename EG , typename LFSU , typename X , typename LFSV , typename C > | |
void | jacobian_volume_post_skeleton (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, C &m) const |
get an element's jacobian after the intersections have been handled More... | |
template<typename IG , typename LFSU , typename X , typename LFSV , typename C > | |
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, C &m_ss, C &m_sn, C &m_ns, C &m_nn) const |
apply an internal intersections's jacobians More... | |
template<typename IG , typename LFSU , typename X , typename LFSV , typename C > | |
void | jacobian_boundary (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, C &m_ss) const |
get a boundary intersections's jacobian More... | |
Methods for instationary problems | |
typedef tuple_element< 0, Args >::type::RealType | RealType |
Export type used for time values. More... | |
void | setTime (RealType t) |
set time for subsequent evaluation More... | |
RealType | getTime () const |
get current time More... | |
void | preStep (RealType time, RealType dt, int stages) |
to be called once before each time step More... | |
void | postStep () |
to be called once at the end of each time step More... | |
void | preStage (RealType time, int r) |
to be called once before each stage More... | |
int | getStage () const |
get current stage More... | |
void | postStage () |
to be called once at the end of each stage More... | |
RealType | suggestTimestep (RealType dt) const |
to be called after stage 1 More... | |
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.
K | Type of the scaling factors. |
Args | Tuple of local operators. Must fulfill tuple_size<Args>::value>=1 . |
typedef tuple_element<0, Args>::type::RealType Dune::PDELab::WeightedSumLocalOperator< K, Args >::RealType |
Export type used for time values.
anonymous enum |
Whether to assemble the pattern on the elements, i.e. whether or not pattern_volume() should be called.
Enumerator | |
---|---|
doPatternVolume |
anonymous 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.
Enumerator | |
---|---|
doPatternVolumePostSkeleton |
anonymous enum |
Whether to assemble the pattern on the interior intersections, i.e. whether or not pattern_skeleton() should be called.
Enumerator | |
---|---|
doPatternSkeleton |
anonymous enum |
Whether to assemble the pattern on the boundary intersections, i.e. whether or not pattern_boundary() should be called.
Enumerator | |
---|---|
doPatternBoundary |
anonymous enum |
Whether to call the local operator's alpha_volume(), jacobian_apply_volume() and jacobian_volume().
Enumerator | |
---|---|
doAlphaVolume |
anonymous enum |
Whether to call the local operator's alpha_volume_post_skeleton(), jacobian_apply_volume_post_skeleton() and jacobian_volume_post_skeleton().
Enumerator | |
---|---|
doAlphaVolumePostSkeleton |
anonymous enum |
Whether to call the local operator's alpha_skeleton(), jacobian_apply_skeleton() and jacobian_skeleton().
Enumerator | |
---|---|
doAlphaSkeleton |
anonymous enum |
Whether to call the local operator's alpha_boundary(), jacobian_apply_boundary() and jacobian_boundary().
Enumerator | |
---|---|
doAlphaBoundary |
anonymous enum |
Whether to call the local operator's lambda_volume().
Enumerator | |
---|---|
doLambdaVolume |
anonymous enum |
Whether to call the local operator's lambda_volume_post_skeleton().
Enumerator | |
---|---|
doLambdaVolumePostSkeleton |
anonymous enum |
Whether to call the local operator's lambda_skeleton().
Enumerator | |
---|---|
doLambdaSkeleton |
anonymous enum |
Whether to call the local operator's lambda_boundary().
Enumerator | |
---|---|
doLambdaBoundary |
anonymous enum |
|
inline |
construct a WeightedSumLocalOperator
No summand local operators are set. They must be initialized with setSummand() before the constructed object is used.
|
inline |
construct a WeightedSumLocalOperator from a tuple of local operators
|
inline |
get a boundary intersections's contribution to alpha
References Dune::PDELab::WeightedVectorAccumulationView< C >::container(), ig, Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::lambda_boundary(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::lambda_skeleton(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::lambda_volume(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::lambda_volume_post_skeleton(), and Dune::PDELab::WeightedVectorAccumulationView< C >::weight().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::alpha_skeleton().
|
inline |
get an internal intersections's contribution to alpha
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::alpha_boundary().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::alpha_volume_post_skeleton().
|
inline |
get an element's contribution to alpha
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::alpha_volume_post_skeleton().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::pattern_boundary().
|
inline |
get an element's contribution to alpha after the intersections have been handled
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::alpha_skeleton().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::alpha_volume().
|
inline |
get current stage
|
inline |
get the i'th component of the sum
|
inline |
get current time
|
inline |
get the weight for the i'th component of the sum
|
inline |
apply a boundary intersections's jacobian
References Dune::PDELab::WeightedMatrixAccumulationView< C >::container(), ig, Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::jacobian_boundary(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::jacobian_skeleton(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::jacobian_volume(), Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_volume(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::jacobian_volume_post_skeleton(), and Dune::PDELab::WeightedMatrixAccumulationView< C >::weight().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_apply_skeleton().
|
inline |
apply an internal intersections's jacobians
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_apply_boundary().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_apply_volume_post_skeleton().
|
inline |
apply an element's jacobian
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_apply_volume_post_skeleton().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::lambda_boundary().
|
inline |
apply an element's jacobian after the intersections have been handled
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_apply_skeleton().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_apply_volume().
|
inline |
get a boundary intersections's jacobian
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_skeleton().
|
inline |
apply an internal intersections's jacobians
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_boundary().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_volume_post_skeleton().
|
inline |
get an element's jacobian
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_volume_post_skeleton().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_apply_boundary().
|
inline |
get an element's jacobian after the intersections have been handled
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_skeleton().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_volume().
|
inline |
get a boundary intersections's contribution to lambda
References Dune::PDELab::WeightedVectorAccumulationView< C >::container(), ig, Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::jacobian_apply_boundary(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::jacobian_apply_skeleton(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::jacobian_apply_volume(), Dune::PDELab::WeightedSumLocalOperator< K, Args >::jacobian_apply_volume(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::jacobian_apply_volume_post_skeleton(), and Dune::PDELab::WeightedVectorAccumulationView< C >::weight().
|
inline |
get an internal intersections's contribution to lambda
|
inline |
get an element's contribution to lambda
|
inline |
get an element's contribution to lambda after the intersections have been handled
|
inline |
get a boundary intersection's contribution to the sparsity pattern
References Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::alpha_boundary(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::alpha_skeleton(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::alpha_volume(), Dune::PDELab::WeightedSumLocalOperator< K, Args >::alpha_volume(), Dune::PDELab::LocalAssemblerCallSwitch< LA, doIt >::alpha_volume_post_skeleton(), Dune::PDELab::WeightedVectorAccumulationView< C >::container(), ig, and Dune::PDELab::WeightedVectorAccumulationView< C >::weight().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::pattern_skeleton().
|
inline |
get an internal intersection's contribution to the sparsity pattern
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::pattern_boundary().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::pattern_volume_post_skeleton().
|
inline |
get an element's contribution to the sparsity pattern
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::pattern_volume_post_skeleton().
|
inline |
get an element's contribution to the sparsity pattern after the intersections have been handled
References Dune::PDELab::WeightedSumLocalOperator< K, Args >::pattern_skeleton().
Referenced by Dune::PDELab::WeightedSumLocalOperator< K, Args >::pattern_volume().
|
inline |
to be called once at the end of each stage
|
inline |
to be called once at the end of each time step
|
inline |
to be called once before each stage
|
inline |
to be called once before each time step
|
inline |
set the i'th component of the sum
|
inline |
set time for subsequent evaluation
|
inline |
set the weight for the i'th component of the sum
References w.
|
inline |
to be called after stage 1