2020-08-17 09:10:18 -05:00
|
|
|
/*
|
|
|
|
Copyright 2013, 2014, 2015 SINTEF ICT, Applied Mathematics.
|
|
|
|
Copyright 2014 Dr. Blatt - HPC-Simulation-Software & Services
|
|
|
|
Copyright 2015 IRIS AS
|
|
|
|
Copyright 2014 STATOIL ASA.
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#ifndef OPM_READDECK_HEADER_INCLUDED
|
|
|
|
#define OPM_READDECK_HEADER_INCLUDED
|
|
|
|
|
2021-10-05 01:25:54 -05:00
|
|
|
#include <opm/simulators/utils/ParallelCommunication.hpp>
|
|
|
|
|
2020-08-17 09:10:18 -05:00
|
|
|
#include <memory>
|
2021-03-08 10:17:09 -06:00
|
|
|
#include <optional>
|
2020-08-17 09:10:18 -05:00
|
|
|
#include <string>
|
|
|
|
|
2021-10-07 07:15:15 -05:00
|
|
|
namespace Opm {
|
|
|
|
class Deck;
|
|
|
|
class EclipseState;
|
|
|
|
class ErrorGuard;
|
|
|
|
class ParseContext;
|
|
|
|
class Python;
|
|
|
|
class Schedule;
|
|
|
|
class SummaryConfig;
|
|
|
|
class UDQState;
|
2021-10-11 07:38:41 -05:00
|
|
|
class WellTestState;
|
2021-10-07 07:15:15 -05:00
|
|
|
} // end namespace Opm
|
2021-04-29 02:56:14 -05:00
|
|
|
|
2021-10-07 07:15:15 -05:00
|
|
|
namespace Opm {
|
2021-04-29 02:56:14 -05:00
|
|
|
|
2021-09-19 03:17:58 -05:00
|
|
|
namespace Action {
|
|
|
|
class State;
|
|
|
|
}
|
|
|
|
|
2020-08-17 09:10:18 -05:00
|
|
|
enum class FileOutputMode {
|
2021-10-07 07:15:15 -05:00
|
|
|
//! \brief No file output.
|
2020-08-17 09:10:18 -05:00
|
|
|
OUTPUT_NONE = 0,
|
2021-10-07 07:15:15 -05:00
|
|
|
|
|
|
|
//! \brief Output only to log files, no ECLIPSE output.
|
2020-08-17 09:10:18 -05:00
|
|
|
OUTPUT_LOG_ONLY = 1,
|
2021-10-07 07:15:15 -05:00
|
|
|
|
2020-08-17 09:10:18 -05:00
|
|
|
//! \brief Output to all files.
|
2021-10-07 07:15:15 -05:00
|
|
|
OUTPUT_ALL = 3,
|
2020-08-17 09:10:18 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
// Setup the OpmLog backends
|
2021-10-07 07:15:15 -05:00
|
|
|
FileOutputMode
|
|
|
|
setupLogging(int mpi_rank_,
|
|
|
|
const std::string& deck_filename,
|
|
|
|
const std::string& cmdline_output_dir,
|
|
|
|
const std::string& cmdline_output,
|
|
|
|
bool output_cout_,
|
2022-01-27 10:00:39 -06:00
|
|
|
const std::string& stdout_log_id,
|
|
|
|
const bool allRanksDbgLog);
|
2020-08-17 09:10:18 -05:00
|
|
|
|
2020-08-18 05:35:55 -05:00
|
|
|
/// \brief Reads the deck and creates all necessary objects if needed
|
|
|
|
///
|
2021-10-07 07:15:15 -05:00
|
|
|
/// If pointers already contains objects then they are used otherwise they
|
|
|
|
/// are created and can be used outside later.
|
|
|
|
void readDeck(Parallel::Communication comm,
|
|
|
|
const std::string& deckFilename,
|
|
|
|
std::shared_ptr<Deck>& deck,
|
|
|
|
std::shared_ptr<EclipseState>& eclipseState,
|
|
|
|
std::shared_ptr<Schedule>& schedule,
|
|
|
|
std::unique_ptr<UDQState>& udqState,
|
|
|
|
std::unique_ptr<Action::State>& actionState,
|
2021-10-11 07:38:41 -05:00
|
|
|
std::unique_ptr<WellTestState>& wtestState,
|
2021-10-07 07:15:15 -05:00
|
|
|
std::shared_ptr<SummaryConfig>& summaryConfig,
|
|
|
|
std::unique_ptr<ErrorGuard> errorGuard,
|
|
|
|
std::shared_ptr<Python> python,
|
|
|
|
std::unique_ptr<ParseContext> parseContext,
|
|
|
|
bool initFromRestart,
|
|
|
|
bool checkDeck,
|
|
|
|
const std::optional<int>& outputInterval);
|
2020-08-17 09:10:18 -05:00
|
|
|
} // end namespace Opm
|
|
|
|
|
|
|
|
#endif // OPM_READDECK_HEADER_INCLUDED
|