Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

hp2D/baseQuadGraphics.hh
Go to the documentation of this file.
00001 /* Graphics for 2D hp FEM
00002  */
00003 
00004 #ifndef baseQuadGraphics_hh
00005 #define baseQuadGraphics_hh
00006 
00007 #include "basics/typedefs.hh"
00008 #include "graphics/basis.hh"
00009 #include "space/function.hh"
00010 #include "toolbox/elementGraphics.hh"
00011 #include "graphics/matrixBasis.hh"
00012 
00013 namespace hp2D {
00014   using concepts::Real;
00015   using concepts::Cmplx;
00016 
00017   // Forward declaration
00018   template<class F>
00019   class BaseQuad;
00020 
00021   // ****************************************************** BaseQuadGraphics **
00022 
00027   template<class F>
00028   class BaseQuadGraphics: public concepts::ElementGraphics<F> {
00029   public:
00030     using concepts::ElementGraphicsBase::graphicsType;
00031 
00033     BaseQuadGraphics();
00034     ~BaseQuadGraphics();
00035 
00036     virtual void operator()(const concepts::Element<F>& elm,
00037         enum concepts::ElementGraphicsBase::graphicsType type,
00038         concepts::CellPostprocess<F>& post) const;
00039 
00041     void setValue(const concepts::ElementFunction<Real, F>* value);
00042     void setValue(const concepts::ElementFunction<Cmplx, F>* value);
00043   protected:
00044     virtual std::ostream& info(std::ostream& os) const;
00045   private:
00047     void writeGnuplot_(const BaseQuad<F>& quad,
00048         concepts::CellPostprocess<F>& post) const;
00050     void writeMatlab_(const BaseQuad<F>& quad,
00051         concepts::CellPostprocess<F>& post) const;
00053     template<typename G>
00054     bool writeMatlab_(const BaseQuad<F>& quad,
00055         graphics::BaseDataCell<G, F>* stream) const;
00057     template<typename G>
00058     bool writeMatlab_(const BaseQuad<F>& quad,
00059         graphics::BaseElementFormulaCell<G, F>* stream) const;
00061     void writeTecplot_(const BaseQuad<F>& quad,
00062         concepts::CellPostprocess<F>& post) const;
00064     template<typename G>
00065     bool writeTecplot_(const BaseQuad<F>& quad,
00066         graphics::BaseDataCell<G, F>* stream) const;
00068     template<typename G>
00069     bool writeTecplot_(const BaseQuad<F>& quad,
00070         graphics::BaseElementFormulaCell<G, F>* stream) const;
00071 
00072     // Convert CellPostprocess to MatrixBaseDataCell and handle different cases
00073     // (count required memorysize OR store data in matrices)
00074     bool handleDenseMatrix_(const BaseQuad<F>& quad, concepts::CellPostprocess<
00075         F>& post) const;
00076 
00077     //Write informations in "quad" in the dense matrices hold by "bdc"
00078     template<class G>
00079     bool writeDenseMatrix_(const BaseQuad<F>& quad,
00080         graphics::MatrixBaseDataCell<G, F>* bdc) const;
00081 
00082     template<class G>
00083     bool writeDenseMatrix_(const BaseQuad<F>& quad,
00084         graphics::MatrixBaseElementFormulaCell<G, F>* bdc) const;
00085     template<class G>
00086     bool writeDenseMatrix_(const BaseQuad<F>& quad,
00087         graphics::MatrixSolutionEvaluationCell<G, F>* bdc) const;
00088 
00089     //Count which size the dense matrices must have
00090     bool countDenseMatrix_(const BaseQuad<F>& quad,
00091         graphics::MatrixBaseOutputCell<F>* bdc) const;
00092 
00094     void value_(const concepts::ElementFunction<Real, F>*& fun) const;
00095     void value_(const concepts::ElementFunction<Cmplx, F>*& fun) const;
00097     const concepts::ElementFunction<Real, F>* valueR_;
00099     const concepts::ElementFunction<Cmplx, F>* valueC_;
00100 
00102     mutable concepts::Real2d p_;
00104     mutable concepts::Real2d x_;
00105   };
00106 
00107 } // namespace hp2D
00108 
00109 #endif // baseQuadGraphics_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)