mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
#1035 Replaced auto in the example/test code to understand what is going on.
This commit is contained in:
parent
c555f77a71
commit
cd6ee6466b
@ -62,7 +62,7 @@ namespace example {
|
||||
Opm::ECLGraph::PhaseIndex::Liquid ,
|
||||
Opm::ECLGraph::PhaseIndex::Vapour })
|
||||
{
|
||||
const auto pflux = G.flux(p);
|
||||
const std::vector<double> pflux = G.flux(p);
|
||||
|
||||
if (! pflux.empty()) {
|
||||
assert (pflux.size() == nconn.total);
|
||||
@ -125,19 +125,22 @@ namespace example {
|
||||
inline Opm::FlowDiagnostics::Toolbox
|
||||
initialiseFlowDiagnostics(const Opm::ECLGraph& G)
|
||||
{
|
||||
const auto connGraph = Opm::FlowDiagnostics::
|
||||
ConnectivityGraph{ static_cast<int>(G.numCells()),
|
||||
G.neighbours() };
|
||||
const Opm::FlowDiagnostics::ConnectivityGraph connGraph =
|
||||
Opm::FlowDiagnostics::ConnectivityGraph{ static_cast<int>(G.numCells()),
|
||||
G.neighbours() };
|
||||
|
||||
// Create the Toolbox.
|
||||
auto tool = Opm::FlowDiagnostics::Toolbox{ connGraph };
|
||||
|
||||
Opm::FlowDiagnostics::Toolbox tool = Opm::FlowDiagnostics::Toolbox{ connGraph };
|
||||
|
||||
tool.assignPoreVolume(G.poreVolume());
|
||||
tool.assignConnectionFlux(Hack::convert_flux_to_SI(extractFluxField(G)));
|
||||
|
||||
auto wsol = Opm::ECLWellSolution{};
|
||||
Opm::FlowDiagnostics::ConnectionValues connectionsVals = Hack::convert_flux_to_SI(extractFluxField(G));
|
||||
tool.assignConnectionFlux(connectionsVals);
|
||||
|
||||
const auto well_fluxes =
|
||||
Opm::ECLWellSolution wsol = Opm::ECLWellSolution{};
|
||||
|
||||
const std::vector<Opm::ECLWellSolution::WellData> well_fluxes =
|
||||
wsol.solution(G.rawResultData(), G.numGrids());
|
||||
|
||||
tool.assignInflowFlux(extractWellFlows(G, well_fluxes));
|
||||
|
@ -29,8 +29,8 @@ TEST(opm_flowdiagnostics_test, basic_construction)
|
||||
|
||||
// Solve for time of flight.
|
||||
std::vector<Opm::FlowDiagnostics::CellSet> start;
|
||||
auto sol = fdTool.computeInjectionDiagnostics(start);
|
||||
const auto& tof = sol.fd.timeOfFlight();
|
||||
Opm::FlowDiagnostics::Toolbox::Forward sol = fdTool.computeInjectionDiagnostics(start);
|
||||
const std::vector<double>& tof = sol.fd.timeOfFlight();
|
||||
|
||||
// Write it to standard out.
|
||||
std::cout.precision(16);
|
||||
|
Loading…
Reference in New Issue
Block a user