1 // -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 // vi: set et ts=8 sw=4 sts=4: 3 #ifndef DUNE_PDELAB_LOCALOPERATOR_FLAGS_HH 4 #define DUNE_PDELAB_LOCALOPERATOR_FLAGS_HH 5 6 namespace Dune 7 { 8 namespace PDELab 9 { 10 //! \addtogroup LocalOperator 11 //! \ingroup PDELab 12 //! \{ 13 14 //! Default flags for all local operators 15 /** 16 * \nosubgrouping 17 */ 18 class LocalOperatorDefaultFlags 19 { 20 public: 21 //! \name Flags selective assembly 22 //! \{ 23 24 //! \brief Whether to do selective assembly on the elements, 25 //! i.e. whether or not skip_entity() should be called. 26 enum { /*! \hideinitializer */ doSkipEntity = false }; 27 //! \brief Whether to do selective assembly on the intersections, 28 //! i.e. whether or not skip_intersection() should be called. 29 enum { /*! \hideinitializer */ doSkipIntersection = false }; 30 31 //! \} Flags selective assembly 32 33 //! \name Flags for the sparsity pattern 34 //! \{ 35 36 //! \brief Whether to assemble the pattern on the elements, 37 //! i.e. whether or not pattern_volume() should be called. 38 enum { /*! \hideinitializer */ doPatternVolume = false }; 39 //! \brief Whether to assemble the pattern on the elements after 40 //! the skeleton has been handled, i.e. whether or not 41 //! pattern_volume_post_skeleton() should be called. 42 enum { /*! \hideinitializer */ doPatternVolumePostSkeleton = false }; 43 //! \brief Whether to assemble the pattern on the interior 44 //! intersections, i.e. whether or not pattern_skeleton() 45 //! should be called. 46 enum { /*! \hideinitializer */ doPatternSkeleton = false }; 47 //! \brief Whether to assemble the pattern on the boundary 48 //! intersections, i.e. whether or not pattern_boundary() 49 //! should be called. 50 enum { /*! \hideinitializer */ doPatternBoundary = false }; 51 52 //! \} Flags for the sparsity pattern 53 54 //! \name Flags for the non-constant part of the residual and the jacobian 55 //! \{ 56 57 //! \brief Whether to call the local operator's alpha_volume(), 58 //! jacobian_apply_volume() and jacobian_volume(). 59 enum { /*! \hideinitializer */ doAlphaVolume = false }; 60 //! \brief Whether to call the local operator's 61 //! alpha_volume_post_skeleton(), 62 //! jacobian_apply_volume_post_skeleton() and 63 //! jacobian_volume_post_skeleton(). 64 enum { /*! \hideinitializer */ doAlphaVolumePostSkeleton = false }; 65 //! \brief Whether to call the local operator's alpha_skeleton(), 66 //! jacobian_apply_skeleton() and jacobian_skeleton(). 67 enum { /*! \hideinitializer */ doAlphaSkeleton = false }; 68 //! \brief Whether to call the local operator's alpha_boundary(), 69 //! jacobian_apply_boundary() and jacobian_boundary(). 70 enum { /*! \hideinitializer */ doAlphaBoundary = false }; 71 72 //! \} Flags for the non-constant part of the residual and the jacobian 73 74 //! \name Flags for the constant part of the residual 75 //! \{ 76 77 //! \brief Whether to call the local operator's lambda_volume(). 78 enum { /*! \hideinitializer */ doLambdaVolume = false }; 79 //! \brief Whether to call the local operator's 80 //! lambda_volume_post_skeleton(). 81 enum { /*! \hideinitializer */ doLambdaVolumePostSkeleton = false }; 82 //! \brief Whether to call the local operator's lambda_skeleton(). 83 enum { /*! \hideinitializer */ doLambdaSkeleton = false }; 84 //! \brief Whether to call the local operator's lambda_boundary(). 85 enum { /*! \hideinitializer */ doLambdaBoundary = false }; 86 87 //! \} Flags for the constant part of the residual 88 89 //! \name Special flags 90 //! \{ 91 92 //! \brief Whether to visit the skeleton methods from both sides 93 enum { /*! \hideinitializer */ doSkeletonTwoSided = false }; 94 95 //! \brief Wheter the local operator describes a linear problem 96 enum { /*! \hideinitializer */ isLinear = true }; 97 98 //! \} Special flags 99 }; 100 101 102 //! Namespace with decorator classes that influence assembler behavior. 103 namespace lop { 104 105 //! Decorator base class for local operators that have a diagonal jacobian matrix. 106 /** 107 * By inheriting from this decorator class, local operators assert that 108 * their jacobian is completely diagonal. 109 * This information can be used by the assembler to e.g. switch to a diagonal 110 * local matrix that gets passed to the LocalOperator, which can save a lot of 111 * memory bandwidth for large local function spaces. 112 */ 113 struct DiagonalJacobian 114 {}; 115 116 } 117 118 //! \} group LocalOperator 119 } 120 } 121 122 #endif // DUNE_PDELAB_LOCALOPERATOR_FLAGS_HH 123