2009-08-24 06:03:40 +06:00
|
|
|
#ifndef FILE_BASEGEOM
|
|
|
|
#define FILE_BASEGEOM
|
|
|
|
|
|
|
|
/**************************************************************************/
|
|
|
|
/* File: basegeom.hpp */
|
|
|
|
/* Author: Joachim Schoeberl */
|
|
|
|
/* Date: 23. Aug. 09 */
|
|
|
|
/**************************************************************************/
|
|
|
|
|
2011-03-03 01:50:39 +05:00
|
|
|
|
|
|
|
struct Tcl_Interp;
|
2011-01-11 01:18:01 +05:00
|
|
|
|
|
|
|
namespace netgen
|
|
|
|
{
|
2009-08-24 06:03:40 +06:00
|
|
|
|
2011-03-04 02:42:20 +05:00
|
|
|
class DLL_HEADER NetgenGeometry
|
2011-03-03 01:50:39 +05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~NetgenGeometry () { ; }
|
2009-08-25 20:00:20 +06:00
|
|
|
|
2016-12-05 17:50:21 +05:00
|
|
|
virtual int GenerateMesh (shared_ptr<Mesh> & mesh, MeshingParameters & mparam);
|
2009-08-25 20:00:20 +06:00
|
|
|
|
2011-03-03 01:50:39 +05:00
|
|
|
virtual const Refinement & GetRefinement () const;
|
2011-01-11 01:18:01 +05:00
|
|
|
|
2019-10-02 20:20:13 +05:00
|
|
|
virtual void DoArchive(Archive&)
|
2018-12-14 16:01:58 +05:00
|
|
|
{ throw NgException("DoArchive not implemented for " + Demangle(typeid(*this).name())); }
|
|
|
|
|
2019-10-02 20:20:13 +05:00
|
|
|
virtual Mesh::GEOM_TYPE GetGeomType() const { return Mesh::NO_GEOM; }
|
|
|
|
virtual void Analyse(Mesh& mesh,
|
|
|
|
const MeshingParameters& mparam) {}
|
|
|
|
virtual void FindEdges(Mesh& mesh, const MeshingParameters& mparam) {}
|
|
|
|
virtual void MeshSurface(Mesh& mesh, const MeshingParameters& mparam) {}
|
|
|
|
virtual void OptimizeSurface(Mesh& mesh, const MeshingParameters& mparam) {}
|
|
|
|
virtual void FinalizeMesh(Mesh& mesh) const {}
|
2011-03-03 01:50:39 +05:00
|
|
|
virtual void Save (string filename) const;
|
2011-08-29 16:09:11 +06:00
|
|
|
virtual void SaveToMeshFile (ostream & /* ost */) const { ; }
|
2011-03-03 01:50:39 +05:00
|
|
|
};
|
2009-08-24 06:03:40 +06:00
|
|
|
|
|
|
|
|
2010-03-23 17:52:07 +05:00
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-04 02:42:20 +05:00
|
|
|
class DLL_HEADER GeometryRegister
|
2011-03-03 01:50:39 +05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~GeometryRegister();
|
|
|
|
virtual NetgenGeometry * Load (string filename) const = 0;
|
2011-08-29 16:09:11 +06:00
|
|
|
virtual NetgenGeometry * LoadFromMeshFile (istream & /* ist */) const { return NULL; }
|
|
|
|
virtual class VisualScene * GetVisualScene (const NetgenGeometry * /* geom */) const
|
2011-03-03 01:50:39 +05:00
|
|
|
{ return NULL; }
|
2011-08-29 16:09:11 +06:00
|
|
|
virtual void SetParameters (Tcl_Interp * /* interp */) { ; }
|
2011-03-03 01:50:39 +05:00
|
|
|
};
|
|
|
|
|
2019-07-09 13:39:16 +05:00
|
|
|
class DLL_HEADER GeometryRegisterArray : public NgArray<GeometryRegister*>
|
2013-02-06 18:55:20 +06:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~GeometryRegisterArray()
|
|
|
|
{
|
|
|
|
for (int i = 0; i < Size(); i++)
|
|
|
|
delete (*this)[i];
|
|
|
|
}
|
2018-05-12 12:16:02 +05:00
|
|
|
|
|
|
|
virtual shared_ptr<NetgenGeometry> LoadFromMeshFile (istream & ist) const;
|
2013-02-06 18:55:20 +06:00
|
|
|
};
|
|
|
|
|
2019-07-09 13:39:16 +05:00
|
|
|
// extern DLL_HEADER NgArray<GeometryRegister*> geometryregister;
|
2013-02-06 18:55:20 +06:00
|
|
|
extern DLL_HEADER GeometryRegisterArray geometryregister;
|
2011-01-11 01:18:01 +05:00
|
|
|
}
|
|
|
|
|
2010-03-23 17:52:07 +05:00
|
|
|
|
|
|
|
|
2009-08-24 06:03:40 +06:00
|
|
|
#endif
|