1 #include "rheolef/branch.h"
28 template <
class T,
class M>
31 if (_p_data_out) delete_macro (_p_data_out);
37 template <
class T,
class M>
41 if (_header_in_done)
return;
42 _header_in_done =
true;
43 check_macro (
dis_scatch(in,
"\nbranch"),
"input stream does not contains a branch");
47 in >>
version >> sz >> nval >> _parameter_name;
48 _n_value = ((nval == -1) ? numeric_limits<size_type>::max() : nval);
51 in >> base::operator[](i).first;
54 template <
class T,
class M>
58 get_header_rheolef (in);
59 if (!in || !
dis_scatch(in,
"#"+parameter_name())) {
71 in >>
catchmark (base::operator[](i).first) >> base::operator[](i).second;
84 iorheo::flag_type format = iorheo::flags(in.is()) & iorheo::format_field;
87 else { error_macro (
"unsupported input format="<<format); }
93 iorheo::flag_type format = iorheo::flags(in.is()) & iorheo::format_field;
96 else { error_macro (
"unsupported input format="<<format); }
98 #ifdef _RHEOLEF_HAVE_MPI
101 get_header (idiststream& in, branch_basic<T,distributed>&
b)
103 b.get_header_rheolef (in);
107 get_event (idiststream& in, branch_basic<T,distributed>&
b)
109 b.get_event_rheolef (in);
112 template <
class T,
class M>
122 template <
class T,
class M>
127 if (_n_value != numeric_limits<size_type>::max()) nval = _n_value;
128 out <<
"#!branch" << endl
131 <<
"1 " << base::size() <<
" " << nval << endl
134 for (
size_type i = 0; i < base::size(); i++) {
135 out <<
" " << base::operator[](i).first;
143 iorheo::flag_type format = iorheo::flags(
out.os()) & iorheo::format_field;
148 else { error_macro (
"unsupported output/render format="<<format); }
150 #ifdef _RHEOLEF_HAVE_MPI
155 b.put_header_rheolef (
out);
158 template <
class T,
class M>
162 if (_header_out_done)
return;
163 _header_out_done =
true;
166 template <
class T,
class M>
171 << setprecision(numeric_limits<T>::digits10)
172 <<
"#" << _parameter_name <<
" " << _parameter_value << endl
176 out <<
catchmark (base::operator[](i).first) << base::operator[](i).second;
185 iorheo::flag_type format = iorheo::flags(
out.os()) & iorheo::format_field;
190 else {
b.put_event_rheolef(
out); }
192 #ifdef _RHEOLEF_HAVE_MPI
195 put_event (odiststream&
out,
const branch_basic<T,distributed>&
b)
198 b.put_event_rheolef (
out);
201 template <
class T,
class M>
208 template <
class T,
class M>
217 if (
b._finalize_out_done)
return;
218 b._finalize_out_done =
true;
219 iorheo::flag_type format = iorheo::flags(
out.os()) & iorheo::format_field;
224 else {
b.put_finalize_rheolef(
out); }
226 #ifdef _RHEOLEF_HAVE_MPI
233 template <
class T,
class M>
242 #define rheolef_instanciate(T,M) \
243 template class branch_basic<T,M>; \
244 template void get_header (idiststream&, branch_basic<T,M>&); \
245 template void get_event (idiststream&, branch_basic<T,M>&); \
246 template odiststream& operator<< (odiststream&, const branch_basic<T,M>&); \
247 template idiststream& operator>> (idiststream&, branch_basic<T,M>&);
250 #ifdef _RHEOLEF_HAVE_MPI
253 #undef rheolef_instanciate
see the Float page for the full documentation
void put_header_rheolef(odiststream &) const
void put_finalize_rheolef(odiststream &) const
void put_finalize(odiststream &) const
void get_header_rheolef(idiststream &)
base::size_type size_type
void get_event_rheolef(idiststream &)
void put_event_rheolef(odiststream &) const
void put_header(odiststream &) const
see the catchmark page for the full documentation
odiststream: see the diststream page for the full documentation
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 format format format format format paraview
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 format format format gnuplot
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
#define rheolef_instanciate(T, M)
This file is part of Rheolef.
std::istream & operator>>(std::istream &is, const catchmark &m)
void get_event(idiststream &in, branch_basic< T, sequential > &b)
void put_header_gnuplot(odiststream &ops, const branch_basic< T, sequential > &b)
void put_event_paraview(odiststream &out, const branch_basic< T, sequential > &b)
void put_finalize(odiststream &out, const branch_basic< T, sequential > &b)
void get_header(idiststream &in, branch_basic< T, sequential > &b)
void put_finalize_gnuplot(odiststream &ops, const branch_basic< T, sequential > &b)
void put_event(odiststream &out, const branch_basic< T, sequential > &b)
void put_header_vtk(odiststream &out, const branch_basic< T, sequential > &b)
void put_header(odiststream &out, const branch_basic< T, sequential > &b)
void put_finalize_vtk(odiststream &out, const branch_basic< T, sequential > &b)
void put_event_vtk(odiststream &out, const branch_basic< T, sequential > &b)
void put_header_paraview(odiststream &out, const branch_basic< T, sequential > &b)
bool dis_scatch(idiststream &ips, const communicator &comm, std::string ch)
distributed version of scatch(istream&,string)
std::ostream & operator<<(std::ostream &os, const catchmark &m)
void get_event_vtk(idiststream &ips, branch_basic< T, sequential > &b)
void put_event_gnuplot(odiststream &ops, const branch_basic< T, sequential > &b)
void get_header_vtk(idiststream &ips, branch_basic< T, sequential > &b)
void put_finalize_paraview(odiststream &out, const branch_basic< T, sequential > &b)