How to print values on gauss points

From KratosWiki
Revision as of 08:25, 3 May 2012 by Kazem (Talk | contribs)
Jump to: navigation, search

Following steps are necessary to be abale to print values on Gauss points:

1. Call PrintOnGaussPoints function of the gid_io with the variable that you want to see, i.e CONTACT_STICK, to the python file

 gid_io.PrintOnGaussPoints(CONTACT_STICK, self.model_part, time);

Note that the variable must be a double, a vector of doubles or a Matrix of doubles.

2. This function in his turn calls a function inside your element that is called GetValueOnIntegrationPoints.

This is an standard function of class of element and has 3 representatives for double, vector of doubles and Matrix of doubles.

One example of it can be found as ,

	void PfemContactElement3D::GetValueOnIntegrationPoints(const Variable<double>& rVariable, std::vector<double>& rValues, const ProcessInfo& rCurrentProcessInfo) {

if (rVariable == CONTACT_STICK) { for (unsigned int PointNumber = 0; PointNumber < 1; PointNumber++) { rValues[PointNumber] = double(this->GetValue(IS_CONTACT_MASTER)); } }


Personal tools