3 #ifndef DUNE_PDELAB_LOCALOPERATOR_NUMERICALRESIDUAL_HH 4 #define DUNE_PDELAB_LOCALOPERATOR_NUMERICALRESIDUAL_HH 34 template<
typename Imp>
40 template<
typename EG,
typename LFSU,
typename X,
typename LFSV,
44 const LFSU& lfsu,
const X& x,
const LFSV& lfsv,
48 typedef typename Jacobian::WeightedAccumulationView JacobianView;
50 Jacobian mat(r.size(),x.size(), 0);
52 asImp().jacobian_volume(eg, lfsu, x, lfsv, matview);
54 mat.usmv(r.weight(),x,r);
58 Imp& asImp () {
return static_cast<Imp &
> (*this); }
59 const Imp& asImp ()
const {
return static_cast<const Imp &
>(*this); }
73 template<
typename Imp>
79 template<
typename IG,
typename LFSU,
typename X,
typename LFSV,
83 const LFSU& lfsu_s,
const X& x_s,
const LFSV& lfsv_s,
84 const LFSU& lfsu_n,
const X& x_n,
const LFSV& lfsv_n,
88 typedef typename Jacobian::WeightedAccumulationView JacobianView;
90 Jacobian mat_ss(r_s.size(),x_s.size(),0);
91 Jacobian mat_sn(r_s.size(),x_n.size(),0);
92 Jacobian mat_ns(r_n.size(),x_s.size(),0);
93 Jacobian mat_nn(r_n.size(),x_n.size(),0);
100 asImp().jacobian_skeleton(ig,
103 view_ss, view_sn, view_ns, view_nn);
105 mat_ss.usmv(r_s.weight(),x_s,r_s);
106 mat_ns.usmv(r_n.weight(),x_s,r_n);
107 mat_sn.usmv(r_s.weight(),x_n,r_s);
108 mat_nn.usmv(r_n.weight(),x_n,r_n);
112 Imp& asImp () {
return static_cast<Imp &
> (*this); }
113 const Imp& asImp ()
const {
return static_cast<const Imp &
>(*this); }
127 template<
typename Imp>
133 template<
typename IG,
typename LFSU,
typename X,
typename LFSV,
137 const LFSU& lfsu,
const X& x,
const LFSV& lfsv,
141 typedef typename Jacobian::WeightedAccumulationView JacobianView;
143 Jacobian mat(x.size(),r.size(), 0);
145 asImp().jacobian_boundary(ig, lfsu, x, lfsv, view);
147 mat.usmv(r.weight(),x,r);
151 Imp& asImp () {
return static_cast<Imp &
> (*this); }
152 const Imp& asImp ()
const {
return static_cast<const Imp &
>(*this); }
159 #endif // DUNE_PDELAB_LOCALOPERATOR_NUMERICALRESIDUAL_HH const IG & ig
Definition: constraints.hh:148
Implement alpha_boundary() based on jacobian_boundary()
Definition: numericalresidual.hh:128
WeightedAccumulationView weightedAccumulationView(weight_type weight)
Returns a WeighedAccumulationView with some weight in addition to this view's weight.
Definition: localmatrix.hh:47
WeightedAccumulationView weightedAccumulationView(weight_type weight)
Returns a weighted accumulate-only view of this matrix with the given weight.
Definition: localmatrix.hh:398
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
Implement alpha_skeleton() based on jacobian_skeleton()
Definition: numericalresidual.hh:74
A dense matrix for storing data associated with the degrees of freedom of a pair of LocalFunctionSpac...
Definition: localmatrix.hh:184
Implement alpha_volume() based on jacobian_volume()
Definition: numericalresidual.hh:35
void alpha_volume(const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, R &r) const
compute
Definition: numericalresidual.hh:43