Go to the documentation of this file.
22 Matrix(
int nrows,
int ncols);
64 virtual void Debug()
const = 0;
71 virtual void GetDiag(std::vector<double> &d)
const = 0;
78 std::vector<double>
const &
GetDiag()
const
80 if ( 0 ==
_dd.size() )
85 assert(
Nrows() ==
static_cast<int>(
_dd.size()) );
95 virtual void Mult(std::vector<double> &w, std::vector<double>
const &
u)
const = 0;
105 std::vector<double> &w,
106 std::vector<double>
const &f, std::vector<double>
const &
u)
const = 0;
117 virtual int fetch(
int row,
int col)
const = 0;
122 mutable std::vector<double>
_dd;
152 void GetDiag(std::vector<double> &d)
const override;
166 void Mult(std::vector<double> &w, std::vector<double>
const &
u)
const override;
175 void Defect(std::vector<double> &w,
176 std::vector<double>
const &f, std::vector<double>
const &
u)
const override;
181 void Debug()
const override;
192 int fetch(
int row,
int col)
const override;
206 bool Compare2Old(
int nnode,
int const id[],
int const ik[],
double const sk[])
const;
219 std::vector<double> &fc, std::vector<double> &ff, std::vector<double> &uf);
312 void AddElem_3(
int const ial[3],
double const ske[3][3],
double const fe[3], std::vector<double> &f);
401 void GetDiag(std::vector<double> &d)
const override;
415 void Mult(std::vector<double> &wf, std::vector<double>
const &uc)
const override;
423 void MultT(std::vector<double>
const &wf, std::vector<double> &uc)
const;
432 void Defect(std::vector<double> &w,
433 std::vector<double>
const &f, std::vector<double>
const &
u)
const override;
438 void Debug()
const override;
449 int fetch(
int row,
int col)
const override;
462 std::vector<double> &fc, std::vector<double> &ff, std::vector<double> &uf);
499 BisectIntDirichlet(std::vector<int>
const &fathers, std::vector<int>
const &idxc_dir);
522 void CalcElem(
int const ial[3],
double const xc[],
double ske[3][3],
double fe[3]);
540 void AddElem(
int const ial[3],
double const ske[3][3],
double const fe[3],
541 int const id[],
int const ik[],
double sk[],
double f[]);
int _nrows
number of rows in matrix
void MultT(std::vector< double > const &wf, std::vector< double > &uc) const
void Derive_Matrix_Pattern()
void CalculateLaplace(std::vector< double > &f)
void AddElem(int const ial[3], double const ske[3][3], double const fe[3], int const id[], int const ik[], double sk[], double f[])
int fetch(int row, int col) const override
int fetch(int row, int col) const override
friend void DefectRestrict(CRS_Matrix const &SK, BisectInterpolation const &P, std::vector< double > &fc, std::vector< double > &ff, std::vector< double > &uf)
bool Compare2Old(int nnode, int const id[], int const ik[], double const sk[]) const
std::vector< double > _dd
diagonal matrix elements
void AddElem_3(int const ial[3], double const ske[3][3], double const fe[3], std::vector< double > &f)
**
std::vector< int > _ik
column indices
void Mult(std::vector< double > &w, std::vector< double > const &u) const override
**
void Mult(std::vector< double > &wf, std::vector< double > const &uc) const override
**
std::vector< int > _iv
fathers[nnode][2] of fine grid nodes, double entries denote injection points
std::vector< double > _sk
non-zero values
void Defect(std::vector< double > &w, std::vector< double > const &f, std::vector< double > const &u) const override
void Defect(std::vector< double > &w, std::vector< double > const &f, std::vector< double > const &u) const override
void Derive_Matrix_Pattern_slow()
void Debug() const override
void Debug() const override
~BisectInterpolation() override
void ApplyDirichletBC(std::vector< double > const &u, std::vector< double > &f)
virtual void Defect(std::vector< double > &w, std::vector< double > const &f, std::vector< double > const &u) const =0
std::vector< double > _vv
weights[nnode][2] of fathers for grid nodes
virtual void Debug() const =0
virtual ~CRS_Matrix() override
Matrix(int nrows, int ncols)
const Mesh & _mesh
reference to discretization
virtual void Mult(std::vector< double > &w, std::vector< double > const &u) const =0
int _nnz
number of non-zero entries
~BisectIntDirichlet() override
const std::vector< double > & GetDiag() const
FEM_Matrix(Mesh const &mesh)
int _ncols
number of columns in matrix
void Derive_Matrix_Pattern_fast()
function vertex minimal boundary edge info in an ASCII file Matlab indexing is stored(starts with 1). % % The output file format is compatible with Mesh_2d_3_matlab nnode
void CalcElem(int const ial[3], double const xc[], double ske[3][3], double fe[3])
friend void DefectRestrict(CRS_Matrix const &SK, BisectInterpolation const &P, std::vector< double > &fc, std::vector< double > &ff, std::vector< double > &uf)
std::vector< int > _id
start indices of matrix rows
virtual int fetch(int row, int col) const =0