- Thank you received: 0
Integrate only on material
4 years 5 months ago #2746
by mischl
Integrate only on material was created by mischl
Hey, I have a function gfu and I want to integrate it on a domain which is a subset of my mesh
When creating my geometry I did
and integrating on the mesh works fine
However, when I try to integrate on my rectangle, it doesn't work
Integrate(gfu_old, definedon=mesh.Materials("rectangle"))
Integrate(gfu_old, mesh.Materials("rectangle"))
Integrate(gfu_old, "rectangle")
I checked the help for integrate and mesh and google. Do I understand correct, that definedon is for my function spaces? Thanks for the answer, I assume it is an obvious one
When creating my geometry I did
Code:
geo.SetMaterial(2,"rectangle")
Code:
Integrate(gfu_old, mesh)
However, when I try to integrate on my rectangle, it doesn't work
Integrate(gfu_old, definedon=mesh.Materials("rectangle"))
Integrate(gfu_old, mesh.Materials("rectangle"))
Integrate(gfu_old, "rectangle")
I checked the help for integrate and mesh and google. Do I understand correct, that definedon is for my function spaces? Thanks for the answer, I assume it is an obvious one
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
4 years 5 months ago #2748
by mneunteufel
Replied by mneunteufel on topic Integrate only on material
Hi mischl,
the correct syntax should by
It needs the mesh and the region as two separate arguments.
Best
Michael
the correct syntax should by
Code:
Integrate(gfu_old, mesh, definedon=mesh.Materials("rectangle"))
It needs the mesh and the region as two separate arguments.
Best
Michael
The following user(s) said Thank You: mischl
4 years 5 months ago #2752
by joachim
Replied by joachim on topic Integrate only on material
with the coming nightly version also the shorter form
is working,
Joachim
Code:
Integrate(gfu_old, mesh.Materials("rectangle"))
Joachim
The following user(s) said Thank You: mischl
4 years 5 months ago #2792
by mischl
Replied by mischl on topic Integrate only on material
Ah, thanks! So I didn't understand the help regarding this
Time to create page: 0.109 seconds