Skip to content

Commit

Permalink
Merge pull request #235 from psnbaba/trivial_io
Browse files Browse the repository at this point in the history
bug fix in trivial inlet outlet
  • Loading branch information
prabhuramachandran committed Aug 31, 2019
2 parents 766dbb1 + d664fc9 commit 95a17b6
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions pysph/examples/trivial_inlet_outlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,7 @@ def create_particles(self):
outlet = get_particle_array(name='outlet', x=x, y=y, m=m, h=h, u=u,
rho=rho)

ghost_inlet = self.iom.create_ghost(inlet, inlet=True)
ghost_outlet = self.iom.create_ghost(outlet, inlet=False)

particles = [inlet, fluid, outlet]
if ghost_inlet:
particles.append(ghost_inlet)
if ghost_outlet:
particles.append(ghost_outlet)

props = ['ioid', 'disp', 'x0']
for p in props:
Expand All @@ -100,16 +93,18 @@ def _create_inlet_outlet_manager(self):
from pysph.sph.bc.donothing.inlet import Inlet
from pysph.sph.bc.donothing.outlet import Outlet

props_to_copy = ['x', 'y', 'z', 'u', 'v', 'w', 'm',
'h', 'rho', 'p', 'ioid']
inlet_info = InletInfo(
pa_name='inlet', normal=[-1.0, 0.0, 0.0],
refpoint=[0.0, 0.0, 0.0], has_ghost=True,
refpoint=[0.0, 0.0, 0.0], has_ghost=False,
update_cls=Inlet
)

outlet_info = OutletInfo(
pa_name='outlet', normal=[1.0, 0.0, 0.0],
refpoint=[1.0, 0.0, 0.0], update_cls=Outlet,
props_to_copy=['uhat', 'ioid']
props_to_copy=props_to_copy
)

iom = SimpleInletOutlet(
Expand Down

0 comments on commit 95a17b6

Please sign in to comment.