ForK Library

# Fortran Kriging (ForK) Library

## Introduction

Library for Building Kriging Surfaces in Fortran 90

Goal:

• Provide easy to use tools for constructing and making predictions from gradient-enhanced and function-only Kriging models that can be incorporated directly into existing FORTRAN codes.

Features:

• Build Kriging based on Function Values
• Build Kriging based on Function/Gradient Values
• Prediction of Function/Gradient Values
• Variance predictions for Function/Gradient
• Universal Kriging with Arbitrary Basis
• Written in Fortran 90 utilizing LAPACK

## Usage

1. Generate Training Data ( $$X,Y,dY$$)
2. Call buildkriging (or buildkrigingGEK when gradient values are used) to determine Gaussian process parameters (referred to as hyperparameters) and process the data (denoted as $$V$$)
3. Once model is constructed, predictions can be made using the following:
4. Optimization can also be performed on the Kriging Surface:

GitHub

## Examples

The process of creating a Kriging model based on function values from an analytic test function (defined in toyfunc) is found in krigingwrapper.

Creating a gradient-enhanced kriging model based on function and derivative values of an analytic test function is found in krigingwrapperGEK.

## Compilation

1. Manually edit Makefile to specify compiler and compilation flags
• If the pre-processing flag "HAVELAPACK" is supplied, LAPACK is used so make sure the appropriate library is linked during compilation.
• For parallelism, openmp is used within the pattern search used to determine the hyperparameters, as such the sequential version of LAPACK should be used
• The flag "-mkl=sequential" works for the Intel Fortran compiler
2. Use "make" to compile the library, named "kriginglib.a"
3. Link the library "kriginglib.a" to your executable (as well as LAPACK and openmp if appropriate)