set Dirichlet BC

Asked by ceguo

Hi everyone,

When set Dirichlet boundary I usually use something like whereZero(domain.getX()[0]). I'm wondering if it is more proper to use whereZero(ContinuousFunction(mydomain).getX()[0])? Sometimes I notice when I use whereZero(domain.getX()[0]-0.5) but there is no nodes at x=0.5, then there will be a problem for the solver. Does this mean there is no internal interpolation for the boundary nodal displacements?

Ning

Question information

Language:
English Edit question
Status:
Solved
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Solved by:
Lutz Gross
Solved:
Last query:
Last reply:
Revision history for this message
Best Lutz Gross (l-gross) said :
#1

I fact it should be whereZero(Solution(mydomain).getX()[0]) bit this does not make any difference if you don't deal with periodic boundaries. Moreover, mydomain.getX() and ContinuousFunction(mydomain).getX() are in fact equivalent and no interpolation is required (at least if no periodic boundary conditions are involved).

If you use r=whereZero(domain.getX()[0]-0.5) to set a PDE constraint and there is no node with x=0.5
you will not introduce a constraint - in many cases the PDE is then singular and the solver gets `confused' .

Revision history for this message
ceguo (hhh-guo) said :
#2

Thanks Lutz Gross, that solved my question.