# Copyright 2017 David Grote # # This file is part of WarpX. # # License: BSD-3-Clause-LBNL # The WarpXPIC class is the beginnings of an implementation of a standard interface # for running PIC codes. This is the run time equivalent to the PICMI standard. # This standard would specify the API for calling the various pieces of typical # time step loops, for example get_self_fields and put_Efields. Ideally, a user # could write a loop using the standard and, importing one of compliant codes, be # able to run a customized PIC simulation with that code. from warp.run_modes.timestepper import PICAPI from ._libwarpx import libwarpx class WarpXPIC(PICAPI): def get_time(self): return libwarpx.libwarpx_so.warpx_gett_new(0) def set_time(self, time): for i in range(libwarpx.libwarpx_so.warpx_finestLevel()+1): libwarpx.libwarpx_so.warpx_sett_new(i, time) def get_step_size(self): libwarpx.libwarpx_so.warpx_ComputeDt() return libwarpx.libwarpx_so.warpx_getdt(0) def get_step_number(self): return libwarpx.libwarpx_so.warpx_getistep(0) def set_step_number(self, it): for i in range(libwarpx.libwarpx_so.warpx_finestLevel()+1): libwarpx.libwarpx_so.warpx_setistep(i, it) def push_positions(self, dt): libwarpx.libwarpx_so.warpx_PushX(0, dt) def push_velocities_withE(self, dt): libwarpx.libwarpx_so.warpx_EPushV(0, dt) def push_velocities_withB(self, dt): libwarpx.libwarpx_so.warpx_BPushV(0, dt) def get_self_fields(self): libwarpx.libwarpx_so.warpx_FieldGather(0) def calculate_source(self): libwarpx.libwarpx_so.warpx_CurrentDeposition(0) def push_Efields(self, dt): libwarpx.libwarpx_so.warpx_EvolveE(0, dt) libwarpx.libwarpx_so.warpx_FillBoundaryE(0, True) def push_Bfields(self, dt): libwarpx.libwarpx_so.warpx_EvolveB(0, dt) libwarpx.libwarpx_so.warpx_FillBoundaryB(0, True) def apply_particle_boundary_conditions(self): libwarpx.libwarpx_so.mypc_Redistribute() # Redistribute particles libwarpx.libwarpx_so.warpx_MoveWindow(self.istep,True) # !!! not the correct place yet value=''/>
path: root/Source/Python/WarpX_py.cpp (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2019-08-29Create new function CopyJPMLGravatar Remi Lehe 3-18/+23
2019-08-29minor change for upcoming AMReX changesGravatar Weiqun Zhang 1-2/+2
2019-08-30Layout changesGravatar ablelly 1-20/+0
2019-08-30Layout changes for the file PML.cppGravatar ablelly 1-45/+82
2019-08-29Refactor communications in PMLGravatar Remi Lehe 1-53/+38
2019-08-29Removed useless variables in PML Exchange functionsGravatar ablelly 4-75/+44
2019-08-29Changed function name "CopyRegInPMLs" to "CopyToPML"Gravatar ablelly 2-10/+12
Tabulations changes
2019-08-29Deleted functions `CopyJinReg` and `CopyPMLsInReg` (unused)Gravatar ablelly 2-41/+0
2019-08-29Changed function name `CopyJinPML` to `CopyJtoPML`Gravatar ablelly 3-7/+7
2019-08-29Added input parameters `do_pml_in_domain`, `do_pml_has_particle`, ↵Gravatar ablelly 1-0/+12
`do_pml_j_damping` in the documentation
2019-08-29Cleaned the Fortran interfaceGravatar ablelly 1-18/+18
2019-08-29layout correctionsGravatar ablelly 2-4/+2
2019-08-29sigma_cum, sigma_cum_fac renamed into sigma_cumsum, sigma_cumsum_facGravatar ablelly 3-59/+59
sigma_star_cum, sigma_star_cum_fac renamed into sigma_star_cumsum, sigma_star_cumsum_fac
2019-08-29Cleaned code from useless Fortran and from pml_typeGravatar ablelly 3-168/+1
2019-08-28Added shift for the sigma functionsGravatar ablelly 3-27/+67
2019-08-28Changed macro WARPX_DIM_2D to WARPX_DIM_XZ for clarityGravatar Dave Grote 4-22/+22
2019-08-28Doc: Cannonical DOI RefGravatar Axel Huebl 1-0/+1
One more badge with the latest, cannonical DOI reference on Warp-X.
2019-08-28Fix invalid memory access in 2DGravatar Remi Lehe 2-8/+16
2019-08-28Fix invalid memory access in 2DGravatar Remi Lehe 1-5/+13
2019-08-28Warpx:DampJPML : Fortran code replaced by C++ codeGravatar ablelly 3-131/+34
Code cleaned
2019-08-28remove unnecessary references and clean function namesGravatar MaxThevenet 3-47/+49
2019-08-28C++ damping functions called. Compiling!Gravatar ablelly 2-4/+91
2019-08-28C++ current damping - compilingGravatar ablelly 1-9/+9
2019-08-28Added C++ functions for current damping in PMLGravatar ablelly 1-0/+43
2019-08-27Readme: BadgesGravatar Axel Huebl 1-1/+7
We need fancy badges! :)
2019-08-27Docs: Update Link to RTDGravatar Axel Huebl 2-2/+3
Link to new autobuild documentation.
2019-08-27RTD: Enable Doc AutobuildsGravatar Axel Huebl 4-5/+16
Prepare readthedocs.org (RTD) autobuilds on each merge.
2019-08-27Fix 2D typosGravatar Remi Lehe 1-5/+4
2019-08-27typo in docGravatar MaxThevenet 1-0/+1
2019-08-27Call C++ functionsGravatar Remi Lehe 4-547/+208
2019-08-27only dump relevant particle quantities in automated testsGravatar MaxThevenet 1-5/+5
2019-08-26make scripts more general and clean the docGravatar MaxThevenet 5-35/+42
2019-08-26add script to compute domain size and #cellsGravatar MaxThevenet 2-2/+23