Rheolef  7.1
an efficient C++ finite element environment
p_laplacian_damped_newton.cc

The p-Laplacian problem by the damped Newton method

#include "rheolef.h"
using namespace rheolef;
using namespace std;
#include "p_laplacian.h"
int main(int argc, char**argv) {
environment rheolef (argc,argv);
geo omega (argv[1]);
string approx = (argc > 2) ? argv[2] : "P1";
Float p = (argc > 3) ? atof(argv[3]) : 1.5;
Float tol = (argc > 4) ? atof(argv[4]) : eps;
size_t max_iter = (argc > 5) ? atoi(argv[5]) : 500;
derr << "# P-Laplacian problem by damped Newton:" << endl
<< "# geo = " << omega.name() << endl
<< "# approx = " << approx << endl
<< "# p = " << p << endl;
p_laplacian F (p, omega, approx);
field uh = F.initial ();
int status = damped_newton (F, uh, tol, max_iter, &derr);
dout << catchmark("p") << p << endl
<< catchmark("u") << uh;
return status;
}
see the Float page for the full documentation
see the field page for the full documentation
see the geo page for the full documentation
field initial() const
odiststream dout(cout)
see the diststream page for the full documentation
Definition: diststream.h:430
odiststream derr(cerr)
see the diststream page for the full documentation
Definition: diststream.h:436
This file is part of Rheolef.
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
The p-Laplacian problem by the Newton method – class header.
int main(int argc, char **argv)
rheolef - reference manual
Definition: sphere.icc:25
Float epsilon