next up previous contents
Next: Reading a user section Up: Adding a user subsection Previous: Example   Contents

Detailed API

The following subroutines are part of the Class User Section API. The interface module named class_user_interfaces MUST be used in the calling program or subroutines:

Finally, the calling sequence of the user's transfer routine must be of the following form:

subroutine toclass(data,version,error)
  type(  ),        intent(in)    :: data     ! The data to be transfered to Class
  integer(kind=4), intent(in)    :: version  ! The version of the data
  logical,         intent(inout) :: error    ! Logical error flag
The name of this subroutine is to be defined by the user. The data type can be of any kind provided by the user. The purpose of this routine is to send the data elements to CLASS in a given order. The advantage of this mechanism is to leave CLASS compute the whole data size and store it as its will. The counterpart is that the order must be then exactly respected in the other parts of the user code, e.g. in the reading subroutine fromclass defined hereafter. Furthermore, the CLASS API does not allow to read only one element in the data.


next up previous contents
Next: Reading a user section Up: Adding a user subsection Previous: Example   Contents
Gildas manager 2014-07-01