Glenn Hammond  committed 65fab22

Fixes to allow Richards and TH to accommodate gridded datasets

  • Participants
  • Parent commits 137ec1a

Comments (0)

Files changed (3)

File src/pflotran/coupler.F90

   use Option_module
   use Region_module
   use Grid_module
+  use Dataset_Base_class
+  use Dataset_Gridded_HDF5_class
   use Unstructured_Grid_Aux_module
   use Unstructured_Explicit_module, only : UGridExplicitSetBoundaryConnect, &
           if (coupler%flow_condition%pressure%itype /= HYDROSTATIC_BC .and. &
               coupler%flow_condition%pressure%itype /= SEEPAGE_BC .and. &
               coupler%flow_condition%pressure%itype /= CONDUCTANCE_BC) then
-            nullify_connection_set = PETSC_TRUE
+            select type(selector => coupler%flow_condition%pressure%dataset)
+              class is(dataset_gridded_hdf5_type)
+              class default
+                nullify_connection_set = PETSC_TRUE
+            end select
         else if (associated(coupler%flow_condition%concentration)) then
           ! need to calculate connection set

File src/pflotran/dataset_gridded_hdf5.F90

   select type (this)
     class is (dataset_gridded_hdf5_type)
       DatasetGriddedHDF5Cast => this
+    class default
+      ! to catch a class that is not gridded.
   end select
 end function DatasetGriddedHDF5Cast

File src/pflotran/init.F90

   call RealizationPassPtrsToPatches(realization)
   ! link conditions with regions through couplers and generate connectivity
   call RealProcessMatPropAndSatFunc(realization)
+  ! must process conditions before couplers in order to determine dataset types
+  call RealizationProcessConditions(realization)
   call RealizationProcessCouplers(realization)
-  call RealizationProcessConditions(realization)
   call SandboxesSetup(realization)
   call RealProcessFluidProperties(realization)
   call assignMaterialPropToRegions(realization)