16#define TecplotGraphConstr_D 0
17#define TecplotMeshWriteFormula_D 0
44 enum elementTypes {TRIANGLE, QUADRILATERAL, TETRAHEDRON , BRICK,
54 const std::string title,
55 const enum elementTypes type = QUADRILATERAL);
63 const std::string title,
64 const enum elementTypes type = QUADRILATERAL,
65 const uint points = noPoints);
75 template<
class F,
class G>
77 const std::string title,
79 const enum elementTypes type = QUADRILATERAL,
81 const bool append =
false);
90 template<
class F,
class G>
92 const std::string title,
94 const enum elementTypes type = QUADRILATERAL);
101 template<
class F,
class G>
103 const std::string title,
105 const enum elementTypes type = QUADRILATERAL);
115 const std::string title,
117 const enum elementTypes type = QUADRILATERAL,
118 const uint points = noPoints);
122 static uint noPoints;
124 virtual std::ostream&
info(std::ostream& os)
const;
129 template<
class F,
class G>
133 void createStreams_();
135 void closeStreams_(
const std::vector<uint>& cnt);
137 const uint dim_()
const;
139 const std::string typeStr_()
const;
142 std::map<std::string, std::ostream*> s_ptr_;
144 const std::string title_;
146 const enum elementTypes type_;
151 const std::string filename,
152 const std::string title,
153 const enum elementTypes type)
160 concepts::ElementGraphicsBase::TECPLOT, noPoints);
163 write_(postProcess, tecplot, 0);
166 template<
class F,
class G>
168 const std::string filename,
169 const std::string title,
171 const enum elementTypes type,
180 concepts::ElementGraphicsBase::TECPLOT,
185 write_(postProcess, tecplot, (F)0);
188 template<
class F,
class G>
190 const std::string filename,
191 const std::string title,
193 const enum elementTypes type)
195 title_(title), type_(type) {
200 concepts::ElementGraphicsBase::TECPLOT, frm,
204 write_(postProcess, tecplot,
true);
207 template<
class F,
class G>
209 const std::string filename,
210 const std::string title,
212 const enum elementTypes type)
219 (s_ptr_, dim_(), concepts::ElementGraphicsBase::TECPLOT, frm);
222 write_(postProcess, tecplot, (F)0);
227 const std::string filename,
228 const std::string title,
230 const enum elementTypes type,
238 concepts::ElementGraphicsBase::TECPLOT,
242 write_(postProcess, tecplot, F(1));
245 template<
class F,
class G>
255 tecplot.
count().assign(2, 0);
257 DEBUGL(TecplotGraphConstr_D, tecplot);
259 postProcess(tecplot);
261 closeStreams_(tecplot.
count());
284 std::map<std::string, std::ostream*>& os,
286 std::vector<uint>& cnt);
298 std::map<std::string, std::ostream*>& os,
300 std::vector<uint>& cnt,
308 template<u
int dim,
class F>
311 std::ostream& os,
const F* values = 0);
319 std::vector<uint>& cnt);
321 virtual std::ostream&
info(std::ostream& os)
const;
336 std::map<std::string, std::ostream*>& os,
338 std::vector<uint>& cnt,
341 DEBUGL(TecplotMeshWriteFormula_D,
"cell = " << cell);
355 for (uint i = X.size(); i--; )
362 template<u
int dim,
class F>
365 std::ostream& os,
const F* v) {
368 bool values = v != 0;
369 for(uint i = coord.size(); i--; ) {
370 writeCoord_(*x++, os);
virtual Connector & connector() const =0
Returns the connector.
std::vector< uint > & count()
Number of points written to the files, used for mesh representation.
std::unique_ptr< std::ofstream > ofs_
Stream for output file.
TecplotGraphics(concepts::Mesh &msh, const std::string filename, const std::string title, const enum elementTypes type=QUADRILATERAL, const uint points=noPoints)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
TecplotGraphics(const concepts::Space< G > &spc, const std::string filename, const std::string title, const enum elementTypes type=QUADRILATERAL)
static void writeMesh(const concepts::Cell &cell, std::map< std::string, std::ostream * > &os, const concepts::Array< uint > &np, std::vector< uint > &cnt)
static void writeData(const concepts::Array< concepts::Point< Real, dim > > &coord, std::ostream &os, const F *values=0)
static void writeFormula(const concepts::Cell &cell, std::map< std::string, std::ostream * > &os, const concepts::Array< uint > &np, std::vector< uint > &cnt, const concepts::PiecewiseFormulaBase< F > *frm)
static void writeConnect(const concepts::Quad2d &quad, std::ostream &os, const concepts::Array< uint > &np, std::vector< uint > &cnt)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
#define DEBUGL(doit, msg)
Set< F > makeSet(uint n, const F &first,...)
std::string tecplotEnding(const std::string &filename)
Returns a string with ".dat" ending.