ExtendableGrids.jl icon indicating copy to clipboard operation
ExtendableGrids.jl copied to clipboard

Order of barycentric coordinates

Open j-fu opened this issue 3 years ago • 1 comments

Hi, I am trying to write a linear interpolation function from simplexgrids to simplexgrids. The main loop is as follows:

   	cf = CellFinder(grid_from)
	for inode_to=1:nnodes_to
	@views icell_from=gFindLocal!(λ, cf, coord[:,inode_to]; icellstart)
		for i=1:dim+1
                       inode_from=cn_from[i,icell_from]
			u_to[inode_to]+=λ[i]*u_from[inode_from]
		end
	   icell_start=icell_from	   	
	end

This does not work. I figured out that I need to permute the λ values. How is the sequence of barycentric coordinates defined with respect to cellnodes[:,icell] ? And do we have a link with #1 ?

j-fu avatar May 28 '22 17:05 j-fu