GemaCoreLib
The GeMA Core library
gmLobattoIntegrationTables.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4 ** All rights reserved.
5 **
6 ** This file is part of the "GeMA" software. It's use should respect
7 ** the terms in the license agreement that can be found together
8 ** with this source code.
9 ** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10 ** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11 ** A PARTICULAR PURPOSE.
12 **
13 ************************************************************************/
14 
25 #ifndef _GEMA_LOBATTO_INT_TABLES_H_
26 #define _GEMA_LOBATTO_INT_TABLES_H_
27 
28 #include "gmCoreConfig.h"
29 #include "gmMatrix.h"
30 #include "gmVector.h"
31 
32 #include <QVector>
33 
36 {
37 public:
42  {
43  if(rule < 1 || rule > 11)
44  return NULL;
45  assert(!_lineTable[rule-1].isEmpty());
46  return &_lineTable[rule-1];
47  }
48 
52  static int lineRuleDegree(int rule) { return 2 * rule - 3; }
53 
54  static bool initTables();
55 
56 private:
57  static void initLineTable();
58 
59  static double jacobi(double eps, int p, double alpha, double beta);
60  static double dJacobi(double eps, int order, double alpha, double beta);
61  static double rootChevyshev(int indexRoot, int orderPol);
62  static void rootJacobi(int order, double alpha, double beta, GmVector& zeros);
63  static void quadPoints(int Q, GmMatrix & Quad);
64 
66  static QVector<QPair<double, double>> _lineTable[11];
67 };
68 
69 #endif
Declaration of usefull configuration definitions for the Core library.
Declaration of the GmMatrix class.
Declaration of the GmVector class.
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
static int lineRuleDegree(int rule)
Returns the integration degree for the given line Lobatto rule (The polynomial degree for which this ...
Definition: gmLobattoIntegrationTables.h:52
static const QVector< QPair< double, double > > * lineRuleTable(int rule)
Returns the table storing (position, weight) pairs for the given line Lobatto rule....
Definition: gmLobattoIntegrationTables.h:41
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition: gmVector.h:34
A class storing tables with (position, weight) pairs for line Lobatto integration rules.
Definition: gmLobattoIntegrationTables.h:35
arma::mat GmMatrix
The basic type for a GeMA matrix object. Currently based on an Armadillo matrix.
Definition: gmMatrix.h:38