MeshFunction assert(entity.dim() == _dim) failed
I am trying to apply an neumann BC on one edge of my 2d rectangular domain. To do so, I made two MeshFunctions:
dim = mesh.topology(
dolfin:
right->mark(ASD, 3);
dolfin:
right is an instance of my own Edge class, which inherits from dolfin::SubDomain. I use these MeshFunctions later like so:
dolfin:
problem.
I do it this way because I couldn't get it to compile any other way. There is a demo that uses "0" as in the integer value instead of my "empty" MeshFunction, but when I tried that, I couldn't get it to compile. I put the mesh function that I care about in the last position, because as I understand it, that is the position for external facets. Which in this case, would be my external edges. I can compile this code and it runs up until i try to call "solve." I then get that assertion error. I was looking in the code, and it seems like _dim is the dimension that is passed to the mesh function, and entity.dim() is the dimension of the MeshEntity the MeshFunction is trying to mark. So what I think is happening, is that the MeshFunction somehow thinks I have a 3d domain.
The full error message is as follows:
Solving linear variational problem
Matrix of size 1251 x 1251 has 8551 nonzero entries.
forward: ./dolfin/
[wolf:24774] *** Process received signal ***
[wolf:24774] Signal: Aborted (6)
[wolf:24774] Signal code: (-6)
[wolf:24774] [ 0] [0xb7f5f410]
[wolf:24774] [ 1] /lib/tls/
[wolf:24774] [ 2] /lib/tls/
[wolf:24774] [ 3] /usr/local/
[wolf:24774] [ 4] /usr/local/
[wolf:24774] [ 5] /usr/local/
[wolf:24774] [ 6] /usr/local/
[wolf:24774] [ 7] /usr/local/
[wolf:24774] [ 8] ./forward(
[wolf:24774] [ 9] ./forward(
[wolf:24774] [10] ./forward(
[wolf:24774] [11] /lib/tls/
[wolf:24774] [12] ./forward [0x8072051]
[wolf:24774] *** End of error message ***
Aborted
My main is called forward, since this is the forward solution to my problem, and hopefully I will also be doing the inverse later. I saw this thread: http://<email address hidden>
Any help would be appreciated,
Thank you very much,
Phil
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Anders Logg
- Solved:
- Last query:
- Last reply: