Skip to content

Reply To: BounceBack boundary

#7701
Mike
Participant

Thank you for your reply!
I agree with your idea.
Below is my code :
std::vector<int> unknownIndexes;
// east-top
// I change the oritation in self-defined sethalfbbboundary.hh
if(orientation == 8){

unknownIndexes = {3};

}
//east bottom
else if(orientation == -8){

unknownIndexes = {1};

}
// west top
else if(orientation == 9){

unknownIndexes = {5};

}
// west bottom
else if(orientation == -9){
unknownIndexes = {7};

}
else{
unknownIndexes = util::subIndexOutgoing<DESCRIPTOR, direction,
orientation>();
}
auto cell = blockLattice.get(x, y);

for (unsigned i = 0; i < unknownIndexes.size(); ++i) {

cell[unknownIndexes[i]] = cell.neighbor(descriptors::c<DESCRIPTOR>(unknownIndexes[i]))[util::opposite<DESCRIPTOR>(unknownIndexes[i])];

}

as in main function, I define solid boundaries nodynamics.

  • This reply was modified 11 months, 1 week ago by Mike.
  • This reply was modified 11 months, 1 week ago by Mike.