Initialize

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
Line 3: Line 3:
 
  KRATOS_TRY
 
  KRATOS_TRY
 
   const GeometryType::IntegrationPointsArrayType& integration_points = GetGeometry().IntegrationPoints();
 
   const GeometryType::IntegrationPointsArrayType& integration_points = GetGeometry().IntegrationPoints();
 +
 
   //resizing jacobian inverses containers
 
   //resizing jacobian inverses containers
 
    
 
    
Line 8: Line 9:
 
   mDetJ0.resize(integration_points.size());
 
   mDetJ0.resize(integration_points.size());
 
   GeometryType::JacobiansType J0;
 
   GeometryType::JacobiansType J0;
J0 = GetGeometry().Jacobian(J0);   
+
  J0 = GetGeometry().Jacobian(J0);   
mTotalDomainInitialSize = 0.00;
+
  mTotalDomainInitialSize = 0.00;
 
+
if(mConstitutiveLawVector.size() == 0)
+
  if(mConstitutiveLawVector.size() == 0)
 
{
 
{
 
mConstitutiveLawVector.resize(integration_points.size());
 
mConstitutiveLawVector.resize(integration_points.size());

Revision as of 15:48, 28 November 2007

void LinearElement::Initialize()
{
KRATOS_TRY
 const GeometryType::IntegrationPointsArrayType& integration_points = GetGeometry().IntegrationPoints();

 //resizing jacobian inverses containers
 
 mInvJ0.resize(integration_points.size());
 mDetJ0.resize(integration_points.size());
 GeometryType::JacobiansType J0;
 J0 = GetGeometry().Jacobian(J0);  
 mTotalDomainInitialSize = 0.00;

 if(mConstitutiveLawVector.size() == 0)

{ mConstitutiveLawVector.resize(integration_points.size()); InitializeMaterial(); }

//calculating the inverse J0 for(unsigned int PointNumber = 0; PointNumber<integration_points.size(); PointNumber++) { //getting informations for integration double IntegrationWeight = integration_points[PointNumber].Weight(); //calculating and storing inverse of the jacobian and the parameters needed

MathUtils<double>::InvertMatrix(J0[PointNumber],mInvJ0[PointNumber],mDetJ0[PointNumber]);


//calculating the total area

mTotalDomainInitialSize += mDetJ0[PointNumber]*IntegrationWeight;

}

KRATOS_CATCH("")

}

Personal tools
Categories