Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Use common 0.2 #53

Merged
merged 12 commits into from
Nov 3, 2015
Merged

Use common 0.2 #53

merged 12 commits into from
Nov 3, 2015

Conversation

khiltunen
Copy link
Contributor

This PR makes openfoam wrappers compatible with the common 0.2.0 version (issue #51). Also issue #25 concerning unittest fails when running from specific folders is fixed. Now the needed cuds data is constructed when tests are executed.

@khiltunen
Copy link
Contributor Author

@nathanfranklin do you have time to review the changes on this PR ?

@nathanfranklin
Copy link
Member

@khiltunen , i won't have time till Tueasday. If that is okay, I will take a look then.

@khiltunen
Copy link
Contributor Author

That's okay. Thank's !

@@ -181,8 +184,7 @@ def __init__(self, name, BC=None, mesh=None, path=None):
foamface.writeMesh(name)

# write possible cell data to time directory
for cell in mesh.iter_cells():
self.update_cell(cell)
self.update_cells(list(mesh.iter_cells()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list could be removed:
self.update_cells(mesh.iter_cells())

Note though that you are using mesh here without testing if it is possibly None

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list removed and corresponding change made on update_cells method.
update_cells() call is inside
if mesh:

@nathanfranklin
Copy link
Member

The README needs to be updated:

@nathanfranklin
Copy link
Member

Should probably mention using . /opt/openfoam222/etc/bashrc during installation (especially due to #46)

#24 should be prioritized after this PR

@nathanfranklin
Copy link
Member

simphony-openfoam also requires PyTables for testing purposes (as it is using HHDF5-based IO of simphony). PyTables is an optional requirement for simphony-common.

In addition to some examples, tables is required in the following tests:
https://github.com/simphony/simphony-openfoam/pull/53/files#diff-ad512478f98823bd8d1417ffdfc52056L15

I don't know if the best solution is to add tables (hdf5) as a requirement or to remove its use in that test as on first look it seems like the test itself is only actually uses the openfoam-file format.

If you do add it as a requirement, see the following from simphony's README:

Packages that depend on the optional features and use setuptools should
append the H5IO and/or CUBAGen identifier next to
simphony in their setup_requires configuration option. For example::

install_requires = ["simphony[H5IO, CUBAGen]"]

Will make sure that the requirements of H5IO and CUBAGen support
are installed. (see setuptools extras_ for more information)

@@ -3,7 +3,7 @@
"""

from foam_controlwrapper.foam_controlwrapper import FoamControlWrapper
from foam_controlwrapper.foam_controlwrapper import read_foammesh
from foam_controlwrapper.mesh_utils import read_foammesh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read_foammesh is no longer in mesh_utils

@nathanfranklin
Copy link
Member

The examples poiseuille.py and poiseuille_vof.py in foam_controlwrapper and poiseuille.py in foam_internalwrapper/ are failing

@khiltunen
Copy link
Contributor Author

I can't get those fail. Could you provide the error thread ?

@nathanfranklin
Copy link
Member

I can't get those fail. Could you provide the error thread ?

My mistake. I forgot to reinstall. Sorry.

@khiltunen
Copy link
Contributor Author

Not at all. Thank's again for valuable comment's !

@nathanfranklin
Copy link
Member

Not at all. Thank's again for valuable comment's !

glad to help. Just left one more comment. Otherwise, looks good to me 👍

khiltunen added a commit that referenced this pull request Nov 3, 2015
@khiltunen khiltunen merged commit bd30904 into master Nov 3, 2015
@khiltunen khiltunen deleted the use-common-0.2 branch November 3, 2015 12:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants