Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
embankment_adapt.cc

The elasticity problem for the embankment geometry with adaptive mesh.

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 catchmark page for the full documentation
Definition catchmark.h:67
see the environment page for the full documentation
odiststream: see the diststream page for the full documentation
Definition diststream.h:137
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)
int main()
Definition field2bb.cc:58
This file is part of Rheolef.
STL namespace.
rheolef - reference manual
adapt_option: see the adapt page for the full documentation
Definition adapt.h:147