FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
trapezoidal_driver.hpp
1// FEAT3: Finite Element Analysis Toolbox, Version 3
2// Copyright (C) 2010 by Stefan Turek & the FEAT group
3// FEAT3 is released under the GNU General Public License version 3,
4// see the file 'copyright.txt' in the top level directory for details.
5
6#pragma once
7
8// includes, FEAT
9#include <kernel/cubature/scalar/driver_base.hpp>
10
11namespace FEAT
12{
13 namespace Cubature
14 {
15 namespace Scalar
16 {
27 public DriverBase
28 {
29 public:
31 static constexpr bool variadic = false;
33 static constexpr bool tensorize = false;
35 static constexpr int num_points = 2;
36
38 static String name()
39 {
40 return "trapezoidal";
41 }
42
49 template<
50 typename Weight_,
51 typename Coord_>
52 static void fill(Rule<Weight_, Coord_>& rule)
53 {
54 rule.get_coord(0) = -Coord_(1);
55 rule.get_coord(1) = Coord_(1);
56 rule.get_weight(0) = Weight_(1);
57 rule.get_weight(1) = Weight_(1);
58 }
59 }; // class TrapezoidalDriver<...>
60 } // namespace Scalar
61 } // namespace Cubature
62} // namespace FEAT
Scalar cubature driver base class.
Definition: driver_base.hpp:23
Scalar Cubature Rule class template.
Definition: rule.hpp:39
Trapezoidal Rule driver class template.
static constexpr bool variadic
this rule is not variadic
static constexpr int num_points
this rule has 2 points
static constexpr bool tensorize
disable tensorization
static String name()
Returns the name of the cubature rule.
static void fill(Rule< Weight_, Coord_ > &rule)
Fills the cubature rule structure.
String class implementation.
Definition: string.hpp:47
FEAT namespace.
Definition: adjactor.hpp:12