Skip to content

Reply To: How to create the cuboidGeometry for a inclined 2D cuboid geometry

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics How to create the cuboidGeometry for a inclined 2D cuboid geometry Reply To: How to create the cuboidGeometry for a inclined 2D cuboid geometry

#6128
Gloriousface
Participant

one example snippet to wrok is like the following:
for(int iC=0;iC<4;++iC){
BlockGeometry2D<T>& BGeo=superGeometry.getExtendedBlockGeometry(iC);
int Nx=BGeo.getNx();
int Ny=BGeo.getNy();
for(int ix=2;ix<=Nx-2;++ix){
for(int iy=2;iy<Ny-2;++iy){
BGeo.getPhysR(phR,ix,iy);
indx=phR[0];
indy=phR[1];
if(indx>10 && indx<15 && indy>20 && indy<50){
BGeo.get(ix,iy)=2;
}
}
}

clout<<“BlockGeometry “<<iC<<” prepared!”<<endl;
}