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

models/adaptiveModels.hh
Go to the documentation of this file.
00001 
00006 #ifndef adaptiveModels_hh
00007 #define adaptiveModels_hh
00008 
00009 #include "hp2D/spacePreBuilder.hh"
00010 #include "models.hh"
00011 #include "toolbox/inputParam.hh"
00012 
00013 namespace concepts {
00014 
00015   // forward declaration
00016   class InputAdaptiveModels;
00017 
00018   // ******************************************************** AdaptiveModels **
00019 
00020   template<class F, uint dim>
00021   class AdaptiveModel : public Model<F> {
00022   public:
00023     enum subdivTypes { NONE = 0, X = 1, Y = 2};
00024 
00025     AdaptiveModel(const std::string problemName) : Model<F>(problemName) {}
00033     void rebuildMesh(const uint l = 0, const uint p = 1,
00034          const uint g = 0, const uint subdiv = X | Y);
00035     void rebuildMesh(concepts::InputAdaptiveModels& input);
00036   private:
00037     virtual void rebuildMesh_(const uint l = 0, const uint p = 1,
00038             const uint g = 0, const uint subdiv = X | Y) = 0;
00039   };
00040 
00041   // *************************************************** InputAdaptiveModels **
00042 
00048   class InputAdaptiveModels : public concepts::InputParameter {
00049   public:
00051     InputAdaptiveModels(concepts::InOutParameters& input, const uint p = 1);
00055     virtual std::ostream& letters(std::ostream& os) const;
00057     virtual std::ostream& arguments(std::ostream& os) const;
00059     virtual std::ostream& description(std::ostream& os) const;
00064     virtual int input(int opt, const char* optarg);
00065   protected:
00066     virtual std::ostream& info(std::ostream& os) const;
00067   };
00068 
00069 
00070 } // namespace concepts
00071 
00072 namespace hp2D {
00073 
00074   // ******************************************************** AdaptiveModels **
00075 
00076   template<class F>
00077   class AdaptiveModel : public concepts::AdaptiveModel<F,2> {
00078   public:
00080     AdaptiveModel(const std::string problemName, const uint geomRefAttr = 100);
00081   protected:
00082     enum subdivTypes { NONE = 0, X = 1, Y = 2};
00084     virtual void rebuildMesh_(const uint l = 0, const uint p = 1,
00085             const uint g = 0, const uint subdiv = X | Y);
00086     virtual concepts::Mesh& mesh_() { return prebuild_().mesh(); }
00088     virtual hpFull& prebuild_() = 0;
00090     const uint geomRefAttr_;
00091   };
00092 
00093 } // namespace hp2D
00094 
00095 #endif // adaptiveModels_hh

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