question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pointwise evaluation of a vector

See original GitHub issue

Hi @kinnala ,

Is it possible to do pointwise evalulation of InteriorBasis on a set of input points for ElementHex1 ? I can see an interpolator method, but not sure of what it does. I am trying:

import numpy as np
from skfem import *
mesh  = MeshHex()
elem = ElementHex1()
velem = ElementVectorH1(elem)
basis = InteriorBasis(mesh, velem,  MappingIsoparametric(mesh, elem), intorder=1)
eval = basis.interpolator(np.random.random(basis.N))

but this raises:

Traceback (most recent call last):
  File ".\generateStructuredMesh.py", line 110, in <module>
    eval = basis.interpolator(np.random.random(basis.N))
  File "C:\Users\bshri\AppData\Local\Programs\Python\Python37\lib\site-packages\skfem\assembly\basis\interior_basis.py", line 141, in interpolator
    finder = self.mesh.element_finder()
  File "C:\Users\bshri\AppData\Local\Programs\Python\Python37\lib\site-packages\skfem\mesh\mesh.py", line 342, in element_finder
    raise NotImplementedError("element_finder not implemented "
NotImplementedError: element_finder not implemented for the given Mesh type.

Is this something that you put there for future implementation?

https://github.com/kinnala/scikit-fem/blob/884a427043577233584ea4257dea6f9c2f599d64/skfem/mesh/mesh.py#L339-L343

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
kinnalacommented, Oct 4, 2020

There is now a preliminary implementation for tets and 1D meshes available for testing in #487 .

1reaction
kinnalacommented, Sep 23, 2020

An additional remark: inverse mapping of MappingIsoparametric will clip the results to the unit cube for robustness so the above approach might require some tuning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

(2.2) Definition of pointwise vector operations: (a) The sum f + ...
L(X, Y ) is a vector space under pointwise addition and multiplication by a scalar. Linearity is preserved not only under (pointwise) addition ......
Read more >
Pointwise multiplication on vector-valued function spaces with ...
Abstract: We investigate pointwise multipliers on vector-valued function spaces over \mathbb{R}^d, equipped with Muckenhoupt weights.
Read more >
Pointwise descriptions of nearly incompressible vector fields ...
Journal of Mathematical Analysis and Applications ... Pointwise descriptions of nearly incompressible vector fields with bounded curl.
Read more >
Evaluating the Normal Vector - YouTube
In this video we go through a standard cross product to find the equation of the vector normal to our plane.Watch this video...
Read more >
Evaluation codes
the pointwise calculations going on entirely inside the field F. It is not surprising that Vα is an F-space, since its set of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found