# -*- mode: cmake -*-

#
#  ATS
#    Flow PK class
#

add_subdirectory(constitutive_relations)
#add_subdirectory(Darcy)
add_subdirectory(richards)
add_subdirectory(permafrost)
add_subdirectory(overland)
add_subdirectory(icy_overland)
add_subdirectory(overland_head)
add_subdirectory(snow_distribution)

#=========================================================================================
# autogenerated flow include files for registration of evaluators/factories/pks

# constitutive_relations/overland_conductivity/

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/overland_conductivity/unfrozen_effective_depth_evaluator_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/elevation/snow_skin_potential_evaluator_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/overland_conductivity/overland_conductivity_evaluator_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/elevation/snow_distribution_evaluator_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/elevation/explicit_snow_distribution_evaluator_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/elevation/implicit_snow_distribution_evaluator_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/elevation/implicit_snow_distribution_uwflux_evaluator_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/elevation/meshed_elevation_evaluator_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/overland_conductivity/unfrozen_fraction_evaluator_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/overland_conductivity/surface_relperm_evaluator_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/overland_conductivity/unfrozen_fraction_relperm_model_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/overland_conductivity/zero_uf_relperm_model_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/overland_conductivity/one_uf_relperm_model_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/overland_conductivity/one_surface_relperm_model_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  )


generate_evaluators_registration_header(
  HEADERFILE flow_constitutive_relations_overland_conductivity_registration.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_OVERLAND_CONDUCTIVITY
  INSTALL    True
  )


# constitutive_relations/porosity/

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/porosity/compressible_porosity_evaluator_reg.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_POROSITY_EVALUATORS
  )

generate_evaluators_registration_header(
  HEADERFILE flow_constitutive_relations_porosity_registration.hh
  LISTNAME   FLOW_CONSTITUTIVE_RELATIONS_POROSITY_EVALUATORS
  INSTALL    True
  )

# constitutive_relations/wrm/

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/pc_ice_evaluator_reg.hh
  LISTNAME   WMR_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/pc_liquid_evaluator_reg.hh
  LISTNAME   WMR_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/wrm_evaluator_reg.hh
  LISTNAME   WMR_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/wrm_permafrost_evaluator_reg.hh
  LISTNAME   WMR_EVALUATORS_FACTORIES
  )

generate_evaluators_registration_header(
  HEADERFILE flow_constitutive_relations_wrm_registration.hh
  LISTNAME   WMR_EVALUATORS_FACTORIES
  INSTALL    True
  )

# constitutive_relations/wrm/models/

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/models/wrm_factory_reg.hh
  LISTNAME   WRM_MODELS_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/models/wrm_fpd_permafrost_model_reg.hh
  LISTNAME   WRM_MODELS_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/models/wrm_fpd_smoothed_permafrost_model_reg.hh
  LISTNAME   WRM_MODELS_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/models/wrm_implicit_permafrost_model_reg.hh
  LISTNAME   WRM_MODELS_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/models/wrm_linear_system_reg.hh
  LISTNAME   WRM_MODELS_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/models/wrm_old_permafrost_model_reg.hh
  LISTNAME   WRM_MODELS_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/models/wrm_permafrost_factory_reg.hh
  LISTNAME   WRM_MODELS_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/models/wrm_van_genuchten_reg.hh
  LISTNAME   WRM_MODELS_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/models/wrm_brooks_corey_reg.hh
  LISTNAME   WRM_MODELS_EVALUATORS_FACTORIES
  )

register_evaluator_with_factory(
  HEADERFILE constitutive_relations/wrm/models/wrm_zero_relperm_reg.hh
  LISTNAME   WRM_MODELS_EVALUATORS_FACTORIES
  )

generate_evaluators_registration_header(
  HEADERFILE flow_constitutive_relations_wrm_models_registration.hh
  LISTNAME   WRM_MODELS_EVALUATORS_FACTORIES
  INSTALL    True
  )

# icy_overland/
register_evaluator_with_factory(
  HEADERFILE icy_overland/icy_height_evaluator_reg.hh
  LISTNAME   FLOW_ICY_OVERLAND_EVAL_FAC
  )

register_evaluator_with_factory(
  HEADERFILE icy_overland/icy_overland_reg.hh
  LISTNAME   FLOW_ICY_OVERLAND_EVAL_FAC
  )

generate_evaluators_registration_header(
  HEADERFILE flow_icy_overland_registration.hh
  LISTNAME   FLOW_ICY_OVERLAND_EVAL_FAC
  INSTALL    True
  )

# overland/
register_evaluator_with_factory(
  HEADERFILE overland/overland_pk_reg.hh
  LISTNAME   FLOW_OVERLAND_EVAL_FAC
  )

register_evaluator_with_factory(
  HEADERFILE snow_distribution/snow_distribution_reg.hh
  LISTNAME   FLOW_OVERLAND_EVAL_FAC
  )

generate_evaluators_registration_header(
  HEADERFILE flow_overland_registration.hh
  LISTNAME   FLOW_OVERLAND_EVAL_FAC
  INSTALL    True
  )


# overland_head/
register_evaluator_with_factory(
  HEADERFILE overland_head/height_evaluator_reg.hh
  LISTNAME   FLOW_OVERLAND_HEAD_EVAL_FAC
  )

register_evaluator_with_factory(
  HEADERFILE overland_head/effective_height_evaluator_reg.hh
  LISTNAME   FLOW_OVERLAND_HEAD_EVAL_FAC
  )

register_evaluator_with_factory(
  HEADERFILE overland_head/overland_head_pk_reg.hh
  LISTNAME   FLOW_OVERLAND_HEAD_EVAL_FAC
  )

generate_evaluators_registration_header(
  HEADERFILE flow_overland_head_registration.hh
  LISTNAME   FLOW_OVERLAND_HEAD_EVAL_FAC
  INSTALL    True
  )


# permafrost/

register_evaluator_with_factory(
  HEADERFILE permafrost/permafrost_pk_reg.hh
  LISTNAME   PERMAFROST_EVAL_FAC
  )

generate_evaluators_registration_header(
  HEADERFILE flow_permafrost_registration.hh
  LISTNAME   PERMAFROST_EVAL_FAC
  INSTALL    True
  )


# richards/

register_evaluator_with_factory(
  HEADERFILE richards/richards_water_content_reg.hh
  LISTNAME   RICHARDS_EVAL_FAC
  )

register_evaluator_with_factory(
  HEADERFILE richards/richards_pk_reg.hh
  LISTNAME   RICHARDS_EVAL_FAC
  )

register_evaluator_with_factory(
  HEADERFILE richards/richards_steadystate_reg.hh
  LISTNAME   RICHARDS_EVAL_FAC
  )

generate_evaluators_registration_header(
  HEADERFILE flow_richards_registration.hh
  LISTNAME   RICHARDS_EVAL_FAC
  INSTALL    True
  )





