Skip to end of metadata
Go to start of metadata

Origin has included all functions from NAG MARK C LIBRARY since Origin 8 was released. These functions can be easily accessed from your Origin C function. In Origin 2017, the NAG library has been updated to the latest version Mark 25.

Linked Jira:   ORG-13393 - Getting issue details... STATUS



The details of each function can be referred to Origin C Guide: NAG C Library.

SummaryDetails
The header file <oc_nag8.h> has been replaced by <OC_nag.h>, and the header file <oc_nag_ex.h> have been withdrawn.

For example:

#include <OC_nag8.h>
#include <nag\OC_nag_ex.h>

has to be changed into:

#include <OC_nag.h>
//#include <nag\OC_nag_ex.h>//not need, only oc_nag.h required.

Some NAG functions have been withdrawn and replaced by other functions.

See the full list in the table below

If there is an error as below after compiling, it might be caused by the NAG function that have been withdrawn since the new release NAG C Library.

Error, function or variable ***** not found.


Referring to the following table Withdrawn Functions, the replacement function can be found and used instead. For example:

  • e01sac has been replaced by e01sjc since Mark 23.

    Origin C: Example: Interpolation and Gridding: XYZ Gridding by Renka Cline Method
    e01sac(method, nSize, vx, vy, vz, &comm, &optional, &fail);

    can be changed instead of:

    Origin C: Example: Interpolation and Gridding: XYZ Gridding by Renka Cline Method
    //The arguments triang and grads that were not included in e01sac should be declared before calling the function e01sjc
    e01sjc(nSize, vx, vy, vz, triang, grads, &fail); 
  • e01sbc has been replaced by e01skc since Mark 23.

    Origin C: Example: Interpolation and Gridding: XYZ Gridding by Renka Cline Method
    e01sbc(&comm, nRows*nCols, vxGrid, vyGrid, mat, &fail);

    can be changed instead of:

    Origin C: Example: Interpolation and Gridding: XYZ Gridding by Renka Cline Method
    //The arguments triang and grads that were not included in e01sbc should be declared before calling the function e01skc
    //More details of e01skc can be referred to NGA C Library
    for(int ii=0; ii < nRows; ii++)
    {
    	for(int jj=0; jj < nCols; jj++)
    	{
    		e01skc(nSize,vx, vy, vz, triang, grads, vxGrid[jj], vyGrid[ii], &mat[jj][ii], &fail);
        }
    }
  • d01ajc has been replaced by d01sjc since Mark 24.

    Origin C: Example: Quadrature Integral: Simple Integral Function
    d01ajc(func, a, b, epsabs, epsrel, max_num_subint, &result, &abserr, &qp, &fail);

    can be changed instead of:

    Origin C: Example: Quadrature Integral: Simple Integral Function
    d01sjc(func, a, b, epsabs, epsrel, max_num_subint,&result, &abserr, &qp, &comm, &fail);

    The examples usually indicate the minimum change necessary, but many of the replacement functions have additional flexibility. You are recommended to familiarize yourself with the replacement NAG function in NAG C Library.

Some NAG functions have been withdrawn without replacement. 

See the full list in the table below  

If there is no replacement required of the withdrawn function, it can be removed from the code file. For example:

  • e01szc has been withdrawn since Mark 23.

    Origin C: Example: Interpolation and Gridding: XYZ Gridding by Renka Cline Method
    if (fail.code != NE_NOERROR)
    {
    	printf("Error from e01sac: %s\n", fail.message);
    	//nag_2d_scat_free
    	e01szc(&comm);
    	return fail.code;
    }

    has to be changed into:

    Origin C: Example: Interpolation and Gridding: XYZ Gridding by Renka Cline Method
    if (fail.code != NE_NOERROR)
    {
    	printf("Error from e01sac: %s\n", fail.message);
    	return fail.code;
    }

Some NAG functions have been added.

See the full list in the table below

There are 551 new user-callable functions included in the NAG C Library of Origin 2017, which can be referred to the table New Functions as follow.

Generally speaking, the function is new to NAG library in Origin 2017, if its mark of introduction is 23, 24 or 25.

Withdrawn Functions

New Functions

  • No labels
Write a comment…