- Thank you received: 0
Non-constant coefficients in NGSolve
3 years 7 months ago #3761
by Fritz
Non-constant coefficients in NGSolve was created 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.
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.
3 years 7 months ago #3762
by hvwahl
Replied by hvwahl on topic Non-constant coefficients in NGSolve
Hi Fritz,
you can use the
or multiples of these to do this. See also
the documentation
Best wishes,
Henry
you can use the
Code:
IfPos(x,if,else)
Best wishes,
Henry
Time to create page: 0.095 seconds