Initialize

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
Line 21: Line 21:
 
   
 
   
 
       for(unsigned int PointNumber = 0; PointNumber<integration_points.size(); PointNumber++)
 
       for(unsigned int PointNumber = 0; PointNumber<integration_points.size(); PointNumber++)
{
+
{
//getting informations for integration
+
//getting informations for integration
double IntegrationWeight = integration_points[PointNumber].Weight();
+
double IntegrationWeight = integration_points[PointNumber].Weight();
//calculating and storing inverse of the jacobian and the parameters needed
+
//calculating and storing inverse of the jacobian and the parameters needed
 
+
MathUtils<double>::InvertMatrix(J0[PointNumber],mInvJ0[PointNumber],mDetJ0[PointNumber]);
+
MathUtils<double>::InvertMatrix(J0[PointNumber],mInvJ0[PointNumber],mDetJ0[PointNumber]);
 
+
 
+
 
+
//calculating the total area
+
  //calculating the total area
 
+
mTotalDomainInitialSize += mDetJ0[PointNumber]*IntegrationWeight;
+
mTotalDomainInitialSize += mDetJ0[PointNumber]*IntegrationWeight;
 
+
}
+
}
 
+
KRATOS_CATCH("")
+
KRATOS_CATCH("")
 
+
}
+
}

Revision as of 15:52, 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