Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
yield_slip_damped_newton.cc
Go to the documentation of this file.
1
25#include "rheolef.h"
26using namespace std;
27using namespace rheolef;
28#include "yield_slip.h"
29int main(int argc, char**argv) {
30 environment rheolef (argc,argv);
31 geo omega (argv[1]);
32 string approx = (argc > 2) ? argv[2] : "P1";
33 Float S = (argc > 3) ? atof(argv[3]) : 0.6;
34 Float n = (argc > 4) ? atof(argv[4]) : 1;
35 Float Cf = (argc > 5) ? atof(argv[5]) : 1;
36 Float r = (argc > 6) ? atof(argv[6]) : 1;
37 domain boundary = omega["boundary"];
38 yield_slip F (S, n, Cf, r, omega, boundary, approx);
39 field beta_h = F.initial();
40 Float tol = 10*numeric_limits<Float>::epsilon();
41 size_t max_iter = 10000;
42 int status = damped_newton (F, beta_h, tol, max_iter, &derr);
43 field uh, lambda_h;
44 F.post (beta_h, uh, lambda_h);
45 dout << setprecision(numeric_limits<Float>::digits10)
46 << catchmark("S") << S << endl
47 << catchmark("n") << n << endl
48 << catchmark("Cf") << Cf << endl
49 << catchmark("r") << r << endl
50 << catchmark("u") << uh
51 << catchmark("lambda") << lambda_h;
52 return status;
53}
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 catchmark page for the full documentation
Definition catchmark.h:67
see the environment page for the full documentation
field initial() const
void post(const field &beta_h, field &uh, field &lambda_h) const
int main()
Definition field2bb.cc:58
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
STL namespace.
rheolef - reference manual
The yield slip problem – class header.