Skip to content

Commit

Permalink
[Draft] Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Aug 11, 2022
1 parent f6e5978 commit 0dc5187
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/kurth/input_kurth.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ constf1.kt = 1.0
###############################################################################
# Algorithms
###############################################################################
algo.particle_shape = 2
algo.particle_shape = 3
21 changes: 21 additions & 0 deletions tests/python/test_space_charge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-

from impactx import ImpactX, elements
import matplotlib.pyplot as plt


def tst_space_charge():
"""
This tests an equivalent to main.cpp in C++
"""
impactX = ImpactX()

impactX.load_inputs_file("examples/kurth/input_kurth.in")

impactX.init_grids()
impactX.init_beam_distribution_from_inputs()
impactX.init_lattice_elements_from_inputs()

impactX.evolve(num_steps=1)

# rho = impactX...

0 comments on commit 0dc5187

Please sign in to comment.