6#ifndef graphicsbasis_hh
7#define graphicsbasis_hh
26 template<
class F,
class G>
30 class PiecewiseFormulaBase;
50 static const uint n() {
return 1; }
55 static const uint n() {
return 1; }
58 template<
class F, u
int dim>
60 static const uint n() {
return Size<F>::n() * dim; }
63 template<
class F, u
int dim>
65 static const uint n() {
return Size<F>::n() * dim * dim; }
78 OutputBase(
const std::string filename,
const bool append =
false);
81 virtual std::ostream&
info(std::ostream& os)
const;
83 std::unique_ptr<std::ofstream>
ofs_;
94 template<
class F = Real>
98 const concepts::ElementGraphicsBase::graphicsType type)
103 std::map<std::string, std::ostream*>&
write() {
return os_; }
114 virtual uint
n()
const = 0;
116 virtual std::ostream&
info(std::ostream& os)
const;
118 const enum concepts::ElementGraphicsBase::graphicsType
type_;
126 std::map<std::string, std::ostream*>&
os_;
139 template<class F, class G = typename concepts::Realtype<F>::type>
150 const concepts::ElementGraphicsBase::graphicsType type,
164 virtual uint
n()
const;
166 virtual std::ostream&
info(std::ostream& os)
const;
184 template<class F, class G = typename concepts::Realtype<F>::type>
194 (std::map<std::string, std::ostream*>& os,
const uint
dim,
195 const concepts::ElementGraphicsBase::graphicsType type,
207 virtual std::ostream&
info(std::ostream& os)
const;
220 template<class F, class G = typename concepts::Realtype<F>::type>
232 const concepts::ElementGraphicsBase::graphicsType type,
234 const uint points = 5);
244 virtual std::ostream&
info(std::ostream& os)
const;
269 const concepts::ElementGraphicsBase::graphicsType type,
270 const uint points = 5);
278 virtual uint
n()
const {
return 0; }
280 virtual std::ostream&
info(std::ostream& os)
const;
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual uint n() const
Number of components.
const concepts::ElementFunction< F, G > *& elementFunction()
Returns the function of the solution.
const concepts::Array< F > & coeff() const
Returns the coefficients of the elements shape functions.
virtual void operator()(const concepts::Element< G > &elm)
virtual void operator()(const concepts::Cell &cell)
Not operational.
BaseDataCell(std::map< std::string, std::ostream * > &os, const uint dim, const concepts::ElementGraphicsBase::graphicsType type, const concepts::Vector< F > &sol, const concepts::ElementFunction< F, G > *fun=0)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
BaseMeshCell(std::map< std::string, std::ostream * > &os, const uint dim, const concepts::ElementGraphicsBase::graphicsType type, const uint points=5)
virtual uint n() const
Number of components.
virtual void operator()(const concepts::Element< Real > &elm)
virtual void operator()(const concepts::Cell &cell)
virtual void operator()(const concepts::Element< F > &elm)=0
std::map< std::string, std::ostream * > & os_
Streams to write the data to.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
enum concepts::ElementGraphicsBase::graphicsType type_
Type of Output, like Matlab, Gnuplot.
std::vector< uint > & count()
Number of points written to the files, used for mesh representation.
uint dim() const
Number of the elements, used for drawing mesh representation.
uint streams() const
Number of streams.
std::map< std::string, std::ostream * > & write()
Returns the streams to write the data to.
virtual void operator()(const concepts::Cell &cell)=0
virtual uint n() const =0
Number of components.
concepts::Sequence< uint > cnt_
Some counters.
const uint dim_
Number of drawn elements.
std::unique_ptr< std::ofstream > ofs_
Stream for output file.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
OutputBase(const std::string filename, const bool append=false)