local coordinates
Asked by
B. Emek Abali
I need the coordinates relative to the middle of the cell in my form, so I came to the idea of
class cellcoords(
def eval(self, out, x):
out[0] = x[0]-self.
out[1] = x[1]-self.
out[2] = x[2]-self.
def value_shape(self):
return (3,)
x = cellcoords()
where my lack of programming knowledge restricts me to the question marks ! I dig in the Mesh...h but could not find out..
How can I reach to a method (midpoint() ) in MeshEntity class from the Expression (I think self. directs me to the MeshData class) ?
any other method is also welcome.
Thanks a lot,
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- B. Emek Abali
- Solved:
- Last query:
- Last reply:
To post a message you must log in.