25 : m_sbpMode(-1), m_sbpOperator(), m_polyDeg(-1), m_polyType(-1), m_intMethod(-1), m_nodes(), m_wInt(), m_wBary() {
58 init(polyDeg, polyType, noNodes1D, intMethod, sbpMode, sbpOperator);
113 ASSERT(polyDeg + 1 == noNodes,
"polyDeg+1 not equal to noNodes in DG mode! (" << polyDeg <<
" " << noNodes <<
")");
137 mTerm(1,
"LG NOT AVAILABLE FOR SBP MODE");
184 for(
MInt i = 0; i < noNodes; i++) {
228 init(polyDeg, polyType, noNodes, intMethod, sbpMode, sbpOperator);
MFloatVector m_LhatFace[2]
~DgInterpolation()
Destructor clears all member variables.
void init(const MInt polyDeg, const DgPolynomialType polyType, const MInt noNodes, const DgIntegrationMethod intMethod, const MBool sbpMode, const MString sbpOperator)
Sets the member variables and calls the appropriate functions to calculate the nodes and weights etc.
DgInterpolation()
Default constructor only sets default values for member variables.
void initInterpolation(const MInt polyDeg, const DgPolynomialType polyType, const MInt noNodes, const DgIntegrationMethod intMethod, const MBool sbpMode, const MString sbpOperator)
Sets the member variables neccessary for the interpolation between sets of nodes.
void clear()
Deletes the data (if internal storage was used) and resets dimensions to zero.
size_type resize(size_type n0, size_type n1=1, size_type n2=1, size_type n3=1, size_type n4=1)
Deletes the old data structure and creates a new one with the requested dimensions.
@ DG_INTEGRATE_GAUSS_LOBATTO
void mTerm(const MInt errorCode, const MString &location, const MString &message)
std::basic_string< char > MString
Holds helper functions for the interpolation.
void readSbpOperator(MInt noNodes1D, MString opName, MFloatVector &sbpA, MFloatVector &sbpP, MFloatVector &sbpQ)
Reads all coefficient files to contruct SBP operator.
void calcLegendreGaussLobattoNodesAndWeights(MInt Nmax, MFloat *nodes, MFloat *wInt)
Calculate the Gauss-Lobatto integration nodes and weight for the Legendre polynomials on the interval...
void calcLinearInterpolationBase(const MFloat x, const MInt noNodes, const MFloat *nodes, MFloat *const polynomials)
Calculates linear interpolation base for point (1D).
void calcLagrangeInterpolatingPolynomials(const MFloat x, const MInt polyDeg, const MFloat *nodes, const MFloat *wBary, MFloat *polynomials)
Calculates the values of the Lagrangian polynomials l_j for a given point x in [-1,...
void calcSBPNodes(const MInt noNodes, MFloat *nodes)
Generates an equidistant node distribution.
void readDDRP(MFloat *nodesVector, MFloat *wIntVector, MFloat *dhatMatrix)
Reads DDRP operator and nodal distribution from file.
void calcBarycentricWeights(MInt Nmax, const MFloat *nodes, MFloat *weights)
Calculates the barycentric weights for Lagrange interpolation at thei specified nodes.
void calcLhat(const MFloat x, const MInt polyDeg, const MFloat *nodes, const MFloat *wInt, const MFloat *wBary, MFloat *Lhat)
Calculates the Lagrange polynomials evaluated at point x in [-1,1] and pre-divides them by the integr...
void calcDhatSBP(const MInt noNodes, MFloatVector sbpA, MFloatVector sbpQ, const MFloat *wInt, MFloat *dhatMatrix)
Calculates SBP operator from coefficients.
void calcSBPWeights(const MInt noNodes, MFloatVector sbpP, MFloat *wInt)
Calulates the diagonal weight matrix (H) entries.
void calcLegendreGaussNodesAndWeights(MInt Nmax, MFloat *nodes, MFloat *wInt)
Calculate the Gauss integration nodes and weight for the Legendre polynomials on the interval [-1,...
void calcDhat(MInt Nmax, const MFloat *nodes, const MFloat *wInt, const MFloat *wBary, MFloat *dhatMatrix)
Calculates the polynomial derivative matrix and normalizes it using the integration weights.
MBool getSBPOperator(const MInt noNodes1D, const MString opName, MFloatVector &sbpA, MFloatVector &sbpP, MFloatVector &sbpQ)
Gets SBP Coefficients from corresponding header if existent.