fixed: properly avoid inclusion of BDA types if BDA is disabled

This commit is contained in:
Arne Morten Kvarving 2024-05-02 11:31:23 +02:00
parent da5f20a0d9
commit 3024fba293
5 changed files with 12 additions and 5 deletions

View File

@ -89,6 +89,10 @@ struct EnableTerminalOutput {
namespace Opm {
#if COMPILE_BDA_BRIDGE
class WellContributions;
#endif
/// Class for handling the blackoil well model.
template<typename TypeTag>
class BlackoilWellModel : public BaseAuxiliaryModule<TypeTag>
@ -281,8 +285,10 @@ namespace Opm {
// subtract B*inv(D)*C * x from A*x
void apply(const BVector& x, BVector& Ax) const;
#if COMPILE_BDA_BRIDGE
// accumulate the contributions of all Wells in the WellContributions object
void getWellContributions(WellContributions& x) const;
#endif
// apply well model with scaling of alpha
void applyScaleAdd(const Scalar alpha, const BVector& x, BVector& Ax) const;

View File

@ -41,7 +41,10 @@
#include <opm/simulators/wells/ParallelWBPCalculation.hpp>
#include <opm/simulators/wells/VFPProperties.hpp>
#include <opm/simulators/utils/MPIPacker.hpp>
#if COMPILE_BDA_BRIDGE
#include <opm/simulators/linalg/bda/WellContributions.hpp>
#endif
#if HAVE_MPI
#include <opm/simulators/utils/MPISerializer.hpp>
@ -1556,6 +1559,7 @@ namespace Opm {
}
}
#if COMPILE_BDA_BRIDGE
template<typename TypeTag>
void
BlackoilWellModel<TypeTag>::
@ -1591,6 +1595,7 @@ namespace Opm {
}
}
}
#endif
// Ax = Ax - alpha * C D^-1 B x
template<typename TypeTag>

View File

@ -29,8 +29,6 @@
#include <opm/material/densead/Evaluation.hpp>
#include <array>
#include <memory>
#include <utility>
#include <vector>
@ -39,7 +37,6 @@ namespace Opm
class ConvergenceReport;
class Schedule;
class WellContributions;
class SummaryState;
template<class FluidSystem, class Indices> class WellInterfaceIndices;

View File

@ -46,7 +46,7 @@
#include <cstddef>
#include <string>
#if HAVE_CUDA || HAVE_OPENCL
#if COMPILE_BDA_BRIDGE && (HAVE_CUDA || HAVE_OPENCL)
#include <opm/simulators/linalg/bda/WellContributions.hpp>
#endif

View File

@ -35,7 +35,6 @@
#include <opm/simulators/wells/WellConvergence.hpp>
#include <opm/simulators/wells/WellInterfaceIndices.hpp>
#include <opm/simulators/wells/WellState.hpp>
#include <opm/simulators/linalg/bda/WellContributions.hpp>
#include <cmath>
#include <cstddef>