2009-01-12 23:40:13 +00:00
|
|
|
#ifndef BISECT
|
|
|
|
#define BISECT
|
|
|
|
|
|
|
|
class BisectionOptions
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
const char * outfilename;
|
|
|
|
const char * mlfilename;
|
|
|
|
const char * refinementfilename;
|
|
|
|
const char * femcode;
|
|
|
|
int maxlevel;
|
|
|
|
int usemarkedelements;
|
|
|
|
bool refine_hp;
|
|
|
|
bool refine_p;
|
2016-08-18 00:48:27 +02:00
|
|
|
TaskManager task_manager = &DummyTaskManager;
|
2018-01-04 10:43:22 +01:00
|
|
|
Tracer tracer = &DummyTracer;
|
2015-10-19 10:08:30 +02:00
|
|
|
DLL_HEADER BisectionOptions ();
|
2009-01-12 23:40:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class ZRefinementOptions
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
int minref;
|
2015-10-19 10:08:30 +02:00
|
|
|
DLL_HEADER ZRefinementOptions();
|
2009-01-12 23:40:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-19 10:08:30 +02:00
|
|
|
DLL_HEADER extern void BisectTetsCopyMesh (Mesh &, const NetgenGeometry *,
|
2009-01-12 23:40:13 +00:00
|
|
|
BisectionOptions & opt);
|
|
|
|
|
2015-10-19 10:08:30 +02:00
|
|
|
DLL_HEADER extern void ZRefinement (Mesh &, const class NetgenGeometry *,
|
2009-01-12 23:40:13 +00:00
|
|
|
ZRefinementOptions & opt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-03 21:42:20 +00:00
|
|
|
class DLL_HEADER Refinement
|
2009-01-12 23:40:13 +00:00
|
|
|
{
|
|
|
|
MeshOptimize2d * optimizer2d;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Refinement ();
|
|
|
|
virtual ~Refinement ();
|
|
|
|
|
2009-08-25 14:00:20 +00:00
|
|
|
void Refine (Mesh & mesh) const;
|
2009-01-12 23:40:13 +00:00
|
|
|
void Refine (Mesh & mesh);
|
2019-07-09 10:39:16 +02:00
|
|
|
void Bisect (Mesh & mesh, class BisectionOptions & opt, NgArray<double> * quality_loss = NULL) const;
|
2010-09-14 21:21:04 +00:00
|
|
|
|
|
|
|
void MakeSecondOrder (Mesh & mesh) const;
|
2009-01-12 23:40:13 +00:00
|
|
|
void MakeSecondOrder (Mesh & mesh);
|
|
|
|
|
|
|
|
virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint,
|
|
|
|
int surfi,
|
|
|
|
const PointGeomInfo & gi1,
|
|
|
|
const PointGeomInfo & gi2,
|
2011-01-10 20:18:01 +00:00
|
|
|
Point<3> & newp, PointGeomInfo & newgi) const;
|
2009-01-12 23:40:13 +00:00
|
|
|
|
|
|
|
virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint,
|
|
|
|
int surfi1, int surfi2,
|
|
|
|
const EdgePointGeomInfo & ap1,
|
|
|
|
const EdgePointGeomInfo & ap2,
|
2011-01-10 20:18:01 +00:00
|
|
|
Point<3> & newp, EdgePointGeomInfo & newgi) const;
|
2009-01-12 23:40:13 +00:00
|
|
|
|
|
|
|
virtual Vec<3> GetTangent (const Point<3> & p, int surfi1, int surfi2,
|
|
|
|
const EdgePointGeomInfo & egi) const;
|
|
|
|
|
|
|
|
virtual Vec<3> GetNormal (const Point<3> & p, int surfi1,
|
|
|
|
const PointGeomInfo & gi) const;
|
|
|
|
|
|
|
|
|
2011-01-10 20:18:01 +00:00
|
|
|
virtual void ProjectToSurface (Point<3> & p, int surfi) const;
|
2009-01-12 23:40:13 +00:00
|
|
|
|
2019-06-03 09:04:33 +02:00
|
|
|
virtual void ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & /* gi */) const
|
2009-01-12 23:40:13 +00:00
|
|
|
{
|
|
|
|
ProjectToSurface (p, surfi);
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void ProjectToEdge (Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & egi) const;
|
|
|
|
|
|
|
|
|
|
|
|
void ValidateSecondOrder (Mesh & mesh);
|
|
|
|
void ValidateRefinedMesh (Mesh & mesh,
|
2019-07-09 10:39:16 +02:00
|
|
|
NgArray<INDEX_2> & parents);
|
2009-01-12 23:40:13 +00:00
|
|
|
|
2011-01-10 20:18:01 +00:00
|
|
|
MeshOptimize2d * Get2dOptimizer(void) const
|
2009-01-12 23:40:13 +00:00
|
|
|
{
|
|
|
|
return optimizer2d;
|
|
|
|
}
|
|
|
|
void Set2dOptimizer(MeshOptimize2d * opti)
|
|
|
|
{
|
|
|
|
optimizer2d = opti;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
virtual void LocalizeEdgePoints(Mesh & /* mesh */) const {;}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|