mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 12:50:34 +05:00
Curve mesh functionality over Ngx_Mesh
This commit is contained in:
parent
1629d6bf69
commit
66ef426c79
@ -276,6 +276,7 @@ namespace netgen
|
|||||||
// 3D only
|
// 3D only
|
||||||
// std::pair<int,int> GetBoundaryNeighbouringDomains (int bnr);
|
// std::pair<int,int> GetBoundaryNeighbouringDomains (int bnr);
|
||||||
|
|
||||||
|
DLL_HEADER void Curve (int order);
|
||||||
void Refine (NG_REFINEMENT_TYPE reftype,
|
void Refine (NG_REFINEMENT_TYPE reftype,
|
||||||
void (*taskmanager)(function<void(int,int)>) = &DummyTaskManager2,
|
void (*taskmanager)(function<void(int,int)>) = &DummyTaskManager2,
|
||||||
void (*tracer)(string, bool) = &DummyTracer2);
|
void (*tracer)(string, bool) = &DummyTracer2);
|
||||||
|
@ -1105,13 +1105,15 @@ void Ng_HighOrder (int order, bool rational)
|
|||||||
(&const_cast<Refinement&> (ng_geometry -> GetRefinement()),
|
(&const_cast<Refinement&> (ng_geometry -> GetRefinement()),
|
||||||
order, rational);
|
order, rational);
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
if (!mesh->GetGeometry())
|
if (!mesh->GetGeometry())
|
||||||
throw NgException ("don't have a geometry for mesh curving");
|
throw NgException ("don't have a geometry for mesh curving");
|
||||||
mesh->BuildCurvedElements
|
mesh->BuildCurvedElements
|
||||||
(&const_cast<Refinement&> (mesh->GetGeometry()->GetRefinement()),
|
(&const_cast<Refinement&> (mesh->GetGeometry()->GetRefinement()),
|
||||||
order, rational);
|
order, rational);
|
||||||
|
|
||||||
mesh -> SetNextMajorTimeStamp();
|
mesh -> SetNextMajorTimeStamp();
|
||||||
|
*/
|
||||||
|
mesh->BuildCurvedElements(order);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1040,6 +1040,11 @@ namespace netgen
|
|||||||
return ind-1;
|
return ind-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Ngx_Mesh :: Curve (int order)
|
||||||
|
{
|
||||||
|
NgLock meshlock (mesh->MajorMutex(), true);
|
||||||
|
mesh->BuildCurvedElements(order);
|
||||||
|
}
|
||||||
|
|
||||||
void Ngx_Mesh :: Refine (NG_REFINEMENT_TYPE reftype,
|
void Ngx_Mesh :: Refine (NG_REFINEMENT_TYPE reftype,
|
||||||
void (*task_manager)(function<void(int,int)>),
|
void (*task_manager)(function<void(int,int)>),
|
||||||
|
@ -5835,6 +5835,23 @@ namespace netgen
|
|||||||
SetNextMajorTimeStamp();
|
SetNextMajorTimeStamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Mesh :: BuildCurvedElements (int aorder)
|
||||||
|
{
|
||||||
|
if (!GetGeometry())
|
||||||
|
throw NgException ("don't have a geometry for mesh curving");
|
||||||
|
|
||||||
|
GetCurvedElements().BuildCurvedElements (&GetGeometry()->GetRefinement(), aorder, false);
|
||||||
|
|
||||||
|
for (SegmentIndex seg = 0; seg < GetNSeg(); seg++)
|
||||||
|
(*this)[seg].SetCurved (GetCurvedElements().IsSegmentCurved (seg));
|
||||||
|
for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++)
|
||||||
|
(*this)[sei].SetCurved (GetCurvedElements().IsSurfaceElementCurved (sei));
|
||||||
|
for (ElementIndex ei = 0; ei < GetNE(); ei++)
|
||||||
|
(*this)[ei].SetCurved (GetCurvedElements().IsElementCurved (ei));
|
||||||
|
|
||||||
|
SetNextMajorTimeStamp();
|
||||||
|
}
|
||||||
|
|
||||||
void Mesh :: SetMaterial (int domnr, const string & mat)
|
void Mesh :: SetMaterial (int domnr, const string & mat)
|
||||||
{
|
{
|
||||||
if (domnr > materials.Size())
|
if (domnr > materials.Size())
|
||||||
|
@ -716,6 +716,7 @@ namespace netgen
|
|||||||
{ return *curvedelems; }
|
{ return *curvedelems; }
|
||||||
|
|
||||||
DLL_HEADER void BuildCurvedElements (const class Refinement * ref, int aorder, bool arational = false);
|
DLL_HEADER void BuildCurvedElements (const class Refinement * ref, int aorder, bool arational = false);
|
||||||
|
DLL_HEADER void BuildCurvedElements (int aorder);
|
||||||
|
|
||||||
const class AnisotropicClusters & GetClusters () const
|
const class AnisotropicClusters & GetClusters () const
|
||||||
{ return *clusters; }
|
{ return *clusters; }
|
||||||
|
Loading…
Reference in New Issue
Block a user