fix vis init
This commit is contained in:
@@ -514,6 +514,8 @@ runAnalysis::runAnalysis(std::shared_ptr<Database> input_db, const RankInfoStruc
|
||||
{
|
||||
|
||||
auto db = input_db->getDatabase( "Analysis" );
|
||||
auto vis_db = input_db->getDatabase( "Visualization" );
|
||||
|
||||
// Ids of work items to use for dependencies
|
||||
ThreadPool::thread_id_t d_wait_blobID;
|
||||
ThreadPool::thread_id_t d_wait_analysis;
|
||||
@@ -552,6 +554,7 @@ runAnalysis::runAnalysis(std::shared_ptr<Database> input_db, const RankInfoStruc
|
||||
IO::initialize("","silo","false");
|
||||
// Create the MeshDataStruct
|
||||
d_meshData.resize(1);
|
||||
|
||||
d_meshData[0].meshName = "domain";
|
||||
d_meshData[0].mesh = std::make_shared<IO::DomainMesh>( Dm->rank_info,Dm->Nx-2,Dm->Ny-2,Dm->Nz-2,Dm->Lx,Dm->Ly,Dm->Lz );
|
||||
auto PhaseVar = std::make_shared<IO::Variable>();
|
||||
@@ -562,17 +565,23 @@ runAnalysis::runAnalysis(std::shared_ptr<Database> input_db, const RankInfoStruc
|
||||
auto SignDistVar = std::make_shared<IO::Variable>();
|
||||
auto BlobIDVar = std::make_shared<IO::Variable>();
|
||||
|
||||
if (vis_db->getWithDefault<bool>( "save_phase_field", true )){
|
||||
PhaseVar->name = "phase";
|
||||
PhaseVar->type = IO::VariableType::VolumeVariable;
|
||||
PhaseVar->dim = 1;
|
||||
PhaseVar->data.resize(Dm->Nx-2,Dm->Ny-2,Dm->Nz-2);
|
||||
d_meshData[0].vars.push_back(PhaseVar);
|
||||
}
|
||||
|
||||
if (vis_db->getWithDefault<bool>( "save_pressure", false )){
|
||||
PressVar->name = "Pressure";
|
||||
PressVar->type = IO::VariableType::VolumeVariable;
|
||||
PressVar->dim = 1;
|
||||
PressVar->data.resize(Dm->Nx-2,Dm->Ny-2,Dm->Nz-2);
|
||||
d_meshData[0].vars.push_back(PressVar);
|
||||
}
|
||||
|
||||
if (vis_db->getWithDefault<bool>( "save_velocity", false )){
|
||||
VxVar->name = "Velocity_x";
|
||||
VxVar->type = IO::VariableType::VolumeVariable;
|
||||
VxVar->dim = 1;
|
||||
@@ -588,17 +597,25 @@ runAnalysis::runAnalysis(std::shared_ptr<Database> input_db, const RankInfoStruc
|
||||
VzVar->dim = 1;
|
||||
VzVar->data.resize(Dm->Nx-2,Dm->Ny-2,Dm->Nz-2);
|
||||
d_meshData[0].vars.push_back(VzVar);
|
||||
}
|
||||
|
||||
if (vis_db->getWithDefault<bool>( "save_distance", false )){
|
||||
SignDistVar->name = "SignDist";
|
||||
SignDistVar->type = IO::VariableType::VolumeVariable;
|
||||
SignDistVar->dim = 1;
|
||||
SignDistVar->data.resize(Dm->Nx-2,Dm->Ny-2,Dm->Nz-2);
|
||||
d_meshData[0].vars.push_back(SignDistVar);
|
||||
}
|
||||
|
||||
if (vis_db->getWithDefault<bool>( "save_connected_components", false )){
|
||||
BlobIDVar->name = "BlobID";
|
||||
BlobIDVar->type = IO::VariableType::VolumeVariable;
|
||||
BlobIDVar->dim = 1;
|
||||
BlobIDVar->data.resize(Dm->Nx-2,Dm->Ny-2,Dm->Nz-2);
|
||||
d_meshData[0].vars.push_back(BlobIDVar);
|
||||
}
|
||||
|
||||
|
||||
// Initialize the comms
|
||||
MPI_Comm_dup(MPI_COMM_WORLD,&d_comm);
|
||||
for (int i=0; i<1024; i++) {
|
||||
|
||||
Reference in New Issue
Block a user