Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Indicator Function for 3d Mesh

More
4 years 8 months ago #1786 by kelley
Hi,

I have a three dimensional geometry with different subdomains. To implement my weak form including the region boundaries, I was following the approach recommended in this thread .

My confusion now is that the indicator function is not acting as expected since it is indicating some sides of the domain (see the attached example adapted from the tutorials). I checked the current tutorials and the difference from the working examples appears to be that this is a three dimensional mesh. I'm not sure if I have to adapt my example somehow or if the CoefficientFunction does not have this information like it doesn't have the boundary region information?

I also tried setting GridFunctions as a workaround but these are interpolating into neighboring subdomains -- maybe there is a way to prevent this?

Please let me know and thanks in advance,
Josie
More
4 years 8 months ago #1795 by joachim
Hi Josie,

the CoefficientFunction( list ) has one value per material, or one value per boundary, depending on the context. Drawing the surface mesh interprets it as one value per boundary.

If you clip and visualize L in the clipping plane, it looks as you expect.

You can also say:
Code:
cf = BoundaryFromVolumeCF(CoefficientFunction(values_list)) Draw(cf, mesh, "L")
Then the surface visualization evaluates the CF inside the volume elements next to the surface.

Joachim
More
4 years 8 months ago #1800 by kelley
I see, so it was just the visualization and the indicator function was defined one value per material as I expected it to be. I also just verified this with vtk out.
Thank you for the explanation!
Time to create page: 0.165 seconds