- Thank you received: 0
Piecewise CoefficientFunction
3 years 8 months ago - 3 years 8 months ago #3599
by Ryanleaf
Piecewise CoefficientFunction was created by Ryanleaf
Dear All,
I have a quick question. I am trying to define a piecewise Coefficient function. I noticed that I could achieve this by doing something like this,
" domain_values = {'inner': 3.7, 'outer': 1}
values_list = [domain_values[mat]
for mat in mesh.GetMaterials()]
cf = CoefficientFunction(values_list)
Draw(cf, mesh, 'piecewise') "
I am wondering is it possible to define a piecewise coefficient function without setting actual domains?
Write a coefficient function f like:
f(x,y,z)=x. when x^2+y^2>1
f(x,y,z)=y. when x^2+y^2<=1
Without creating a cylinder domain?
Thanks,
Ryan
I have a quick question. I am trying to define a piecewise Coefficient function. I noticed that I could achieve this by doing something like this,
" domain_values = {'inner': 3.7, 'outer': 1}
values_list = [domain_values[mat]
for mat in mesh.GetMaterials()]
cf = CoefficientFunction(values_list)
Draw(cf, mesh, 'piecewise') "
I am wondering is it possible to define a piecewise coefficient function without setting actual domains?
Write a coefficient function f like:
f(x,y,z)=x. when x^2+y^2>1
f(x,y,z)=y. when x^2+y^2<=1
Without creating a cylinder domain?
Thanks,
Ryan
Last edit: 3 years 8 months ago by Ryanleaf.
Time to create page: 0.093 seconds