Commit 8c075531 authored by steffen.schotthoefer's avatar steffen.schotthoefer
Browse files

training data formatting

parent 0f72fceb
Pipeline #98927 passed with stages
in 32 minutes and 14 seconds
......@@ -4,6 +4,7 @@
#include "settings/typedef.h"
// Forward Declaration
class Config;
class Physics;
class Mesh;
......
......@@ -4,7 +4,6 @@
#include "solverbase.h"
class EntropyBase;
class QuadratureBase;
class SphericalHarmonics;
class OptimizerBase;
......
......@@ -238,14 +238,15 @@ void MNSolver::WriteNNTrainingData( unsigned idx_pseudoTime ) {
myfile.open( filename, std::ofstream::app );
for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) {
myfile << 0 << ", " << _nTotalEntries << "," << idx_pseudoTime;
for( unsigned idx_sys = 0; idx_sys < _nTotalEntries; idx_sys++ ) {
myfile << _sol[idx_cell][idx_sys];
myfile << "," << _sol[idx_cell][idx_sys];
}
myfile << "\n";
myfile << "\n" << 1 << ", " << _nTotalEntries << "," << idx_pseudoTime;
for( unsigned idx_sys = 0; idx_sys < _nTotalEntries; idx_sys++ ) {
myfile << _alpha[idx_cell][idx_sys];
myfile << "," << _alpha[idx_cell][idx_sys];
}
myfile << "\n\n";
if( idx_cell < _nTotalEntries - 1 ) myfile << "\n";
}
myfile.close();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment