mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
some stylistic changes
in particular, where to put empty lines and spaces. Also added a copyright statement for myself to a few files and added a comment. the new comment was requested by [at]bska, the rest was requested by [at]atgeirr.
This commit is contained in:
parent
553f32e6cf
commit
5666df807b
@ -63,8 +63,12 @@ namespace Opm {
|
||||
// --------- Public methods ---------
|
||||
|
||||
/// Construct solver for a given model.
|
||||
///
|
||||
/// The model is a std::shared_ptr because the object to which model points to is
|
||||
/// not allowed to be deleted as long as the NewtonSolver object exists.
|
||||
///
|
||||
/// \param[in] param parameters controlling nonlinear Newton process
|
||||
/// \param[in, out] model physical simulation model
|
||||
/// \param[in, out] model physical simulation model.
|
||||
explicit NewtonSolver(const SolverParameters& param,
|
||||
std::shared_ptr<PhysicalModel> model);
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright 2013 SINTEF ICT, Applied Mathematics.
|
||||
Copyright 2015 Andreas Lauser
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
@ -74,11 +75,12 @@
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
template<class Simulator>
|
||||
|
||||
template <class Simulator>
|
||||
struct SimulatorTraits;
|
||||
|
||||
/// Class collecting all necessary components for a two-phase simulation.
|
||||
template<class Implementation>
|
||||
template <class Implementation>
|
||||
class SimulatorBase
|
||||
{
|
||||
typedef SimulatorTraits<Implementation> Traits;
|
||||
@ -141,8 +143,8 @@ namespace Opm
|
||||
ReservoirState& state);
|
||||
|
||||
protected:
|
||||
Implementation& asImp_() { return *static_cast<Implementation*>(this); }
|
||||
const Implementation& asImp_() const { return *static_cast<const Implementation*>(this); }
|
||||
Implementation& asImpl() { return *static_cast<Implementation*>(this); }
|
||||
const Implementation& asImpl() const { return *static_cast<const Implementation*>(this); }
|
||||
|
||||
void handleAdditionalWellInflow(SimulatorTimer& timer,
|
||||
WellsManager& wells_manager,
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*
|
||||
Copyright 2013 SINTEF ICT, Applied Mathematics.
|
||||
Copyright 2014 IRIS AS
|
||||
Copyright 2015 Andreas Lauser
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
@ -20,7 +21,8 @@
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
template<class Implementation>
|
||||
|
||||
template <class Implementation>
|
||||
SimulatorBase<Implementation>::SimulatorBase(const parameter::ParameterGroup& param,
|
||||
const Grid& grid,
|
||||
const DerivedGeology& geo,
|
||||
@ -68,7 +70,7 @@ namespace Opm
|
||||
#endif
|
||||
}
|
||||
|
||||
template<class Implementation>
|
||||
template <class Implementation>
|
||||
SimulatorReport SimulatorBase<Implementation>::run(SimulatorTimer& timer,
|
||||
ReservoirState& state)
|
||||
{
|
||||
@ -129,7 +131,7 @@ namespace Opm
|
||||
well_state.init(wells, state, prev_well_state);
|
||||
|
||||
// give the polymer and surfactant simulators the chance to do their stuff
|
||||
asImp_().handleAdditionalWellInflow(timer, wells_manager, well_state, wells);
|
||||
asImpl().handleAdditionalWellInflow(timer, wells_manager, well_state, wells);
|
||||
|
||||
// write simulation state at the report stage
|
||||
output_writer_.writeTimeStep( timer, state, well_state );
|
||||
@ -139,12 +141,12 @@ namespace Opm
|
||||
props_.updateSatHyst(state.saturation(), allcells_);
|
||||
|
||||
// Compute reservoir volumes for RESV controls.
|
||||
asImp_().computeRESV(timer.currentStepNum(), wells, state, well_state);
|
||||
asImpl().computeRESV(timer.currentStepNum(), wells, state, well_state);
|
||||
|
||||
// Run a multiple steps of the solver depending on the time step control.
|
||||
solver_timer.start();
|
||||
|
||||
auto solver = asImp_().createSolver(wells);
|
||||
auto solver = asImpl().createSolver(wells);
|
||||
|
||||
// If sub stepping is enabled allow the solver to sub cycle
|
||||
// in case the report steps are to large for the solver to converge
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright 2013 SINTEF ICT, Applied Mathematics.
|
||||
Copyright 2015 Andreas Lauser
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
@ -25,10 +26,11 @@
|
||||
#include "NewtonSolver.hpp"
|
||||
|
||||
namespace Opm {
|
||||
template<class GridT>
|
||||
|
||||
template <class GridT>
|
||||
class SimulatorFullyImplicitBlackoil;
|
||||
|
||||
template<class GridT>
|
||||
template <class GridT>
|
||||
struct SimulatorTraits<SimulatorFullyImplicitBlackoil<GridT> >
|
||||
{
|
||||
typedef WellStateFullyImplicitBlackoil WellState;
|
||||
@ -40,7 +42,7 @@ struct SimulatorTraits<SimulatorFullyImplicitBlackoil<GridT> >
|
||||
};
|
||||
|
||||
/// a simulator for the blackoil model
|
||||
template<class GridT>
|
||||
template <class GridT>
|
||||
class SimulatorFullyImplicitBlackoil
|
||||
: public SimulatorBase<SimulatorFullyImplicitBlackoil<GridT> >
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user