Go to the documentation of this file.
7 #ifndef karniadakisOp_hh
8 #define karniadakisOp_hh
47 uint npx, uint type) {
68 for (uint i = 0; i < npx; ++i) {
74 jacobi[npx + i] = 4 * x - 2.0;
77 for (uint n = 2; n < np - 1; ++n) {
78 an = 2 * n * (2 * n + 1) * (2 * n + 2);
79 bn = 2 * n * n * (2 * n + 2);
80 dn = 2 * n * 2 * n * (n + 2);
81 jacobi[n * npx + i] = ((2 * an * x - an) * jacobi[(n - 1)
82 * npx + i] - bn * jacobi[(n - 2) * npx + i]) / dn;
93 for (uint i = 0; i < npx; ++i) {
95 val[npx + i] = absc[i];
99 for (uint n = 0; n < np - 1; ++n) {
102 for (uint i = 0; i < npx; ++i) {
104 val[m * npx + i] = (val[i] * val[npx + i])
105 * jacobi[n * npx + i];
118 for (uint i = 0; i < npx; ++i) {
124 jacobiD[npx + i] = 6.0 * x - 3.0;
127 for (uint n = 2; n < np - 2; ++n) {
128 an = (2 * n + 2) * (2 * n + 3) * (2 * n + 4);
129 bn = 2 * (n + 1) * (n + 1) * (2 * n + 4);
130 dn = 2 * n * (n + 4) * (2 * n + 2);
131 jacobiD[n * npx + i] = ((2 * an * x - an) * jacobiD[(n
132 - 1) * npx + i] - bn * jacobiD[(n - 2) * npx
139 for (uint i = 0; i < npx; ++i) {
148 for (uint n = 0; n < np - 1; ++n) {
151 for (uint i = 0; i < npx; ++i) {
154 Real& v = val[m * npx + i] = (0.5 - x)
155 * jacobi[n * npx + i];
160 v += (x - x * x) * (n + 3) / 2 * jacobiD[(n - 1) * npx
181 #endif // karniadakisOp_hh
#define conceptsException(exc)
Prepares an exception for throwing.
#define conceptsAssert(cond, exc)
Assert that a certain condition is fulfilled.
Exception class for assertions.
const concepts::Array< Real > computeKarniadakisValues(uint np, const Real *absc, uint npx, uint type)
Evaluate (transformed) Karniadakis Shapefunctions up to a order np on requested abcissa points in [0,...
Exception class to express a missing feature.
double Real
Type normally used for a floating point number.
Basic namespace for Concepts-2.