Skip to content

Commit

Permalink
comment in buffer mask for x-direction
Browse files Browse the repository at this point in the history
  • Loading branch information
RevathiJambunathan committed Apr 22, 2024
1 parent a25641c commit 641fdca
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions Source/WarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3135,40 +3135,40 @@ WarpX::BuildBufferMasks ()
wtmsk(i,j,k) = 0.;
return;
}
//for (int ii = i-1; ii >= i-ngbuffer; --ii) {
// if (gmsk(ii,j,k)==0) {
// amrex::Real arg = (static_cast<amrex::Real>(i-ii)-ngbuffer*tanh_midpoint)
// / ((1.-tanh_midpoint)*(ngbuffer/3.));
// wtmsk(i,j,k) = std::tanh(arg)*0.5 + 0.5;
// amrex::Print() << " i edge wt is " << wtmsk(i,j,k) << "\n";
// return;
// }
//}
//for (int ii = i+1; ii <= i+ngbuffer; ++ii) {
// if (gmsk(ii,j,k)==0) {
// amrex::Real arg = (static_cast<amrex::Real>(ii-i)-ngbuffer*tanh_midpoint)
// / ((1.-tanh_midpoint)*(ngbuffer/3.));
// wtmsk(i,j,k) = std::tanh(arg)*0.5+0.5;
// amrex::Print() << " wt is " << wtmsk(i,j,k) << "\n";
// return;
// }
//}
for (int jj = j-1; jj >= j-ngbuffer; --jj) {
if (gmsk(i,jj,k)==0) {
amrex::Real arg = (static_cast<amrex::Real>(j-jj)-ngbuffer*tanh_midpoint)
for (int ii = i-1; ii >= i-ngbuffer; --ii) {
if (gmsk(ii,j,k)==0) {
amrex::Real arg = (static_cast<amrex::Real>(i-ii)-ngbuffer*tanh_midpoint)
/ ((1.-tanh_midpoint)*(ngbuffer/3.));
wtmsk(i,j,k) = std::tanh(arg)*0.5 + 0.5;
amrex::Print() << " i edge wt is " << wtmsk(i,j,k) << "\n";
return;
}
}
for (int jj = j+1; jj <= j+ngbuffer; ++jj) {
if (gmsk(i,jj,k)==0) {
amrex::Real arg = (static_cast<amrex::Real>(jj - j)-ngbuffer*tanh_midpoint)
for (int ii = i+1; ii <= i+ngbuffer; ++ii) {
if (gmsk(ii,j,k)==0) {
amrex::Real arg = (static_cast<amrex::Real>(ii-i)-ngbuffer*tanh_midpoint)
/ ((1.-tanh_midpoint)*(ngbuffer/3.));
wtmsk(i,j,k) = std::tanh(arg)*0.5+0.5;
amrex::Print() << " wt is " << wtmsk(i,j,k) << "\n";
return;
}
}
//for (int jj = j-1; jj >= j-ngbuffer; --jj) {
// if (gmsk(i,jj,k)==0) {
// amrex::Real arg = (static_cast<amrex::Real>(j-jj)-ngbuffer*tanh_midpoint)
// / ((1.-tanh_midpoint)*(ngbuffer/3.));
// wtmsk(i,j,k) = std::tanh(arg)*0.5 + 0.5;
// return;
// }
//}
//for (int jj = j+1; jj <= j+ngbuffer; ++jj) {
// if (gmsk(i,jj,k)==0) {
// amrex::Real arg = (static_cast<amrex::Real>(jj - j)-ngbuffer*tanh_midpoint)
// / ((1.-tanh_midpoint)*(ngbuffer/3.));
// wtmsk(i,j,k) = std::tanh(arg)*0.5+0.5;
// return;
// }
//}
//for (int kk = k-1; kk >= k-ngbuffer; --kk) {
// if (gmsk(i,j,kk)==0) {
// amrex::Real arg = (static_cast<amrex::Real>(k-kk)-ngbuffer*tanh_midpoint)
Expand Down

0 comments on commit 641fdca

Please sign in to comment.