2 #ifndef DUNE_PDELAB_LAPLACEDIRICHLETP12D_HH 3 #define DUNE_PDELAB_LAPLACEDIRICHLETP12D_HH 4 #warning This file is deprecated and will be removed after the Dune-PDELab 2.4 release! Use the ConvectionDiffusionFEM local operator from dune/pdelab/localoperator/convectiondiffusionfem.hh instead! 6 #include <dune/common/exceptions.hh> 7 #include <dune/common/fvector.hh> 8 #include <dune/common/fmatrix.hh> 31 enum { doPatternVolume =
true };
34 enum { doAlphaVolume =
true };
37 template<
typename EG,
typename LFSU,
typename X,
typename LFSV,
typename R>
38 void alpha_volume (
const EG& eg,
const LFSU& lfsu,
const X& x,
const LFSV& lfsv, R& r)
const 41 typedef typename LFSU::Traits::FiniteElementType::
42 Traits::LocalBasisType::Traits::DomainFieldType DF;
43 typedef typename LFSU::Traits::FiniteElementType::
44 Traits::LocalBasisType::Traits::RangeFieldType RF;
47 Dune::FieldVector<DF,2> integrationpoint(1.0/3.0);
50 typedef typename LFSU::Traits::FiniteElementType::
51 Traits::LocalBasisType::Traits::JacobianType JT;
52 std::vector<JT> gradients(lfsu.size());
53 lfsu.finiteElement().localBasis().
54 evaluateJacobian(integrationpoint,gradients);
57 const typename EG::Geometry::JacobianInverseTransposed
58 jac = eg.geometry().jacobianInverseTransposed(integrationpoint);
59 Dune::FieldVector<RF,2> gradphi[3];
60 for (
int i=0; i<3; i++)
63 jac.umv(gradients[i][0],gradphi[i]);
67 Dune::FieldVector<RF,2> gradu(0.0);
68 for (
int i=0; i<3; i++)
69 gradu.axpy(x[i],gradphi[i]);
72 RF area = 0.5*eg.geometry().integrationElement(integrationpoint);
73 for (
int i=0; i<3; i++)
74 r.accumulate(lfsv, i, (gradu*gradphi[i])*area);
Definition: convectiondiffusionfem.hh:35
Definition: laplacedirichletp12d.hh:23
sparsity pattern generator
Definition: pattern.hh:13
Definition: adaptivity.hh:27
void alpha_volume(const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, R &r) const
Definition: laplacedirichletp12d.hh:38
Default flags for all local operators.
Definition: flags.hh:18
Implement jacobian_volume() based on alpha_volume()
Definition: numericaljacobian.hh:31
Implements linear and nonlinear versions of jacobian_apply_volume() based on alpha_volume() ...
Definition: numericaljacobianapply.hh:32