helpers_for_test.py 579 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import numpy as np
import sys
sys.path.append("C://Users//xbrjos//Desktop//Python")
import gepard
from gepard.analysis.particleContainer import ParticleContainer


def get_default_ParticleContainer() -> ParticleContainer:
    particleContainer: ParticleContainer = ParticleContainer(None)
    particleContainer.initializeParticles(4)
    contours: list = []
    for i in range(4):
        x = 10*i
        contours.append(np.array([[[x, 0]], [[x+10, 0]], [[x+10, 10]], [[x, 10]]], dtype=np.int32))
    particleContainer.setParticleContours(contours)
    return particleContainer