mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Rename FullyImplicitSolver -> NewtonSolver.
This commit is contained in:
parent
82827f56c0
commit
f89297255f
@ -107,11 +107,11 @@ list (APPEND PUBLIC_HEADER_FILES
|
|||||||
opm/autodiff/ImpesTPFAAD.hpp
|
opm/autodiff/ImpesTPFAAD.hpp
|
||||||
opm/autodiff/FullyImplicitBlackoilSolver.hpp
|
opm/autodiff/FullyImplicitBlackoilSolver.hpp
|
||||||
opm/autodiff/FullyImplicitBlackoilSolver_impl.hpp
|
opm/autodiff/FullyImplicitBlackoilSolver_impl.hpp
|
||||||
opm/autodiff/FullyImplicitSolver.hpp
|
|
||||||
opm/autodiff/FullyImplicitSolver_impl.hpp
|
|
||||||
opm/autodiff/NewtonIterationBlackoilCPR.hpp
|
opm/autodiff/NewtonIterationBlackoilCPR.hpp
|
||||||
opm/autodiff/NewtonIterationBlackoilInterface.hpp
|
opm/autodiff/NewtonIterationBlackoilInterface.hpp
|
||||||
opm/autodiff/NewtonIterationBlackoilSimple.hpp
|
opm/autodiff/NewtonIterationBlackoilSimple.hpp
|
||||||
|
opm/autodiff/NewtonSolver.hpp
|
||||||
|
opm/autodiff/NewtonSolver_impl.hpp
|
||||||
opm/autodiff/LinearisedBlackoilResidual.hpp
|
opm/autodiff/LinearisedBlackoilResidual.hpp
|
||||||
opm/autodiff/RateConverter.hpp
|
opm/autodiff/RateConverter.hpp
|
||||||
opm/autodiff/RedistributeDataHandles.hpp
|
opm/autodiff/RedistributeDataHandles.hpp
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OPM_FULLYIMPLICITSOLVER_HEADER_INCLUDED
|
#ifndef OPM_NEWTONSOLVER_HEADER_INCLUDED
|
||||||
#define OPM_FULLYIMPLICITSOLVER_HEADER_INCLUDED
|
#define OPM_NEWTONSOLVER_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <opm/autodiff/AutoDiffBlock.hpp>
|
#include <opm/autodiff/AutoDiffBlock.hpp>
|
||||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||||
@ -27,9 +27,9 @@
|
|||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
|
|
||||||
/// A fully implicit solver class suitable for general models.
|
/// A Newton solver class suitable for general fully-implicit models.
|
||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
class FullyImplicitSolver
|
class NewtonSolver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// --------- Types and enums ---------
|
// --------- Types and enums ---------
|
||||||
@ -65,8 +65,8 @@ namespace Opm {
|
|||||||
/// Construct solver for a given model.
|
/// Construct solver for a given model.
|
||||||
/// \param[in] param parameters controlling nonlinear Newton process
|
/// \param[in] param parameters controlling nonlinear Newton process
|
||||||
/// \param[in, out] model physical simulation model
|
/// \param[in, out] model physical simulation model
|
||||||
explicit FullyImplicitSolver(const SolverParameter& param,
|
explicit NewtonSolver(const SolverParameter& param,
|
||||||
PhysicalModel& model);
|
PhysicalModel& model);
|
||||||
|
|
||||||
/// Take a single forward step, after which the states will be modified
|
/// Take a single forward step, after which the states will be modified
|
||||||
/// according to the physical model.
|
/// according to the physical model.
|
||||||
@ -106,6 +106,6 @@ namespace Opm {
|
|||||||
};
|
};
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|
||||||
#include "FullyImplicitSolver_impl.hpp"
|
#include "NewtonSolver_impl.hpp"
|
||||||
|
|
||||||
#endif // OPM_FULLYIMPLICITSOLVER_HEADER_INCLUDED
|
#endif // OPM_NEWTONSOLVER_HEADER_INCLUDED
|
@ -20,16 +20,16 @@
|
|||||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OPM_FULLYIMPLICITSOLVER_IMPL_HEADER_INCLUDED
|
#ifndef OPM_NEWTONSOLVER_IMPL_HEADER_INCLUDED
|
||||||
#define OPM_FULLYIMPLICITSOLVER_IMPL_HEADER_INCLUDED
|
#define OPM_NEWTONSOLVER_IMPL_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <opm/autodiff/FullyImplicitSolver.hpp>
|
#include <opm/autodiff/NewtonSolver.hpp>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
FullyImplicitSolver<PhysicalModel>::FullyImplicitSolver(const SolverParameter& param,
|
NewtonSolver<PhysicalModel>::NewtonSolver(const SolverParameter& param,
|
||||||
PhysicalModel& model)
|
PhysicalModel& model)
|
||||||
: param_(param),
|
: param_(param),
|
||||||
model_(model),
|
model_(model),
|
||||||
newtonIterations_(0),
|
newtonIterations_(0),
|
||||||
@ -38,13 +38,13 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
unsigned int FullyImplicitSolver<PhysicalModel>::newtonIterations () const
|
unsigned int NewtonSolver<PhysicalModel>::newtonIterations () const
|
||||||
{
|
{
|
||||||
return newtonIterations_;
|
return newtonIterations_;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
unsigned int FullyImplicitSolver<PhysicalModel>::linearIterations () const
|
unsigned int NewtonSolver<PhysicalModel>::linearIterations () const
|
||||||
{
|
{
|
||||||
return linearIterations_;
|
return linearIterations_;
|
||||||
}
|
}
|
||||||
@ -52,7 +52,7 @@ namespace Opm
|
|||||||
|
|
||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
int
|
int
|
||||||
FullyImplicitSolver<PhysicalModel>::
|
NewtonSolver<PhysicalModel>::
|
||||||
step(const double dt,
|
step(const double dt,
|
||||||
ReservoirState& reservoir_state,
|
ReservoirState& reservoir_state,
|
||||||
WellState& well_state)
|
WellState& well_state)
|
||||||
@ -128,7 +128,7 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
void FullyImplicitSolver<PhysicalModel>::SolverParameter::
|
void NewtonSolver<PhysicalModel>::SolverParameter::
|
||||||
reset()
|
reset()
|
||||||
{
|
{
|
||||||
// default values for the solver parameters
|
// default values for the solver parameters
|
||||||
@ -141,7 +141,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
FullyImplicitSolver<PhysicalModel>::SolverParameter::
|
NewtonSolver<PhysicalModel>::SolverParameter::
|
||||||
SolverParameter()
|
SolverParameter()
|
||||||
{
|
{
|
||||||
// set default values
|
// set default values
|
||||||
@ -149,7 +149,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
FullyImplicitSolver<PhysicalModel>::SolverParameter::
|
NewtonSolver<PhysicalModel>::SolverParameter::
|
||||||
SolverParameter( const parameter::ParameterGroup& param )
|
SolverParameter( const parameter::ParameterGroup& param )
|
||||||
{
|
{
|
||||||
// set default values
|
// set default values
|
||||||
@ -172,9 +172,9 @@ namespace Opm
|
|||||||
|
|
||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
void
|
void
|
||||||
FullyImplicitSolver<PhysicalModel>::detectNewtonOscillations(const std::vector<std::vector<double>>& residual_history,
|
NewtonSolver<PhysicalModel>::detectNewtonOscillations(const std::vector<std::vector<double>>& residual_history,
|
||||||
const int it, const double relaxRelTol,
|
const int it, const double relaxRelTol,
|
||||||
bool& oscillate, bool& stagnate) const
|
bool& oscillate, bool& stagnate) const
|
||||||
{
|
{
|
||||||
// The detection of oscillation in two primary variable results in the report of the detection
|
// The detection of oscillation in two primary variable results in the report of the detection
|
||||||
// of oscillation for the solver.
|
// of oscillation for the solver.
|
||||||
@ -209,8 +209,8 @@ namespace Opm
|
|||||||
|
|
||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
void
|
void
|
||||||
FullyImplicitSolver<PhysicalModel>::stabilizeNewton(V& dx, V& dxOld, const double omega,
|
NewtonSolver<PhysicalModel>::stabilizeNewton(V& dx, V& dxOld, const double omega,
|
||||||
const RelaxType relax_type) const
|
const RelaxType relax_type) const
|
||||||
{
|
{
|
||||||
// The dxOld is updated with dx.
|
// The dxOld is updated with dx.
|
||||||
// If omega is equal to 1., no relaxtion will be appiled.
|
// If omega is equal to 1., no relaxtion will be appiled.
|
@ -24,7 +24,7 @@
|
|||||||
#include <opm/core/utility/ErrorMacros.hpp>
|
#include <opm/core/utility/ErrorMacros.hpp>
|
||||||
|
|
||||||
#include <opm/autodiff/GeoProps.hpp>
|
#include <opm/autodiff/GeoProps.hpp>
|
||||||
#include <opm/autodiff/FullyImplicitSolver.hpp>
|
#include <opm/autodiff/NewtonSolver.hpp>
|
||||||
#include <opm/autodiff/BlackoilModel.hpp>
|
#include <opm/autodiff/BlackoilModel.hpp>
|
||||||
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
|
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
|
||||||
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
|
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
|
||||||
@ -236,7 +236,7 @@ namespace Opm
|
|||||||
typedef BlackoilModel<Grid> Model;
|
typedef BlackoilModel<Grid> Model;
|
||||||
typedef typename Model::ModelParameter ModelParam;
|
typedef typename Model::ModelParameter ModelParam;
|
||||||
ModelParam modelParam( param_ );
|
ModelParam modelParam( param_ );
|
||||||
typedef FullyImplicitSolver<Model> Solver;
|
typedef NewtonSolver<Model> Solver;
|
||||||
typedef typename Solver::SolverParameter SolverParam;
|
typedef typename Solver::SolverParameter SolverParam;
|
||||||
SolverParam solverParam( param_ );
|
SolverParam solverParam( param_ );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user