Rheolef  7.1
an efficient C++ finite element environment
embankment_adapt.cc
Go to the documentation of this file.
1 #include "rheolef.h"
26 using namespace rheolef;
27 using namespace std;
28 #include "elasticity_solve.icc"
29 #include "elasticity_criterion.icc"
30 #include "embankment.icc"
31 int main(int argc, char**argv) {
32  environment rheolef (argc, argv);
33  const Float lambda = 1;
34  geo omega (argv[1]);
35  adapt_option options;
36  string approx = (argc > 2) ? argv[2] : "P1";
37  options.err = (argc > 3) ? atof(argv[3]) : 5e-3;
38  size_t n_adapt = (argc > 4) ? atoi(argv[4]) : 5;
39  options.hmin = 0.004;
40  for (size_t i = 0; true; i++) {
41  space Xh = embankment_space (omega, approx);
42  field uh = elasticity_solve (Xh, lambda);
43  odiststream of (omega.name(), "field");
44  of << catchmark("lambda") << lambda << endl
45  << catchmark("u") << uh;
46  if (i == n_adapt) break;
48  omega = adapt(ch, options);
49  odiststream og (omega.name(), "geo");
50  og << omega;
51  }
52 }
elasticity_solve.icc
The elasticity problem – solver function.
rheolef::adapt
geo_basic< T, M > adapt(const field_basic< T, M > &uh, const adapt_option &opts)
adapt(uh,opts): see the adapt page for the full documentation
Definition: adapt.cc:172
rheolef::catchmark
see the catchmark page for the full documentation
Definition: catchmark.h:67
field
see the field page for the full documentation
rheolef::adapt_option
adapt_option: see the adapt page for the full documentation
Definition: adapt.h:147
space
see the space page for the full documentation
rheolef.h
rheolef - reference manual
embankment.icc
The elasticity problem for the embankment geometry – boundary conditions.
rheolef::adapt_option::hmin
Float hmin
Definition: adapt.h:154
elasticity_solve
field elasticity_solve(const space &Xh, Float lambda)
Definition: elasticity_solve.icc:25
elasticity_criterion.icc
The elasticity problem – adaptive mesh criterion.
main
int main(int argc, char **argv)
Definition: embankment_adapt.cc:31
rheolef::environment
see the environment page for the full documentation
Definition: environment.h:115
embankment_space
space embankment_space(const geo &omega, string approx)
Definition: embankment.icc:25
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::adapt_option::err
Float err
Definition: adapt.h:151
rheolef::odiststream
odiststream: see the diststream page for the full documentation
Definition: diststream.h:126
Float
see the Float page for the full documentation
elasticity_criterion
field elasticity_criterion(Float lambda, const field &uh)
Definition: elasticity_criterion.icc:25
rheolef::std
Definition: vec_expr_v2.h:402
geo
see the geo page for the full documentation
lambda
Definition: yield_slip_circle.h:34