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;
}
}
Float
see the Float page for the full documentation
field
see the field page for the full documentation
geo
see the geo page for the full documentation
space
see the space page for the full documentation
elasticity_criterion.icc
The elasticity problem – adaptive mesh criterion.
elasticity_criterion
field elasticity_criterion(Float lambda, const field &uh)
Definition: elasticity_criterion.icc:25
elasticity_solve.icc
The elasticity problem – solver function.
elasticity_solve
field elasticity_solve(const space &Xh, Float lambda)
Definition: elasticity_solve.icc:25
embankment.icc
The elasticity problem for the embankment geometry – boundary conditions.
embankment_space
space embankment_space(const geo &omega, string approx)
Definition: embankment.icc:25
main
int main(int argc, char **argv)
Definition: embankment_adapt.cc:31
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
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.h
rheolef - reference manual
lambda
Definition: yield_slip_circle.h:34