Rheolef  7.1
an efficient C++ finite element environment
yield_slip_augmented_lagrangian.cc
Go to the documentation of this file.
1 #include "rheolef.h"
26 using namespace std;
27 using namespace rheolef;
29 #include "poisson_robin.icc"
30 int main(int argc, char**argv) {
31  environment rheolef (argc,argv);
32  dlog << noverbose;
33  geo omega (argv[1]);
34  string approx = (argc > 2) ? argv[2] : "P1";
35  Float S = (argc > 3) ? atof(argv[3]) : 0.6;
36  Float n = (argc > 4) ? atof(argv[4]) : 1;
37  Float Cf = (argc > 5) ? atof(argv[5]) : 1;
38  Float r = (argc > 6) ? atof(argv[6]) : 1;
40  size_t max_iter = 100000;
41  space Xh (omega, approx);
42  test v (Xh);
43  field lh = integrate(v);
44  field uh = poisson_robin (Cf, omega["boundary"], lh);
45  space Wh (omega["boundary"], Xh.get_approx());
46  field lambda_h = Cf*uh["boundary"];
47  int status = yield_slip_augmented_lagrangian(S, n, Cf, omega["boundary"],
48  lh, lambda_h, uh, tol, max_iter, r);
49  dout << setprecision(numeric_limits<Float>::digits10)
50  << catchmark("S") << S << endl
51  << catchmark("n") << n << endl
52  << catchmark("Cf") << Cf << endl
53  << catchmark("r") << r << endl
54  << catchmark("u") << uh
55  << catchmark("lambda") << lambda_h;
56  return status;
57 }
mkgeo_ball.n
int n
Definition: mkgeo_ball.sh:150
poisson_robin.icc
The Poisson problem with Robin boundary condition – solver function.
rheolef::catchmark
see the catchmark page for the full documentation
Definition: catchmark.h:67
yield_slip_augmented_lagrangian
int yield_slip_augmented_lagrangian(Float S, Float n, Float Cf, geo boundary, field lh, field &lambda_h, field &uh, Float tol, size_t max_iter, Float r)
Definition: yield_slip_augmented_lagrangian.icc:26
field
see the field page for the full documentation
rheolef::integrate
std::enable_if< details::is_field_expr_v2_nonlinear_arg< Expr >::value &&! is_undeterminated< Result >::value, Result >::type integrate(const geo_basic< T, M > &omega, const Expr &expr, const integrate_option &iopt, Result dummy=Result())
see the integrate page for the full documentation
Definition: integrate.h:202
space
see the space page for the full documentation
rheolef.h
rheolef - reference manual
rheolef::environment
see the environment page for the full documentation
Definition: environment.h:115
lh
field lh(Float epsilon, Float t, const test &v)
Definition: burgers_diffusion_operators.icc:25
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
test
see the test page for the full documentation
Float
see the Float page for the full documentation
main
int main(int argc, char **argv)
Definition: yield_slip_augmented_lagrangian.cc:30
poisson_robin
field poisson_robin(Float Cf, const geo &boundary, const field &lh)
Definition: poisson_robin.icc:25
epsilon
Float epsilon
Definition: transmission_error.cc:25
yield_slip_augmented_lagrangian.icc
The yield slip problem by the augmented Lagrangian method – solver function.
rheolef::std
Definition: vec_expr_v2.h:402
mkgeo_contraction.status
status
Definition: mkgeo_contraction.sh:290
geo
see the geo page for the full documentation