Skip to content

An OOP library for 1 and 2-dimensional Lagrange interpolation

Notifications You must be signed in to change notification settings

jlokimlin/lagrange_interpolator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lagrange_interpolator

This Fortran project implements 1 and 2-dimensional Lagrange interpolation.


Requirements


To build the project

Type the following command line arguments

git clone https://github.com/jlokimlin/lagrange_interpolator.git

cd lagrange_interpolator; make all

Usage

    use, intrinsic :: iso_fortran_env, only: &
        wp => REAL64, &
        ip => INT32

    use lagrange_interpolator_library, only: &
        LagrangeInterpolator

    ! Explicit typing only
    implicit none
    
    type (LagrangeInterpolator) :: interp
    real (wp)				    :: estimate
    real (wp)					:: desired_point, desired_point_2d(2)
    real (wp), allocatable      :: x(:), y(:), fx(:), fxy(:,:)
    integer (ip), parameter	    :: TYPE = 0 ! 0 = None, 1 = Constant, 2 = Linear
    
    !... generate some data
    
    call interp%perform_1d_interpolation( TYPE, x, fx, desired_point, estimate )
    
    call interp%perform_2d_interpolation( TYPE, x, y, fxy, desired_point_2d, estimate )

About

An OOP library for 1 and 2-dimensional Lagrange interpolation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published