#include <mc/mc_base.h>
#include <mc/vec.h>
#include <mc/bmat.h>
Go to the source code of this file.
Classes | |
struct | sBvec |
Contains public data members for Bvec class. More... | |
Typedefs | |
typedef struct sBvec | Bvec |
Declaration of the Bvec class as the Bvec structure. | |
Functions | |
int | Bvec_numB (Bvec *thee) |
Return the number of blocks. | |
Bvec * | Bvec_ctor (Vmem *vmem, const char *name, int pnumB, int pnumR[MAXV]) |
The block vector constructor (data array malloc'd by us). | |
Bvec * | Bvec_ctor2 (Vmem *vmem, const char *name, int pnumB, int pnumR[MAXV], double *data) |
The block vector constructor (data array passed in). | |
Bvec * | Bvec_ctor3 (Vmem *vmem, const char *name, int length) |
The vector constructor (data array malloc'd by us). | |
Bvec * | Bvec_ctor4 (Vmem *vmem, const char *name, int length, double *data) |
The vector constructor (data array malloc'd by us). | |
void | Bvec_dtor (Bvec **thee) |
The block vector destructor. | |
void | Bvec_createVectors (Bvec *thee, Bvec *vecs[], int num) |
Create a set of vectors with duplicate attributes. | |
void | Bvec_destroyVectors (Bvec *thee, Bvec *vecs[], int num) |
Destroy set of vectors previously created by Bvec_createVectors. | |
void | Bvec_createVecMat (Bvec *thee, Bvec *vecs[], int num, Mat **mat) |
Create a matrix from columns of vectors. | |
void | Bvec_destroyVecMat (Bvec *thee, Bvec *vecs[], int num, Mat **mat) |
Destroy matrix previously created by Bvec_createVecMat. | |
int | Bvec_len (Bvec *thee) |
Return the total number of rows. | |
double * | Bvec_addr (Bvec *thee) |
Return a pointer to the total data array. | |
double | Bvec_val (Bvec *thee, int i) |
Return value of component of vector. | |
void | Bvec_set (Bvec *thee, int i, double val) |
Set value of component of vector. | |
double | Bvec_nrm1 (Bvec *thee) |
1-norm of a block vector. | |
double | Bvec_nrm2 (Bvec *thee) |
2-norm of a block vector. | |
double | Bvec_nrm8 (Bvec *thee) |
oo-norm of a block vector. | |
double | Bvec_dif1 (Bvec *thee, Bvec *v) |
1-norm of the difference of two block vectors. | |
double | Bvec_dif2 (Bvec *thee, Bvec *v) |
2-norm of the difference of two block vectors. | |
double | Bvec_dif8 (Bvec *thee, Bvec *v) |
oo-norm of the difference of two block vectors. | |
double | Bvec_dot (Bvec *thee, Bvec *v) |
Dot product of two block vectors. | |
void | Bvec_init (Bvec *thee, double val) |
Initialize a block vector. | |
void | Bvec_scal (Bvec *thee, double val) |
Scale a block vector. | |
void | Bvec_copy (Bvec *thee, Bvec *v) |
Copy a block vector. | |
void | Bvec_axpy (Bvec *thee, Bvec *v, double val) |
Saxpy for a block vector. | |
void | Bvec_print (Bvec *thee) |
Print the block vector. | |
void | Bvec_printSp (Bvec *thee, char *fname) |
Print the block vector. | |
void | Bvec_diagScale (Bvec *thee, Bmat *A, Bvec *f) |
Apply inverse of diagonal to a vector. | |
void | Bvec_matvec (Bvec *thee, Bmat *A, Bvec *v, int key, int part) |
Block matrix times vector. | |
void | Bvec_smooth (Bvec *thee, Bmat *A, Bvec *f, Bvec *w, int key, int ioflag, int meth, int adj, int itmax, double etol, double omega) |
Generic smoothing operator (for a general YSMP-based matrix). | |
void | Bvec_bnd (Bvec *thee, Bmat *bmat, int key) |
Apply boundary condition. | |
void | Bvec_memChk (Bvec *thee) |
Print the exact current malloc usage. | |
int | Bvec_numRT (Bvec *thee) |
Return the total number of rows. | |
int | Bvec_numRB (Bvec *thee, int i) |
Return the size of a block. | |
double * | Bvec_addrB (Bvec *thee, int i) |
Return a pointer to the data in a block. | |
double | Bvec_valB (Bvec *thee, int i, int which) |
Return value of component of a vector. | |
void | Bvec_setB (Bvec *thee, int i, int which, double val) |
Set value of component of a vector. | |
void | Bvec_addToB (Bvec *thee, int i, int which, double val) |
Add value to component of a vector. | |
void | Bvec_initB (Bvec *thee, int i, double val) |
Initialize a particular block of a block vector. | |
void | Bvec_absLog (Bvec *thee, double val) |
Log of abs value of entries of block vector, shifted by < val >. | |
void | Bvec_lmethod (Bvec *thee, Bmat *A, Bvec *f, Bvec *r, Bvec *ut, int key, int flag, int itmax, double etol, int prec, int cycle, Bmat *P, int meth) |
Executes one of a number of linear solvers. | |
void | Bvec_slu (Bvec *thee, Bmat *A, Bvec *f, Bvec *r, Bvec *ut, int key, int flag) |
Sparse LU direct solver (requires only a nonsingular A). | |
void | Bvec_mg (Bvec *thee, Bmat *A, Bvec *f, Bvec *r, Bvec *ut, int key, int flag, int itmax, double etol, int prec, int cycle, Bmat *P) |
MG algorithm front end (NOT recursively callable). | |
void | Bvec_mgInit (Bvec *thee, Bmat *A, Bvec *f, Bvec *r, Bmat *P) |
Initialize the algebraic multilevel hierarchy for Bvec_mg. | |
void | Bvec_mgDestroy (Bvec *thee, Bmat *A, Bvec *f, Bvec *r) |
Destroy algebraic multilevel hierarchy created by Bvec_mgInit. | |
void | Bvec_cg (Bvec *thee, Bmat *A, Bvec *f, Bvec *r, Bvec *ut, int key, int flag, int itmax, double etol, int prec, int cycle, Bmat *P, Bvec *p, Bvec *ap, Bvec *bap, Bvec *po, Bvec *apo, Bvec *tp) |
CG method (ODIR algorithm, requires SPD operators A, B, and M). | |
void | Bvec_bcg (Bvec *thee, Bmat *A, Bvec *f, Bvec *r, Bvec *ut, int key, int flag, int itmax, double etol, int prec, int cycle, Bmat *P, Bvec *s, Bvec *p, Bvec *ap, Bvec *bap, Bvec *po, Bvec *apo, Bvec *q, Bvec *atq, Bvec *btatq, Bvec *qo, Bvec *atqo) |
BCG method (pure bi-orthogonal extension of CG). | |
void | Bvec_eig (Bvec *thee, Bmat *A, int litmax, double letol, double *lambda, int key, int flag, int itmax, double etol) |
Calculate the eigenvector corresponding to the second smallest eigenvalue of the given (symmetric adjacency) matrix. |
* * MC = < Manifold Code > * Copyright (C) 1994--2008 Michael Holst * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *