FlowModelingControl / flowtorch

flowTorch - a Python library for analysis and reduced-order modeling of fluid flows
GNU General Public License v3.0
136 stars 46 forks source link

Pre-computed cell centers and volumes not loaded #47

Closed JanisGeise closed 4 months ago

JanisGeise commented 4 months ago

Hi @AndreWeiner,

after the last commit 61e3c88, the foam_dataloader doesn't find the pre-computed cell centers and volumes anymore. I think the reason for this is the deletion of the backslash from CONSTANT_PATH = "constant/" to CONSTANT_PATH = "constant" (line 29, 30). In the method _centers_and_volumes_computed(self, path: str) the foam_dataloader checks if the files exist using isfile(path + "C") and isfile(path + "V"), which results in the path being "constantV" instead of "constant/V".

Changing isfile(path + "C") and isfile(path + "V") to isfile(join(path, "C")) and isfile(join(path, "V")) fixes the issue.

Regards, Janis