tem_aps_load_coupling Subroutine

public subroutine tem_aps_load_coupling(me, thandle, conf)

This routine loads coupling defintion from boundary condition table

Arguments

Type IntentOptional AttributesName
type(tem_aps_coupling_type), intent(out) :: me

Coupling description to be filled from config file

integer, intent(in) :: thandle

Boundary condition sub table

type(flu_State), intent(in) :: conf

Lua script to obtain the configuration data from.


Calls

proc~~tem_aps_load_coupling~~CallsGraph proc~tem_aps_load_coupling tem_aps_load_coupling proc~tem_abort tem_abort proc~tem_aps_load_coupling->proc~tem_abort interface~aot_get_val~2 aot_get_val proc~tem_aps_load_coupling->interface~aot_get_val~2 mpi_abort mpi_abort proc~tem_abort->mpi_abort

Called by

proc~~tem_aps_load_coupling~~CalledByGraph proc~tem_aps_load_coupling tem_aps_load_coupling proc~load_spacetime_predefined load_spacetime_predefined proc~load_spacetime_predefined->proc~tem_aps_load_coupling proc~tem_load_spacetime_single tem_load_spacetime_single proc~tem_load_spacetime_single->proc~load_spacetime_predefined proc~tem_load_spacetime_single->proc~tem_load_spacetime_single proc~tem_load_spacetime_table tem_load_spacetime_table proc~tem_load_spacetime_table->proc~tem_load_spacetime_single interface~tem_load_spacetime tem_load_spacetime interface~tem_load_spacetime->proc~tem_load_spacetime_single interface~tem_load_spacetime->proc~tem_load_spacetime_table proc~tem_variable_loadmapping_single tem_variable_loadMapping_single proc~tem_variable_loadmapping_single->interface~tem_load_spacetime program~tem_spacetime_fun_test tem_spacetime_fun_test program~tem_spacetime_fun_test->interface~tem_load_spacetime proc~tem_variable_load_single tem_variable_load_single proc~tem_variable_load_single->interface~tem_load_spacetime

Contents

Source Code


Source Code

  subroutine tem_aps_load_coupling(me, thandle, conf)
    ! -------------------------------------------------------------------------!
    !> Coupling description to be filled from config file
    type(tem_aps_coupling_type), intent(out) :: me
    !> Boundary condition sub table
    integer, intent(in) :: thandle
    !> Lua script to obtain the configuration data from.
    type(flu_State), intent(in) :: conf
    ! -------------------------------------------------------------------------!
    integer :: iError
    integer, allocatable :: vError(:)
    ! -------------------------------------------------------------------------!

    ! get the domain name with whom we want to couple
    call aot_get_val( L       = conf,            &
      &               thandle = thandle,         &
      &               key     = 'domain_from',   &
      &               val     = me%rem_domLabel, &
      &               ErrCode = iError           )
    if (iError .NE. 0) then
      write(logUnit(1),*) ' No coupling domain for the coupling boundary' &
        &                 //' is defined, coupling can not work, abort...'
      call tem_abort
    end if

    ! get the list of variables
    ! look for the request variable table
    call aot_get_val( val       = me%varNames,    &
      &               ErrCode   = vError,         &
      &               maxLength = 100,            &
      &               L         = conf,           &
      &               thandle   = thandle,        &
      &               key       = 'input_varname' )

    if ( any(btest(vError, aoterr_Fatal)) ) then
      write(logUnit(1),*) 'ERROR: could not input_varname for coupling variable'
      call tem_abort()
    end if

    me%nVars = size(me%varNames)

   end subroutine tem_aps_load_coupling