mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-18 21:43:27 -06:00
Update doc, only initialize tracerhead_by_cell_ if needed.
This commit is contained in:
parent
9f6b4e5258
commit
241f866709
@ -95,8 +95,6 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
/// Solve for time-of-flight and a number of tracers.
|
/// Solve for time-of-flight and a number of tracers.
|
||||||
/// One tracer will be used for each inflow flux specified in
|
|
||||||
/// the source parameter.
|
|
||||||
/// \param[in] darcyflux Array of signed face fluxes.
|
/// \param[in] darcyflux Array of signed face fluxes.
|
||||||
/// \param[in] porevolume Array of pore volumes.
|
/// \param[in] porevolume Array of pore volumes.
|
||||||
/// \param[in] source Source term. Sign convention is:
|
/// \param[in] source Source term. Sign convention is:
|
||||||
@ -105,8 +103,8 @@ namespace Opm
|
|||||||
/// \param[in] tracerheads Table containing one row per tracer, and each
|
/// \param[in] tracerheads Table containing one row per tracer, and each
|
||||||
/// row contains the source cells for that tracer.
|
/// row contains the source cells for that tracer.
|
||||||
/// \param[out] tof Array of time-of-flight values (1 per cell).
|
/// \param[out] tof Array of time-of-flight values (1 per cell).
|
||||||
/// \param[out] tracer Array of tracer values (N per cell, where N is
|
/// \param[out] tracer Array of tracer values. N per cell, where N is
|
||||||
/// the number of cells c for which source[c] > 0.0).
|
/// equalt to tracerheads.size().
|
||||||
void TofReorder::solveTofTracer(const double* darcyflux,
|
void TofReorder::solveTofTracer(const double* darcyflux,
|
||||||
const double* porevolume,
|
const double* porevolume,
|
||||||
const double* source,
|
const double* source,
|
||||||
@ -132,8 +130,10 @@ namespace Opm
|
|||||||
num_tracers_ = tracerheads.size();
|
num_tracers_ = tracerheads.size();
|
||||||
tracer.resize(grid_.number_of_cells*num_tracers_);
|
tracer.resize(grid_.number_of_cells*num_tracers_);
|
||||||
std::fill(tracer.begin(), tracer.end(), 0.0);
|
std::fill(tracer.begin(), tracer.end(), 0.0);
|
||||||
tracerhead_by_cell_.clear();
|
if (num_tracers_ > 0) {
|
||||||
tracerhead_by_cell_.resize(grid_.number_of_cells, NoTracerHead);
|
tracerhead_by_cell_.clear();
|
||||||
|
tracerhead_by_cell_.resize(grid_.number_of_cells, NoTracerHead);
|
||||||
|
}
|
||||||
for (int tr = 0; tr < num_tracers_; ++tr) {
|
for (int tr = 0; tr < num_tracers_; ++tr) {
|
||||||
for (int i = 0; i < tracerheads[tr].size(); ++i) {
|
for (int i = 0; i < tracerheads[tr].size(); ++i) {
|
||||||
const int cell = tracerheads[tr][i];
|
const int cell = tracerheads[tr][i];
|
||||||
|
@ -62,8 +62,6 @@ namespace Opm
|
|||||||
std::vector<double>& tof);
|
std::vector<double>& tof);
|
||||||
|
|
||||||
/// Solve for time-of-flight and a number of tracers.
|
/// Solve for time-of-flight and a number of tracers.
|
||||||
/// One tracer will be used for each inflow flux specified in
|
|
||||||
/// the source parameter.
|
|
||||||
/// \param[in] darcyflux Array of signed face fluxes.
|
/// \param[in] darcyflux Array of signed face fluxes.
|
||||||
/// \param[in] porevolume Array of pore volumes.
|
/// \param[in] porevolume Array of pore volumes.
|
||||||
/// \param[in] source Source term. Sign convention is:
|
/// \param[in] source Source term. Sign convention is:
|
||||||
@ -72,8 +70,8 @@ namespace Opm
|
|||||||
/// \param[in] tracerheads Table containing one row per tracer, and each
|
/// \param[in] tracerheads Table containing one row per tracer, and each
|
||||||
/// row contains the source cells for that tracer.
|
/// row contains the source cells for that tracer.
|
||||||
/// \param[out] tof Array of time-of-flight values (1 per cell).
|
/// \param[out] tof Array of time-of-flight values (1 per cell).
|
||||||
/// \param[out] tracer Array of tracer values (N per cell, where N is
|
/// \param[out] tracer Array of tracer values. N per cell, where N is
|
||||||
/// the number of cells c for which source[c] > 0.0).
|
/// equalt to tracerheads.size().
|
||||||
void solveTofTracer(const double* darcyflux,
|
void solveTofTracer(const double* darcyflux,
|
||||||
const double* porevolume,
|
const double* porevolume,
|
||||||
const double* source,
|
const double* source,
|
||||||
|
Loading…
Reference in New Issue
Block a user