move some stuff to base geometry

This commit is contained in:
Christopher Lackner 2019-10-24 13:17:00 +02:00
parent c127711d4d
commit 36e56e5d6c
3 changed files with 21 additions and 1 deletions

View File

@ -37,5 +37,6 @@ install(FILES
localh.hpp meshclass.hpp meshfunc.hpp meshing2.hpp meshing3.hpp localh.hpp meshclass.hpp meshfunc.hpp meshing2.hpp meshing3.hpp
meshing.hpp meshtool.hpp meshtype.hpp msghandler.hpp paralleltop.hpp meshing.hpp meshtool.hpp meshtype.hpp msghandler.hpp paralleltop.hpp
ruler2.hpp ruler3.hpp specials.hpp topology.hpp validate.hpp ruler2.hpp ruler3.hpp specials.hpp topology.hpp validate.hpp
python_mesh.hpp
DESTINATION ${NG_INSTALL_DIR_INCLUDE}/meshing COMPONENT netgen_devel DESTINATION ${NG_INSTALL_DIR_INCLUDE}/meshing COMPONENT netgen_devel
) )

View File

@ -10,6 +10,23 @@ namespace netgen
GeometryRegister :: ~GeometryRegister() GeometryRegister :: ~GeometryRegister()
{ ; } { ; }
void NetgenGeometry :: Analyse(Mesh& mesh,
const MeshingParameters& mparam)
{
static Timer t1("SetLocalMeshsize"); RegionTimer regt(t1);
mesh.SetGlobalH(mparam.maxh);
mesh.SetMinimalH(mparam.minh);
mesh.SetLocalH(bounding_box.PMin(), bounding_box.PMax(),
mparam.grading);
if(mparam.uselocalh)
{
// TODO set local h
}
mesh.LoadLocalMeshSize(mparam.meshsizefilename);
}
void NetgenGeometry :: OptimizeSurface(Mesh& mesh, const MeshingParameters& mparam) void NetgenGeometry :: OptimizeSurface(Mesh& mesh, const MeshingParameters& mparam)
{ {
const auto savetask = multithread.task; const auto savetask = multithread.task;

View File

@ -16,6 +16,8 @@ namespace netgen
class DLL_HEADER NetgenGeometry class DLL_HEADER NetgenGeometry
{ {
unique_ptr<Refinement> ref; unique_ptr<Refinement> ref;
protected:
Box<3> bounding_box;
public: public:
NetgenGeometry() NetgenGeometry()
{ {
@ -35,7 +37,7 @@ namespace netgen
virtual Mesh::GEOM_TYPE GetGeomType() const { return Mesh::NO_GEOM; } virtual Mesh::GEOM_TYPE GetGeomType() const { return Mesh::NO_GEOM; }
virtual void Analyse(Mesh& mesh, virtual void Analyse(Mesh& mesh,
const MeshingParameters& mparam) {} const MeshingParameters& mparam);
virtual void FindEdges(Mesh& mesh, const MeshingParameters& mparam) {} virtual void FindEdges(Mesh& mesh, const MeshingParameters& mparam) {}
virtual void MeshSurface(Mesh& mesh, const MeshingParameters& mparam) {} virtual void MeshSurface(Mesh& mesh, const MeshingParameters& mparam) {}
virtual void OptimizeSurface(Mesh& mesh, const MeshingParameters& mparam); virtual void OptimizeSurface(Mesh& mesh, const MeshingParameters& mparam);