/usr/share/doc/rheolef-doc/examples/poiseuille.h is in rheolef-doc 6.7-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | struct u_poiseuille {
Float operator() (const point& x) const {
return a*(c+x[1])*(c-x[1]); }
u_poiseuille (const Float& c1, std::string sc) : c(c1)
{ a = (sc == "cartesian") ? 3/(2*pow(c,3)) : 4/pow(c,4); }
protected: Float c, a;
};
struct psi_poiseuille {
Float operator() (const point& x) const {
return xy ? a*sqr(c-x[1])*(2*c+x[1]) : a*sqr(c-x[1])*sqr(c+x[1]); }
psi_poiseuille (const Float& c1, std::string sc)
: c(c1), xy(sc == "cartesian")
{ a = xy ? -1/(2*pow(c,3)) : -1/pow(c,4); }
protected: Float c, a; bool xy;
};
|