Switched to new storage convention for swash output in sws_ola

This commit is contained in:
Edgar P. Burkhart 2022-03-28 09:44:35 +02:00
parent b557712372
commit 71049d49ea
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
63 changed files with 174 additions and 5717 deletions

View file

@ -1,38 +1,3 @@
import re
from fluidfoam import readof
class OFModel:
def __init__(self, root):
self._root = root
def read_mesh(self):
self._x, self._y, self._z = readof.readmesh(str(self._root))
def write_field(self, field, values):
with open(self._root.joinpath("0", field), "r") as aw_file:
aw_raw = aw_file.read()
with open(self._root.joinpath("0", field), "w") as aw_file:
aw_file.write(
re.sub(
r"(?<=\(\n).*?(?=\n\))",
"\n".join(values.astype(str)),
aw_raw,
count=1,
flags=re.S,
)
)
@property
def x(self):
return self._x
@property
def y(self):
return self._y
@property
def z(self):
return self._z
version https://git-lfs.github.com/spec/v1
oid sha256:2ec88dc3c20627b5f6d383e748ac7876415cacd4aff2cce3cb39bfdeb713b858
size 857