FEDEM Solver  R8.0
Source code of the dynamics solver
Modules | Functions/Subroutines
fmxWriter.f90 File Reference

Shared library wrapper for reading and writing FEDEM fmx files. More...

Modules

module  fmxwriter
 Module encapsulation of the IO_FMX subroutine.
 

Functions/Subroutines

subroutine fmxwriter::io_fmx (prefix, itype, data, nval, chkSum, ierr)
 Read/writes a double precision array from/to the specified fmx-file. More...
 
integer function writefmx (prefix, itype, data, nval)
 Writes a double precision array to the specified fmx-file. More...
 
integer function readfmx (prefix, itype, data, nval)
 Reads a double precision array from the specified fmx-file. More...
 
subroutine initfmx ()
 Initializes the Fortran file unit to be used for error messages. More...
 
integer function readfsm (prefix, ndof, ndof1, ndof2, nceq, nmmceq, meqn, meqn1, meqn2, mmceq, mpmceq, ttcc)
 Reads some SAM data arrays from the specified fsm-file. More...
 

Detailed Description

Shared library wrapper for reading and writing FEDEM fmx files.

Author
Knut Morten Okstad, SAP SE
Date
22 Nov 2019

Function/Subroutine Documentation

◆ initfmx()

subroutine initfmx

Initializes the Fortran file unit to be used for error messages.

◆ readfmx()

integer function readfmx ( character(len=*), intent(in)  prefix,
integer, intent(in)  itype,
double precision, dimension(*), intent(inout)  data,
integer, intent(in)  nval 
)

Reads a double precision array from the specified fmx-file.

Parameters
[in]prefixFile name prefix
[in]itypeMatrix type (1=stiffness, 2=mass, 3=gravity forces)
[out]dataArray with matrix content
[in]nvalSize of the data array
Returns
Error status. Negative value indicates an error, otherwise OK

◆ readfsm()

integer function readfsm ( character(len=*), intent(in)  prefix,
integer, intent(inout)  ndof,
integer, intent(inout)  ndof1,
integer, intent(inout)  ndof2,
integer, intent(inout)  nceq,
integer, intent(inout)  nmmceq,
integer, dimension(*), intent(out)  meqn,
integer, dimension(*), intent(out)  meqn1,
integer, dimension(*), intent(out)  meqn2,
integer, dimension(*), intent(out)  mmceq,
integer, dimension(*), intent(out)  mpmceq,
real(dp), dimension(*), intent(out)  ttcc 
)

Reads some SAM data arrays from the specified fsm-file.

Parameters
[in]prefixFile name prefix
ndofSize of the meqn array
ndof1Size of the meqn1 array
ndof2Size of the meqn2 array
nceqSize of the @ mpmceq array
nmmceqSize of the mmceq and ttcc arrays
[out]meqnMatrix of equation numbers for all DOFs
[out]meqn1Matrix of status 1 equation numbers
[out]meqn2Matrix of status 2 equation numbers
[out]mmceqMatrix of matrices of constraint equations
[out]mpmceqMatrix of pointers to matrices of constraint equations
[out]ttccTable of tables of constraint equation coefficients
Returns
Error status. Negative value indicates an error, otherwise OK

This function should be invoked twice. In the first call, prefix should point to the file to read from and the size parameters ndof, ndof1 ... nmmceq are extracted. The file remains open. Before the second call, the arrays meqn, meqn1 ... ttcc need to be allocated to the lenghts returned by the first call. These arrays are then read in the second call of this function (with a blank prefix argument).

◆ writefmx()

integer function writefmx ( character(len=*), intent(in)  prefix,
integer, intent(in)  itype,
double precision, dimension(*), intent(inout)  data,
integer, intent(in)  nval 
)

Writes a double precision array to the specified fmx-file.

Parameters
[in]prefixFile name prefix
[in]itypeMatrix type (1=stiffness, 2=mass, 3=gravity forces)
[in]dataArray with matrix content
[in]nvalSize of the data array
Returns
Error status. Negative value indicates an error, otherwise OK