diff --git a/src/pystencils/functions.py b/src/pystencils/sympyextensions/pointers.py similarity index 95% rename from src/pystencils/functions.py rename to src/pystencils/sympyextensions/pointers.py index 76fbb70742352cf9d5627fe012652bb064acdfed..130338c99583bc4874b53cc804f4ff4761f0e580 100644 --- a/src/pystencils/functions.py +++ b/src/pystencils/sympyextensions/pointers.py @@ -1,5 +1,5 @@ import sympy as sp -from .types import PsPointerType +from ..types import PsPointerType class AddressOf(sp.Function): diff --git a/src/pystencils/rng.py b/src/pystencils/sympyextensions/rng.py similarity index 99% rename from src/pystencils/rng.py rename to src/pystencils/sympyextensions/rng.py index 221505a109beee4a66cd26d525b986ed8b324899..5f1006f0f3b0ce8ca7e72100a72f008cc92c0dac 100644 --- a/src/pystencils/rng.py +++ b/src/pystencils/sympyextensions/rng.py @@ -7,6 +7,7 @@ from pystencils.sympyextensions import TypedSymbol, CastFunc # from pystencils.backends.cbackend import CustomCodeNode # TODO nbackend: replace from pystencils.sympyextensions import fast_subs + # class RNGBase(CustomCodeNode): TODO nbackend: replace class RNGBase: diff --git a/src/pystencils/sympyextensions/typed_sympy.py b/src/pystencils/sympyextensions/typed_sympy.py index 7e9edaab123cf9dbb837a6588c4084fe58bda9de..949aa699180c5d770128292ab7766d22cac61a71 100644 --- a/src/pystencils/sympyextensions/typed_sympy.py +++ b/src/pystencils/sympyextensions/typed_sympy.py @@ -142,8 +142,7 @@ class FieldShapeSymbol(TypedSymbol): def __new_stage2__(cls, field_name: str, coordinate: int): from ..defaults import DEFAULTS - names = "_".join([field_name for field_name in field_names]) - name = f"_size_{names}_{coordinate}" + name = f"_size_{field_name}_{coordinate}" obj = super(FieldShapeSymbol, cls).__xnew__( cls, name, DEFAULTS.index_dtype, positive=True ) diff --git a/tests/test_address_of.py b/tests/test_address_of.py index c0a75e540237aa2e0ff46af37859c19cc069ce59..0d25be62c145032ee8e3c298da45543ff835d63d 100644 --- a/tests/test_address_of.py +++ b/tests/test_address_of.py @@ -4,7 +4,7 @@ Test of pystencils.data_types.address_of import pytest import pystencils from pystencils.typing import PointerType, CastFunc, BasicType -from pystencils.functions import AddressOf +from pystencils.sympyextensions.pointers import AddressOf from pystencils.simp.simplifications import sympy_cse import sympy as sp diff --git a/tests/test_fvm.py b/tests/test_fvm.py index 0b103e52554f767a0948509e8cae084c1af9e124..e10874cbdf27abe161510e57242f1232f60a6d53 100644 --- a/tests/test_fvm.py +++ b/tests/test_fvm.py @@ -3,7 +3,7 @@ import pystencils as ps import numpy as np import pytest from itertools import product -from pystencils.rng import random_symbol +from pystencils.sympyextensions.rng import random_symbol from pystencils.sympyextensions.astnodes import SympyAssignment from pystencils.node_collection import NodeCollection diff --git a/tests/test_random.py b/tests/test_random.py index 63cd61494b675acbc1675277ff9eb9b1f57ddb3e..6c3a888db86ff7e3b3ed100961643e3cdf36231b 100644 --- a/tests/test_random.py +++ b/tests/test_random.py @@ -5,7 +5,7 @@ import pytest import pystencils as ps from pystencils.sympyextensions.astnodes import SympyAssignment from pystencils.node_collection import NodeCollection -from pystencils.rng import PhiloxFourFloats, PhiloxTwoDoubles, AESNIFourFloats, AESNITwoDoubles, random_symbol +from pystencils.sympyextensions.rng import PhiloxFourFloats, PhiloxTwoDoubles, AESNIFourFloats, AESNITwoDoubles, random_symbol from pystencils.backends.simd_instruction_sets import get_supported_instruction_sets from pystencils.cpu.cpujit import get_compiler_config from pystencils.typing import TypedSymbol