Revision 6c9b2bd7dc6837bf459c9ceaa80114d0cbc15f10 authored by Dmitry Yu. Naumov on 23 March 2021, 15:07:49 UTC, committed by Dmitry Yu. Naumov on 23 March 2021, 15:07:49 UTC
[CMake] Third-party license, ccache setup and msvc folder See merge request ogs/ogs!3535
GaussLegendreTri.h
/**
* \file
* \author Norihiro Watanabe
* \date 2013-08-13
* \brief
*
* \copyright
* Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#pragma once
#include <array>
#include "mathlib_export.h"
namespace MathLib
{
/// Gauss-Legendre quadrature on triangles
///
/// \tparam ORDER integration order.
template <unsigned ORDER>
struct GaussLegendreTri {
static MATHLIB_EXPORT const unsigned Order = ORDER;
static MATHLIB_EXPORT const unsigned NPoints = ORDER;
static MATHLIB_EXPORT const std::array<std::array<double, 2>, NPoints> X;
static MATHLIB_EXPORT const double W[NPoints];
};
template <>
struct GaussLegendreTri<2> {
static MATHLIB_EXPORT const unsigned Order = 2;
static MATHLIB_EXPORT const unsigned NPoints = 3;
static MATHLIB_EXPORT const std::array<std::array<double, 2>, NPoints> X;
static MATHLIB_EXPORT const double W[NPoints];
};
template <>
struct GaussLegendreTri<3> {
static MATHLIB_EXPORT const unsigned Order = 3;
static MATHLIB_EXPORT const unsigned NPoints = 4;
static MATHLIB_EXPORT const std::array<std::array<double, 2>, NPoints> X;
static MATHLIB_EXPORT const double W[NPoints];
};
template <>
struct GaussLegendreTri<4> {
static MATHLIB_EXPORT const unsigned Order = 4;
static MATHLIB_EXPORT const unsigned NPoints = 7;
static MATHLIB_EXPORT const std::array<std::array<double, 2>, NPoints> X;
static MATHLIB_EXPORT const double W[NPoints];
};
#ifndef _MSC_VER // The following explicit instantatiation declaration does not
// compile on that particular compiler but is necessary.
template <>
const std::array<std::array<double, 2>, GaussLegendreTri<1>::NPoints>
GaussLegendreTri<1>::X;
template <>
double const GaussLegendreTri<1>::W[1];
#endif
} // namespace MathLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...