mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
if only 1 locahl tree is set use the global one on all layers
This commit is contained in:
parent
154302605f
commit
842780feec
@ -3345,10 +3345,11 @@ namespace netgen
|
||||
|
||||
double Mesh :: GetH (const Point3d & p, int layer) const
|
||||
{
|
||||
const auto& lh = GetLocalH(layer);
|
||||
double hmin = hglob;
|
||||
if (lochfunc[layer-1])
|
||||
if (lh)
|
||||
{
|
||||
double hl = lochfunc[layer-1]->GetH (p);
|
||||
double hl = lh->GetH (p);
|
||||
if (hl < hglob)
|
||||
hmin = hl;
|
||||
}
|
||||
@ -3357,10 +3358,11 @@ namespace netgen
|
||||
|
||||
double Mesh :: GetMinH (const Point3d & pmin, const Point3d & pmax, int layer)
|
||||
{
|
||||
const auto& lh = GetLocalH(layer);
|
||||
double hmin = hglob;
|
||||
if (lochfunc[layer-1])
|
||||
if (lh)
|
||||
{
|
||||
double hl = lochfunc[layer-1]->GetMinH (pmin, pmax);
|
||||
double hl = lh->GetMinH (pmin, pmax);
|
||||
if (hl < hmin)
|
||||
hmin = hl;
|
||||
}
|
||||
|
@ -469,7 +469,12 @@ namespace netgen
|
||||
///
|
||||
LocalH & LocalHFunction (int layer=1) { return * lochfunc[layer-1]; }
|
||||
|
||||
shared_ptr<LocalH> GetLocalH(int layer=1) const { return lochfunc[layer-1]; }
|
||||
shared_ptr<LocalH> GetLocalH(int layer=1) const
|
||||
{
|
||||
if(lochfunc.Size() == 1)
|
||||
return lochfunc[0];
|
||||
return lochfunc[layer-1];
|
||||
}
|
||||
void SetLocalH(shared_ptr<LocalH> loch, int layer=1);
|
||||
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user