udfGetPbcCrd()
Return the nodal coordinates for the periodic boundary condition.
Syntax
crd = udfGetPbcCrd( udfHd ) ;
Type
AcuSolve User-Defined Problem Boundary Condition
Parameters
- udfHd
- The opaque handle (pointer) which was passed to the user function.
Return Value
- crd (Real*)
- Pointer to three dimensional real array of nodal coordinates. The first (fastest) dimension of the array is the number of node-pairs, nItems, the second dimension is three for the x, y and z coordinates, and the third (slowest) is two for each of the two nodes in a node-pair.
Description
Real* crd ;
Real x_1, y_1, z_1, x_2, y_2, z_2 ;
Integer pair ;
...
crd = udfGetPbcCrd( udfHd ) ;
for ( pair = 0 ; pair < nItems ; pair++ ) {
/* first node in pair */
x_1 = crd[0*nItems+pair] ;
y_1 = crd[1*nItems+pair] ;
z_1 = crd[2*nItems+pair] ;
/* second node in pair */
x_2 = crd[3*nItems+pair] ;
y_2 = crd[4*nItems+pair] ;
z_2 = crd[5*nItems+pair] ;
...
}
Errors
- This routine expects a valid udfHd.
- This routine may only be called within a Periodic Boundary Condition user function.