mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-25 15:10:09 -05:00
Merge pull request #6041 from akva2/fix_tracer_comp
Fix tracercontainer in flowexp_comp
This commit is contained in:
4 files changed
+13
-18
No files matched your search
@@ -125,7 +125,6 @@ GenericOutputBlackoilModule(const EclipseState& eclState,
|
||||
, enableSaltPrecipitation_(enableSaltPrecipitation)
|
||||
, enableExtbo_(enableExtbo)
|
||||
, enableMICP_(enableMICP)
|
||||
, tracerC_(eclState_)
|
||||
, flowsC_(schedule, summaryConfig)
|
||||
, rftC_(eclState_, schedule_,
|
||||
[this](const std::string& wname)
|
||||
@@ -481,7 +480,7 @@ assignToSolution(data::Solution& sol)
|
||||
this->fipC_.outputRestart(sol);
|
||||
|
||||
// Tracers
|
||||
this->tracerC_.outputRestart(sol);
|
||||
this->tracerC_.outputRestart(sol, eclState_.tracer());
|
||||
}
|
||||
|
||||
template<class FluidSystem>
|
||||
@@ -915,7 +914,7 @@ doAllocBuffers(const unsigned bufferSize,
|
||||
}
|
||||
|
||||
// tracers
|
||||
this->tracerC_.allocate(bufferSize);
|
||||
this->tracerC_.allocate(bufferSize, eclState_.tracer());
|
||||
|
||||
//Warn for any unhandled keyword
|
||||
if (log) {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
namespace Opm {
|
||||
|
||||
namespace data { class Solution; }
|
||||
template<class Scalar> class MICPSolutionContainer;
|
||||
template<class Scalar> struct MICPSolutionContainer;
|
||||
|
||||
template<class Scalar>
|
||||
class MICPContainer
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <config.h>
|
||||
#include <opm/simulators/flow/TracerContainer.hpp>
|
||||
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/TracerConfig.hpp>
|
||||
|
||||
#include <opm/material/fluidsystems/BlackOilDefaultIndexTraits.hpp>
|
||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||
@@ -38,9 +38,9 @@ namespace Opm {
|
||||
|
||||
template<class FluidSystem>
|
||||
void TracerContainer<FluidSystem>::
|
||||
allocate(const unsigned bufferSize)
|
||||
allocate(const unsigned bufferSize,
|
||||
const TracerConfig& tracers)
|
||||
{
|
||||
const auto& tracers = eclState_.tracer();
|
||||
if (!tracers.empty()) {
|
||||
allocated_ = true;
|
||||
freeConcentrations_.resize(tracers.size());
|
||||
@@ -93,13 +93,13 @@ assignSolConcentrations(const unsigned globalDofIdx,
|
||||
|
||||
template<class FluidSystem>
|
||||
void TracerContainer<FluidSystem>::
|
||||
outputRestart(data::Solution& sol)
|
||||
outputRestart(data::Solution& sol,
|
||||
const TracerConfig& tracers)
|
||||
{
|
||||
if (!this->allocated_) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto& tracers = this->eclState_.tracer();
|
||||
std::for_each(tracers.begin(), tracers.end(),
|
||||
[idx = 0, &sol, this](const auto& tracer) mutable
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
namespace Opm {
|
||||
|
||||
namespace data { class Solution; }
|
||||
class EclipseState;
|
||||
class TracerConfig;
|
||||
|
||||
template<class FluidSystem>
|
||||
class TracerContainer
|
||||
@@ -41,11 +41,8 @@ class TracerContainer
|
||||
using ScalarBuffer = std::vector<Scalar>;
|
||||
|
||||
public:
|
||||
TracerContainer(const EclipseState& eclState)
|
||||
: eclState_(eclState)
|
||||
{}
|
||||
|
||||
void allocate(const unsigned bufferSize);
|
||||
void allocate(const unsigned bufferSize,
|
||||
const TracerConfig& tracers);
|
||||
|
||||
using AssignFunction = std::function<Scalar(const unsigned)>;
|
||||
|
||||
@@ -55,11 +52,10 @@ public:
|
||||
void assignSolConcentrations(const unsigned globalDofIdx,
|
||||
const AssignFunction& concentration);
|
||||
|
||||
void outputRestart(data::Solution& sol);
|
||||
void outputRestart(data::Solution& sol,
|
||||
const TracerConfig& tracers);
|
||||
|
||||
private:
|
||||
const EclipseState& eclState_;
|
||||
|
||||
std::vector<ScalarBuffer> freeConcentrations_{};
|
||||
std::vector<ScalarBuffer> solConcentrations_{};
|
||||
bool allocated_{false};
|
||||
|
||||
Reference in new issue
Block a user