Scippy

SCIP

Solving Constraint Integer Programs

lapack_calls.h File Reference

Detailed Description

interface methods for lapack functions

Author
Marc Pfetsch

This file is used to call the LAPACK routine DSYEVR and DGETRF.

LAPACK can be built with 32- or 64-bit integers, which is not visible to the outside. This interface tries to work around this issue. Since the Fortran routines are called by reference, they only get a pointer. We always use 64-bit integers on input, but reduce the output to 32-bit integers. We assume that all sizes can be represented in 32-bit integers.

Author
Marc Pfetsch

Definition in file lapack_calls.h.

#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_retcode.h"

Go to the source code of this file.

Functions

SCIP_Bool SCIPlapackIsAvailable (void)
 
void SCIPlapackVersion (int *major, int *minor, int *patch)
 
SCIP_RETCODE SCIPlapackComputeEigenvalues (BMS_BUFMEM *bufmem, SCIP_Bool geteigenvectors, int N, SCIP_Real *a, SCIP_Real *w)
 
SCIP_RETCODE SCIPlapackSolveLinearEquations (BMS_BUFMEM *bufmem, int N, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
 

Function Documentation

◆ SCIPlapackIsAvailable()

SCIP_Bool SCIPlapackIsAvailable ( void  )

returns whether Lapack is available, i.e., whether it has been linked in

Definition at line 121 of file lapack_calls.c.

References FALSE, SCIPisIpoptAvailableIpopt(), and TRUE.

Referenced by detectSocQuadraticComplex(), SCIP_DECL_SEPAEXECLP(), SCIP_DECL_SEPAEXECSOL(), SCIPcomputeFacetVertexPolyhedralNonlinear(), and SCIPexprComputeQuadraticCurvature().

◆ SCIPlapackVersion()

void SCIPlapackVersion ( int *  majorver,
int *  minorver,
int *  patchver 
)

returns Lapack version if Lapack is available

returns whether Lapack s available, i.e., whether it has been linked in

Parameters
majorvermajor version number
minorverminor version number
patchverpatch version number

Definition at line 181 of file lapack_calls.c.

References F77_FUNC(), and NULL.

Referenced by doScipCreate().

◆ SCIPlapackComputeEigenvalues()

SCIP_RETCODE SCIPlapackComputeEigenvalues ( BMS_BUFMEM bufmem,
SCIP_Bool  geteigenvectors,
int  N,
SCIP_Real a,
SCIP_Real w 
)

computes eigenvalues and eigenvectors of a dense symmetric matrix

Calls Lapack's DSYEV function.

Parameters
bufmembuffer memory (or NULL if IPOPT is used)
geteigenvectorsshould also eigenvectors should be computed?
Ndimension
amatrix data on input (size N*N); eigenvectors on output if geteigenvectors == TRUE
warray to store eigenvalues (size N) (or NULL)

Definition at line 352 of file lapack_calls.c.

References a, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcallLapackDsyevIpopt(), SCIPerrorMessage, SCIPisIpoptAvailableIpopt(), and w.

Referenced by detectSocQuadraticComplex(), getEigenValues(), and SCIPexprComputeQuadraticCurvature().

◆ SCIPlapackSolveLinearEquations()

SCIP_RETCODE SCIPlapackSolveLinearEquations ( BMS_BUFMEM bufmem,
int  n,
SCIP_Real A,
SCIP_Real b,
SCIP_Real x,
SCIP_Bool success 
)

solves a linear problem of the form Ax = b for a regular matrix A

Calls Lapack's DGETRF routine to calculate a LU factorization and uses this factorization to solve the linear problem Ax = b.

solves a linear problem of the form Ax = b for a regular matrix A

Calls Lapacks DGETRF routine to calculate a LU factorization and uses this factorization to solve the linear problem Ax = b.

Code taken from nlpi_ipopt.cpp

Parameters
bufmembuffer memory
ndimension
Amatrix data on input (size N*N); filled column-wise
bright hand side vector (size N)
xbuffer to store solution (size N)
successpointer to store if the solving routine was successful

Definition at line 386 of file lapack_calls.c.

References b, BMSallocBufferMemoryArray, BMScopyMemoryArray, BMSduplicateBufferMemoryArray, BMSfreeBufferMemoryArray, F77_FUNC(), FALSE, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_UNUSED, SCIPdebugMessage, SCIPisIpoptAvailableIpopt(), SCIPsolveLinearEquationsIpopt(), TRUE, and x.

Referenced by computeHyperplaneThreePoints().