21 #include "libmesh/plt_loader.h" 23 #include "libmesh/int_range.h" 454 const unsigned int version_in)
const 456 std::ofstream out_stream (
name.c_str());
458 out_stream <<
"TITLE=\"" 463 out_stream <<
"VARIABLES = ";
466 out_stream <<
"\"" << this->
var_name(v) <<
"\"\n";
470 out_stream <<
"ZONE T=\"" << this->
zone_name(z) <<
"\"\n";
471 out_stream <<
" I=" << this->
imax(z)
472 <<
", J=" << this->
jmax(z)
473 <<
", K=" << this->
kmax(z);
480 out_stream <<
", F=BLOCK\n";
484 out_stream <<
", ZONETYPE=Ordered\n" 485 <<
"DATAPACKING=BLOCK\n";
488 out_stream <<
"DT=(";
489 for (
unsigned int v=0; v<this->
n_vars(); v++)
490 out_stream <<
"SINGLE ";
493 out_stream.precision(9);
499 for (
unsigned int k=0; k<this->
kmax(z); k++)
500 for (
unsigned int j=0; j<this->
jmax(z); j++)
501 for (
unsigned int i=0; i<this->
imax(z); i++)
503 out_stream << std::scientific
504 <<
_data[z][v][l++] <<
" ";
522 out_stream <<
", F=POINT\n";
526 out_stream <<
", ZONETYPE=Ordered\n" 527 <<
"DATAPACKING=POINT\n";
530 out_stream <<
"DT=(";
531 for (
unsigned int v=0; v<this->
n_vars(); v++)
532 out_stream <<
"SINGLE ";
535 out_stream.precision(9);
540 for (
unsigned int k=0; k<this->
kmax(z); k++)
541 for (
unsigned int j=0; j<this->
jmax(z); j++)
542 for (
unsigned int i=0; i<this->
imax(z); i++)
545 out_stream << std::scientific
546 <<
_data[z][v][l] <<
" ";
557 libmesh_error_msg(
"Unrecognized zone type: this->zone_type(z)==" << this->
zone_type(z));
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
unsigned int n_vars() const
std::vector< std::vector< std::vector< float > > > _data
Vector to hold the data.
The libMesh namespace provides an interface to certain functionality in the library.
const std::string & var_name(const unsigned int v) const
unsigned int imax(const unsigned int z) const
const std::string & zone_name(const unsigned int z) const
unsigned int jmax(const unsigned int z) const
const std::string & title() const
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
unsigned int n_zones() const
unsigned int kmax(const unsigned int z) const
void write_dat(const std::string &name, const unsigned int version=10) const
Writes an ASCII Tecplot file.
unsigned int zone_type(const unsigned int z) const