mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-25 00:40:02 -06:00
Fix compilationw with amgcl/vexcl and without CUDA/OpenCL.
There is no reason to omit WellContributions if neither CUDA nor OpenCL is found as the implementations/functions only use C++- To the contrary, the defines used for deactivating were not consistent with usage elsewhere and resulted in compiler erorrs for exotic configuration
This commit is contained in:
parent
0a3ede1400
commit
c2963560d2
@ -253,10 +253,8 @@ namespace Opm {
|
|||||||
// subtract B*inv(D)*C * x from A*x
|
// subtract B*inv(D)*C * x from A*x
|
||||||
void apply(const BVector& x, BVector& Ax) const;
|
void apply(const BVector& x, BVector& Ax) const;
|
||||||
|
|
||||||
#if HAVE_CUDA || HAVE_OPENCL
|
|
||||||
// accumulate the contributions of all Wells in the WellContributions object
|
// accumulate the contributions of all Wells in the WellContributions object
|
||||||
void getWellContributions(WellContributions& x) const;
|
void getWellContributions(WellContributions& x) const;
|
||||||
#endif
|
|
||||||
|
|
||||||
// apply well model with scaling of alpha
|
// apply well model with scaling of alpha
|
||||||
void applyScaleAdd(const Scalar alpha, const BVector& x, BVector& Ax) const;
|
void applyScaleAdd(const Scalar alpha, const BVector& x, BVector& Ax) const;
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
|
|
||||||
#include <opm/simulators/wells/VFPProperties.hpp>
|
#include <opm/simulators/wells/VFPProperties.hpp>
|
||||||
#include <opm/simulators/utils/MPIPacker.hpp>
|
#include <opm/simulators/utils/MPIPacker.hpp>
|
||||||
|
#include <opm/simulators/linalg/bda/WellContributions.hpp>
|
||||||
|
|
||||||
#if HAVE_MPI
|
#if HAVE_MPI
|
||||||
#include <ebos/eclmpiserializer.hh>
|
#include <ebos/eclmpiserializer.hh>
|
||||||
#endif
|
#endif
|
||||||
@ -1191,7 +1193,6 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_CUDA || HAVE_OPENCL
|
|
||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
void
|
void
|
||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
@ -1229,7 +1230,6 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Ax = Ax - alpha * C D^-1 B x
|
// Ax = Ax - alpha * C D^-1 B x
|
||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
|
@ -1815,7 +1815,6 @@ updateUpwindingSegments()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_CUDA || HAVE_OPENCL
|
|
||||||
template<typename FluidSystem, typename Indices, typename Scalar>
|
template<typename FluidSystem, typename Indices, typename Scalar>
|
||||||
void
|
void
|
||||||
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
|
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
|
||||||
@ -1883,7 +1882,6 @@ addWellContribution(WellContributions& wellContribs) const
|
|||||||
Drows,
|
Drows,
|
||||||
Cvals);
|
Cvals);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#define INSTANCE(A,...) \
|
#define INSTANCE(A,...) \
|
||||||
template class MultisegmentWellEval<BlackOilFluidSystem<double,A>,__VA_ARGS__,double>;
|
template class MultisegmentWellEval<BlackOilFluidSystem<double,A>,__VA_ARGS__,double>;
|
||||||
|
@ -54,10 +54,8 @@ template<typename FluidSystem, typename Indices, typename Scalar>
|
|||||||
class MultisegmentWellEval : public MultisegmentWellGeneric<Scalar>
|
class MultisegmentWellEval : public MultisegmentWellGeneric<Scalar>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if HAVE_CUDA || HAVE_OPENCL
|
|
||||||
/// add the contribution (C, D, B matrices) of this Well to the WellContributions object
|
/// add the contribution (C, D, B matrices) of this Well to the WellContributions object
|
||||||
void addWellContribution(WellContributions& wellContribs) const;
|
void addWellContribution(WellContributions& wellContribs) const;
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// TODO: for now, not considering the polymer, solvent and so on to simplify the development process.
|
// TODO: for now, not considering the polymer, solvent and so on to simplify the development process.
|
||||||
|
@ -34,13 +34,11 @@
|
|||||||
#include <opm/simulators/wells/ParallelWellInfo.hpp>
|
#include <opm/simulators/wells/ParallelWellInfo.hpp>
|
||||||
#include <opm/simulators/wells/WellInterfaceIndices.hpp>
|
#include <opm/simulators/wells/WellInterfaceIndices.hpp>
|
||||||
#include <opm/simulators/wells/WellState.hpp>
|
#include <opm/simulators/wells/WellState.hpp>
|
||||||
|
#include <opm/simulators/linalg/bda/WellContributions.hpp>
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#if HAVE_CUDA || HAVE_OPENCL
|
|
||||||
#include <opm/simulators/linalg/bda/WellContributions.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
@ -1109,7 +1107,6 @@ init(std::vector<double>& perf_depth,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_CUDA || HAVE_OPENCL
|
|
||||||
template<class FluidSystem, class Indices, class Scalar>
|
template<class FluidSystem, class Indices, class Scalar>
|
||||||
void
|
void
|
||||||
StandardWellEval<FluidSystem,Indices,Scalar>::
|
StandardWellEval<FluidSystem,Indices,Scalar>::
|
||||||
@ -1158,7 +1155,6 @@ addWellContribution(WellContributions& wellContribs) const
|
|||||||
}
|
}
|
||||||
wellContribs.addMatrix(WellContributions::MatrixType::B, colIndices.data(), nnzValues.data(), this->duneB_.nonzeroes());
|
wellContribs.addMatrix(WellContributions::MatrixType::B, colIndices.data(), nnzValues.data(), this->duneB_.nonzeroes());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#define INSTANCE(A,...) \
|
#define INSTANCE(A,...) \
|
||||||
template class StandardWellEval<BlackOilFluidSystem<double,A>,__VA_ARGS__,double>;
|
template class StandardWellEval<BlackOilFluidSystem<double,A>,__VA_ARGS__,double>;
|
||||||
|
@ -96,10 +96,8 @@ public:
|
|||||||
using Eval = DenseAd::Evaluation<Scalar, Indices::numEq>;
|
using Eval = DenseAd::Evaluation<Scalar, Indices::numEq>;
|
||||||
using BVectorWell = typename StandardWellGeneric<Scalar>::BVectorWell;
|
using BVectorWell = typename StandardWellGeneric<Scalar>::BVectorWell;
|
||||||
|
|
||||||
#if HAVE_CUDA || HAVE_OPENCL
|
|
||||||
/// add the contribution (C, D^-1, B matrices) of this Well to the WellContributions object
|
/// add the contribution (C, D^-1, B matrices) of this Well to the WellContributions object
|
||||||
void addWellContribution(WellContributions& wellContribs) const;
|
void addWellContribution(WellContributions& wellContribs) const;
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
StandardWellEval(const WellInterfaceIndices<FluidSystem,Indices,Scalar>& baseif);
|
StandardWellEval(const WellInterfaceIndices<FluidSystem,Indices,Scalar>& baseif);
|
||||||
|
@ -518,7 +518,6 @@ checkConvergencePolyMW(const std::vector<double>& res,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if HAVE_CUDA || HAVE_OPENCL
|
|
||||||
template<class Scalar>
|
template<class Scalar>
|
||||||
void
|
void
|
||||||
StandardWellGeneric<Scalar>::
|
StandardWellGeneric<Scalar>::
|
||||||
@ -526,7 +525,6 @@ getNumBlocks(unsigned int& numBlocks) const
|
|||||||
{
|
{
|
||||||
numBlocks = duneB_.nonzeroes();
|
numBlocks = duneB_.nonzeroes();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
template class StandardWellGeneric<double>;
|
template class StandardWellGeneric<double>;
|
||||||
|
|
||||||
|
@ -65,10 +65,8 @@ protected:
|
|||||||
using OffDiagMatWell = Dune::BCRSMatrix<OffDiagMatrixBlockWellType>;
|
using OffDiagMatWell = Dune::BCRSMatrix<OffDiagMatrixBlockWellType>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#if HAVE_CUDA || HAVE_OPENCL
|
|
||||||
/// get the number of blocks of the C and B matrices, used to allocate memory in a WellContributions object
|
/// get the number of blocks of the C and B matrices, used to allocate memory in a WellContributions object
|
||||||
void getNumBlocks(unsigned int& _nnzs) const;
|
void getNumBlocks(unsigned int& _nnzs) const;
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
StandardWellGeneric(int Bhp,
|
StandardWellGeneric(int Bhp,
|
||||||
|
Loading…
Reference in New Issue
Block a user