include convert IO
This commit is contained in:
parent
6d59317919
commit
de743e75b7
@ -35,8 +35,8 @@ ADD_LBPM_EXECUTABLE( GenerateSphereTest )
|
|||||||
#ADD_LBPM_EXECUTABLE( BlobAnalysis )
|
#ADD_LBPM_EXECUTABLE( BlobAnalysis )
|
||||||
#ADD_LBPM_EXECUTABLE( BlobIdentify )
|
#ADD_LBPM_EXECUTABLE( BlobIdentify )
|
||||||
#ADD_LBPM_EXECUTABLE( BlobIdentifyParallel )
|
#ADD_LBPM_EXECUTABLE( BlobIdentifyParallel )
|
||||||
#ADD_LBPM_EXECUTABLE( convertIO )
|
ADD_LBPM_EXECUTABLE( convertIO )
|
||||||
#ADD_LBPM_EXECUTABLE( DataAggregator )
|
ADD_LBPM_EXECUTABLE( DataAggregator )
|
||||||
#ADD_LBPM_EXECUTABLE( BlobAnalyzeParallel )(
|
#ADD_LBPM_EXECUTABLE( BlobAnalyzeParallel )(
|
||||||
ADD_LBPM_EXECUTABLE( lbpm_minkowski_scalar )
|
ADD_LBPM_EXECUTABLE( lbpm_minkowski_scalar )
|
||||||
ADD_LBPM_EXECUTABLE( TestPoissonSolver )
|
ADD_LBPM_EXECUTABLE( TestPoissonSolver )
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#include "common/MPI_Helpers.h"
|
#include "common/MPI.h"
|
||||||
#include "common/Communication.h"
|
#include "common/Communication.h"
|
||||||
#include "common/Utilities.h"
|
#include "common/Utilities.h"
|
||||||
#include "IO/Mesh.h"
|
#include "IO/Mesh.h"
|
||||||
@ -13,7 +13,6 @@
|
|||||||
#include "IO/Writer.h"
|
#include "IO/Writer.h"
|
||||||
#include "ProfilerApp.h"
|
#include "ProfilerApp.h"
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
// Initialize MPI
|
// Initialize MPI
|
||||||
@ -38,7 +37,7 @@ int main(int argc, char **argv)
|
|||||||
std::string path = IO::getPath( filename );
|
std::string path = IO::getPath( filename );
|
||||||
|
|
||||||
// Read the timesteps
|
// Read the timesteps
|
||||||
auto timesteps = IO::readTimesteps( filename, "old" );
|
auto timesteps = IO::readTimesteps( filename, "silo" );
|
||||||
|
|
||||||
// Loop through the timesteps, reading/writing the data
|
// Loop through the timesteps, reading/writing the data
|
||||||
IO::initialize( "", format, false );
|
IO::initialize( "", format, false );
|
||||||
@ -63,19 +62,20 @@ int main(int argc, char **argv)
|
|||||||
// Read the variables
|
// Read the variables
|
||||||
for ( auto var : database.variables ) {
|
for ( auto var : database.variables ) {
|
||||||
auto varData = IO::getVariable( path, timestep, database, rank, var.name );
|
auto varData = IO::getVariable( path, timestep, database, rank, var.name );
|
||||||
|
printf("reformat %s \n",var.name);
|
||||||
IO::reformatVariable( *meshData[i].mesh, *varData );
|
IO::reformatVariable( *meshData[i].mesh, *varData );
|
||||||
meshData[i].vars.push_back( varData );
|
meshData[i].vars.push_back( varData );
|
||||||
}
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
MPI_Barrier(comm);
|
comm.barrier();
|
||||||
PROFILE_STOP("Read");
|
PROFILE_STOP("Read");
|
||||||
|
|
||||||
// Save the mesh data to a new file
|
// Save the mesh data to a new file
|
||||||
PROFILE_START("Write");
|
PROFILE_START("Write");
|
||||||
IO::writeData( timestep, meshData, MPI_COMM_WORLD );
|
IO::writeData( timestep, meshData, MPI_COMM_WORLD );
|
||||||
MPI_Barrier(comm);
|
comm.barrier();
|
||||||
PROFILE_STOP("Write");
|
PROFILE_STOP("Write");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user