Prepares output list used by GRANS.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(grans_obj), | intent(inout) | :: | this |
GRANS solver |
subroutine grans_obj_PrepareSolverOutput(this) !> Prepares output list used by GRANS. implicit none class(grans_obj), intent(inout) :: this !! GRANS solver ! Work variables character(len=str256) :: str integer :: count,n if (.not.this%parser%IsDefined("Output data")) return ! Count number of output call this%parser%Get("Output data", str ) count = 0 n = 1 do while (n.ne.0) count = count + 1 str=adjustl(str(n:len_trim(str))) n = scan(trim(str),' ') end do ! Read the outputs allocate(this%outputs(count)) call this%parser%Get("Output data", this%outputs) ! Get names of fields to output ! Note: field names must match the actual names ! given in cdifs_obj_PrepareSolverFields this%output_var = [character(str8)::] do n=1,size(this%outputs) select case (this%outputs(n)) case ('Fp') this%output_var = [character(str8) :: this%output_var(:), 'Fpx', 'Fpy', 'Fpz'] case ('ibVF') if (this%use_RP .or. this%use_IB) & this%output_var = [character(str8) :: this%output_var(:), 'ibVF'] case ('ibS') if (this%use_RP .or. this%use_IB) & this%output_var = [character(str8) :: this%output_var(:), 'ibS'] case ('PVF') this%output_var = [character(str8) :: this%output_var(:), 'PVF'] case ('ResPart') this%output_var = [character(str8) :: this%output_var(:), 'id', 'd','rho','u','v', 'w'] case ('PntPart') this%output_var = [character(str8) :: this%output_var(:), 'id', 'd','rho','u','v', 'w'] case default call this%parallel%Stop("Unknown output variables in GRANS: "//this%outputs(n)) end select end do return end subroutine grans_obj_PrepareSolverOutput