embankment_adapt.cc

The elasticity problem for the embankment geometry with adaptive mesh

#include "rheolef.h"
using namespace rheolef;
using namespace std;
#include "elasticity_solve.icc"
#include "elasticity_criterion.icc"
#include "embankment.icc"
int main(int argc, char**argv) {
environment rheolef (argc, argv);
const Float lambda = 1;
geo omega (argv[1]);
adapt_option options;
string approx = (argc > 2) ? argv[2] : "P1";
options.err = (argc > 3) ? atof(argv[3]) : 5e-3;
size_t n_adapt = (argc > 4) ? atoi(argv[4]) : 5;
options.hmin = 0.004;
for (size_t i = 0; true; i++) {
space Xh = embankment_space (omega, approx);
field uh = elasticity_solve (Xh, lambda);
odiststream of (omega.name(), "field");
of << catchmark("lambda") << lambda << endl
<< catchmark("u") << uh;
if (i == n_adapt) break;
field ch = elasticity_criterion (lambda,uh);
omega = adapt(ch, options);
odiststream og (omega.name(), "geo");
og << omega;
}
}
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:391
geo
see the geo page for the full documentation
lambda
Definition: yield_slip_circle.h:34