Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
combustion_newton.cc

The combustion problem by the Newton method.

The combustion problem by the Newton method

#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);
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;
}
see the Float page for the full documentation
see the field page for the full documentation
see the geo page for the full documentation
see the environment page for the full documentation
The combustion problem: class header for the Newton method.
int main()
Definition field2bb.cc:58
This file is part of Rheolef.
STL namespace.
field residue(Float p, const field &uh)
rheolef - reference manual
odiststream & put(odiststream &os, const field &uh) const
field initial(std::string restart="")
void set_parameter(float_type lambda1)
Definition combustion.h:35