The Zalesak slotted disk benchmark – adaptive post-treatment.
int main(
int argc,
char**argv) {
size_t subdivide = (argc > 1) ? atoi(argv[1]) : 3;
Float field_error = (argc > 2) ? atof(argv[2]) : 1e-3;
bool do_verbose = true;
bool do_clean = true;
string cleanlist;
din >> ievent (t0, phi0_h);
while (din >> ievent (tf, phi_h));
dout <<
vtk << setbasename(tmp+
"criterion")
<< oevent (t0, ch, phi0_h, phi_h);
cleanlist +=
tmp+
"criterion-0.vtk";
string py_name =
tmp+
"adapt.py";
cleanlist += " "+py_name;
bool view_2d = phi_h.
get_geo().map_dimension() < 3;
py << "#!/usr/bin/env pvbatch --script=" << endl
<< "# This is a paraview script automatically generated by rheolef." << endl
<< endl
<< "from paraview.simple import *" << endl
<< "from paraview_rheolef import * # load rheolef specific functions" << endl
<< endl
<< "opt = { \\" << endl
<< " 'mark' : 'c', \\" << endl
<< " 'view_2d' : " << view_2d << ", \\" << endl
<< " 'geo_error' : " << geo_error << ", \\" << endl
<< " 'field_error' : " << field_error << ", \\" << endl
<< " 'subdivide' : " << subdivide << " \\" << endl
<< " }" << endl
<< endl
<<
"adapt_Pk_iso_P1 (paraview, \""<<
tmp<<
"criterion-0.vtk\", \""<<
tmp<<
"adapt.vtk\", opt)" << endl
<< endl
;
string prog = "pvbatch --force-offscreen-rendering ";
if (do_verbose) derr <<
"! " <<
command << endl;
check_macro (dis_system (command) == 0,
"unix command failed");
cleanlist +=
" "+
tmp+
"adapt.vtk";
iorheo::setbasename(in_vtk.is(),"adapt");
in_vtk >> ia_event (t, c_ha, phi0_ha, phi_ha);
<< oa_event (t0, phi0_ha)
<< oa_event (tf, phi_ha);
if (do_clean) {
if (do_verbose) derr <<
"! " <<
command << endl;
check_macro (dis_system (command) == 0,
"unix command failed");
}
if (do_verbose) {
cerr << "zalesak_dg_adapt: mesh size " << Xh.get_geo().size()
<<
" -> " << phi_ha.
get_geo().size() << endl;
}
}
see the Float page for the full documentation
see the branch page for the full documentation
see the communicator page for the full documentation
see the environment page for the full documentation
const geo_type & get_geo() const
const space_type & get_space() const
idiststream: see the diststream page for the full documentation
odiststream: see the diststream page for the full documentation
see the space page for the full documentation
#define _RHEOLEF_PKGDATADIR
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
verbose clean transpose logscale grid shrink ball stereo iso volume skipvtk deformation fastfieldload lattice reader_on_stdin color format format format format format format format format format format format format format format format format vtk
verbose clean transpose logscale grid shrink ball stereo iso volume skipvtk deformation fastfieldload lattice reader_on_stdin color rheo
class rheolef::details::field_expr_v2_nonlinear_node_unary compose
This file is part of Rheolef.
field_basic< T, M > lazy_interpolate(const space_basic< T, M > &X2h, const field_basic< T, M > &u1h)
see the interpolate page for the full documentation
std::string get_tmpdir()
get_tmpdir: see the rheostream page for the full documentation
The Zalesak slotted disk benchmark – the exact solution.
Float heaviside(const Float &x)
Float criterion(const Float &x, const Float &y)