Non-constant coefficients in NGSolve

More
3 years 7 months ago #3761 by Fritz
Hello,

I am a relatively new user of NG Solve and was curious how one defines non-constant coefficients. I am trying to solve a PDE with a coefficient that is piecewise constant. From following the tutorial on solving Poisson's equation, I have x and y coordinates, however, from looking at the documentation, it does not allude to how to loop through the x and y coordinates and change the value of the coefficient accordingly.
More
3 years 7 months ago #3762 by hvwahl
Hi Fritz,

you can use the
Code:
IfPos(x,if,else)
or multiples of these to do this. See also the documentation

Best wishes,
Henry
Time to create page: 0.095 seconds