⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matrixeigenstateproblem.h

📁 An object-oriented C++ implementation of Davidson method for finding a few selected extreme eigenpai
💻 H
字号:

#ifndef __Matrix_Eigenstate_Problem
#define __Matrix_Eigenstate_Problem

#include "../davidson/gridparam.h"
#include "../davidson/potentialbase.h"
#include "../davidson/matrixbase.h"

class MatrixEigenstateProblem: public MatrixBase
{
    private:
        ftyp *diag; //pointer for vector of the diagonal elements
        const GridParam *gp; //pointer for object of GridParam class

        // Calculates values of diagonal elements matrix (in case of
        // 1D, 2D and 3D)
        void Diag1D(const PotentialBase &);
        void Diag2D(const PotentialBase &);
        void Diag3D(const PotentialBase &);

        /*  Computes the product of matrix A with a block of
            vectors B(N,M)
           					C=A B
       		where A(NxN) is a Symmetric Sparse matrix (in case of 1D,
            2D and 3D). */
        void dssbmv1D(ntyp , ftyp *, ftyp *, ntyp ) const; //1D
        void dssbmv2D(ntyp , ftyp *, ftyp *, ntyp ) const; //2D
        void dssbmv3D(ntyp , ftyp *, ftyp *, ntyp ) const; //3D

    public:
    	/*	The object GridParam class, is responsible for setting
        	of grid parameters (i.e. range, dimension, number of
        	knots of the grid). The object PotentialBase class, is
        	responsible for calculation of the potential value in
        	space point. User can write his own MatrixEigenstateProblem class
            and pass an object of this class as an argument for Davidson class
        	constructor provided that its class has suitable public method */
        MatrixEigenstateProblem(const GridParam &, const PotentialBase &);

        //returns pointer for vector of the diagonal elements
        ftyp *Diagonal() const;

        // this metod computes the product of matrix A and a block of
        // vectors B(n,m), C=A B where A(nxn)
        void dssbmv(ntyp , ftyp *, ftyp *, ntyp ) const;

        // method returns dimension table of diagonal elements
        ntyp GetN() const;

        ~MatrixEigenstateProblem();

};


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -