mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Renamed class {FullyImplicit->Linearised}BlackoilResidual.
This commit is contained in:
parent
a19344efa9
commit
9e7ab6d1d2
@ -23,7 +23,7 @@
|
|||||||
#include <opm/autodiff/AutoDiffBlock.hpp>
|
#include <opm/autodiff/AutoDiffBlock.hpp>
|
||||||
#include <opm/autodiff/AutoDiffHelpers.hpp>
|
#include <opm/autodiff/AutoDiffHelpers.hpp>
|
||||||
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
|
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
|
||||||
#include <opm/autodiff/FullyImplicitBlackoilResidual.hpp>
|
#include <opm/autodiff/LinearisedBlackoilResidual.hpp>
|
||||||
#include <opm/autodiff/FullyImplicitSystemSolverInterface.hpp>
|
#include <opm/autodiff/FullyImplicitSystemSolverInterface.hpp>
|
||||||
|
|
||||||
struct UnstructuredGrid;
|
struct UnstructuredGrid;
|
||||||
@ -139,7 +139,7 @@ namespace Opm {
|
|||||||
std::vector<PhasePresence> phaseCondition_;
|
std::vector<PhasePresence> phaseCondition_;
|
||||||
V well_perforation_pressure_diffs_; // Diff to bhp for each well perforation.
|
V well_perforation_pressure_diffs_; // Diff to bhp for each well perforation.
|
||||||
|
|
||||||
FullyImplicitBlackoilResidual residual_;
|
LinearisedBlackoilResidual residual_;
|
||||||
|
|
||||||
// Private methods.
|
// Private methods.
|
||||||
SolutionState
|
SolutionState
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef OPM_FULLYIMPLICITSYSTEMSOLVERINTERFACE_HEADER_INCLUDED
|
#ifndef OPM_FULLYIMPLICITSYSTEMSOLVERINTERFACE_HEADER_INCLUDED
|
||||||
#define OPM_FULLYIMPLICITSYSTEMSOLVERINTERFACE_HEADER_INCLUDED
|
#define OPM_FULLYIMPLICITSYSTEMSOLVERINTERFACE_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <opm/autodiff/FullyImplicitBlackoilResidual.hpp>
|
#include <opm/autodiff/LinearisedBlackoilResidual.hpp>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
@ -30,14 +30,14 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Return type for linearSolve(). A simple, non-ad vector type.
|
/// Return type for linearSolve(). A simple, non-ad vector type.
|
||||||
typedef FullyImplicitBlackoilResidual::ADB::V SolutionVector;
|
typedef LinearisedBlackoilResidual::ADB::V SolutionVector;
|
||||||
|
|
||||||
/// Solve the linear system Ax = b, with A being the
|
/// Solve the linear system Ax = b, with A being the
|
||||||
/// combined derivative matrix of the residual and b
|
/// combined derivative matrix of the residual and b
|
||||||
/// being the residual itself.
|
/// being the residual itself.
|
||||||
/// \param[in] residual residual object containing A and b.
|
/// \param[in] residual residual object containing A and b.
|
||||||
/// \return the solution x
|
/// \return the solution x
|
||||||
virtual SolutionVector linearSolve(const FullyImplicitBlackoilResidual& residual) const = 0;
|
virtual SolutionVector linearSolve(const LinearisedBlackoilResidual& residual) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -38,9 +38,9 @@ namespace Opm
|
|||||||
/// \param[in] residual residual object containing A and b.
|
/// \param[in] residual residual object containing A and b.
|
||||||
/// \return the solution x
|
/// \return the solution x
|
||||||
FullyImplicitSystemSolverSimple::SolutionVector
|
FullyImplicitSystemSolverSimple::SolutionVector
|
||||||
FullyImplicitSystemSolverSimple::linearSolve(const FullyImplicitBlackoilResidual& residual) const
|
FullyImplicitSystemSolverSimple::linearSolve(const LinearisedBlackoilResidual& residual) const
|
||||||
{
|
{
|
||||||
typedef FullyImplicitBlackoilResidual::ADB ADB;
|
typedef LinearisedBlackoilResidual::ADB ADB;
|
||||||
const int np = residual.material_balance_eq.size();
|
const int np = residual.material_balance_eq.size();
|
||||||
ADB mass_res = residual.material_balance_eq[0];
|
ADB mass_res = residual.material_balance_eq[0];
|
||||||
for (int phase = 1; phase < np; ++phase) {
|
for (int phase = 1; phase < np; ++phase) {
|
||||||
|
@ -43,7 +43,7 @@ namespace Opm
|
|||||||
/// being the residual itself.
|
/// being the residual itself.
|
||||||
/// \param[in] residual residual object containing A and b.
|
/// \param[in] residual residual object containing A and b.
|
||||||
/// \return the solution x
|
/// \return the solution x
|
||||||
virtual SolutionVector linearSolve(const FullyImplicitBlackoilResidual& residual) const;
|
virtual SolutionVector linearSolve(const LinearisedBlackoilResidual& residual) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const LinearSolverInterface& linsolver_;
|
const LinearSolverInterface& linsolver_;
|
||||||
|
@ -17,8 +17,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_FULLYIMPLICITBLACKOILRESIDUAL_HEADER_INCLUDED
|
#ifndef OPM_LINEARISEDBLACKOILRESIDUAL_HEADER_INCLUDED
|
||||||
#define OPM_FULLYIMPLICITBLACKOILRESIDUAL_HEADER_INCLUDED
|
#define OPM_LINEARISEDBLACKOILRESIDUAL_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <opm/autodiff/AutoDiffBlock.hpp>
|
#include <opm/autodiff/AutoDiffBlock.hpp>
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ namespace Opm
|
|||||||
/// FullyImplicitBlackoilSolver, and is separated from that
|
/// FullyImplicitBlackoilSolver, and is separated from that
|
||||||
/// class to facilitate the development of linear solver
|
/// class to facilitate the development of linear solver
|
||||||
/// strategies outside that class.
|
/// strategies outside that class.
|
||||||
struct FullyImplicitBlackoilResidual {
|
struct LinearisedBlackoilResidual {
|
||||||
/// A type alias for the automatic differentiation type.
|
/// A type alias for the automatic differentiation type.
|
||||||
typedef AutoDiffBlock<double> ADB;
|
typedef AutoDiffBlock<double> ADB;
|
||||||
/// The material_balance_eq vector has one element for each
|
/// The material_balance_eq vector has one element for each
|
||||||
@ -67,4 +67,4 @@ namespace Opm
|
|||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|
||||||
|
|
||||||
#endif // OPM_FULLYIMPLICITBLACKOILRESIDUAL_HEADER_INCLUDED
|
#endif // OPM_LINEARISEDBLACKOILRESIDUAL_HEADER_INCLUDED
|
Loading…
Reference in New Issue
Block a user