Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More fixes to make Oasis work with FEniCS 2018.1.0 #20

Merged
merged 8 commits into from
Dec 30, 2018

Conversation

benzwick
Copy link
Collaborator

Most of the example problems now run with FEniCS 2018.1.0.

The following problems still have some issues that I was unable to fix:

  • NSCoupled/Nozzle2D.py
  • NSCoupled/SkewedFlow.py
  • NSfracStep/FlowPastSphere3D.py
  • NSfracStep/SkewedFlow.py

See FEniCS 2017.2.0 changelog:

Deprecate VertexFunction, EdgeFunction, FaceFunction,
FacetFunction, CellFunction; use MeshFunction instead
Warning seems to have been removed from DOLFIN:

NameError: name 'warning' is not defined
See FEniCS 2017.2.0 changelog:

Deprecate subclassing of Expression in Python;
new Python class UserExpression introduced for
user overloads
DOLFIN (2018.1.0) now uses pybind11 for wrapping C++ and
does not allow the implementation of dynamic attributes.

This commit fixes the following error:

AttributeError: 'dolfin.cpp.io.XDMFFile' object has no attribute 'uv'
Parameters "same_nonzero_pattern" and "reuse_factorization" deprecated.
Attempting to set them causes a segmentation fault.

See DOLFIN commits:

- https://bitbucket.org/fenics-project/dolfin/commits/29ce62d9942ea27821373506c4537eb174bd8816
- https://bitbucket.org/fenics-project/dolfin/commits/7ab838869df6b9d0b8b049ed4b203f2cd3e7862c
NameError: name 'set_log_active' is not defined

Perhaps there is no pybind11 wrapper for this yet.
DOLFIN (2018.1.0) now uses pybind11 for wrapping C++ and
does not allow the implementation of dynamic attributes.

This commit fixes the following error:

AttributeError: 'dolfin.cpp.la.LUSolver' object has no attribute 'normalize'
if not hasattr(tstepfile, 'uv'):
tstepfile.uv = AssignedVectorFunction(u_)
# Create vector function and assigners
uv = AssignedVectorFunction(u_)
Copy link
Owner

Choose a reason for hiding this comment

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

Only problem here is that now this vector function will be created new every time. That is not efficient, but then again, it's not a big deal. Can be fixed later on.

@mikaem
Copy link
Owner

mikaem commented Dec 30, 2018

Thanks a lot @benzwick for this update. Seems to me that it's all minor changes so I'll just go ahead and merge it.

@mikaem mikaem merged commit 559badb into mikaem:master Dec 30, 2018
@benzwick benzwick deleted the more-fixes-for-fenics-2018.1.0 branch January 5, 2019 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants