Expression conditional on subdomain
Asked by
Nico Schlömer
I'd like to define an expression that does (sorry for the ASCII art
/ 1.0/x[0] in subdomain 1
f(x) = (
\ 1.0 in subdomain 2
(Subdomain 1 doesn't contain any points with x[0].)
I'm quite used to defining custom Expressions like
class MyExpr(Expression):
def eval_cell(self, values, x, cell):
k = subdomains.
if k==1:
else:
but x[0] isn't what I want here. (I'm not even sure what it does in eval_cell(). -- The barycenter?)
There are also UFL conditionals, but I couldn't find out how to make them depend on subdomains.
Any hints?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Nico Schlömer
- Solved:
- Last query:
- Last reply:
This question was reopened
To post a message you must log in.