dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #18256
[Question #110430]: Plot boundary conditions
New question #110430 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/110430
Hi,
I would like to plot the boundary conditions in my problem. The boundary condition is a DirichletBC using a generic function as part of the Expression (class MyFunc : public Expression ....) I have tried the following:
Let "bc" be the DirichletBC and "be" the Expression used to describe the BC.
1. plot(bc, mesh = mesh, element=V.ufl_element())
=> "RuntimeError: Don't know how to plot given object and projection failed: <DOLFIN object x (unnamed data)"
2. plot(be, mesh = BoundaryMesh(mesh), element=V.ufl_element())
=> "RuntimeError: *** Error: Current facet is unknown"
Am I missing something?
Something that might be related and possibly a bug, when I try to plot "be" as follows:
pts = array([[0.0,0.0,0.0], [0.5,0.5,0.5]], dtype='d') # Assume points are on boundary
plot(be, mesh=mesh, element=V.ufl_element(), plot_pts=pts)
=> TypeError: in method 'MyFunc_eval', argument 3 of type 'dolfin::Data const &'
I assume that the data sent to MyFunc_eval should be of a different type, but this would be inconsistent with the general way of plotting arbitrary points.
Thank you
Renier
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.
Follow ups