Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
embankment_adapt.cc
Go to the documentation of this file.
1
25#include "rheolef.h"
26using namespace rheolef;
27using namespace std;
28#include "elasticity_solve.icc"
30#include "embankment.icc"
31int 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}
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.
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:179
STL namespace.
rheolef - reference manual
adapt_option: see the adapt page for the full documentation
Definition adapt.h:147