00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef SUNDANCE_HNMESHER2D_H_
00043 #define SUNDANCE_HNMESHER2D_H_
00044
00045 #include "SundanceDefs.hpp"
00046 #include "SundanceMeshSourceBase.hpp"
00047 #include "SundanceHNMesh2D.hpp"
00048 #include "SundanceRefinementBase.hpp"
00049 #include "SundanceRefinementClass.hpp"
00050 #include "SundanceDomainDefinition.hpp"
00051
00052 namespace Sundance
00053 {
00054
00055 class RefinementClass;
00056 class MeshDomainDef;
00057
00058 class HNMesher2D : public MeshSourceBase
00059 {
00060 public:
00061
00062 HNMesher2D(
00063 double position_x, double position_y,
00064 double offset_x , double offset_y,
00065 int resolution_x , int resolution_y ,
00066 const MeshType& meshType,
00067 const MPIComm& comm = MPIComm::world())
00068 :
00069 MeshSourceBase(meshType, 0, comm),
00070 _position_x(position_x), _position_y(position_y),
00071 _offset_x(offset_x), _offset_y(offset_y),
00072 _resolution_x(resolution_x) , _resolution_y(resolution_y) ,
00073 refineClass_(dummyRefineClass_) ,
00074 meshDomain_(dummyMeshDomain_) {;}
00075
00076
00077 HNMesher2D(
00078 double position_x, double position_y,
00079 double offset_x , double offset_y,
00080 int resolution_x , int resolution_y ,
00081 const MeshType& meshType,
00082 const RefinementClass& refineClass ,
00083 const MPIComm& comm = MPIComm::world())
00084 :
00085 MeshSourceBase(meshType, 0, comm),
00086 _position_x(position_x), _position_y(position_y),
00087 _offset_x(offset_x), _offset_y(offset_y),
00088 _resolution_x(resolution_x) , _resolution_y(resolution_y) ,
00089 refineClass_(refineClass) ,
00090 meshDomain_(dummyMeshDomain_) {;}
00091
00092
00093 HNMesher2D(
00094 double position_x, double position_y,
00095 double offset_x , double offset_y,
00096 int resolution_x , int resolution_y ,
00097 const MeshType& meshType,
00098 const MeshDomainDef& meshDomain ,
00099 const MPIComm& comm = MPIComm::world())
00100 :
00101 MeshSourceBase(meshType, 0, comm),
00102 _position_x(position_x), _position_y(position_y),
00103 _offset_x(offset_x), _offset_y(offset_y),
00104 _resolution_x(resolution_x) , _resolution_y(resolution_y) ,
00105 refineClass_(dummyRefineClass_) ,
00106 meshDomain_(meshDomain) {;}
00107
00108
00109 HNMesher2D(
00110 double position_x, double position_y,
00111 double offset_x , double offset_y,
00112 int resolution_x , int resolution_y ,
00113 const MeshType& meshType,
00114 const RefinementClass& refineClass ,
00115 const MeshDomainDef& meshDomain ,
00116 const MPIComm& comm = MPIComm::world())
00117 :
00118 MeshSourceBase(meshType, 0, comm),
00119 _position_x(position_x), _position_y(position_y),
00120 _offset_x(offset_x), _offset_y(offset_y),
00121 _resolution_x(resolution_x) , _resolution_y(resolution_y) ,
00122 refineClass_(refineClass) ,
00123 meshDomain_(meshDomain) {;}
00124
00125
00126 HNMesher2D(const ParameterList& params);
00127
00128
00129 virtual ~HNMesher2D() {;}
00130
00131
00132 virtual std::string description() const
00133 {return "HNMesher2D[pos x =" + Teuchos::toString(_position_x)
00134 + ", pos y=" + Teuchos::toString(_position_y)
00135 + ", offset x=" + Teuchos::toString(_offset_x) +
00136 + ", offset y=" + Teuchos::toString(_offset_y)
00137 + ", resolution_x=" + Teuchos::toString(_resolution_x)
00138 + ", resolution_y=" + Teuchos::toString(_resolution_y)+"]";}
00139
00140
00141
00142 virtual RCP<MeshSourceBase> getRcp() {return rcp(this);}
00143
00144
00145 protected:
00146
00147
00148 virtual Mesh fillMesh() const ;
00149
00150 private:
00151
00152
00153 double _position_x;
00154
00155 double _position_y;
00156
00157 double _offset_x;
00158
00159 double _offset_y;
00160
00161 int _resolution_x;
00162
00163 int _resolution_y;
00164
00165
00166 const RefinementClass refineClass_;
00167
00168
00169 const MeshDomainDef meshDomain_;
00170
00171
00172
00173 static const RefinementClass dummyRefineClass_;
00174
00175
00176 static const MeshDomainDef dummyMeshDomain_;
00177 };
00178 }
00179 #endif