combustion_newton.cc
Go to the documentation of this file.
#include "rheolef.h"
using namespace rheolef;
using namespace std;
#include "combustion.h"
int main(int argc, char**argv) {
environment rheolef (argc,argv);
geo omega (argv[1]);
Float eps = numeric_limits<Float>::epsilon();
string approx = (argc > 2) ? argv[2] : "P1";
Float lambda = (argc > 3) ? atof(argv[3]) : 0.1;
Float tol = (argc > 4) ? atof(argv[4]) : eps;
size_t max_iter = (argc > 5) ? atoi(argv[5]) : 100;
combustion F (omega, approx);
F.set_parameter (lambda);
field uh = F.initial ();
Float residue = tol;
size_t n_iter = max_iter;
damped_newton (F, uh, residue, n_iter, &derr);
F.put (dout, uh);
return (residue <= sqrt(tol)) ? 0 : 1;
}
field
see the field page for the full documentation
residue
field residue(Float p, const field &uh)
Definition: p_laplacian_post.cc:35
combustion::set_parameter
void set_parameter(float_type lambda1)
Definition: combustion.h:35
combustion.h
The combustion problem: class header for the Newton method.
main
int main(int argc, char **argv)
Definition: combustion_newton.cc:29
combustion
Definition: combustion.h:25
rheolef.h
rheolef - reference manual
rheolef::environment
see the environment page for the full documentation
Definition: environment.h:115
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::derr
odiststream derr(cerr)
see the diststream page for the full documentation
Definition: diststream.h:436
Float
see the Float page for the full documentation
rheolef::damped_newton
int damped_newton(const Problem &P, const Preconditioner &T, Field &u, Real &tol, Size &max_iter, odiststream *p_derr=0)
see the damped_newton page for the full documentation
Definition: damped-newton-generic.h:29
rheolef::dout
odiststream dout(cout)
see the diststream page for the full documentation
Definition: diststream.h:430
epsilon
Float epsilon
Definition: transmission_error.cc:25
rheolef::std
Definition: vec_expr_v2.h:391
combustion::put
odiststream & put(odiststream &os, const field &uh) const
Definition: combustion1.icc:43
geo
see the geo page for the full documentation
combustion::initial
field initial(std::string restart="")
Definition: combustion1.icc:35
lambda
Definition: yield_slip_circle.h:34