Skip to content

Commit

Permalink
removing particles if inside R_Star
Browse files Browse the repository at this point in the history
  • Loading branch information
RevathiJambunathan committed Jan 6, 2021
1 parent 93b0dfd commit 955a3e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Source/Initialization/InjectorPosition.H
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ struct InjectorPosition
bool
insidePulsarBounds (amrex::Real r, amrex::Real R_star, amrex::Real dR_star) const noexcept
{
// return (r>=R_star and r<=(R_star+dR_star));
return (r<=R_star and r>=(R_star-dR_star));
//return (r<=R_star and r>=(R_star-dR_star));
return (r<=(R_star+dR_star) and r>=(R_star-dR_star));
}
#endif

Expand Down
7 changes: 4 additions & 3 deletions Source/Particles/PhysicalParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,8 +934,8 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox)
}
//if (sigma_inj < 0 and q_pm >0) {p.id()=-1; continue;}
//if (sigma_inj > 0 and q_pm <0) {p.id()=-1; continue;}
//if (sigma_inj < 0 and q_pm >0) {p.id()=-1; continue;}
//if (sigma_inj > 0 and q_pm <0) {p.id()=-1; continue;}
if (sigma_inj < 0 and q_pm >0) {p.id()=-1; continue;}
if (sigma_inj > 0 and q_pm <0) {p.id()=-1; continue;}
// if rho is too smal -- we dont inject particles
if (std::abs(rho_GJ) < 1.0E-20) {
p.id() = -1;
Expand Down Expand Up @@ -2254,7 +2254,8 @@ void PhysicalParticleContainer::PulsarParticleRemoval() {
Real r = std::sqrt((x-xc)*(x-xc)
+ (y-yc)*(y-yc)
+ (z-zc)*(z-zc));
if (r<=(PulsarParm::R_star-PulsarParm::dR_star)) {
//if (r<=(PulsarParm::R_star-PulsarParm::dR_star)) {
if (r<=(PulsarParm::R_star)) {
pp[i].id() = -1;
}
});
Expand Down

0 comments on commit 955a3e6

Please sign in to comment.