How to define a sloping boundary?

Asked by Jingchi Yu

As we know, if I want to define a boundary of a box, I can use some codes like"wherezero(x[0])"

On this basis, if I want to define a sloping boundary like the hypotenuse of the triangle,how can I do that?

Waiting your answer all the time~Thx~

Question information

English Edit question
esys-escript Edit question
No assignee Edit question
Solved by:
Adam Ellery
Last query:
Last reply:
Revision history for this message
Best Adam Ellery (aellery) said :

Hi Jingchi,

For a line defined by the equation y=a*x+b, you can use the expression along the lines "whereZero(x[1]-(a*x[0]+b))".

- Adam

Revision history for this message
Jingchi Yu (yujc-17) said :

Thanks Adam Ellery, that solved my question.