mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove ebos_altidx
building a whole simulator for this, and then not even running a test for it, seems rather excessive. if a test for index-conformance is wanted, a better approach should be taken.
This commit is contained in:
@@ -486,14 +486,6 @@ else()
|
|||||||
set(EBOS_DEBUG_EXTENSIONS_DEFAULT_ENABLE_IF "TRUE")
|
set(EBOS_DEBUG_EXTENSIONS_DEFAULT_ENABLE_IF "TRUE")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
opm_add_test(ebos_altidx
|
|
||||||
ONLY_COMPILE
|
|
||||||
DEFAULT_ENABLE_IF ${EBOS_DEBUG_EXTENSIONS_DEFAULT_ENABLE_IF}
|
|
||||||
SOURCES ebos/ebos_altidx.cc
|
|
||||||
EXE_NAME ebos_altidx
|
|
||||||
DEPENDS opmsimulators
|
|
||||||
LIBRARIES opmsimulators)
|
|
||||||
|
|
||||||
opm_add_test(ebos_plain
|
opm_add_test(ebos_plain
|
||||||
ONLY_COMPILE
|
ONLY_COMPILE
|
||||||
DEFAULT_ENABLE_IF ${EBOS_DEBUG_EXTENSIONS_DEFAULT_ENABLE_IF}
|
DEFAULT_ENABLE_IF ${EBOS_DEBUG_EXTENSIONS_DEFAULT_ENABLE_IF}
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
||||||
// vi: set et ts=4 sw=4 sts=4:
|
|
||||||
/*
|
|
||||||
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 2 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/>.
|
|
||||||
|
|
||||||
Consult the COPYING file in the top-level source directory of this
|
|
||||||
module for the precise wording of the license and the list of
|
|
||||||
copyright holders.
|
|
||||||
*/
|
|
||||||
/*!
|
|
||||||
* \file
|
|
||||||
*
|
|
||||||
* \brief This is an ebos variant which uses alternative phase and component indices than
|
|
||||||
* the default variant.
|
|
||||||
*
|
|
||||||
* It is purely for testing purposes and is supposed to produce bitwise identical
|
|
||||||
* results.
|
|
||||||
*/
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "ebos.hh"
|
|
||||||
#include "startEbos.hh"
|
|
||||||
#include "eclalternativeblackoilindices.hh"
|
|
||||||
|
|
||||||
namespace Opm::Properties {
|
|
||||||
|
|
||||||
namespace TTag {
|
|
||||||
struct EbosAltIdxTypeTag {
|
|
||||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// use a fluid system with different indices than the default
|
|
||||||
template<class TypeTag>
|
|
||||||
struct FluidSystem<TypeTag, TTag::EbosAltIdxTypeTag>
|
|
||||||
{
|
|
||||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
|
||||||
|
|
||||||
public:
|
|
||||||
typedef BlackOilFluidSystem<Scalar, EclAlternativeBlackOilIndexTraits> type;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Opm::Properties
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
using ProblemTypeTag = Opm::Properties::TTag::EbosAltIdxTypeTag;
|
|
||||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
||||||
// vi: set et ts=4 sw=4 sts=4:
|
|
||||||
/*
|
|
||||||
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 2 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/>.
|
|
||||||
|
|
||||||
Consult the COPYING file in the top-level source directory of this
|
|
||||||
module for the precise wording of the license and the list of
|
|
||||||
copyright holders.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef ECL_ALTERNATIVE_BLACKOIL_INDICES_HH
|
|
||||||
#define ECL_ALTERNATIVE_BLACKOIL_INDICES_HH
|
|
||||||
|
|
||||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
|
||||||
|
|
||||||
namespace Opm {
|
|
||||||
|
|
||||||
class EclAlternativeBlackOilIndexTraits
|
|
||||||
{
|
|
||||||
using DIT = Opm::BlackOilDefaultIndexTraits;
|
|
||||||
|
|
||||||
public:
|
|
||||||
static const unsigned waterPhaseIdx = DIT::oilPhaseIdx;
|
|
||||||
static const unsigned oilPhaseIdx = DIT::gasPhaseIdx;
|
|
||||||
static const unsigned gasPhaseIdx = DIT::waterPhaseIdx;
|
|
||||||
|
|
||||||
static const unsigned waterCompIdx = DIT::gasCompIdx;
|
|
||||||
static const unsigned oilCompIdx = DIT::waterCompIdx;
|
|
||||||
static const unsigned gasCompIdx = DIT::oilCompIdx;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <ebos/eclgenericoutputblackoilmodule.hh>
|
#include <ebos/eclgenericoutputblackoilmodule.hh>
|
||||||
#include <ebos/eclalternativeblackoilindices.hh>
|
|
||||||
|
|
||||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||||
|
|
||||||
@@ -1641,6 +1640,5 @@ updateSummaryRegionValues(const Inplace& inplace,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template class EclGenericOutputBlackoilModule<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,double>;
|
template class EclGenericOutputBlackoilModule<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,double>;
|
||||||
template class EclGenericOutputBlackoilModule<BlackOilFluidSystem<double,EclAlternativeBlackOilIndexTraits>,double>;
|
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|||||||
@@ -24,8 +24,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <ebos/eclgenericproblem.hh>
|
#include <ebos/eclgenericproblem.hh>
|
||||||
|
|
||||||
#include <ebos/eclalternativeblackoilindices.hh>
|
|
||||||
|
|
||||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
@@ -642,16 +640,10 @@ initDRSDT_(size_t numDof,
|
|||||||
template class EclGenericProblem<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>,
|
template class EclGenericProblem<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>,
|
||||||
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,
|
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,
|
||||||
double>;
|
double>;
|
||||||
template class EclGenericProblem<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>,
|
|
||||||
BlackOilFluidSystem<double,EclAlternativeBlackOilIndexTraits>,
|
|
||||||
double>;
|
|
||||||
#else
|
#else
|
||||||
template class EclGenericProblem<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
|
template class EclGenericProblem<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
|
||||||
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,
|
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,
|
||||||
double>;
|
double>;
|
||||||
template class EclGenericProblem<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
|
|
||||||
BlackOilFluidSystem<double,EclAlternativeBlackOilIndexTraits>,
|
|
||||||
double>;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template class EclGenericProblem<Dune::GridView<Dune::PolyhedralGridViewTraits<3,3,double,Dune::PartitionIteratorType(4)>>,
|
template class EclGenericProblem<Dune::GridView<Dune::PolyhedralGridViewTraits<3,3,double,Dune::PartitionIteratorType(4)>>,
|
||||||
|
|||||||
@@ -21,8 +21,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <opm/simulators/wells/MultisegmentWellEval.hpp>
|
#include <opm/simulators/wells/MultisegmentWellEval.hpp>
|
||||||
|
|
||||||
#include <ebos/eclalternativeblackoilindices.hh>
|
|
||||||
|
|
||||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||||
|
|
||||||
#include <opm/models/blackoil/blackoilindices.hh>
|
#include <opm/models/blackoil/blackoilindices.hh>
|
||||||
@@ -2011,7 +2009,4 @@ INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,1u,0u,false,false,0u>)
|
|||||||
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,1u,false,false,0u>)
|
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,1u,false,false,0u>)
|
||||||
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,0u,false,false,1u>)
|
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,0u,false,false,1u>)
|
||||||
|
|
||||||
// Alt indices
|
|
||||||
INSTANCE(EclAlternativeBlackOilIndexTraits,BlackOilIndices<0u,0u,0u,0u,false,false,0u>)
|
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|||||||
@@ -22,8 +22,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <opm/simulators/wells/StandardWellEval.hpp>
|
#include <opm/simulators/wells/StandardWellEval.hpp>
|
||||||
|
|
||||||
#include <ebos/eclalternativeblackoilindices.hh>
|
|
||||||
|
|
||||||
#include <opm/material/densead/DynamicEvaluation.hpp>
|
#include <opm/material/densead/DynamicEvaluation.hpp>
|
||||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||||
|
|
||||||
@@ -1276,7 +1274,4 @@ INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,1u,0u,false,false,0u>)
|
|||||||
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,1u,false,false,0u>)
|
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,1u,false,false,0u>)
|
||||||
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,1u,false,false,1u>)
|
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,1u,false,false,1u>)
|
||||||
|
|
||||||
// Alternative indices
|
|
||||||
INSTANCE(EclAlternativeBlackOilIndexTraits,BlackOilIndices<0u,0u,0u,0u,false,false,0u>)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,8 +22,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <opm/simulators/wells/WellInterfaceEval.hpp>
|
#include <opm/simulators/wells/WellInterfaceEval.hpp>
|
||||||
|
|
||||||
#include <ebos/eclalternativeblackoilindices.hh>
|
|
||||||
|
|
||||||
#include <opm/material/densead/Evaluation.hpp>
|
#include <opm/material/densead/Evaluation.hpp>
|
||||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||||
|
|
||||||
@@ -535,10 +533,8 @@ calculateBhpFromThp<__VA_ARGS__>(const WellState&, \
|
|||||||
DeferredLogger&) const;
|
DeferredLogger&) const;
|
||||||
|
|
||||||
using FluidSys = BlackOilFluidSystem<double, BlackOilDefaultIndexTraits>;
|
using FluidSys = BlackOilFluidSystem<double, BlackOilDefaultIndexTraits>;
|
||||||
using FluidAltSys = BlackOilFluidSystem<double, EclAlternativeBlackOilIndexTraits>;
|
|
||||||
|
|
||||||
template class WellInterfaceEval<FluidSys>;
|
template class WellInterfaceEval<FluidSys>;
|
||||||
template class WellInterfaceEval<FluidAltSys>;
|
|
||||||
|
|
||||||
INSTANCE_METHODS(FluidSys, DenseAd::Evaluation<double,3,0u>)
|
INSTANCE_METHODS(FluidSys, DenseAd::Evaluation<double,3,0u>)
|
||||||
INSTANCE_METHODS(FluidSys, DenseAd::Evaluation<double,4,0u>)
|
INSTANCE_METHODS(FluidSys, DenseAd::Evaluation<double,4,0u>)
|
||||||
@@ -554,9 +550,6 @@ INSTANCE_METHODS(FluidSys, DenseAd::Evaluation<double,-1,8u>)
|
|||||||
INSTANCE_METHODS(FluidSys, DenseAd::Evaluation<double,-1,9u>)
|
INSTANCE_METHODS(FluidSys, DenseAd::Evaluation<double,-1,9u>)
|
||||||
INSTANCE_METHODS(FluidSys, DenseAd::Evaluation<double,-1,10u>)
|
INSTANCE_METHODS(FluidSys, DenseAd::Evaluation<double,-1,10u>)
|
||||||
|
|
||||||
INSTANCE_METHODS(FluidAltSys, DenseAd::Evaluation<double,7,0u>)
|
|
||||||
INSTANCE_METHODS(FluidAltSys, DenseAd::Evaluation<double,-1,8u>)
|
|
||||||
|
|
||||||
#define INSTANCE_BHP(...) \
|
#define INSTANCE_BHP(...) \
|
||||||
template double WellInterfaceEval<__VA_ARGS__>:: \
|
template double WellInterfaceEval<__VA_ARGS__>:: \
|
||||||
calculateBhpFromThp<double>(const WellState&, \
|
calculateBhpFromThp<double>(const WellState&, \
|
||||||
@@ -567,6 +560,5 @@ calculateBhpFromThp<double>(const WellState&, \
|
|||||||
DeferredLogger&) const;
|
DeferredLogger&) const;
|
||||||
|
|
||||||
INSTANCE_BHP(FluidSys)
|
INSTANCE_BHP(FluidSys)
|
||||||
INSTANCE_BHP(FluidAltSys)
|
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
#include <opm/simulators/wells/WellState.hpp>
|
#include <opm/simulators/wells/WellState.hpp>
|
||||||
#include <opm/simulators/wells/GroupState.hpp>
|
#include <opm/simulators/wells/GroupState.hpp>
|
||||||
#include <opm/simulators/wells/TargetCalculator.hpp>
|
#include <opm/simulators/wells/TargetCalculator.hpp>
|
||||||
#include <ebos/eclalternativeblackoilindices.hh>
|
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@@ -1102,6 +1101,5 @@ getGroupProductionTargetRate(const Group& group,
|
|||||||
return scale;
|
return scale;
|
||||||
}
|
}
|
||||||
template class WellInterfaceFluidSystem<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>;
|
template class WellInterfaceFluidSystem<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>;
|
||||||
template class WellInterfaceFluidSystem<BlackOilFluidSystem<double,EclAlternativeBlackOilIndexTraits>>;
|
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|||||||
@@ -22,8 +22,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <opm/simulators/wells/WellInterfaceIndices.hpp>
|
#include <opm/simulators/wells/WellInterfaceIndices.hpp>
|
||||||
|
|
||||||
#include <ebos/eclalternativeblackoilindices.hh>
|
|
||||||
|
|
||||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||||
|
|
||||||
#include <opm/models/blackoil/blackoilindices.hh>
|
#include <opm/models/blackoil/blackoilindices.hh>
|
||||||
@@ -143,7 +141,4 @@ INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,1u,false,false,0u>)
|
|||||||
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,1u,false,false,1u>)
|
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,1u,false,false,1u>)
|
||||||
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,0u,false,false,1u>)
|
INSTANCE(BlackOilDefaultIndexTraits,BlackOilIndices<0u,0u,0u,0u,false,false,1u>)
|
||||||
|
|
||||||
// Alternative indices
|
|
||||||
INSTANCE(EclAlternativeBlackOilIndexTraits,BlackOilIndices<0u,0u,0u,0u,false,false,0u>)
|
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|||||||
Reference in New Issue
Block a user