Applying DirichletBC to a single node #2742
-
Hi all, I have been struggling with enforcing DirichletBC to nodes. I am trying to solve a problem that satisfies boundary conditions on a few nodes. My mesh has marked nodesets but from what I gathered petsc does not read the nodeset information from the exodus meshes. So, I am trying to mark the nodes directly in Firedrake. Here is a snippet of the code which I have written to extract the node (0.,0.)
This code does not work, the error message says "BC construction got invalid markers." Can someone please let me know how can this be done? Best, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Here's an old (i.e. used to work, interfaces might have changed mildly) snippet of code that colours facets of a mesh:
|
Beta Was this translation helpful? Give feedback.
-
Given that this is still useful (at least in my case), here is the same code but working with more recent versions:
Modifications:
Thanks again Patrick! |
Beta Was this translation helpful? Give feedback.
-
I've found that the
|
Beta Was this translation helpful? Give feedback.
Here's an old (i.e. used to work, interfaces might have changed mildly) snippet of code that colours facets of a mesh: