arjenmarkus / interpolation2d3d Goto Github PK
View Code? Open in Web Editor NEWInterpolation in 2D and 3D, object-oriented interfaces
License: MIT License
Interpolation in 2D and 3D, object-oriented interfaces
License: MIT License
I noticed that all the interpolation classes make copies of the x-, y-, and z-arrays (when applicable). This is of course a safe and pragmatic design choice, after-all memory is cheap today.
For large applications, one might not be able to afford the copies. In this case it might be preferable to have a network_view
class, which only stores a reference to the data:
real, pointer :: x(:) => null(), y(:) => null()
What I've realized today is that such a class could access the coordinates in their natural storage layout:
subroutine create_mesh_2d( this, x, y )
class(network_view_2d), intent(inout) :: this
real, intent(in), target :: x(:)
real, intent(in), target :: y(:)
This would mean an application could support both Fortran- and C-like layouts,i.e.
real, target :: x(4), y(4)
x = [ 0.0, 0.0, 1.0, 1.0]
y = [ 0.0, 1.0, 0.0, 1.0]
call network%create_mesh( x, y )
or
real, target :: xy(2,4)
xy(1,:) = [ 0.0, 0.0, 1.0, 1.0]
xy(2,:) = [ 0.0, 1.0, 0.0, 1.0]
call network%create_mesh( xy(1,:), xy(2,:) )
I think the strided array access is a very cool Fortran feature. I haven't looked deeper into the original routines from Renka. Presumably those expect (contiguous) assumed-size arrays. Those would need to be modified to take assumed-shape arrays for the above to work
Note I have no urgent need for this, but the idea seemed worth documenting at least.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.