64 const MFloat*
const sourceNodes,
65 const MFloat*
const sourceBaryWeights,
66 const MInt targetPolyDeg,
67 const MFloat*
const targetNodes,
69 const MInt sourceNoNodes = sourcePolyDeg + 1;
70 const MInt targetNoNodes = targetPolyDeg + 1;
74 for(
MInt i = 0; i < targetNoNodes; i++) {
76 targetNodes[i], sourcePolyDeg, sourceNodes, sourceBaryWeights, &matrix[i * sourceNoNodes]);
107 const MFloat*
const nodes,
108 const MFloat*
const wBary,
111 const MInt noNodes = polyDeg + 1;
115 for(
MInt i = 0; i < noNodes; i++) {
117 0.5 * nodes[i] + shift, polyDeg, nodes, wBary, &matrix[i * noNodes]);
161 const MFloat*
const nodes,
162 const MFloat*
const wBary,
165 const MInt noNodes = polyDeg + 1;
170 projectionNodes.
resize(noNodes);
171 projectionWInt.
resize(noNodes);
176 projectionWBary.
resize(noNodes);
182 for(
MInt i = 0; i < noNodes; i++) {
187 &mortarToCoarseElement(i, 0));
191 for(
MInt i = 0; i < noNodes; i++) {
192 for(
MInt j = 0; j < i + 1; j++) {
193 const MFloat temp = mortarToCoarseElement(i, j);
194 mortarToCoarseElement(i, j) = 0.5 * mortarToCoarseElement(j, i) * projectionWInt[j] / projectionWInt[i];
195 mortarToCoarseElement(j, i) = 0.5 * temp * projectionWInt[i] / projectionWInt[j];
215 for(
MInt q = 0; q < noNodes; q++) {
216 for(
MInt j = 0; j < noNodes; j++) {
217 for(
MInt i = 0; i < noNodes; i++) {
218 for(
MInt n = 0; n < noNodes; n++) {
219 m(q, j) += p2dg(q, i) * mortarToCoarseElement(i, n) * dg2p(n, j);
void set(const T &value)
Initializes tensor to constant value.
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.
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 calcBarycentricWeights(MInt Nmax, const MFloat *nodes, MFloat *weights)
Calculates the barycentric weights for Lagrange interpolation at thei specified nodes.
void calcLegendreGaussNodesAndWeights(MInt Nmax, MFloat *nodes, MFloat *wInt)
Calculate the Gauss integration nodes and weight for the Legendre polynomials on the interval [-1,...
void calcMortarProjectionMatrixHReverse(const MInt polyDeg, const MFloat *const nodes, const MFloat *const wBary, const MInt position, MFloat *const matrix)
void calcMortarProjectionMatrixHForward(const MInt polyDeg, const MFloat *const nodes, const MFloat *const wBary, const MInt position, MFloat *const matrix)
void calcMortarProjectionMatrixP(const MInt sourcePolyDeg, const MFloat *const sourceNodes, const MFloat *const sourceBaryWeights, const MInt targetPolyDeg, const MFloat *const targetNodes, MFloat *const matrix)
Namespace for auxiliary functions/classes.