Parallel-in-Time / pySDC

pySDC is a Python implementation of the spectral deferred correction (SDC) approach and its flavors, esp. the multilevel extension MLSDC and PFASST.
http://www.parallel-in-time.org/pySDC
BSD 2-Clause "Simplified" License
32 stars 35 forks source link

Boris/spiraling_particle_playground.py - not working! #100

Closed Krissmedt closed 5 years ago

Krissmedt commented 5 years ago

Currently trying to run and compare with the Boris playgrounds. 'penningtrap_playground.py' runs fine when invoked from the terminal or IPython console, but 'spiraling_particle_playground.py' throws a value errror when run using any of those methods:

` uinit, stats, a0 = main(dt=1.0, Tend=5000)

File "E:\Documents\OneDrive - University of Leeds\phd\code\pySDC-master\pySDC\playgrounds\Boris\spiraling_particle_playground.py", line 68, in main uend, stats = controller.run(u0=uinit, t0=t0, Tend=Tend)

File "C:\ProgramData\Anaconda3\lib\site-packages\pySDC\implementations\controller_classes\allinclusive_classic_nonMPI.py", line 105, in run self.MS[p] = self.pfasst(self.MS[p], len(active_slots))

File "C:\ProgramData\Anaconda3\lib\site-packages\pySDC\implementations\controller_classes\allinclusive_classic_nonMPI.py", line 310, in pfasst S.levels[0].sweep.compute_residual()

File "C:\ProgramData\Anaconda3\lib\site-packages\pySDC\core\Sweeper.py", line 169, in compute_residual res = self.integrate()

File "C:\ProgramData\Anaconda3\lib\site-packages\pySDC\implementations\sweeper_classes\boris_2nd_order.py", line 163, in integrate f = P.build_f(L.f[j], L.u[j], L.time + L.dt * self.coll.nodes[j - 1])

File "C:\ProgramData\Anaconda3\lib\site-packages\pySDC\playgrounds\Boris\spiraling_particle_ProblemClass.py", line 102, in build_f (f.elec.values + np.cross(part.vel.values[:, 0], f.magn.values[:, 0]))

ValueError: could not broadcast input array from shape (3,3) into shape (3) `

pancetta commented 5 years ago

Yeah, sorry... Should work now.