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.

Evaluating gridfunction at element vertices

More
5 years 2 months ago #1442 by armandyam
Hi,

I am trying the adaptive.py example from the tutorials and I tried to evaluate the gridfunction at all the element vertices and for some vertices I get the following error
"WARNING: MeshPoint not in mesh, can't convert to BaseMappedIntegrationPoint!"

and subsequently the error:

TypeError: __call__(): incompatible function arguments. The following argument types are supported:
1. (self: ngsolve.fem.CoefficientFunction, mip: ngsolve.fem.BaseMappedIntegrationPoint) -> object
2. (self: ngsolve.fem.CoefficientFunction, arg0: numpy.ndarray[ngsolve.fem.MeshPoint]) -> array

Invoked with: <ngsolve.comp.GridFunction object at 0x114d0b360>, <ngsolve.fem.MeshPoint object at 0x114d10bc8>

but I am quite certain that point is definitely on the mesh as it is one of the vertices used to define the geometry.

I am not entirely sure why this is happening. I basically call
mip = mesh(x, y)
val= gfu(mip)

where x,y are the coordinates of the vertices. I even tried to print with large number of significant digits and it seems to be correct.

Thanks for the help!
More
5 years 2 months ago #1443 by joachim
it was a bug in the search-tree, it is fixed in the coming nightly release.

Thanks for the report !

Joachim
Time to create page: 0.141 seconds