Skip to content

Commit

Permalink
Eliminate M2ulPhyS::writeHistoryFile
Browse files Browse the repository at this point in the history
Based on kevin's comments, we don't use or maintain this anymore, so
better get rid of it.
  • Loading branch information
trevilo committed Feb 2, 2024
1 parent 4d22265 commit 4ab7af7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
6 changes: 0 additions & 6 deletions src/M2ulPhyS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1988,12 +1988,6 @@ void M2ulPhyS::solveStep() {

const int vis_steps = config.GetNumItersOutput();
if (iter % vis_steps == 0) {
// dump history
// NOTE(kevin): this routine is currently obsolete.
// It computes `dof`-averaged state and time-derivative, which are useless at this point.
// This will not be supported.
writeHistoryFile();

#ifdef HAVE_MASA
if (config.use_mms_) {
if (config.mmsSaveDetails_) {
Expand Down
5 changes: 0 additions & 5 deletions src/M2ulPhyS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,6 @@ class M2ulPhyS : public TPS::Solver {
void initGradUp();
void initilizeSpeciesFromLTE();

// NOTE(kevin): this routine is currently obsolete.
// It computes `dof`-averaged state and time-derivative, which are useless at this point.
// This will not be supported.
void writeHistoryFile();

// i/o routines
void read_partitioned_soln_data(hid_t file, string varName, size_t index, double *data);
void read_serialized_soln_data(hid_t file, string varName, int numDof, int varOffset, double *data, IOFamily &fam);
Expand Down
25 changes: 0 additions & 25 deletions src/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,31 +669,6 @@ void M2ulPhyS::write_soln_data(hid_t group, string varName, hid_t dataspace, dou
return;
}

void M2ulPhyS::writeHistoryFile() {
MPI_Comm TPSCommWorld = this->groupsMPI->getTPSCommWorld();
double global_dUdt[5];
MPI_Allreduce(rhsOperator->getLocalTimeDerivatives(), &global_dUdt, 5, MPI_DOUBLE, MPI_SUM, TPSCommWorld);

if (rank0_) {
histFile << time << "," << iter;
for (int eq = 0; eq < 5; eq++) {
histFile << "," << global_dUdt[eq] / static_cast<double>(nprocs_);
}
}

if (average->ComputeMean()) {
double global_meanData[5 + 6];
MPI_Allreduce(average->getLocalSums(), &global_meanData, 5 + 6, MPI_DOUBLE, MPI_SUM, TPSCommWorld);

if (rank0_) {
histFile << "," << average->GetSamplesMean();
for (int n = 0; n < 5 + 6; n++) histFile << "," << global_meanData[n] / static_cast<double>(nprocs_);
}
}

if (rank0_) histFile << endl;
}

void M2ulPhyS::readTable(const std::string &inputPath, TableInput &result) {
MPI_Comm TPSCommWorld = this->groupsMPI->getTPSCommWorld();
tpsP->getInput((inputPath + "/x_log").c_str(), result.xLogScale, false);
Expand Down

0 comments on commit 4ab7af7

Please sign in to comment.