Adams Basic Package > Adams Solver > Adams Solver C++ vs. FORTRAN > Side-to-side C++/FORTRAN comparison

Side-to-side C++/FORTRAN comparison

The following tables show a side-to-side comparison of statements, commands, functions and subroutine options available only in one code.

Statements comparison

 
STATEMENT
C++
FORTRAN
BEAM
Geometrically nonlinear formulation available
N/A
CONTACT
Flexible-flexible contact available
N/A
CLEARANCE
Distance between two or more geometries
N/A
ENVIRONMENT
Utility to set environment variables
N/A
EQUILIBRIUM
N/A
Dynamic option to find static equilibrium
FE_PART
Finite element beam elements natively supported
N/A
FIELD
Geometrically nonlinear formulation available
N/A
GSE
Implicit equations support
N/A
FLEX_BODY
Dynamic limit, stability, DB_FILE, representation, and BDF_FILE, number of threads, FEA_MEM_SETTINGS, BUFFER_SIZE and COMPUTE_RESOURCE for nonlinear finite element simulations.
N/A
GCON
Generalized user-defined constraint
N/A
INTEGRATOR
HHT, NEWMARK options.
N/A
 
FIXIT, HRATIO and MAXERR options for fixed step integration.
N/A
 
N/A
CONSTANT_BDF, ABAM, RKF45
LSOLVER
UMF package support
N/A
MARKER
Support for curve and surface MARKERs
N/A
 
Support for specifying multiple or no NODE_ID.
N/A
MFORCE
Nonlinear definitions available
N/A
MOTION
Function depending on any state
N/A
PART
Support for 2D PARTs
N/A
PREFERENCES
Additional options
N/A
PSTATE
Support for defining user-defined linearization states
N/A
SURFACE
Surface definition
N/A
UCON
N/A
User-defined constraint

Commands comparison

 
COMMAND
C++
FORTRAN
ACTIVATE
More options available
N/A
DEACTIVATE
More options available
N/A
ENVIRONMENT
Utility to set environment variables
N/A
GCON
User-defined constraints
N/A
LINEAR
More options like RM, PSTATE, EXPORT
N/A
LSOLVER
Option to select UMF
 
PART
Option to set the products of inertia
N/A
RELOAD
Option to reload from a buffer in memory
N/A
SAVE
Option to save to a buffer in memory
N/A
SIMULATE
Settle simulation option
N/A
UCON
N/A
Option to redefine a user-defined constraint

Function comparison

 
FUNCTION
C++
FORTRAN
ACCXYZ
3D acceleration
N/A
AO
Isolates expression from reaction force in GCON
N/A
*CLEAR*
Set of measures for CLEARANCE statement
N/A
DELAY
Defines a delay differential equation
N/A
DXYZ
3D position
N/A
FXYZ
3D force
N/A
NJAC
Utility. Number of Jacobian evaluations
N/A
NRHS
Utility. Number of right-hand side evaluations
N/A
ORDER
Utility. Returns current integration order.
N/A
Q
Modal position
N/A
QDDOT
Modal acceleration
N/A
QDOT
Modal velocity
N/A
TXYZ
3D torque
N/A
UV
Unit vector
N/A
UVX
X component of unit vector
N/A
UVY
Y component of unit vector
N/A
UVZ
Z component of unit vector
N/A
VXYZ
3D velocity
N/A
WDTXYZ
3D angular acceleration
N/A
WXYZ
3D angular velocity
N/A

Utility subroutines comparison

 
UTILITY SUBROUTINE
C++
FORTRAN
ADAMS_DECLARE_THREAD_SAFE
Allows multiple threads to access user-written subroutines
N/A
ADAMS_SMP_GROUP
Allows multiple threads to access user-written subroutines
N/A
CBKSUB
Callback subroutine. Informs user about milestones.
N/A
GTCMAT
Allowed to be called from all simulation types
Limited to static/quasistatic simulations.
SYSPAR
Provides analytical partials from within user-written subroutines
Limited to GSE only.
UCOVAR
N/A
Used by UCOSUB
GSE_SET_IMPLICIT
Allows defining implicit GSE
N/A
UCOSUB
N/A
Used to define user-written subroutines.

Other differences

Other differences include:
1. The C++ solver computes the Jacobian and right-hand-entries of all matrices using symbolic computer algebra. The FORTRAN solver uses numerical differencing.
2. PART command in the C++ solver will generate a Jacobian refactorization.
3. FLEX_BODY's invar2 and invar3 are identically zero in the C++ solver. This means the formulation of the equations of motion for flexible bodies are different.
4. YPR and Euler measures in results may be different in both solvers but they define the same orientation.
5. The C++ solver does not generate an *.out file.
6. There are differences in the wording and structure of the *.msg file.
7. The LINEAR command behaves differently. History rules have been relaxed to provide a more analytical approach in the C++ solver.
8. Velocity reconciliation is done iteratively in the C++ solver. Given that GCONs can be used to create velocity constraints, the reconciliation solution is no longer a linear problem, hence the solution is iterative.
9. In the C++ solver, numerical differencing of user-written subroutines is done by perturbing the measures and using the chain rule. The FORTRAN solver perturbs the states when computing partial derivatives.
10.  The C++ solver accepts a new signature in all use-written subroutines where the IFLAG parameter is of type INTEGER (FORTRAN) or int (C++) instead of BOOLEAN (F77).
11.  The solution sequences implemented in the C++ solver are in general not identical to the ones implemented in the FORTRAN solver. One such difference is related to the number of equations in the assembly of the equations of motion for the dynamic simulations. In dynamic simulations, the FORTRAN solver defines additional equations labelled momenta equations in order to make the system sparser. The C++ solver does not create momenta equations by default. Users may set the environment variable MSC_ADAMS_USE_MOMENTA to mimic the FORTRAN solver's behavior.