Subroutine Type |
Utility/Data Access |
||||||||||||
Definition |
ANALYS is a utility subroutine that is capable of performing a specific type of analysis. The analysis type is specified as an argument. ANALYS may only be called from CONSUB. It is an error to call it from any other user-written subroutine. |
||||||||||||
Calling Syntax |
Fortran CALL ANALYS (ANALYSIS, NAME, TBEGIN, TEND, IFLAG, ISTAT)
C/C++ c_analys (char* analysis, char* name, double* tbegin, double* tend, int* iflag, int* istat);
Python istat = py_analys (analysis, name, tbegin, tend, iflag)
MATLAB istat = m_analys (analysis, name, tbegin, tend, iflag) |
||||||||||||
Input |
analysis |
character array |
Specifies the type of analysis that is to be performed. Valid options are:
Any other value for ANALYSIS will result in an error. |
||||||||||
name |
character array |
A brief description of the analysis. This string is associated with the requested analysis in when certain output files are generated. |
|||||||||||
tbegin |
double precision |
This specifies the start time of the simulation. When multiple analysis are being performed in CONSUB, TBEGIN is required to be set to the simulation time when ANALYS is invoked. |
|||||||||||
tend |
double precision |
This specifies the end time of the simulation. TEND > TBEGIN, otherwise MotionSolve will issue an error. |
|||||||||||
init |
integer |
This attribute is ignored by MotionSolve; it is present in the function signature for compatibility reasons only. |
|||||||||||
Output |
istat |
integer |
A flag that return the status of the call to ANALYS. ISTAT can have the following values: 0 = Success -1 = Failure: ANALYSIS was provided an invalid value. -9 = Failure: TBEGIN is not the same as the current simulation time -10 = Failure: TBEGIN > TEND |
||||||||||
Remarks |
|
||||||||||||
Example |
def consub (par, npar):
#Purpose of the CONSUB #This CONSUB performs 2 simulations: # 1. gravity = 1g (surface of Earth) # 2. gravity = 0.38g (surface of Mars)
# Behavior on Earth istat = py_datout() status = py_analys (“TRANSIENT”, "Simulation on Earth", 0.0, 1.0, 1)
# Behavior on Mars command = "ACCGRAV/IGRAV=0, JGRAV=0, KGRAV=-3.72742" istat = py_modify (command) istat = py_datout() status = py_analys (“TRANSIENT”, "Simulation on Mars", 1.0, 2.0, 1)
return status |
See Also: