switch checkers to allow void boundary

This commit is contained in:
James E McClure
2019-03-26 21:35:14 -04:00
parent 4f97bf78f2
commit 6b16660e2d

View File

@@ -87,6 +87,9 @@ int main(int argc, char **argv)
if (domain_db->keyExists( "checkerSize" )){
checkerSize = domain_db->getScalar<int>( "checkerSize" );
}
else {
checkerSize = SIZE[0];
}
auto ReadValues = domain_db->getVector<char>( "ReadValues" );
auto WriteValues = domain_db->getVector<char>( "WriteValues" );
auto ReadType = domain_db->getScalar<std::string>( "ReadType" );
@@ -158,13 +161,13 @@ int main(int argc, char **argv)
for (int j = 0; j<Ny; j++){
for (int i = xStart; i < xStart+inlet_count_x; i++){
if ( (j/checkerSize + k/checkerSize)%2 == 0){
// solid checkers
SegData[k*Nx*Ny+j*Nx+i] = 0;
}
else{
// void checkers
SegData[k*Nx*Ny+j*Nx+i] = 2;
}
else{
// solid checkers
SegData[k*Nx*Ny+j*Nx+i] = 0;
}
}
}
}
@@ -177,13 +180,13 @@ int main(int argc, char **argv)
for (int j = yStart; i < yStart+inlet_count_y; j++){
for (int i = 0; i<Nx; i++){
if ( (i/checkerSize + k/checkerSize)%2 == 0){
// solid checkers
SegData[k*Nx*Ny+j*Nx+i] = 0;
}
else{
// void checkers
SegData[k*Nx*Ny+j*Nx+i] = 2;
}
else{
// solid checkers
SegData[k*Nx*Ny+j*Nx+i] = 0;
}
}
}
}
@@ -196,13 +199,13 @@ int main(int argc, char **argv)
for (int j = 0; j<Ny; j++){
for (int i = 0; i<Nx; i++){
if ( (i/checkerSize+j/checkerSize)%2 == 0){
// solid checkers
SegData[k*Nx*Ny+j*Nx+i] = 0;
}
else{
// void checkers
SegData[k*Nx*Ny+j*Nx+i] = 2;
}
else{
// solid checkers
SegData[k*Nx*Ny+j*Nx+i] = 0;
}
}
}
}