[Kratos] problem on integration points and weights

Pooyan pooyan en cimne.upc.edu
Lun Abr 23 17:42:20 CEST 2012


Hi,

Actually this was a static class initialization order fiasco. The problem
arise from the fact that in C++ there is no control in the initialization
order of the static variables and their order may change from one
compilation to other. So if you initialize one static variable with other
one this may lead to crash because the other one hasn't initialized yet. 
I have solve the problem as you mentioned but there is a better solution
given in http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.15 (which I
found long after fixing it).
But seems that there are some geometries which are not corrected yet.

Bests,

Pooyan.

-----Original Message-----
From: kratos-bounces en listas.cimne.upc.edu
[mailto:kratos-bounces en listas.cimne.upc.edu] On Behalf Of hbui
Sent: 23 April 2012 15:07
To: kratos en listas.cimne.upc.edu
Subject: [Kratos] problem on integration points and weights

Hi all,

Currently i'm facing a problem about integration on the
UnsaturatedSoilsElement_2phase_SmallStrain element (structural_application).
This element use Hexahedra3D20 geometry with
GeometryData::GI_GAUSS_3 as default integration rule. When i execute the
program and assert a watch on integration points & weights within element
CalculateAll routine, all values are zeros. I take a look on
HexahedraGaussianIntegrationPoints3 which define integration points for
hexahedra geometry and see the msIntegrationPoints variable is already
initialised statically in integration_rules.cpp. However in class
HexahedraGaussianIntegrationPoints2 just a little bit above there's a
comment "// This is added to solve the problem of static initialization. 
Pooyan." which declared explicitly the values of integration points
msIntegrationPoints must hold. I did the same thing for
HexahedraGaussianIntegrationPoints3 and observed that the Gauss points and
weights return correctly.
Realising this problem may relate other integration rules as well. I want to
clarify if someone has been facing this problem before and what should be
the rationale behind it? Is there any other viable solution instead of
changing integration codes for other geometry by which i don't want to do to
keep synchronisation with repository.

With best regards,
Giang Bui

_______________________________________________
Kratos mailing list
Kratos en listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/kratos



Más información sobre la lista de distribución Kratos