mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #13 from GitPaean/kel85uk-task/#3/BlackoilAquiferModel
Introduces aquiferActive() to reduce overhead during matrix assembly without aquifers.
This commit is contained in:
commit
1c6dfbf295
@ -71,10 +71,12 @@ namespace Opm {
|
|||||||
// at the beginning of each time step (Not report step)
|
// at the beginning of each time step (Not report step)
|
||||||
void prepareTimeStep(const SimulatorTimerInterface& timer);
|
void prepareTimeStep(const SimulatorTimerInterface& timer);
|
||||||
|
|
||||||
|
bool aquiferActive() const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|
||||||
#include "BlackoilAquiferModel_impl.hpp"
|
#include "BlackoilAquiferModel_impl.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
@ -15,6 +15,10 @@ namespace Opm {
|
|||||||
void
|
void
|
||||||
BlackoilAquiferModel<TypeTag>:: timeStepSucceeded(const SimulatorTimerInterface& timer)
|
BlackoilAquiferModel<TypeTag>:: timeStepSucceeded(const SimulatorTimerInterface& timer)
|
||||||
{
|
{
|
||||||
|
if ( !aquiferActive() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (auto aquifer = aquifers_.begin(); aquifer != aquifers_.end(); ++aquifer)
|
for (auto aquifer = aquifers_.begin(); aquifer != aquifers_.end(); ++aquifer)
|
||||||
{
|
{
|
||||||
aquifer->afterTimeStep(timer);
|
aquifer->afterTimeStep(timer);
|
||||||
@ -27,6 +31,10 @@ namespace Opm {
|
|||||||
assemble( const SimulatorTimerInterface& timer,
|
assemble( const SimulatorTimerInterface& timer,
|
||||||
const int iterationIdx )
|
const int iterationIdx )
|
||||||
{
|
{
|
||||||
|
if ( !aquiferActive() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// We need to update the reservoir pressures connected to the aquifer
|
// We need to update the reservoir pressures connected to the aquifer
|
||||||
updateConnectionIntensiveQuantities();
|
updateConnectionIntensiveQuantities();
|
||||||
|
|
||||||
@ -85,8 +93,13 @@ namespace Opm {
|
|||||||
void
|
void
|
||||||
BlackoilAquiferModel<TypeTag>:: init()
|
BlackoilAquiferModel<TypeTag>:: init()
|
||||||
{
|
{
|
||||||
updateConnectionIntensiveQuantities();
|
|
||||||
const auto& deck = ebosSimulator_.vanguard().deck();
|
const auto& deck = ebosSimulator_.vanguard().deck();
|
||||||
|
|
||||||
|
if ( !deck.hasKeyword("AQUCT") ) {
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateConnectionIntensiveQuantities();
|
||||||
const auto& eclState = ebosSimulator_.vanguard().eclState();
|
const auto& eclState = ebosSimulator_.vanguard().eclState();
|
||||||
|
|
||||||
// Get all the carter tracy aquifer properties data and put it in aquifers vector
|
// Get all the carter tracy aquifer properties data and put it in aquifers vector
|
||||||
@ -107,4 +120,11 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Opm
|
template<typename TypeTag>
|
||||||
|
bool
|
||||||
|
BlackoilAquiferModel<TypeTag>:: aquiferActive() const
|
||||||
|
{
|
||||||
|
return !aquifers_.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user