1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0022550: Fixing data races

This commit is contained in:
KGV
2012-01-27 14:12:59 +00:00
committed by bugmaster
parent 46921bd5c8
commit 41194117bf
62 changed files with 1170 additions and 1274 deletions

View File

@@ -139,5 +139,6 @@ fields
ddu : Real[10];
ddv : Real[10];
maxConstraintOrder : Integer;
PolynomialPartOnly : Boolean;
PolynomialPartOnly : Boolean;
Uold, Vold, U2, R, L : Real; -- these fields should be mutable
end;

View File

@@ -25,11 +25,15 @@
//purpose :
//=======================================================================
Plate_Plate::Plate_Plate() :
order(0), n_el(0), n_dim(0),
solution(0),points(0),deru(0),derv(0),
OK(Standard_False),maxConstraintOrder(0)
Plate_Plate::Plate_Plate()
: order(0), n_el(0), n_dim(0),
solution(0),points(0),deru(0),derv(0),
OK(Standard_False),maxConstraintOrder(0),
Uold (1.e20),
Vold (1.e20),
U2 (0.0),
R (0.0),
L (0.0)
{
PolynomialPartOnly = Standard_False;
}
@@ -39,10 +43,15 @@ Plate_Plate::Plate_Plate() :
//purpose :
//=======================================================================
Plate_Plate::Plate_Plate(const Plate_Plate& Ref) :
order(Ref.order),n_el(Ref.n_el),n_dim(Ref.n_dim),
solution(0),points(0),deru(0),derv(0),
OK(Ref.OK)
Plate_Plate::Plate_Plate(const Plate_Plate& Ref)
: order(Ref.order),n_el(Ref.n_el),n_dim(Ref.n_dim),
solution(0),points(0),deru(0),derv(0),
OK (Ref.OK),
Uold (1.e20),
Vold (1.e20),
U2 (0.0),
R (0.0),
L (0.0)
{
Standard_Integer i;
if (Ref.OK) {
@@ -1042,19 +1051,10 @@ gp_XYZ Plate_Plate::EvaluateDerivative(const gp_XY& point2d, const Standard_Inte
// of Laplcian at the power order
//=======================================================================
static Standard_Real Uold = 1.e20;
static Standard_Real Vold = 1.e20;
static Standard_Real U2=0;
static Standard_Real R=0;
static Standard_Real L=0;
Standard_Real Plate_Plate::SolEm(const gp_XY& point2d, const Standard_Integer iu, const Standard_Integer iv) const
{
// Standard_Real U2;
// Standard_Real R;
// Standard_Real L;
//
Plate_Plate* aThis = const_cast<Plate_Plate*>(this);
Standard_Real U,V;
Standard_Integer IU,IV;
@@ -1081,18 +1081,18 @@ Standard_Real Plate_Plate::SolEm(const gp_XY& point2d, const Standard_Integer iu
}
else
{
Uold = U;
Vold = V;
U2 = U*U;
R = U2+V*V;
aThis->Uold = U;
aThis->Vold = V;
aThis->U2 = U*U;
aThis->R = U2+V*V;
if (R<1.e-20) return 0;
L = log(R);
aThis->L = log(R);
}
Standard_Real DUV = 0;
Standard_Integer m = order;
Standard_Integer mm1 = m-1;
Standard_Real &r = R;
Standard_Real &r = aThis->R;
//Standard_Real pr = pow(R, mm1 - IU - IV);