mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Minor fixes and formatting issues addressed.
This commit is contained in:
parent
c1b3c5e973
commit
b7bc8437e7
@ -39,10 +39,14 @@
|
||||
|
||||
#include <dune/grid/common/partitionset.hh>
|
||||
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
#if HAVE_DAMARIS
|
||||
#include <opm/simulators/utils/DamarisOutputModule.hpp>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
@ -146,8 +150,7 @@ public:
|
||||
, simulator_(simulator)
|
||||
{
|
||||
#ifdef HAVE_DAMARIS
|
||||
if (enableDamarisOutput_())
|
||||
this->damarisUpdate = true ;
|
||||
this->damarisUpdate_ = enableDamarisOutput_();
|
||||
#endif
|
||||
this->eclOutputModule_ = std::make_unique<EclOutputBlackOilModule<TypeTag>>(simulator, this->wbp_index_list_, this->collectToIORank_);
|
||||
this->wbp_index_list_.clear();
|
||||
@ -299,14 +302,13 @@ public:
|
||||
this->eclOutputModule_->outputErrorLog(simulator_.gridView().comm());
|
||||
#ifdef HAVE_DAMARIS
|
||||
if (EWOMS_GET_PARAM(TypeTag, bool, EnableDamarisOutput)) {
|
||||
/* N.B. damarisUpdate should be set to true if at any time the model geometry changes */
|
||||
if (this->damarisUpdate == true)
|
||||
{
|
||||
// N.B. damarisUpdate_ should be set to true if at any time the model geometry changes
|
||||
if (this->damarisUpdate_) {
|
||||
const auto& gridView = simulator_.gridView();
|
||||
const int numElements = gridView.size(/*codim=*/0); // I think this might be the full model size? No, it is the local ranks model size
|
||||
const int numElements = gridView.size(/*codim=*/0); // This it is the local ranks model size.
|
||||
Opm::DamarisOutput::setupDamarisWritingPars(simulator_.vanguard().grid().comm(), numElements);
|
||||
// By defauls we assume static grid
|
||||
this->damarisUpdate = false;
|
||||
// By default we assume static grid
|
||||
this->damarisUpdate_ = false;
|
||||
}
|
||||
|
||||
if (!isSubStep) {
|
||||
@ -542,7 +544,7 @@ private:
|
||||
std::unique_ptr<EclOutputBlackOilModule<TypeTag>> eclOutputModule_;
|
||||
Scalar restartTimeStepSize_;
|
||||
#ifdef HAVE_DAMARIS
|
||||
bool damarisUpdate ; ///< Whenever this is true writeOutput() will set up Damris offsets of model fields
|
||||
bool damarisUpdate_ = false; ///< Whenever this is true writeOutput() will set up Damaris offsets of model fields
|
||||
#endif
|
||||
};
|
||||
} // namespace Opm
|
||||
|
Loading…
Reference in New Issue
Block a user