Skip to content

Commit

Permalink
reflecting librom update
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer2368 committed Mar 15, 2024
1 parent 02e50e1 commit 1954a01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/rom_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void ROMHandlerBase::LoadReducedBasis()
*/
{
int local_dim = CAROM::split_dimension(dim_ref_basis[k], MPI_COMM_WORLD);
basis_reader = new CAROM::BasisReader(basis_name + basis_tags[k], CAROM::Database::HDF5_MPIO, local_dim);
basis_reader = new CAROM::BasisReader(basis_name + basis_tags[k], CAROM::Database::formats::HDF5_MPIO, local_dim);

carom_ref_basis[k] = new CAROM::Matrix(*basis_reader->getSpatialBasis(num_ref_basis[k]));
carom_ref_basis[k]->gather();
Expand Down
7 changes: 3 additions & 4 deletions src/sample_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void SampleGenerator::AddSnapshotGenerator(const int &fom_vdofs, const std::stri

snapshot_options.Append(new CAROM::Options(fom_vdofs, max_num_snapshots, 1, update_right_SV));
snapshot_options.Last()->static_svd_preserve_snapshot = true;
snapshot_generators.Append(new CAROM::BasisGenerator(*(snapshot_options.Last()), incremental, filename, CAROM::Database::HDF5_MPIO));
snapshot_generators.Append(new CAROM::BasisGenerator(*(snapshot_options.Last()), incremental, filename, CAROM::Database::formats::HDF5_MPIO));

basis_tag2idx[basis_tag] = basis_tags.size();
basis_tags.push_back(basis_tag);
Expand Down Expand Up @@ -264,7 +264,7 @@ void SampleGenerator::FormReducedBasis(const std::string &basis_prefix,
CAROM::BasisGenerator *basis_generator = snapshot_generators.Last();

for (int s = 0; s < file_list.size(); s++)
basis_generator->loadSamples(file_list[s], "snapshot", 1e9, CAROM::Database::HDF5_MPIO);
basis_generator->loadSamples(file_list[s], "snapshot", 1e9, CAROM::Database::formats::HDF5_MPIO);

basis_generator->endSamples(); // save the merged basis file
SaveSV(basis_generator, basis_name, ref_num_basis);
Expand All @@ -289,8 +289,7 @@ const int SampleGenerator::GetDimFromSnapshots(const std::string &filename)
file_id = H5Fopen(filename_ext.c_str(), H5F_ACC_RDONLY, H5P_DEFAULT);
assert(file_id >= 0);

// TODO(kevin): will have to reflect dataset name update.
hdf5_utils::ReadDataset(file_id, "snapshot_matrix_num_rows_000000", nrows);
hdf5_utils::ReadDataset(file_id, "snapshot_matrix_num_rows", nrows);
assert(nrows[0] > 0);

errf = H5Fclose(file_id);
Expand Down

0 comments on commit 1954a01

Please sign in to comment.