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

Dirichlet Boundary condition for DG element from imported xml mesh

+3 votes

Hi there,

How to enforce DirichletBC for DG element on imported xml mesh? I imported the mesh as

mesh = Mesh('myMesh.xml')
boundaries = MeshFunction("size_t", mesh, "myMesh_facet_region.xml")

and defined the BC with the pointwise parameter

DirichletBC(W, myExpression, boundaries, 1, "pointwise")

but it returned an error saying that

*** Error:   Unable to computing Dirichlet boundary values, pointwise search.
*** Reason:  A SubDomain is required for pointwise search.
asked Dec 24, 2014 by Chao Zhang FEniCS User (1,180 points)
edited Dec 24, 2014 by Chao Zhang

Were you able to solve this problem? I have a related question: http://fenicsproject.org/qa/8968/trouble-applying-function-boundary-definition-dirichletbc

1 Answer

0 votes

Probably, you need the data of boundary with the points marked.

answered Sep 15, 2015 by Hamilton FEniCS Novice (500 points)
...