/var/opm/ResInsight/ThirdParty/custom-opm-common/opm-common/opm/output/OutputWriter.hpp

Interface for writing non-compositional (blackoil, two-phase) simulation state to files.

Use the create() function to setup a chain of writer based on the configuration values, e.g.

ParameterGroup params (argc, argv, false);
auto parser = std::make_shared <const Deck> (
params.get <string> ("deck_filename"));
std::unique_ptr <OutputWriter> writer =
OutputWriter::create (params, parser);
// before the first timestep
writer->writeInit( current_posix_time, time_since_epoch_at_start );
// after each timestep
writer->writeTimeStep
/*
Copyright (c) 2013 Uni Research AS
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_OUTPUT_WRITER_HPP
#define OPM_OUTPUT_WRITER_HPP
#include <opm/output/Cells.hpp>
#include <opm/output/Wells.hpp>
struct UnstructuredGrid;
namespace Opm {
// forward declaration
class EclipseState;
namespace parameter { class ParameterGroup; }
class WellState;
struct PhaseUsage;
class OutputWriter {
public:
virtual ~OutputWriter () { }
virtual void writeInit( const NNC& nnc ) = 0;
virtual void writeTimeStep( int report_step,
time_t current_posix_time,
double seconds_elapsed,
data::Solution reservoirState,
bool isSubstep) = 0;
};
} // namespace Opm
#endif /* OPM_OUTPUT_WRITER_HPP */
virtual void writeTimeStep(int report_step, time_t current_posix_time, double seconds_elapsed, data::Solution reservoirState, data::Wells, bool isSubstep)=0
Write a blackoil reservoir state to disk for later inspection with visualization tools like ResInsigh...
virtual void writeInit(const NNC &nnc)=0
virtual ~OutputWriter()
Definition: OutputWriter.hpp:69
@ NNC
Definition: MULTREGTScanner.hpp:40
WellRates Wells
Definition: Wells.hpp:352
Definition: A.hpp:4