Subroutine Type |
Modeling |
||
Definition |
Used to specify a user defined curve element and its derivatives for a reference curve element. User defined curves are typically used in conjunction with point-to-curve, curve-to-curve, and curve-to-surface constraints. |
||
Use |
User defined reference parameter curve using a curve computed in a CURSUB: |
||
<Reference_ParamCurve id = "111" is_u_closed = "TRUE" u_start = "-1." u_end = "1." usrsub_param_string = "USER(100)" usrsub_dll_name = "NULL"> </Reference_ParamCurve> |
|||
Calling Syntax |
Fortran SUBROUTINE CURSUB (ID, PAR, NPAR, ALPHA, IORD, IFLAG, VALUES)
C void STDCALL CURSUB (int *id, double *par, int *npar, double *alpha, int *iord, int *iflag, double *values)
Python def CURSUB(id, par, npar, alpha, iord, iflag): return values
MATLAB function values = CURSUB(id, par, npar, alpha, iord, iflag) |
||
Input Arguments |
[integer] ID |
The curve subroutine element identifier. |
|
[double precision] PAR |
An array that contains the constant arguments from the list provided in the user-defined statement. |
||
[integer] NPAR |
The number of entries in the PAR array. |
||
[double precision] ALPHA |
The value of the independent variable a used by the curve subroutine to evaluate the curve. |
||
[logical] IFLAG |
The initialization flag. |
||
[integer] IORD |
The order of the derivative that the curve subroutine returns. |
||
|
0 |
The curve coordinates. |
|
|
1 |
The curve first derivative with respect to the curvilinear coordinate ALPHA. |
|
|
2 |
The curve second derivative with respect to the curvilinear coordinate ALPHA. |
|
Output Values |
[double precision] VALUES |
The vector output value of dimension 3 that contains the x, y, and z coordinates of the generated curve. Or, the first/second derivatives with respect to ALPHA, according to the IORD input parameter. |
|
Example |
def CURSUB(id, par, npar, alpha, iord, iflag): values = 3*[0.0] if iord == 0: values[0] = par[0]*cos((alpha+1.0)*pi) values[1] = 0 values[2] = par[0]*sin((alpha+1.0)*pi) return values |