Skip to content

Prolong FE function from a coarse to a fine mesh #888

Answered by kinnala
BarbaraV asked this question in Q&A
Discussion options

You must be logged in to vote

In principle, it is possible to use Basis.interpolator between arbitrary meshes.
This is not very efficient though for very fine meshes.

In [1]: from skfem import *                                                     
In [2]: m = MeshTri().refined(2)                                                
In [3]: basis = Basis(m, ElementTriP1())                                        
In [4]: mfine = m.refined(2)                                                    
In [6]: import numpy as np                                                      
In [7]: x = np.sin(5. * m.p[0])                                                 
In [8]: interp = basis.interpolator(x)                                    …

Replies: 4 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@kinnala
Comment options

@kinnala
Comment options

@xida2020
Comment options

@kinnala
Comment options

@sxwang1991
Comment options

Answer selected by BarbaraV
Comment options

You must be logged in to vote
1 reply
@sxwang1991
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants