def get_stepper(self, scheme, cls, edactvf=True): from pysph.sph.bc.inlet_outlet_manager import InletStep, OutletStep steppers = {} if (cls == PECIntegrator): if isinstance(scheme, EDACScheme): for inlet in self.inlets: steppers[inlet] = InletStep() for outlet in self.outlets: steppers[outlet] = OutletStep() self.active_stages = [2] return steppers
def create_solver(self): self.iom = self._create_inlet_outlet_manager() kernel = CubicSpline(dim=2) integrator = SWEIntegrator(inlet=InletStep(), fluid=SWEStep(), outlet=OutletStep()) tf = 100 solver = Solver(kernel=kernel, dim=2, integrator=integrator, cfl=0.1, adaptive_timestep=True, tf=tf) return solver