Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
lumpingquadraturerule.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE-FUFEM Project contributors, see file AUTHORS.md
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
3
4#ifndef LUMPINGQUADRATURERULE_HH
5#define LUMPINGQUADRATURERULE_HH
6
9
23template<class ct, int dim>
25 public Dune::QuadratureRule<ct, dim>
26{
27 typedef typename Dune::QuadratureRule<ct, dim> Base;
29
30 public:
31
36 Base(gt, 1)
37 {
38 auto refElement = Dune::ReferenceElements<ct, dim>::general(this->type());
39 int size = refElement.size(dim);
40 ct weight = refElement.volume()/size;
41 this->reserve(size);
42 for(int i=0; i<size; ++i)
43 this->push_back(QuadPoint(refElement.position(i,dim), weight));
44 }
45
46};
47
48
49#endif
50
void push_back(const MemberType &item)
int size() const
size_type dim() const
virtual GeometryType type() const
A lumping quadrature rule.
Definition lumpingquadraturerule.hh:26
LumpingQuadratureRule(const Dune::GeometryType &gt)
Construct lumping quadrature rule for given geometry.
Definition lumpingquadraturerule.hh:35