25 #ifndef _GEMA_NEWTON_INT_TABLES_H_ 26 #define _GEMA_NEWTON_INT_TABLES_H_ 46 return select(rule, closed, _closedLineTable, _openLineTable);
62 return select(rule, closed, _closedTriTable, _openTriTable);
77 return select(rule, closed, _closedTetTable, _openTetTable);
86 static bool initTables();
91 template <
class T>
static const T*
select(
int rule,
bool closed,
const T ct[],
const T ot[])
94 if(rule < 1 || rule > 5)
98 assert(!ct[rule-1].isEmpty());
103 assert(!ot[rule-1].isEmpty());
108 static void initLineTables();
109 static void initTriTables();
110 static void initTetTables();
112 static void simplexRulesPermutations(
const char* s,
QStringList& permutations);
113 static double simplexRulesPointAndWeight(
int degree,
const char* index,
int u,
int num,
int den,
QVector<GmVector>& posList);
static const QVector< QPair< double, double > > * lineRuleTable(int rule, bool closed)
Returns the table storing (position, weight) pairs for the given open or closed line Newton Cotes rul...
Definition: gmNewtonCotesIntegrationTables.h:44
Declaration of usefull configuration definitions for the Core library.
static int tetRuleDegree(int rule)
Returns the integration degree for the given tetrahedron Newton rule (The polynomial degree for which...
Definition: gmNewtonCotesIntegrationTables.h:84
static const T * select(int rule, bool closed, const T ct[], const T ot[])
Helper function retuning the rule table selecting from the open or closed version.
Definition: gmNewtonCotesIntegrationTables.h:91
static const QVector< QPair< GmVector, double > > * tetRuleTable(int rule, bool closed)
Returns the table storing (position, weight) pairs for the given open or closed tetrahedron Newton Co...
Definition: gmNewtonCotesIntegrationTables.h:75
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 triRuleDegree(int rule)
Returns the integration degree for the given triangle Newton rule (The polynomial degree for which th...
Definition: gmNewtonCotesIntegrationTables.h:69
static const QVector< QPair< GmVector, double > > * triRuleTable(int rule, bool closed)
Returns the table storing (position, weight) pairs for the given open or closed triangle Newton Cotes...
Definition: gmNewtonCotesIntegrationTables.h:60
A class storing tables with (position, weight) pairs for line, triangle and tetrahedron Open & closed...
Definition: gmNewtonCotesIntegrationTables.h:36
static int lineRuleDegree(int rule)
Returns the integration degree for the given line Newton Cotes rule (The polynomial degree for which ...
Definition: gmNewtonCotesIntegrationTables.h:54