Interface userdef_element_finish()

userdef_element_finish() is called once for all user defined elements when the analysis is ends.

1. User defined element type ELTYPE = EARTH

The interface is given as:

! ---------------------------------------------------------------------------
subroutine userdef_element_finish(c_ch_usrelname,c_ch_eltyp,c_ch_usrelinp, &
                                  c_ch_elid, iel, ierr) bind(c)
! ---------------------------------------------------------------------------
       import c_int, c_char
       type(c_ptr), value,     intent(in) :: instance
       character(kind=c_char), intent(in) :: c_ch_usrelname(*)
       character(kind=c_char), intent(in) :: c_ch_eltyp(*)
       character(kind=c_char), intent(in) :: c_ch_usrelinp(*)
       character(kind=c_char), intent(in) :: c_ch_elid(*)
       !
       integer(c_int), intent(in) :: iel
       integer(c_int), intent(out):: ierr
     end subroutine interface_userdef_finish

  end interface

  type(shared_library_t)          :: lib
  procedure(operation_i), pointer :: op_add
  procedure(interface_userdef_init)     , pointer :: op_usrel_init
  procedure(interface_userdef_calculate), pointer :: op_usrel_calculate
  procedure(interface_userdef_finish)   , pointer :: op_usrel_finish

1.1. Input and output data

A description of the input and output is given in Table 1.

Table 1. Input and output
Data Input/Output Type Size Description

instance

I

pointer

-

Pointer to model specific data

c_ch_usrelname

I

CH

*

Name of the dll

c_ch_eltyp

I

CH

8

Element type

  • EARTH is implemented

c_ch_usrelinp

I

CH

*

Input file for user defined element

c_ch_elid

I

CH

*

User defined id

iel

I

INT

-

Element number

ierr

IO

INT

-

Error flag