MARKER_READ

ModelingInputs a user-defined marker element.

Use

<Reference_Marker
     id                  = "30102040"
     label               = "Joint 3-Marker I"
     body_id             = "30102"
     body_type           = "RigidBody"
     usrsub_param_string = "USER(1,-0.5, 0.3, 0., 1.57079633, 1.57079633, -1.57079633)"
     usrsub_dll_name     = "NULL"
     usrsub_fnc_name     = "MARKER_READ"
/>

Format

Fortran Calling Syntax
SUBROUTINE MARKER_READ (ID, PAR, NPAR, ERRFLG)
C/C++ Calling Syntax
void STDCALL MARKER_READ (int *id, double *par, int *npar, int *errflg)
Python Calling Syntax
def MARKER_READ(id, par, npar):
    return function errflg = MARKER_READ(id, par, npar)
MATLAB Calling Syntax
function errflg = MARKER_READ(id, par, npar)

Attributes

ID
[integer]
The marker element identifier.
PAR
[double precision]
An array that contains the constant arguments from the list provided in the user-defined statement.
NPAR
[integer]
The number of entries in the PAR array.
ERRFLAG
[integer]
The error flag.

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

  1. MARKER_READ can only be defined in a Reference_Marker element. The MARKER_READ function is called only once during solver initialization to get the marker position and orientation for the analysis. MARKER_READ works similar to SPLINE_READ.