Go to the documentation of this file.
24 #include "libmesh/plt_loader.h"
452 const unsigned int version_in)
const
454 std::ofstream out_stream (
name.c_str());
456 out_stream <<
"TITLE=\""
461 out_stream <<
"VARIABLES = ";
463 for (
unsigned int v=0; v<this->
n_vars(); v++)
464 out_stream <<
"\"" << this->
var_name(v) <<
"\"\n";
466 for (
unsigned int z=0; z<this->
n_zones(); z++)
468 out_stream <<
"ZONE T=\"" << this->
zone_name(z) <<
"\"\n";
469 out_stream <<
" I=" << this->
imax(z)
470 <<
", J=" << this->
jmax(z)
471 <<
", K=" << this->
kmax(z);
478 out_stream <<
", F=BLOCK\n";
482 out_stream <<
", ZONETYPE=Ordered\n"
483 <<
"DATAPACKING=BLOCK\n";
486 out_stream <<
"DT=(";
487 for (
unsigned int v=0; v<this->
n_vars(); v++)
488 out_stream <<
"SINGLE ";
491 out_stream.precision(9);
493 for (
unsigned int v=0; v<this->
n_vars(); v++)
497 for (
unsigned int k=0; k<this->
kmax(z); k++)
498 for (
unsigned int j=0; j<this->
jmax(z); j++)
499 for (
unsigned int i=0; i<this->
imax(z); i++)
501 out_stream << std::scientific
502 <<
_data[z][v][l++] <<
" ";
520 out_stream <<
", F=POINT\n";
524 out_stream <<
", ZONETYPE=Ordered\n"
525 <<
"DATAPACKING=POINT\n";
528 out_stream <<
"DT=(";
529 for (
unsigned int v=0; v<this->
n_vars(); v++)
530 out_stream <<
"SINGLE ";
533 out_stream.precision(9);
538 for (
unsigned int k=0; k<this->
kmax(z); k++)
539 for (
unsigned int j=0; j<this->
jmax(z); j++)
540 for (
unsigned int i=0; i<this->
imax(z); i++)
542 for (
unsigned int v=0; v<this->
n_vars(); v++)
543 out_stream << std::scientific
544 <<
_data[z][v][l] <<
" ";
555 libmesh_error_msg(
"Unrecognized zone type: this->zone_type(z)==" << this->
zone_type(z));
const std::string & var_name(const unsigned int v) const
unsigned int n_vars() const
The libMesh namespace provides an interface to certain functionality in the library.
void write_dat(const std::string &name, const unsigned int version=10) const
Writes an ASCII Tecplot file.
unsigned int kmax(const unsigned int z) const
unsigned int jmax(const unsigned int z) const
const std::string & zone_name(const unsigned int z) const
unsigned int n_zones() const
unsigned int zone_type(const unsigned int z) const
unsigned int imax(const unsigned int z) const
std::vector< std::vector< std::vector< float > > > _data
Vector to hold the data.
const std::string & title() const
std::string name(const ElemQuality q)
This function returns a string containing some name for q.