10#include "scaleFElib.h"
30 integer,
allocatable :: list(:)
31 real(rp),
allocatable :: val(:)
32 character(len=H_SHORT) :: tag
34 procedure :: init => meshbndinfo_init
35 procedure :: final => meshbndinfo_final
36 procedure,
private :: set_by_id => meshbndinfo_set_by_id
37 procedure,
private :: set_by_name => meshbndinfo_set_by_name
38 generic :: set => set_by_id, set_by_name
69 subroutine meshbndinfo_init(this, list_size, tag)
70 use scale_const,
only: &
71 undef8 => const_undef8
74 integer,
intent(in) :: list_size
75 character(*),
optional,
intent(in) :: tag
80 allocate( this%list(list_size) )
81 allocate( this%val(list_size) )
90 if (
present(tag))
then
97 end subroutine meshbndinfo_init
101 subroutine meshbndinfo_final(this)
106 if (
allocated(this%list))
then
108 deallocate(this%list)
110 if (
allocated(this%val))
then
115 end subroutine meshbndinfo_final
118 subroutine meshbndinfo_set_by_id(this, is, ie, bnd_type_id, val)
121 integer,
intent(in) :: is
122 integer,
intent(in) :: ie
123 integer,
intent(in) :: bnd_type_id
124 real(rp),
intent(in),
optional :: val
127 this%list(is:ie) = bnd_type_id
129 if (
present(val) )
then
130 this%val(is:ie) = val
135 end subroutine meshbndinfo_set_by_id
138 subroutine meshbndinfo_set_by_name(this, is, ie, bnd_type_name, val)
141 integer,
intent(in) :: is
142 integer,
intent(in) :: ie
143 character(*),
intent(in) :: bnd_type_name
144 real(rp),
intent(in),
optional :: val
146 integer :: bnd_type_id
149 call meshbndinfo_set_by_id(this, is, ie, bnd_type_id, val)
152 end subroutine meshbndinfo_set_by_name
157 character(*),
intent(in) :: bnd_type_name
159 integer :: bnd_type_id
162 select case(trim(bnd_type_name))
176 log_error(
'BndType_NameToID ',*) trim(bnd_type_name) //
' is not supported. Check!'
module FElib / Mesh / Boundary information
integer, parameter, public bnd_type_slip_id
character(len= *), parameter, public bnd_type_fixval_name
character(len= *), parameter, public bnd_type_slip_name
character(len= *), parameter, public bnd_type_adiabat_name
character(len= *), parameter, public bnd_type_nospec_name
integer, parameter, public bnd_type_fixval_id
integer function, public bndtype_nametoid(bnd_type_name)
integer, parameter, public bnd_type_periodic_id
character(len= *), parameter, public bnd_type_noslip_name
character(len= *), parameter, public bnd_type_periodic_name
integer, parameter, public bnd_type_nospec_id
integer, parameter, public bnd_type_adiabat_id
integer, parameter, public bnd_type_noslip_id
Derived type to manage boundary information of computational domain.