OGS
GaussLegendreTet.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <array>
7
8#include "mathlib_export.h"
9
10namespace MathLib
11{
12
16template <unsigned ORDER>
18 static MATHLIB_EXPORT const unsigned Order = ORDER;
19 static MATHLIB_EXPORT const unsigned NPoints = ORDER;
20 static MATHLIB_EXPORT const std::array<std::array<double, 3>, NPoints> X;
21 static MATHLIB_EXPORT const double W[NPoints];
22};
23
24template <>
26 static MATHLIB_EXPORT const unsigned Order = 2;
27 static MATHLIB_EXPORT const unsigned NPoints = 5;
28 static MATHLIB_EXPORT const std::array<std::array<double, 3>, NPoints> X;
29 static MATHLIB_EXPORT const double W[NPoints];
30};
31
32template <>
34 static MATHLIB_EXPORT const unsigned Order = 3;
35 static MATHLIB_EXPORT const unsigned NPoints = 14;
36 static MATHLIB_EXPORT const std::array<std::array<double, 3>, NPoints> X;
37 static MATHLIB_EXPORT const double W[NPoints];
38};
39
40template <>
42{
43 static MATHLIB_EXPORT const unsigned Order = 4;
44 static MATHLIB_EXPORT const unsigned NPoints = 20;
45 static MATHLIB_EXPORT const std::array<std::array<double, 3>, NPoints> X;
46 static MATHLIB_EXPORT const double W[NPoints];
47};
48
49#ifndef _MSC_VER // The following explicit instantatiation declaration does not
50 // compile on that particular compiler but is necessary.
51template <>
52const std::array<std::array<double, 3>, GaussLegendreTet<1>::NPoints>
54template <>
55double const GaussLegendreTet<1>::W[1];
56#endif
57} // namespace MathLib
#define MATHLIB_EXPORT
static MATHLIB_EXPORT const unsigned NPoints
static MATHLIB_EXPORT const std::array< std::array< double, 3 >, NPoints > X
static MATHLIB_EXPORT const double W[NPoints]
static MATHLIB_EXPORT const unsigned Order
static MATHLIB_EXPORT const double W[NPoints]
static MATHLIB_EXPORT const unsigned Order
static MATHLIB_EXPORT const std::array< std::array< double, 3 >, NPoints > X
static MATHLIB_EXPORT const unsigned NPoints
static MATHLIB_EXPORT const unsigned Order
static MATHLIB_EXPORT const unsigned NPoints
static MATHLIB_EXPORT const double W[NPoints]
static MATHLIB_EXPORT const std::array< std::array< double, 3 >, NPoints > X
static MATHLIB_EXPORT const unsigned Order
static MATHLIB_EXPORT const unsigned NPoints
static MATHLIB_EXPORT const double W[NPoints]
static MATHLIB_EXPORT const std::array< std::array< double, 3 >, NPoints > X