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_HNMESHER3D_H_
00043 #define SUNDANCE_HNMESHER3D_H_
00044
00045 #include "SundanceDefs.hpp"
00046 #include "SundanceMeshSourceBase.hpp"
00047 #include "SundanceHNMesh3D.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 HNMesher3D : public MeshSourceBase
00059 {
00060 public:
00061
00062 HNMesher3D(
00063 double position_x , double position_y , double position_z,
00064 double offset_x , double offset_y, double offset_z,
00065 int resolution_x , int resolution_y , int resolution_z,
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), _position_z(position_z),
00071 _offset_x(offset_x), _offset_y(offset_y), _offset_z(offset_z),
00072 _resolution_x(resolution_x) , _resolution_y(resolution_y) , _resolution_z(resolution_z) ,
00073 refineClass_(dummyRefineClass_) ,
00074 meshDomain_(dummyMeshDomain_) {;}
00075
00076
00077 HNMesher3D(
00078 double position_x, double position_y, double position_z,
00079 double offset_x , double offset_y, double offset_z,
00080 int resolution_x , int resolution_y , int resolution_z ,
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),_position_z(position_z),
00087 _offset_x(offset_x), _offset_y(offset_y), _offset_z(offset_z),
00088 _resolution_x(resolution_x) , _resolution_y(resolution_y) ,_resolution_z(resolution_z) ,
00089 refineClass_(refineClass) ,
00090 meshDomain_(dummyMeshDomain_) {;}
00091
00092
00093 HNMesher3D(
00094 double position_x, double position_y, double position_z,
00095 double offset_x , double offset_y, double offset_z,
00096 int resolution_x , int resolution_y , int resolution_z ,
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), _position_z(position_z),
00103 _offset_x(offset_x), _offset_y(offset_y), _offset_z(offset_z),
00104 _resolution_x(resolution_x) , _resolution_y(resolution_y) , _resolution_z(resolution_z) ,
00105 refineClass_(dummyRefineClass_) ,
00106 meshDomain_(meshDomain) {;}
00107
00108
00109 HNMesher3D(
00110 double position_x, double position_y, double position_z,
00111 double offset_x , double offset_y, double offset_z,
00112 int resolution_x , int resolution_y , int resolution_z ,
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), _position_z(position_z),
00120 _offset_x(offset_x), _offset_y(offset_y), _offset_z(offset_z),
00121 _resolution_x(resolution_x) , _resolution_y(resolution_y) , _resolution_z(resolution_z) ,
00122 refineClass_(refineClass) ,
00123 meshDomain_(meshDomain) {;}
00124
00125
00126 HNMesher3D(const ParameterList& params);
00127
00128
00129 virtual ~HNMesher3D() {;}
00130
00131
00132 virtual std::string description() const
00133 {return "HNMesher3D[pos x =" + Teuchos::toString(_position_x)
00134 + ", pos y=" + Teuchos::toString(_position_y)
00135 + ", pos z=" + Teuchos::toString(_position_z)
00136 + ", offset x=" + Teuchos::toString(_offset_x) +
00137 + ", offset y=" + Teuchos::toString(_offset_y)
00138 + ", offset z=" + Teuchos::toString(_offset_z)
00139 + ", resolution_x=" + Teuchos::toString(_resolution_x)
00140 + ", resolution_y=" + Teuchos::toString(_resolution_y)
00141 + ", resolution_z=" + Teuchos::toString(_resolution_z)
00142 +"]";}
00143
00144
00145
00146 virtual RCP<MeshSourceBase> getRcp() {return rcp(this);}
00147
00148
00149 protected:
00150
00151
00152 virtual Mesh fillMesh() const ;
00153
00154 private:
00155
00156
00157 double _position_x;
00158
00159 double _position_y;
00160
00161 double _position_z;
00162
00163 double _offset_x;
00164
00165 double _offset_y;
00166
00167 double _offset_z;
00168
00169 int _resolution_x;
00170
00171 int _resolution_y;
00172
00173 int _resolution_z;
00174
00175
00176 const RefinementClass refineClass_;
00177
00178
00179 const MeshDomainDef meshDomain_;
00180
00181
00182
00183 static const RefinementClass dummyRefineClass_;
00184
00185
00186 static const MeshDomainDef dummyMeshDomain_;
00187 };
00188 }
00189 #endif