OGS
GaussLegendre.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 "mathlib_export.h"
7
8#include "WeightedSum.h"
9
10namespace MathLib
11{
12
16template <unsigned ORDER>
18 static MATHLIB_EXPORT const unsigned Order = ORDER;
19 static MATHLIB_EXPORT const double X[Order];
20 static MATHLIB_EXPORT const double W[Order];
21};
22
23#ifndef _MSC_VER // The following explicit instantatiation declaration does not
24 // compile on that particular compiler.
25template <>
26double const GaussLegendre<1>::X[1];
27template <>
28double const GaussLegendre<1>::W[1];
29template <>
30double const GaussLegendre<2>::X[2];
31template <>
32double const GaussLegendre<2>::W[2];
33template <>
34double const GaussLegendre<3>::X[3];
35template <>
36double const GaussLegendre<3>::W[3];
37template <>
38double const GaussLegendre<4>::X[4];
39template <>
40double const GaussLegendre<4>::W[4];
41#endif
42
43} // namespace MathLib
#define MATHLIB_EXPORT
static MATHLIB_EXPORT const double X[Order]
static MATHLIB_EXPORT const unsigned Order
static MATHLIB_EXPORT const double W[Order]