EVSL  1.1.0
EigenValues Slicing Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions | Variables
evsl_f90.c File Reference

Definitions used by fortran interface. More...

#include <string.h>
#include <stdint.h>
#include "def.h"
#include "struct.h"
#include "internal_proto.h"

Go to the source code of this file.

Functions

void EVSLFORT() evsl_start ()
 Fortran interface for EVSLStart. More...
 
void EVSLFORT() evsl_finish ()
 Fortran interface for EVSLFinish. More...
 
void EVSLFORT() evsl_coo2csr (int *n, int *nnz, int *ir, int *jc, double *vv, uintptr_t *csrf90)
 Fortran interface to convert a COO matrix to CSR the pointer of CSR will be returned. More...
 
void EVSLFORT() evsl_arr2csr (int *n, int *ia, int *ja, double *a, uintptr_t *csrf90)
 Fortran interface to return a CSR struct from (ia,ja,a) the pointer of CSR will be returned. More...
 
void EVSLFORT() evsl_free_csr (uintptr_t *csrf90)
 Fortran interface to free a CSR matrix. More...
 
void EVSLFORT() evsl_seta_csr (uintptr_t *Af90)
 Fortran interface to set matrix A from a CSR matrix. More...
 
void EVSLFORT() evsl_setb_csr (uintptr_t *Bf90)
 Fortran interface to set matrix B from a CSR matrix. More...
 
void EVSLFORT() evsl_setamv (int *n, void *func, void *data)
 Fortran interface for SetAMatvec. More...
 
void EVSLFORT() evsl_setbmv (int *n, void *func, void *data)
 Fortran interface for SetBMatvec. More...
 
void EVSLFORT() evsl_setbsol (void *func, void *data)
 Fortran interface for SetBSol. More...
 
void EVSLFORT() evsl_setltsol (void *func, void *data)
 Fortran interface for SetLTSol. More...
 
void EVSLFORT() evsl_set_geneig ()
 Fortran interface for SetGenEig. More...
 
void EVSLFORT() evsl_lanbounds (int *nsteps, double *lmin, double *lmax)
 Fortran interface for evsl_lanbounds. More...
 
void EVSLFORT() evsl_kpm_spslicer (int *Mdeg, int *nvec, double *xintv, int *nslices, double *sli, int *evint)
 Fortran interface for kpmdos and spslicer. More...
 
void EVSLFORT() evsl_find_pol (double *xintv, double *thresh_int, double *thresh_ext, uintptr_t *polf90)
 Fortran interface for find_pol. More...
 
void EVSLFORT() evsl_free_pol (uintptr_t *polf90)
 Fortran interface for free_pol. More...
 
void EVSLFORT() evsl_find_rat (double *intv, uintptr_t *ratf90)
 Fortran interface for find_rat. More...
 
void EVSLFORT() evsl_free_rat (uintptr_t *ratf90)
 Fortran interface for free_rat. More...
 
void EVSLFORT() evsl_cheblantr (int *mlan, int *nev, double *xintv, int *max_its, double *tol, uintptr_t *polf90)
 Fortran interface for ChebLanTr the results will be saved in the internal variables. More...
 
void EVSLFORT() evsl_cheblannr (double *xintv, int *max_its, double *tol, uintptr_t *polf90)
 Fortran interface for ChebLanNr the results will be saved in the internal variables. More...
 
void EVSLFORT() evsl_ratlannr (double *xintv, int *max_its, double *tol, uintptr_t *ratf90)
 Fortran interface for RatLanNr the results will be saved in the internal variables. More...
 
void EVSLFORT() evsl_ratlantr (int *lanm, int *nev, double *xintv, int *max_its, double *tol, uintptr_t *ratf90)
 Fortran interface for RatLanNr the results will be saved in the internal variables. More...
 
void EVSLFORT() evsl_get_nev (int *nev)
 Get the number of last computed eigenvalues. More...
 
void EVSLFORT() evsl_copy_result (double *val, double *vec)
 copy the computed eigenvalues and vectors More...
 

Variables

int evsl_nev_computed =0
 
int evsl_n =0
 
double * evsl_eigval_computed =NULL
 
double * evsl_eigvec_computed =NULL
 

Detailed Description

Definitions used by fortran interface.

Definition in file evsl_f90.c.

Function Documentation

void EVSLFORT() evsl_arr2csr ( int *  n,
int *  ia,
int *  ja,
double *  a,
uintptr_t *  csrf90 
)

Fortran interface to return a CSR struct from (ia,ja,a) the pointer of CSR will be returned.

Warning
: no memory allocation inside the CSR
Parameters
[in]*n: size of A
[in]*ia,*ja,*a: CSR array
[out]csrf90: CSR pointer

Definition at line 56 of file evsl_f90.c.

References _csrMat::a, _csrMat::ia, _csrMat::ja, Malloc, _csrMat::ncols, _csrMat::nrows, and _csrMat::owndata.

void EVSLFORT() evsl_cheblannr ( double *  xintv,
int *  max_its,
double *  tol,
uintptr_t *  polf90 
)

Fortran interface for ChebLanNr the results will be saved in the internal variables.

Definition at line 287 of file evsl_f90.c.

References ChebLanNr(), evsl_eigval_computed, evsl_eigvec_computed, evsl_n, evsl_nev_computed, evsldata, Malloc, _evsldata::n, and rand_double().

Here is the call graph for this function:

void EVSLFORT() evsl_cheblantr ( int *  mlan,
int *  nev,
double *  xintv,
int *  max_its,
double *  tol,
uintptr_t *  polf90 
)

Fortran interface for ChebLanTr the results will be saved in the internal variables.

Definition at line 252 of file evsl_f90.c.

References ChebLanTr(), evsl_eigval_computed, evsl_eigvec_computed, evsl_n, evsl_nev_computed, evsldata, Malloc, _evsldata::n, and rand_double().

Here is the call graph for this function:

void EVSLFORT() evsl_coo2csr ( int *  n,
int *  nnz,
int *  ir,
int *  jc,
double *  vv,
uintptr_t *  csrf90 
)

Fortran interface to convert a COO matrix to CSR the pointer of CSR will be returned.

Parameters
[in]*n: size of A
[in]*nnz: nnz of A
[in]*ir,*jc,*vv: COO triplets
[out]csrf90: CSR pointer

Definition at line 34 of file evsl_f90.c.

References cooMat_to_csrMat(), _cooMat::ir, _cooMat::jc, Malloc, _cooMat::ncols, _cooMat::nnz, _cooMat::nrows, and _cooMat::vv.

Here is the call graph for this function:

void EVSLFORT() evsl_copy_result ( double *  val,
double *  vec 
)

copy the computed eigenvalues and vectors

Warning
: after this call the internal saved results will be freed

Definition at line 398 of file evsl_f90.c.

References evsl_eigval_computed, evsl_eigvec_computed, evsl_n, and evsl_nev_computed.

void EVSLFORT() evsl_find_pol ( double *  xintv,
double *  thresh_int,
double *  thresh_ext,
uintptr_t *  polf90 
)

Fortran interface for find_pol.

Parameters
[in]xintvIntervals of interest
[in]thresh_intThreshold for accepting interior values
[in]thresh_extThreshold for accepting exterior values
[out]polf90: pointer of pol
Warning
: The pointer will be cast to uintptr_t

uintptr_t: Integer type capable of holding a value converted from a void pointer and then be converted back to that type with a value that compares equal to the original pointer

Definition at line 190 of file evsl_f90.c.

References _polparams::bar, _polparams::damping, _polparams::deg, find_pol(), _polparams::gam, Malloc, _polparams::max_deg, set_pol_def(), _polparams::thresh_ext, and _polparams::thresh_int.

Here is the call graph for this function:

void EVSLFORT() evsl_find_rat ( double *  intv,
uintptr_t *  ratf90 
)

Fortran interface for find_rat.

Parameters
[in]intvinterval of interest
[out]ratf90: pointer of rat
Warning
: The pointer will be cast to uintptr_t

uintptr_t: Integer type capable of holding a value converted from a void pointer and then be converted back to that type with a value that compares equal to the original pointer

Definition at line 227 of file evsl_f90.c.

References _ratparams::beta, find_ratf(), Malloc, _ratparams::num, _ratparams::pw, and set_ratf_def().

Here is the call graph for this function:

void EVSLFORT() evsl_finish ( )

Fortran interface for EVSLFinish.

Definition at line 23 of file evsl_f90.c.

References EVSLFinish().

Here is the call graph for this function:

void EVSLFORT() evsl_free_csr ( uintptr_t *  csrf90)

Fortran interface to free a CSR matrix.

Parameters
[in]csrf90: CSR pointer

Definition at line 73 of file evsl_f90.c.

References free_csr().

Here is the call graph for this function:

void EVSLFORT() evsl_free_pol ( uintptr_t *  polf90)

Fortran interface for free_pol.

Parameters
[out]polf90: pointer of pol

Definition at line 211 of file evsl_f90.c.

References free_pol().

Here is the call graph for this function:

void EVSLFORT() evsl_free_rat ( uintptr_t *  ratf90)

Fortran interface for free_rat.

Definition at line 243 of file evsl_f90.c.

References free_rat().

Here is the call graph for this function:

void EVSLFORT() evsl_get_nev ( int *  nev)

Get the number of last computed eigenvalues.

Definition at line 391 of file evsl_f90.c.

References evsl_nev_computed.

void EVSLFORT() evsl_kpm_spslicer ( int *  Mdeg,
int *  nvec,
double *  xintv,
int *  nslices,
double *  sli,
int *  evint 
)

Fortran interface for kpmdos and spslicer.

Parameters
[in]Mdegdegree
[in]nvecnumber of vectors to use
[in]xintvan array of length 4
[intv[0] intv[1]] is the interval of desired eigenvalues that must be cut (sliced) into n_int sub-intervals
[intv[2],intv[3]] is the global interval of eigenvalues it must contain all eigenvalues of A
[in]nslicesnumber of slices
[out]slislices [of size nslices+1]
[out]evintestimated ev count per slice

Definition at line 161 of file evsl_f90.c.

References kpmdos(), Malloc, and spslicer().

Here is the call graph for this function:

void EVSLFORT() evsl_lanbounds ( int *  nsteps,
double *  lmin,
double *  lmax 
)

Fortran interface for evsl_lanbounds.

Parameters
[in]nstepsnumber of steps
[out]lminlower bound
[out]lmaxupper bound

Definition at line 139 of file evsl_f90.c.

References evsldata, LanTrbounds(), Malloc, _evsldata::n, and rand_double().

Here is the call graph for this function:

void EVSLFORT() evsl_ratlannr ( double *  xintv,
int *  max_its,
double *  tol,
uintptr_t *  ratf90 
)

Fortran interface for RatLanNr the results will be saved in the internal variables.

Definition at line 322 of file evsl_f90.c.

References evsl_eigval_computed, evsl_eigvec_computed, evsl_n, evsl_nev_computed, evsldata, Malloc, _evsldata::n, rand_double(), and RatLanNr().

Here is the call graph for this function:

void EVSLFORT() evsl_ratlantr ( int *  lanm,
int *  nev,
double *  xintv,
int *  max_its,
double *  tol,
uintptr_t *  ratf90 
)

Fortran interface for RatLanNr the results will be saved in the internal variables.

Definition at line 357 of file evsl_f90.c.

References evsl_eigval_computed, evsl_eigvec_computed, evsl_n, evsl_nev_computed, evsldata, Malloc, _evsldata::n, rand_double(), and RatLanTr().

Here is the call graph for this function:

void EVSLFORT() evsl_set_geneig ( )

Fortran interface for SetGenEig.

Definition at line 130 of file evsl_f90.c.

References SetGenEig().

Here is the call graph for this function:

void EVSLFORT() evsl_seta_csr ( uintptr_t *  Af90)

Fortran interface to set matrix A from a CSR matrix.

Parameters
[in]Af90: CSR pointer of A

Definition at line 82 of file evsl_f90.c.

References SetAMatrix().

Here is the call graph for this function:

void EVSLFORT() evsl_setamv ( int *  n,
void *  func,
void *  data 
)

Fortran interface for SetAMatvec.

Parameters
[in]n: size of A
[in]func: function pointer
[in]data: associated data

Definition at line 100 of file evsl_f90.c.

References SetAMatvec().

Here is the call graph for this function:

void EVSLFORT() evsl_setb_csr ( uintptr_t *  Bf90)

Fortran interface to set matrix B from a CSR matrix.

Parameters
[in]Bf90: CSR pointer of B

Definition at line 90 of file evsl_f90.c.

References SetBMatrix().

Here is the call graph for this function:

void EVSLFORT() evsl_setbmv ( int *  n,
void *  func,
void *  data 
)

Fortran interface for SetBMatvec.

Parameters
[in]n: size of B
[in]func: function pointer
[in]data: associated data

Definition at line 109 of file evsl_f90.c.

References SetBMatvec().

Here is the call graph for this function:

void EVSLFORT() evsl_setbsol ( void *  func,
void *  data 
)

Fortran interface for SetBSol.

Parameters
[in]funcfunc pointer of Bsol
[in]datadata pointer of Bsol

Definition at line 117 of file evsl_f90.c.

References SetBSol().

Here is the call graph for this function:

void EVSLFORT() evsl_setltsol ( void *  func,
void *  data 
)

Fortran interface for SetLTSol.

Parameters
[in]funcfunc pointer of LTsol
[in]datadata pointer of LTsol

Definition at line 125 of file evsl_f90.c.

References SetLTSol().

Here is the call graph for this function:

void EVSLFORT() evsl_start ( )

Fortran interface for EVSLStart.

Definition at line 18 of file evsl_f90.c.

References EVSLStart().

Here is the call graph for this function:

Variable Documentation

double* evsl_eigval_computed =NULL
double * evsl_eigvec_computed =NULL
int evsl_n =0
int evsl_nev_computed =0

global variables that hold results from EVSL evsl_copy_result_f90 will copy results from these vars and reset them

Definition at line 14 of file evsl_f90.c.

Referenced by evsl_cheblannr(), evsl_cheblantr(), evsl_copy_result(), evsl_get_nev(), evsl_ratlannr(), and evsl_ratlantr().