bug fixes in Calc_LumpedElements
This commit is contained in:
parent
b6d62858cc
commit
8237d39ece
@ -238,11 +238,14 @@ unsigned int Operator::SnapToMeshLine(int ny, double coord, bool &inside, bool d
|
|||||||
|
|
||||||
bool Operator::SnapToMesh(const double* dcoord, unsigned int* uicoord, bool dualMesh, bool* inside) const
|
bool Operator::SnapToMesh(const double* dcoord, unsigned int* uicoord, bool dualMesh, bool* inside) const
|
||||||
{
|
{
|
||||||
|
bool meshInside=false;
|
||||||
bool ok=true;
|
bool ok=true;
|
||||||
for (int n=0; n<3; ++n)
|
for (int n=0; n<3; ++n)
|
||||||
{
|
{
|
||||||
uicoord[n] = SnapToMeshLine(n,dcoord[n],inside[n],dualMesh);
|
uicoord[n] = SnapToMeshLine(n,dcoord[n],meshInside,dualMesh);
|
||||||
ok &= inside[n];
|
ok &= meshInside;
|
||||||
|
if (inside)
|
||||||
|
inside[n]=meshInside;
|
||||||
}
|
}
|
||||||
// cerr << "Operator::SnapToMesh Wish: " << dcoord[0] << " " << dcoord[1] << " " << dcoord[2] << endl;
|
// cerr << "Operator::SnapToMesh Wish: " << dcoord[0] << " " << dcoord[1] << " " << dcoord[2] << endl;
|
||||||
// cerr << "Operator::SnapToMesh Found: " << discLines[0][uicoord[0]] << " " << discLines[1][uicoord[1]] << " " << discLines[2][uicoord[2]] << endl;
|
// cerr << "Operator::SnapToMesh Found: " << discLines[0][uicoord[0]] << " " << discLines[1][uicoord[1]] << " " << discLines[2][uicoord[2]] << endl;
|
||||||
@ -1243,15 +1246,15 @@ bool Operator::Calc_LumpedElements()
|
|||||||
if (R>0)
|
if (R>0)
|
||||||
kappa = 1 / R / unitGC;
|
kappa = 1 / R / unitGC;
|
||||||
if (C>0)
|
if (C>0)
|
||||||
|
{
|
||||||
epsilon = C / unitGC;
|
epsilon = C / unitGC;
|
||||||
|
|
||||||
if (epsilon< __EPS0__)
|
if (epsilon< __EPS0__)
|
||||||
{
|
{
|
||||||
cerr << "Operator::Calc_LumpedElements(): Warning: Lumped Element capacity is too small for its size! skipping. "
|
cerr << "Operator::Calc_LumpedElements(): Warning: Lumped Element capacity is too small for its size! skipping. "
|
||||||
<< " ID: " << prims.at(bn)->GetID() << " @ Property: " << PLE->GetName() << endl;
|
<< " ID: " << prims.at(bn)->GetID() << " @ Property: " << PLE->GetName() << endl;
|
||||||
C = 0;
|
C = 0;
|
||||||
if (isnan(R))
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (pos[ny]=uiStart[ny];pos[ny]<uiStop[ny];++pos[ny])
|
for (pos[ny]=uiStart[ny];pos[ny]<uiStop[ny];++pos[ny])
|
||||||
@ -1303,6 +1306,7 @@ bool Operator::Calc_LumpedElements()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
box->SetPrimitiveUsed(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user