cylinder settings for uCT

This commit is contained in:
James E McClure
2018-06-06 20:34:23 -04:00
parent 0b90e6c8c9
commit e0d1a66982
3 changed files with 16 additions and 8 deletions

View File

@@ -75,6 +75,10 @@ int main(int argc, char **argv)
auto lamda=uct_db->getScalar<float>( "lamda" );
auto nlm_sigsq=uct_db->getScalar<float>( "nlm_sigsq" );
auto nlm_depth=uct_db->getScalar<int>( "nlm_depth" );
auto cx=uct_db->getScalar<int>( "center_x" );
auto cy=uct_db->getScalar<int>( "center_y" );
auto cz=uct_db->getScalar<int>( "center_z" );
auto CylRad=uct_db->getScalar<float>( "cylinder_radius" );
//.......................................................................
// Reading the domain information file
@@ -181,7 +185,7 @@ int main(int argc, char **argv)
filter_src( *Dm[0], LOCVOL[0] );
// Set up the mask to be distance to cylinder (crop outside cylinder)
float CylRad=900;
// float CylRad=900;
for (int k=0;k<Nz[0]+2;k++) {
for (int j=0;j<Ny[0]+2;j++) {
for (int i=0;i<Nx[0]+2;i++) {
@@ -193,9 +197,9 @@ int main(int argc, char **argv)
int y=jproc*Ny[0]+j-1;
int z=kproc*Nz[0]+k-1;
int cx = 0.5*nprocx*Nx[0];
int cy = 0.5*nprocy*Ny[0];
int cz = 0.5*nprocz*Nz[0];
//int cx = 0.5*nprocx*Nx[0];
//int cy = 0.5*nprocy*Ny[0];
//int cz = 0.5*nprocz*Nz[0];
// distance from the center line
MASK(i,j,k) = CylRad - sqrt(float((z-cz)*(z-cz) + (y-cy)*(y-cy)) );