Interface userdef_element_init()

userdef_element_init() is called once for all user defined elements when the analysis is starts.

1. User defined element type ELTYPE = EARTH

The interface is given as:

! ----------------------------------------------------------------------------
subroutine userdef_element_init(instance,c_ch_usrelname,c_ch_eltyp,                   &
                                c_ch_usrelinp ,c_ch_elid ,                   &
                                iel,init_xyz_iel,init_incli_i,               &
                                initial_depth_i,ldyn,ierr)  bind(c)
! ----------------------------------------------------------------------------
       import c_int, c_double, 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(*)
       !
       real(c_double), dimension(3), intent(in) :: init_xyz_iel
       real(c_double), intent(in) :: init_incli_i, initial_depth_i
       !
       integer(c_int), intent(in) :: iel
       integer(c_int), intent(in) :: ldyn
       integer(c_int), intent(out):: ierr

     end subroutine interface_userdef_init

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

init_xyz_iel

I

DOUBLE, ARRAY

3

Coordinates for element iel

see Figure 1

init_incli_iel

I

DOUBLE

-

Angle [radians] between the user element and the sea floor

see Figure 2

init_depth_iel

I

DOUBLE

-

depth for element iel (from mean water level)

see Figure 1

ldyn

I

INT

-

Flag, static or dynamic analysis

  • 0: static analysis

  • 1: linear analysis

  • 2: nonlinear analysis

  • 3: freq. domain analysis

ierr

IO

INT

-

Error flag

1.2. Parameter definitions

userel parameter definitions
Figure 1. Parameter definitions

1.3. Reference element

userel reference element
Figure 2. Reference element