From 4ffb397ee57b8a8a5780ebd65ae4f3831d515249 Mon Sep 17 00:00:00 2001 From: Giacomo Capodaglio Date: Sat, 2 Mar 2024 12:57:05 -0700 Subject: [PATCH] Initialized pipe_map_created_ and sw_map_created_ --- .../constitutive_relations/sources/pipe_drain_evaluator.cc | 7 ------- .../constitutive_relations/sources/pipe_drain_evaluator.hh | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/pks/flow/constitutive_relations/sources/pipe_drain_evaluator.cc b/src/pks/flow/constitutive_relations/sources/pipe_drain_evaluator.cc index e2a1bf4f3..64d6e8d18 100644 --- a/src/pks/flow/constitutive_relations/sources/pipe_drain_evaluator.cc +++ b/src/pks/flow/constitutive_relations/sources/pipe_drain_evaluator.cc @@ -63,13 +63,6 @@ PipeDrainEvaluator::PipeDrainEvaluator(Teuchos::ParameterList& plist) : sink_source_coeff_ = 1.0; } - // flags to ensure we create the cell maps only once - if (pipe_map_created_ != true) { - pipe_map_created_ = false; - } - if (sw_map_created_ != true) { - sw_map_created_ = false; - } } diff --git a/src/pks/flow/constitutive_relations/sources/pipe_drain_evaluator.hh b/src/pks/flow/constitutive_relations/sources/pipe_drain_evaluator.hh index da07e6092..239e40738 100644 --- a/src/pks/flow/constitutive_relations/sources/pipe_drain_evaluator.hh +++ b/src/pks/flow/constitutive_relations/sources/pipe_drain_evaluator.hh @@ -55,7 +55,7 @@ class PipeDrainEvaluator : public EvaluatorSecondaryMonotypeCV { double energ_loss_coeff_subweir_; // submerged weir double energ_loss_coeff_orifice_; // orifice double sink_source_coeff_; // coefficient that determines sink or source (when using same evaluator file for pipe or surface flow) - bool pipe_flag_, sw_flag_, pipe_map_created_, sw_map_created_; + bool pipe_flag_, sw_flag_, pipe_map_created_ = false, sw_map_created_ = false; std::vector pipe_map_, sw_map_;