This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Best way to make 1D boundary conditions in 2D?

0 votes

My domain is a simple square mesh, with one-dimensional Dirichlet (absorbing) boundary conditions along lines in the square's interior - so just a box with lines inside. I am wondering what the best way to assign such a boundary condition would be.

I'm currently using a search algorithm in my u0_boundary function to determine whether a point in the triangulation is on these interior lines, but I fear this is slower than it need be.

For instance, is there a way to just make this in mshr, like:

Rectangle(dolfin.Point(0,0), dolfin.Point(0,1)) - Vector(dolfin.Point(0,0.5), dolfin.Point(0.1, 0.6)

Thank you!

asked Aug 30, 2016 by rizii FEniCS Novice (170 points)
...