Loading...
Searching...
No Matches
level_set_sphere_check.cc
Go to the documentation of this file.
#include "rheolef.h"
using namespace rheolef;
using namespace std;
#include "sphere.icc"
int main (int argc, char**argv) {
environment rheolef (argc,argv);
Float tol = (argc > 1) ? atof(argv[1]) : 1e+38;
geo gamma_h;
din >> gamma_h;
space Wh (gamma_h, "P1");
trial u (Wh); test v (Wh);
form m = integrate (u*v);
field one (Wh, 1);
Float meas_gamma_h = m(one,one);
size_t d = gamma_h.dimension();
Float pi = acos(Float(-1));
Float meas_gamma = (d == 3) ? 4*pi : 2*pi;
Float err = fabs(meas_gamma - meas_gamma_h);
dout << "meas(gamma_h) = " << meas_gamma_h << endl
<< "meas(gamma) = " << meas_gamma << endl
<< "err = " << err << endl;
return (err < tol) ? 0 : 1;
}
Float
see the Float page for the full documentation
field
see the field page for the full documentation
form
see the form page for the full documentation
geo
see the geo page for the full documentation
rheolef::environment
see the environment page for the full documentation
Definition environment.h:121
space
see the space page for the full documentation
test
see the test page for the full documentation
trial
see the test page for the full documentation
main
int main()
Definition field2bb.cc:58
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39
rheolef::integrate
std::enable_if< details::is_field_expr_v2_nonlinear_arg< Expr >::value &&!is_undeterminated< Result >::value, Result >::type integrate(const geo_basic< T, M > &omega, const Expr &expr, const integrate_option &iopt, Result dummy=Result())
see the integrate page for the full documentation
Definition integrate.h:211
std
STL namespace.
d
size_t d
Definition neumann-laplace-lambda.cc:28
rheolef.h
rheolef - reference manual
sphere.icc
The level set function for the sphere geometry.
u
Definition leveque.h:25