Skip to content

Commit

Permalink
Moved todo comments to header file
Browse files Browse the repository at this point in the history
  • Loading branch information
bellout committed Jan 25, 2017
1 parent 3877808 commit 035c647
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
20 changes: 1 addition & 19 deletions FieldOpt/Hdf5SummaryReader/hdf5_summary_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,10 @@ void Hdf5SummaryReader::readSaturation(std::string file_path) {
H5File file(file_path, H5F_ACC_RDONLY);
Group group = Group(file.openGroup(GROUP_NAME_FLOW_TRANSPORT));
auto dataset_exists = H5Lexists(group.getId(), "GRIDPROPTIME", H5F_ACC_RDONLY);
// std::cout << "dataset_exists = " << dataset_exists << std::endl;

std::vector<std::vector<double>> sgas, soil, swat;

/*!
\todo Overall, this needs a better implementation, e.g., read soil and sgas
at the same time from the H5 group, instead of one vector at a time, which
appears inefficient... on the other hand, this reading needs to be made
flexible/robust against the different phase combinations that might exist
in GRIDPROPTIME, e.g., soil/sgas, soil/sgas/swat, soil/swat, etc.
*/

/*!
\todo Later: to save space, load saturation data as additional columns in
PTZ (replacing current compositional columns? comtrolled by custom KEYWORD?),
and remove GRIDPROPTIME completely
*/

if (dataset_exists) {

// std::cout << "number of phases = " << number_of_phases() << std::endl;

hsize_t SOIL, SWAT, SGAS;
if (number_of_phases() < 3){
SGAS = 0;
Expand Down Expand Up @@ -151,7 +133,7 @@ void Hdf5SummaryReader::readReservoirPressure(std::string file_path) {

// Reorder pressure vector
// Note:
// Data/time component ordering inside vector:
// Data/time component ordering inside data vector:
// Example: pressure vector with 5 cells over 8 time steps:
// size of vector = ncells (x ndata_cols=1) x ntime_steps
//
Expand Down
20 changes: 20 additions & 0 deletions FieldOpt/Hdf5SummaryReader/hdf5_summary_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@
*
* \todo This must also be tested for a 3 phase black oil model,
* it has only been tested for 2 phase dead oil.
*
* \todo Overall, Hdf5SummaryReader::readSaturation needs a better
* implementation that reads soil and sgas at the same time/as a
* single chunck from the H5 group, instead of reading from H5 one
* vector at a time (the thinking is that the former is probably
* more efficient that the latter).
* In either case, the reading functionality needs to be flexible/
* /robust with respect to the different phase combinations that
* might exist in the H5 group (currently GRIDPROPTIME), e.g.,
* soil/sgas, soil/sgas/swat, soil/swat, etc.
*
* \todo Later: to reduce the size of the H5 file, make ADGPRS/
* Optimizer save the saturation data (and whatever else) as
* additional columns into the existing PTZ group (possibly
* replacing current mobility columns), and remove GRIDPROPTIME
* completely.
* Additionally, which cell data types (including custom data
* types) to print to H5 during simulation may be controlled by
* custom simulator KEYWORD.
*
*/
class Hdf5SummaryReader {
public:
Expand Down

0 comments on commit 035c647

Please sign in to comment.