an efficient C++ finite element environment
|
|
Go to the documentation of this file. 1 #include "rheolef/adapt.h"
22 #include "rheolef/form.h"
23 #include "rheolef/field_component.h"
24 #include "rheolef/rheostream.h"
25 #include "rheolef/field_expr.h"
30 template<
class T,
class M>
33 const field_basic<T,M>& uh0,
34 const adapt_option& opts);
39 template<
class T,
class M>
47 bool do_verbose = iorheo::getverbose(clog);
48 bool do_clean = iorheo::getclean(clog);
55 string i_name = omega.name();
56 string geo_name = i_name +
".geo";
62 check_macro (
out.good(),
"adapt: file \"" << geo_name <<
"\"creation failed");
64 clean_files +=
" " + geo_name;
69 string crit_name = i_name +
"-crit.field";
70 clean_files +=
" " + crit_name +
".gz";
71 out.open (crit_name,
"field");
73 check_macro (
out.good(),
"adapt: file \"" << crit_name <<
"\"creation failed");
78 string pos_name = i_name +
"-crit.pos";
79 clean_files +=
" " + pos_name;
81 command =
"zcat " + crit_name +
".gz | " +
bindir +
"/field2gmsh_pos > " + pos_name;
90 string mshcad_file = omega.familyname() +
".mshcad";
91 check_macro (
dis_file_exists(mshcad_file),
"adapt: missing \""<<mshcad_file<<
"\" file");
92 string options =
"-clmin " +
ftos(opts.
hmin)
96 sprintf (buffer,
"%.3d",
int(i+1));
97 string i1_name = omega.familyname() +
"-" + buffer;
99 string algo = (
d <= 2) ?
"bamg" :
"mmg3d";
102 +
" -" +
itos(
d) +
" -algo " + algo
103 +
" -bgm " + pos_name
104 +
" -format msh2 -o " + i1_name +
".msh";
110 command =
"msh2geo -" + omega.coordinate_system_name()
111 +
" " + i1_name +
".msh | gzip -9 > " + i1_name +
".geo.gz";
114 clean_files +=
" " + i1_name +
".msh";
118 idiststream in (i1_name,
"geo");
121 new_omega.set_name (omega.familyname());
122 new_omega.set_serial_number (i+1);
123 clean_files +=
" " + i1_name +
".geo";
124 clean_files +=
" " + i1_name +
".geo.gz";
129 command =
"rm -f" + clean_files;
138 #define _RHEOLEF_instanciation(T,M) \
139 template geo_basic<T,M> adapt_gmsh (const field_basic<T,M>&, const adapt_option&);
142 #ifdef _RHEOLEF_HAVE_MPI
144 #endif // _RHEOLEF_HAVE_MPI
generic mesh with rerefence counting
_RHEOLEF_instanciation(Float, sequential, std::allocator< Float >) _RHEOLEF_instanciation(Float
adapt_option: see the adapt page for the full documentation
#define _RHEOLEF_RHEOLEF_LIBDIR
const geo_type & get_geo() const
bool dis_file_exists(const std::string &filename, const communicator &comm)
This file is part of Rheolef.
int dis_system(const std::string &command, const communicator &comm)
odiststream derr(cerr)
see the diststream page for the full documentation
odiststream: see the diststream page for the full documentation
see the Float page for the full documentation
string ftos(const Float &x)
itof: see the rheostream page for the full documentation
field::size_type size_type
std::string itos(std::string::size_type i)
itos: see the rheostream page for the full documentation
field_basic< T, M > hessian_criterion(const field_basic< T, M > &uh0, const adapt_option &opts)
geo_basic< T, M > adapt_gmsh(const field_basic< T, M > &uh, const adapt_option &opts)