fix domain voxel length bug

This commit is contained in:
JamesEMcclure
2019-05-01 16:37:17 -04:00
parent 82d0e18845
commit e2a7cca884

View File

@@ -131,7 +131,11 @@ void Domain::initialize( std::shared_ptr<Database> db )
outlet_layers_y = OutletCount[1];
outlet_layers_z = OutletCount[2];
}
voxel_length = 1.0;
if (d_db->keyExists( "voxel_length" )){
auto voxel_length = d_db->getScalar<double>("voxel_length");
}
ASSERT( n.size() == 3u );
ASSERT( nproc.size() == 3u );
int nx = n[0];
@@ -158,11 +162,8 @@ void Domain::initialize( std::shared_ptr<Database> db )
// Fill remaining variables
N = Nx*Ny*Nz;
Volume = nx*ny*nx*nproc[0]*nproc[1]*nproc[2]*1.0;
voxel_length = 1.0;
if (d_db->keyExists( "voxel_length" )){
auto voxel_length = d_db->getScalar<double>("voxel_length");
if (myrank==0) printf("voxel length = %f micron \n", voxel_length);
}
if (myrank==0) printf("voxel length = %f micron \n", voxel_length);
id = new signed char[N];
memset(id,0,N);