udfGetElmContvar()
Return the element contravariant at the quadrature point.
Syntax
contvar = udfGetElmContvar( udfHd ) ;
Type
User Defined Element
Parameters
- udfHd
- The opaque handle (pointer) which was passed to the user function.
Return Value
- contvar (Real*)
- Pointer to two dimensional real array of the element contravariant. The first (fastest) dimension of the array is the number of elements, nItems, and the second (slower) dimension is six, for the xx, yy, zz, xy, yz and zx components.
Description
This routine returns the element contravariant at the quadrature point. The element contravariant is given by
where is the local parent element coordinate and is the global coordinate. The latter is for the current (deformed) configuration if mesh displacement is active. For example,
Examples
Real* contvar ;
Real xx_contvar, yy_contvar, zz_contvar ;
Real xy_contvar, yz_contvar, zx_contvar ;
Integer elem ;
...
contvar = udfGetElmContvar( udfHd ) ;
for ( elem = 0 ; elem < nItems ; elem++ ) {
xx_contvar = contvar[0*nItems+elem] ;
yy_contvar = contvar[1*nItems+elem] ;
zz_contvar = contvar[2*nItems+elem] ;
xy_contvar = contvar[3*nItems+elem] ;
yz_contvar = contvar[4*nItems+elem] ;
zx_contvar = contvar[5*nItems+elem] ;
...
}
Errors
- This routine expects a valid udfHd.
- This routine may only be called within a Body Force, Material Model or Component Model user function.