#################
# Test goal: Test conversion of time units defined by user in input YAML file.
# Author: David Flanderka
# Source for reference: qualitative

flow123d_version: 3.1.0
problem: !Coupling_Sequential
  description: Check correct time unit conversion of different time declaration in input YAML file.
  mesh:
    mesh_file: ../00_mesh/prism_11el.msh
    global_snap_radius: 0.1
  flow_equation: !Flow_Darcy_MH
    nonlinear_solver:
      linear_solver: !Petsc
        a_tol: 1.0e-12
        r_tol: 1.0e-12
    input_fields:
      - region: volume
        time: 0.0
        conductivity: 1
        cross_section: !FieldTimeFunction
          time_function:
            - - [ 0, "s" ]
              - 1.0
            - - [ 1000, "s" ]
              - 2.0
            - - [ 2000, "s" ] 
              - 5.0
        sigma: !FieldFE
          mesh_data_file: ./11_mesh_with_data_11el.msh
          field_name: sigma
          time_unit: "min"
        anisotropy: 10
        water_source_density: 24
        init_pressure: 0.1
        storativity: 1.0
      - region: volume
        time: [ 500.0, "s" ]
        conductivity: 5
      - region: volume
        time: [ 25.0, "min" ]
        conductivity: 3
      - region: .BOUNDARY
        bc_type: dirichlet
        bc_pressure: !FieldFormula
          value: 0.1*x
    n_schurs: 2
    output:
      times:
        - 0.0
        - { step: [15.0, "min"] }
        - 0.5
        - 0.75
      fields:
        - pressure_p0
        - velocity_p0
        - conductivity
        - cross_section
        - sigma
        - anisotropy
        - water_source_density
        - field: init_pressure
          times: 
            - 0.0
        - field: storativity
          times:
            - 0.0
            - { step: [30.0, "min"] } 
      observe_fields: [pressure_p0, velocity_p0]
    time:
      end_time: [ 50.0, "min" ]
      init_dt: [ 1, "s" ]
      max_dt: [ 5.0, "min" ]
      min_dt: [ 100, "ms" ]
      common_time_unit: "h"
    output_stream:
      file: ./flow.pvd
      format: !vtk
        variant: ascii
      times:
        - { step: [100, "s"] }
      observe_points:
        - [0, 0, 0.25]
        - [0, 0, 0.2]
        - [0, 0, 0.15]
        - [0, 0, 0.1]
        - [0, 0, 0.05]
        - [0, 0, 1.0]
