12 #ifndef MFEM_LOR_MMS_HPP 13 #define MFEM_LOR_MMS_HPP 20 static constexpr
double pi = M_PI,
pi2 = M_PI*M_PI;
27 double x = pi*xvec[0], y = pi*xvec[1];
28 if (
dim == 2) {
return sin(x)*sin(y); }
29 else {
double z = pi*xvec[2];
return sin(x)*sin(y)*sin(z); }
35 double x = pi*xvec[0], y = pi*xvec[1];
39 return sin(x)*sin(y) + 2*
pi2*sin(x)*sin(y);
43 double z = pi*xvec[2];
44 return sin(x)*sin(y)*sin(z) + 3*
pi2*sin(x)*sin(y)*sin(z);
53 double x = pi*xvec[0], y = pi*xvec[1];
61 double z = pi*xvec[2];
62 u[0] = cos(x)*sin(y)*sin(z);
63 u[1] = sin(x)*cos(y)*sin(z);
64 u[2] = sin(x)*sin(y)*cos(z);
71 double x = pi*xvec[0], y = pi*xvec[1];
76 f[0] = (1 + 2*
pi2)*cos(x)*sin(y);
77 f[1] = (1 + 2*
pi2)*cos(y)*sin(x);
81 double z = pi*xvec[2];
82 f[0] = (1 + 3*
pi2)*cos(x)*sin(y)*sin(z);
83 f[1] = (1 + 3*
pi2)*cos(y)*sin(x)*sin(z);
84 f[2] = (1 + 3*
pi2)*cos(z)*sin(x)*sin(y);
96 double z = pi*xvec[2];
97 f[0] = cos(x)*sin(y)*sin(z);
98 f[1] = sin(x)*cos(y)*sin(z);
99 f[2] = sin(x)*sin(y)*cos(z);
int Size() const
Returns the size of the vector.
double f(const Vector &xvec)
void u_vec(const Vector &xvec, Vector &u)
void f_vec(const Vector &xvec, Vector &f)
double u(const Vector &xvec)