NPSpec  0.2.0
Solve for the spectral properties of nanoparticles easily
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
Data Types | Public Member Functions | Public Attributes | List of all members
npspecmodule Module Reference

This module is a direct wrapper of the functions supplied by the npspec.h header. More...

Public Member Functions

subroutine, public make_c_string (stringin, stringout)
 Convert a Fortran character array to a C-string. More...
 

Public Attributes

integer(c_int), parameter, public nlambda = 800
 Number of wavelengths that will be calculated.
 
real(c_double), dimension(nlambda),
public 
wavelengths
 
integer(c_int), parameter, public efficiency = 0
 Calculate the efficiency spectra (unitless).
 
integer(c_int), parameter, public crosssection = 1
 Calculate the CrossSection spectra (in nm^2).
 
integer(c_int), parameter, public molar = 2
 Calculate the molar absorbtivitty (in L mol^−1 cm^−1).
 
integer(c_int), parameter, public absorption = 3
 Calculate the absorption spectra (unitless).
 
integer(c_int), parameter, public noerror = 0
 No error has occured.
 
integer(c_int), parameter, public invalidradius = -4
 The radius given is invalid.
 
integer(c_int), parameter, public invalidrelativeradius = -5
 The relative radius given is invalid.
 
integer(c_int), parameter, public invalidincrement = -6
 The increment is not a factor of 800 or is negative.
 
integer(c_int), parameter, public invalidpathlength = -7
 The path length chosen is invalid.
 
integer(c_int), parameter, public invalidconcentration = -8
 The concentration given is invalid.
 
integer(c_int), parameter, public invalidrefractiveindex = -9
 The refractive index given is invalid.
 
integer(c_int), parameter, public invalidnumberoflayers = -10
 The number of layers is either negative or greater than 10.
 
integer(c_int), parameter, public unknownmaterial = -11
 The material requested is unknown.
 

Detailed Description

This module is a direct wrapper of the functions supplied by the npspec.h header.

Each function documented in that header is called EXACTLY the same way in Fortran, including the return codes if the function is non-void. This means the the npspec function is called like

retcode = npspec(...)

The void functions are called like subroutines, such as

call RGB(...)

Additionally, there is an additional function included that will convert a Fortran-style character string to a C-style character string for use in interfacing with the C functions.

Member Function/Subroutine Documentation

subroutine, public npspecmodule::make_c_string ( character(*), intent(in)  stringin,
character(kind=c_char, len=*), intent(out)  stringout 
)

Convert a Fortran character array to a C-string.

Parameters
stringinThe string in Fortran format
stringoutThe string in C format

The documentation for this module was generated from the following file: