mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adapt to the removal of the tags for local-AD evaluations
This commit is contained in:
parent
b31ceff970
commit
1d38555f92
@ -23,8 +23,8 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file
|
* \file
|
||||||
*
|
*
|
||||||
* \brief This test makes sure that the programming interface is
|
* \brief This test ensures that the API of the black-oil fluid state conforms to the
|
||||||
* observed by all fluid systems
|
* fluid state specification
|
||||||
*/
|
*/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
@ -36,42 +36,19 @@
|
|||||||
#include <ewoms/models/blackoil/blackoilfluidstate.hh>
|
#include <ewoms/models/blackoil/blackoilfluidstate.hh>
|
||||||
|
|
||||||
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
||||||
|
|
||||||
// include dune's MPI helper header
|
|
||||||
#include <dune/common/version.hh>
|
|
||||||
#include <dune/common/parallel/mpihelper.hh>
|
#include <dune/common/parallel/mpihelper.hh>
|
||||||
|
|
||||||
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||||
|
|
||||||
// check the API of the black-oil fluid states
|
int main(int argc, char **argv)
|
||||||
template <class Scalar>
|
|
||||||
void testBlackOilFluidState()
|
|
||||||
{
|
{
|
||||||
typedef TTAG(BlackOilModel) TypeTag;
|
typedef TTAG(BlackOilModel) TypeTag;
|
||||||
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
|
||||||
typedef Ewoms::BlackOilFluidState<TypeTag> FluidState;
|
typedef Ewoms::BlackOilFluidState<TypeTag> FluidState;
|
||||||
|
|
||||||
|
Dune::MPIHelper::instance(argc, argv);
|
||||||
|
|
||||||
FluidState fs;
|
FluidState fs;
|
||||||
checkFluidState<Evaluation>(fs);
|
checkFluidState<Evaluation>(fs);
|
||||||
}
|
|
||||||
|
|
||||||
class TestAdTag;
|
|
||||||
|
|
||||||
template <class Scalar>
|
|
||||||
inline void testAll()
|
|
||||||
{
|
|
||||||
typedef Opm::LocalAd::Evaluation<Scalar, TestAdTag, 3> Evaluation;
|
|
||||||
|
|
||||||
// ensure that all fluid states are API-compliant
|
|
||||||
testBlackOilFluidState<Scalar>();
|
|
||||||
testBlackOilFluidState<Evaluation>();
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
Dune::MPIHelper::instance(argc, argv);
|
|
||||||
testAll<double>();
|
|
||||||
testAll<float>()
|
|
||||||
;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user