OGS
GaussLegendreTri.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, 2>, 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 = 3;
28 static MATHLIB_EXPORT const std::array<std::array<double, 2>, 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 = 4;
36 static MATHLIB_EXPORT const std::array<std::array<double, 2>, NPoints> X;
37 static MATHLIB_EXPORT const double W[NPoints];
38};
39
40template <>
42 static MATHLIB_EXPORT const unsigned Order = 4;
43 static MATHLIB_EXPORT const unsigned NPoints = 7;
44 static MATHLIB_EXPORT const std::array<std::array<double, 2>, NPoints> X;
45 static MATHLIB_EXPORT const double W[NPoints];
46};
47
48#ifndef _MSC_VER // The following explicit instantatiation declaration does not
49 // compile on that particular compiler but is necessary.
50template <>
51const std::array<std::array<double, 2>, GaussLegendreTri<1>::NPoints>
53template <>
54double const GaussLegendreTri<1>::W[1];
55#endif
56} // namespace MathLib
#define MATHLIB_EXPORT
static MATHLIB_EXPORT const std::array< std::array< double, 2 >, NPoints > X
static MATHLIB_EXPORT const unsigned Order
static MATHLIB_EXPORT const double W[NPoints]
static MATHLIB_EXPORT const unsigned NPoints
static MATHLIB_EXPORT const double W[NPoints]
static MATHLIB_EXPORT const unsigned Order
static MATHLIB_EXPORT const std::array< std::array< double, 2 >, NPoints > X
static MATHLIB_EXPORT const unsigned NPoints
static MATHLIB_EXPORT const unsigned Order
static MATHLIB_EXPORT const std::array< std::array< double, 2 >, NPoints > X
static MATHLIB_EXPORT const unsigned NPoints
static MATHLIB_EXPORT const double W[NPoints]
static MATHLIB_EXPORT const double W[NPoints]
static MATHLIB_EXPORT const std::array< std::array< double, 2 >, NPoints > X
static MATHLIB_EXPORT const unsigned Order
static MATHLIB_EXPORT const unsigned NPoints