output_history Subroutine

private subroutine output_history(self, time, domain, propeties, porosity, temperature, pressure)

Type Bound

type_output

Arguments

Type IntentOptional Attributes Name
class(type_output) :: self
real(kind=real64), intent(in) :: time
type(type_domain), intent(inout), optional :: domain
type(type_proereties_manager), intent(inout), optional :: propeties
real(kind=real64), intent(in), optional :: porosity(:)
real(kind=real64), intent(in), optional :: temperature(:)
real(kind=real64), intent(in), optional :: pressure(:)

Source Code

    subroutine output_history(self, time, domain, propeties, porosity, temperature, pressure)
        implicit none
        class(type_output) :: self
        real(real64), intent(in) :: time
        type(type_domain), intent(inout), optional :: domain
        type(type_proereties_manager), intent(inout), optional :: propeties
        real(real64), intent(in), optional :: porosity(:)
        real(real64), intent(in), optional :: temperature(:)
        real(real64), intent(in), optional :: pressure(:)

        real(real64) :: obsValues(3 * size(self%observations))

        integer(int32) :: iObs

        do iObs = 1, size(self%observations)
            if (.not. self%observations(iObs)%do_output) cycle
            if (self%is_thermal .and. self%is_hydraulic) then
                call self%observations(iObs)%get_values(obs_values=obsValues, &
                                                        nodal_temperature=temperature, &
                                                        nodal_porosity=porosity, &
                                                        nodal_pw=pressure, &
                                                        properties=propeties, &
                                                        domain=domain)
            else if (self%is_thermal) then
                call self%observations(iObs)%get_values(obs_values=obsValues, &
                                                        nodal_temperature=temperature, &
                                                        nodal_porosity=porosity, &
                                                        properties=propeties, &
                                                        domain=domain)
            else if (self%is_hydraulic) then
                call self%observations(iObs)%get_values(obs_values=obsValues, &
                                                        nodal_pw=pressure, &
                                                        nodal_porosity=porosity, &
                                                        properties=propeties, &
                                                        domain=domain)
            end if
            call self%observations(iObs)%write_line( &
                unit=self%observations(iObs)%num_unit, &
                time=time, &
                values=obsValues)
        end do

    end subroutine output_history