MATRIX_READ
ModelingInputs a user-defined marker element.
Use
<Reference_Matrix
id = "301001"
usrsub_param_string = "USER(502,300,100,20,10,1)"
usrsub_dll_name = "NULL"
usrsub_fnc_name = "MATRIX_READ"
/>
Format
- Fortran Calling Syntax
-
SUBROUTINE MATRIX_READ (ID, PAR, NPAR, ERRFLG)
- C/C++ Calling Syntax
-
void STDCALL MATRIX_READ (int *id, double *par, int *npar, int *errflg)
- Python Calling Syntax
-
def MATRIX_READ(id, par, npar): return errflg
- MATLAB Calling Syntax
-
function eflg = MATRIX_READ(id, par, npar)
Attributes
- ID
- [integer]
- PAR
- [double precision]
- NPAR
- [integer]
- ERRFLAG
- [integer]
Example
def MARKER_READ(id, par, npar):
eflg = 0
errflg = 0
r = 3 *[0.0]
angle = 6*[0.0]
angle_type = int(par[0])
r[0] = par[1]
r[1] = par[2]
r[2] = par[3]
if angle_type==0: # DCMTX
angle[0] = par[4]
angle[1] = par[5]
angle[2] = par[6]
angle[3] = par[7]
angle[4] = par[8]
angle[5] = par[9]
elif (angle_type == 1) | (angle_type == 2):# Euler angles (313 or YPR)
angle[0] = par[4]
angle[1] = par[5]
angle[2] = par[6]
elif angle_type == 3: # Euler parameters
angle[0] = par[4]
angle[1] = par[5]
angle[2] = par[6]
angle[3] = par[7]
else:
errflg = 1;
return errflg
eflg = py_put_marker(id, r, angle_type, angle)
return errflg
Comments
- MATRIX_READ can only be
defined in a Reference_Matrix element. The ID of the
Reference_Matrix, defined with
MATRIX_READ, may be referenced as the matrix_id in the
Reference_ParamCurve element. For
example:
<Reference_ParamCurve id = "301001" is_u_closed = "TRUE" is_curve_points = "TRUE" matrix_id = "301001" />