OpenCAEPoro  v0.5.0
A simulator for multicomponent porous media flow
Functions
DenseMat.cpp File Reference

Dense matrix-vector operations. More...

#include "DenseMat.hpp"

Go to the source code of this file.

Functions

void CalEigenSY (const int &N, float *A, float *w, float *work, const int &lwork)
 Calculate the minimal eigenvalue for symmetric matrix with mkl lapack.
 
void Dcopy (const int &N, double *dst, const double *src)
 Calculate the minimal eigenvalue for symmetric matrix with mkl lapack. More...
 
double Ddot (int n, double *a, double *b)
 Dot product of two double vectors stored as pointers.
 
double Dnorm1 (const int &N, double *x)
 Computes the L1-norm of a vector.
 
double Dnorm2 (const int &N, double *x)
 Computes the L2-norm of a vector.
 
void Dscalar (const int &n, const double &alpha, double *x)
 Scales a vector by a constant.
 
void Daxpy (const int &n, const double &alpha, const double *x, double *y)
 Constant times a vector plus a vector.
 
void DaABpbC (const int &m, const int &n, const int &k, const double &alpha, const double *A, const double *B, const double &beta, double *C)
 Computes C' = alpha B'A' + beta C', all matrices are column-major.
 
void myDABpC (const int &m, const int &n, const int &k, const double *A, const double *B, double *C)
 
void myDABpCp (const int &m, const int &n, const int &k, const double *A, const double *B, double *C, const int *flag, const int N)
 
void myDABpCp1 (const int &m, const int &n, const int &k, const double *A, const double *B, double *C, const int *flag, const int N)
 
void myDABpCp2 (const int &m, const int &n, const int &k, const double *A, const double *B, double *C, const int *flag, const int N)
 
void DaAxpby (const int &m, const int &n, const double &a, const double *A, const double *x, const double &b, double *y)
 Computes y = a A x + b y.
 
void LUSolve (const int &nrhs, const int &N, double *A, double *b, int *pivot)
 Calls dgesv to solve the linear system for general matrices.
 
int SYSSolve (const int &nrhs, const char *uplo, const int &N, double *A, double *b, int *pivot, double *work, const int &lwork)
 Calls dsysy to solve the linear system for symm matrices.
 

Detailed Description

Dense matrix-vector operations.

Author
Shizhe Li
Date
Oct/21/2021

Copyright (C) 2021–present by the OpenCAEPoro team. All rights reserved.

Released under the terms of the GNU Lesser General Public License 3.0 or later.

Definition in file DenseMat.cpp.

Function Documentation

◆ Dcopy()

void Dcopy ( const int &  N,
double *  dst,
const double *  src 
)

Calculate the minimal eigenvalue for symmetric matrix with mkl lapack.

Copy a double vector from src to dst.

Definition at line 36 of file DenseMat.cpp.

37 {
38  const int incx = 1, incy = 1;
39  dcopy_(&N, src, &incx, dst, &incy);
40 }
int dcopy_(const int *n, const double *src, const int *incx, double *dst, const int *incy)
Copies a vector, src, to a vector, dst.

References dcopy_().