Rheolef  7.1
an efficient C++ finite element environment
embankment_adapt.cc

The elasticity problem for the embankment geometry with adaptive mesh

#include "rheolef.h"
using namespace rheolef;
using namespace std;
#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);
odiststream of (omega.name(), "field");
of << catchmark("lambda") << lambda << endl
<< catchmark("u") << uh;
if (i == n_adapt) break;
omega = adapt(ch, options);
odiststream og (omega.name(), "geo");
og << omega;
}
}
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 space page for the full documentation
The elasticity problem – adaptive mesh criterion.
field elasticity_criterion(Float lambda, const field &uh)
The elasticity problem – solver function.
field elasticity_solve(const space &Xh, Float lambda)
The elasticity problem for the embankment geometry – boundary conditions.
space embankment_space(const geo &omega, string approx)
Definition: embankment.icc:25
int main(int argc, char **argv)
This file is part of Rheolef.
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 - reference manual