Documentation 6b54b78464
Loading...
Searching...
No Matches
fem_gauss_jacobi_quadrature.hpp
Go to the documentation of this file.
1/*!
2 * \file fem_gauss_jacobi_quadrature.hpp
3 * \brief Headers of the functions to compute the integration points of the
4 Gauss Jacobi quadrature rules.
5 The functions are in the <i>fem_gauss_jacobi_quadrature.cpp</i> file.
6 All the functions in this class are based on the program JACOBI_RULE
7 of John Burkardt.
8 * \author E. van der Weide
9 * \version 8.5.0 "Harrier"
10 *
11 * SU2 Project Website: https://su2code.github.io
12 *
13 * The SU2 Project is maintained by the SU2 Foundation
14 * (http://su2foundation.org)
15 *
16 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
17 *
18 * SU2 is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU Lesser General Public
20 * License as published by the Free Software Foundation; either
21 * version 2.1 of the License, or (at your option) any later version.
22 *
23 * SU2 is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 * Lesser General Public License for more details.
27 *
28 * You should have received a copy of the GNU Lesser General Public
29 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
30 */
31
32/*
33From: "Burkardt, John" <jburkardt@fsu.edu>
34Subject: Re: Gauss-Jacobi Quadrature Code
35Date: July 6, 2016 at 4:14:17 AM PDT
36To: "Thomas D. Economon" <economon@stanford.edu>
37Cc: Edwin van der Weide <E.T.A.vanderWeide@ctw.utwente.nl>
38
39Dear Thomas Economon,
40
41Thank you for your note about jacobi_rule.cpp; I am glad you find it of use.
42
43You are welcome to use this code in any way you choose.
44
45The only reason I put a Gnu LGPL on it was because, from a number of inquiries,
46it became clear to me that people were hesitant to use a piece of software if
47there was no license information on it at all. At the time, LGPL seemed the least
48restrictive. I didn't pay attention to the vexing fact that now there are several
49versions of LGPL, because I really don't care.
50
51If this statement is not enough for you, let me know what would be better.
52I have no objection to you taking a copy of jacobi_rule.cpp and altering the
53license to agree with your preferred version of LGPL, for instance.
54
55John Burkardt
56________________________________________
57From: Thomas D. Economon <economon@stanford.edu>
58Sent: Tuesday, July 5, 2016 11:04:34 PM
59To: Burkardt, John
60Cc: Edwin van der Weide
61Subject: Gauss-Jacobi Quadrature Code
62
63Dear John,
64
65I am the lead developer for the open-source SU2 suite, which is primarily for
66computational fluid dynamics, but also for solving other PDE systems
67(http://su2.stanford.edu, https://github.com/su2code/SU2). Over the past few months,
68we have been working on a new high-order discontinuous Galerkin fluid solver within
69the codebase, led by Prof. Edwin van der Weide at the University of Twente (cc’d).
70
71We found your attached code to be very helpful in resolving some issues with integration
72for our pyramid elements, and we would really like to reuse the implementation if possible.
73First, we would like to check if this is ok with you personally, and ask how we can
74properly attribute your work in the code? Second, we are curious just what version of the
75GNU LGPL license you are using to make sure that we don’t have any licensing issues.
76For SU2, we are using GNU LGPL v2.1.
77
78Thanks for the time and take care,
79Tom
80*/
81
82#pragma once
83
84#include <cmath>
85#include <iostream>
86#include <cstdlib>
87#include <vector>
88
89#include "../CConfig.hpp"
90
91using namespace std;
92
93/*!
94 * \class CGaussJacobiQuadrature
95 * \brief Class used to determine the quadrature points of the Gauss Jacobi
96 integration rules.
97 * \author E. van der Weide
98 * \version 8.5.0 "Harrier"
99 */
101 public:
102 /*!
103 * \brief Function, which serves as the API to compute the integration points
104 and weights.
105 * \param[in] alpha Parameter in the weighting function (b-x)^alpha*(x-a)^beta
106 in the Gauss Jacobi rule.
107 * \param[in] beta Parameter in the weighting function (b-x)^alpha*(x-a)^beta
108 in the Gauss Jacobi rule.
109 * \param[in] a Lower bound of the integration interval, usually -1.0.
110 * \param[in] b Upper bound of the integration interval, usually 1.0.
111 * \param[in,out] GJPoints Location of the Gauss-Jacobi integration points.
112 * \param[in,out] GJWeights Weights of the Gauss-Jacobi integration points.
113 */
114 void GetQuadraturePoints(const passivedouble alpha, const passivedouble beta, const passivedouble a,
115 const passivedouble b, vector<passivedouble>& GJPoints, vector<passivedouble>& GJWeights);
116
117 private:
118 /*!
119 * \brief Function in the original implementation of John Burkardt to compute
120 the integration points of the Gauss-Jacobi quadrature rule.
121 */
122 void cdgqf(int nt, int kind, passivedouble alpha, passivedouble beta, passivedouble t[], passivedouble wts[]);
123
124 /*!
125 * \brief Function in the original implementation of John Burkardt to compute
126 the integration points of the Gauss-Jacobi quadrature rule.
127 */
128 void cgqf(int nt, int kind, passivedouble alpha, passivedouble beta, passivedouble a, passivedouble b,
129 passivedouble t[], passivedouble wts[]);
130
131 /*!
132 * \brief Function in the original implementation of John Burkardt to compute
133 the integration points of the Gauss-Jacobi quadrature rule.
134 */
135 passivedouble class_matrix(int kind, int m, passivedouble alpha, passivedouble beta, passivedouble aj[],
136 passivedouble bj[]);
137
138 /*!
139 * \brief Function in the original implementation of John Burkardt to compute
140 the integration points of the Gauss-Jacobi quadrature rule.
141 */
142 void imtqlx(int n, passivedouble d[], passivedouble e[], passivedouble z[]);
143
144 /*!
145 * \brief Function in the original implementation of John Burkardt to compute
146 the integration points of the Gauss-Jacobi quadrature rule.
147 */
148 void parchk(int kind, int m, passivedouble alpha, passivedouble beta);
149
150 /*!
151 * \brief Function in the original implementation of John Burkardt to compute
152 the integration points of the Gauss-Jacobi quadrature rule.
153 */
154 passivedouble r8_epsilon();
155
156 /*!
157 * \brief Function in the original implementation of John Burkardt to compute
158 the integration points of the Gauss-Jacobi quadrature rule.
159 */
160 passivedouble r8_sign(passivedouble x);
161
162 /*!
163 * \brief Function in the original implementation of John Burkardt to compute
164 the integration points of the Gauss-Jacobi quadrature rule.
165 */
166 void scqf(int nt, const passivedouble t[], const int mlt[], const passivedouble wts[], int nwts, int ndx[],
167 passivedouble swts[], passivedouble st[], int kind, passivedouble alpha, passivedouble beta,
169
170 /*!
171 * \brief Function in the original implementation of John Burkardt to compute
172 the integration points of the Gauss-Jacobi quadrature rule.
173 */
174 void sgqf(int nt, const passivedouble aj[], passivedouble bj[], passivedouble zemu, passivedouble t[],
175 passivedouble wts[]);
176};
Class used to determine the quadrature points of the Gauss Jacobi integration rules.
Definition fem_gauss_jacobi_quadrature.hpp:100
void GetQuadraturePoints(const passivedouble alpha, const passivedouble beta, const passivedouble a, const passivedouble b, vector< passivedouble > &GJPoints, vector< passivedouble > &GJWeights)
Function, which serves as the API to compute the integration points and weights.
Definition fem_gauss_jacobi_quadrature.cpp:82
double passivedouble
Definition code_config.hpp:129