Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes to compile compositional with flowproblem #901

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,13 @@ list (APPEND PUBLIC_HEADER_FILES
opm/models/parallel/gridcommhandles.hh
opm/models/parallel/mpibuffer.hh
opm/models/parallel/threadedentityiterator.hh
opm/models/ptflash/flashintensivequantities.hh
opm/models/ptflash/flashindices.hh
opm/models/ptflash/flashintensivequantities.hh
opm/models/ptflash/flashlocalresidual.hh
opm/models/ptflash/flashmodel.hh
opm/models/ptflash/flashnewtonmethod.hh
opm/models/ptflash/flashparameters.hh
opm/models/ptflash/flashprimaryvariables.hh
opm/models/ptflash/flashproperties.hh
opm/models/pvs/pvsboundaryratevector.hh
opm/models/pvs/pvsratevector.hh
opm/models/pvs/pvsindices.hh
Expand Down
12 changes: 11 additions & 1 deletion opm/models/ptflash/flashindices.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ namespace Opm {
*
* \tparam PVOffset The first index in a primary variable vector.
*/
// TODO: The indices class should handle whether phase is active, not the FluidSystem
template <class TypeTag, int PVOffset>
class FlashIndices
: public EnergyIndices<PVOffset + getPropValue<TypeTag, Properties::NumComponents>(),
Expand All @@ -50,6 +51,15 @@ class FlashIndices
using EnergyIndices = Opm::EnergyIndices<PVOffset + numComponents, enableEnergy>;

public:
static constexpr bool waterEnabled = false;
static constexpr bool gasEnabled = true;
static constexpr bool oilEnabled = true;
static constexpr int waterPhaseIdx = -1;
// static constexpr int waterGasIdx = 0;
// static constexpr int waterOilIdx = 1;
static constexpr int compositionSwitchIdx = -1;
static constexpr int numPhases = 2;
unsigned canonicalToActiveComponentIndex(unsigned solventCompIdx){return solventCompIdx;};
//! number of equations/primary variables
static const int numEq = numComponents + EnergyIndices::numEq_;

Expand All @@ -60,7 +70,7 @@ public:

//! Index of the molefraction of the first component
static constexpr int z0Idx = pressure0Idx + 1;

// equation indices

//! Index of the mass conservation equation for the first
Expand Down