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

The yield slip problem by the damped Neton method

#include "rheolef.h"
using namespace std;
using namespace rheolef;
#include "yield_slip.h"
int main(int argc, char**argv) {
environment rheolef (argc,argv);
geo omega (argv[1]);
string approx = (argc > 2) ? argv[2] : "P1";
Float S = (argc > 3) ? atof(argv[3]) : 0.6;
Float n = (argc > 4) ? atof(argv[4]) : 1;
Float Cf = (argc > 5) ? atof(argv[5]) : 1;
Float r = (argc > 6) ? atof(argv[6]) : 1;
domain boundary = omega["boundary"];
yield_slip F (S, n, Cf, r, omega, boundary, approx);
field beta_h = F.initial();
size_t max_iter = 10000;
int status = damped_newton (F, beta_h, tol, max_iter, &derr);
field uh, lambda_h;
F.post (beta_h, uh, lambda_h);
dout << setprecision(numeric_limits<Float>::digits10)
<< catchmark("S") << S << endl
<< catchmark("n") << n << endl
<< catchmark("Cf") << Cf << endl
<< catchmark("r") << r << endl
<< catchmark("u") << uh
<< catchmark("lambda") << lambda_h;
return status;
}
rheolef::catchmark
see the catchmark page for the full documentation
Definition: catchmark.h:67
field
see the field page for the full documentation
yield_slip::post
void post(const field &beta_h, field &uh, field &lambda_h) const
Definition: yield_slip2.icc:56
yield_slip.h
The yield slip problem – class header.
main
int main(int argc, char **argv)
Definition: yield_slip_damped_newton.cc:29
yield_slip
Definition: yield_slip.h:25
rheolef.h
rheolef - reference manual
yield_slip::initial
field initial() const
Definition: yield_slip2.icc:52
mkgeo_ugrid.boundary
boundary
Definition: mkgeo_ugrid.sh:181
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
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
mkgeo_ball.n
n
Definition: mkgeo_ball.sh:150
epsilon
Float epsilon
Definition: transmission_error.cc:25
mkgeo_contraction.status
status
Definition: mkgeo_contraction.sh:290
geo
see the geo page for the full documentation