SMG2S
Sparse Matrix Generator with Given Spectrum
c-smg2s.h
1 /*
2 MIT License
3 Copyright (c) 2019 Xinzhe WU @ Maison de la Simulation, France
4 Copyright (c) 2019-2022, Xinzhe Wu @ Simulation and Data Laboratory Quantum
5  Materials, Forschungszentrum Juelich GmbH.
6 
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 SOFTWARE.
22 */
23 
24 #ifndef __C_SMG2S_H__
25 #define __C_SMG2S_H__
26 
27 #include <mpi.h>
28 #include <stdint.h>
29 
30 #ifdef __cplusplus
31 extern "C"{
32 #endif
33 
47 
51 struct dcomplex{
53  double real;
55  double imag;
56 };
57 
58 typedef struct dcomplex dcomplex_t;
59 
60 //interface of classes and structs
61 /*Nilpotency Matrix C Wrapper*/
62 // int
64 struct nilp;
66 typedef struct nilp nilp_t;
67 
69 nilp_t *newNilp_1(int nbOne, int size);
71 nilp_t *newNilp_2(int nbOne, int diag, int size);
73 nilp_t *newNilp_3(int *nilpvec, int size);
75 nilp_t *newNilp_4(int *nilpvec, int diag, int size);
77 void nilp_destory(nilp_t *nilp);
79 int nilp_getDegree(nilp_t *nilp);
81 int* nilp_getIndOfZeros(nilp_t *nilp);
83 void nilp_show(nilp_t *nilp);
84 
85 
86 // long int
87 struct nilpL;
89 typedef struct nilpL nilpL_t;
91 nilpL_t *newNilpL_1(long nbOne, long size);
93 nilpL_t *newNilpL_2(long nbOne, long diag, long size);
95 nilpL_t *newNilpL_3(long *nilpvec, long size);
97 nilpL_t *newNilpL_4(long *nilpvec, long diag, long size);
99 void nilpL_destory(nilpL_t *nilp);
101 long nilpL_getDegree(nilpL_t *nilp);
103 long* nilpL_getIndOfZeros(nilpL_t *nilp);
105 void nilpL_show(nilpL_t *nilp);
106 
107 
108 /*init matrix struct*/
109 //int
110 struct initMatrix;
112 typedef struct initMatrix initMatrix_t;
116 initMatrix_t *newInitMatrix_2(int diagl, int diagu);
118 initMatrix_t *newInitMatrix_3(int diagl, int diagu, double Sparsity);
120 initMatrix_t *newInitMatrix_4(int diagl, int diagu, double Scale, double Sparsity);
122 void initMatrix_show(initMatrix_t *init);
124 void initMatrix_destory(initMatrix_t *init);
125 
126 //long
127 struct initMatrixL;
129 typedef struct initMatrixL initMatrixL_t;
133 initMatrixL_t *newInitMatrixL_2(long diagl, long diagu);
135 initMatrixL_t *newInitMatrixL_3(long diagl, long diagu, double Sparsity);
137 initMatrixL_t *newInitMatrixL_4(long diagl, long diagu, double Scale, double Sparsity);
139 void initMatrixL_show(initMatrixL_t *init);
142 
143 
144 /*parVectorMap*/
145 struct parVecMap;
147 typedef struct parVecMap parVecMap_t;
151 parVecMap_t *newParVecMap(MPI_Comm ncomm, int lbound, int ubound);
153 MPI_Comm parVecMapGetComm(parVecMap_t *pv);
155 int parVecMapL2G(parVecMap_t *pv, int local_index);
157 int parVecMapG2L(parVecMap_t *pv, int global_index);
164 
165 struct parVecMapL;
167 typedef struct parVecMapL parVecMapL_t;
171 parVecMapL_t *newParVecMapL(MPI_Comm ncomm, long lbound, long ubound);
173 MPI_Comm parVecMapLGetComm(parVecMapL_t *pv);
175 long parVecMapLL2G(parVecMapL_t *pv, long local_index);
177 long parVecMapLG2L(parVecMapL_t *pv, long global_index);
184 
185 
186 /*parVector*/
187 //double int
188 struct ds_parVec;
190 typedef struct ds_parVec ds_parVec_t;
192 ds_parVec_t *new_ds_ParVec_1(MPI_Comm ncomm, int lbound, int ubound);
206 double ds_parVecGetVal(ds_parVec_t *pv, int index);
208 double ds_parVecGetValLoc(ds_parVec_t *pv, int lindex);
210 double *ds_parVecGetArray(ds_parVec_t *pv);
214 MPI_Comm ds_parVecGetComm(ds_parVec_t *pv);
216 int ds_parVecL2G(ds_parVec_t *pv, int local_index);
218 int ds_parVecG2L(ds_parVec_t *pv, int global_index);
220 void ds_parVecSetToVal(ds_parVec_t *pv, double val);
222 void ds_parVecView(ds_parVec_t *pv);
224 void ds_parVecSetVal(ds_parVec_t *pv, int index, double val);
226 void ds_parVecSetValLoc(ds_parVec_t *pv, int lindex, double val);
228 void ds_parVecAdd(ds_parVec_t *pv, ds_parVec_t *pv2);
230 void ds_parVecScale(ds_parVec_t *pv, double scale);
232 double ds_parVecDot(ds_parVec_t *pv, ds_parVec_t *pv2);
234 void ds_parVecReadExtVec(ds_parVec_t *pv, char* spectrum);
236 void ds_writeToTxt(ds_parVec_t *pv, char* spectrum);
237 
238 //double long
239 struct dl_parVec;
241 typedef struct dl_parVec dl_parVec_t;
243 dl_parVec_t *new_dl_ParVec_1(MPI_Comm ncomm, long lbound, long ubound);
257 double dl_parVecGetVal(dl_parVec_t *pv, long index);
259 double dl_parVecGetValLoc(dl_parVec_t *pv, long lindex);
261 double *dl_parVecGetArray(dl_parVec_t *pv);
265 MPI_Comm dl_parVecGetComm(dl_parVec_t *pv);
267 long dl_parVecL2G(dl_parVec_t *pv, long local_index);
269 long dl_parVecG2L(dl_parVec_t *pv, long global_index);
271 void dl_parVecSetToVal(dl_parVec_t *pv, double val);
273 void dl_parVecView(dl_parVec_t *pv);
275 void dl_parVecSetVal(dl_parVec_t *pv, long index, double val);
277 void dl_parVecSetValLoc(dl_parVec_t *pv, long lindex, double val);
279 void dl_parVecAdd(dl_parVec_t *pv, dl_parVec_t *pv2);
281 void dl_parVecScale(dl_parVec_t *pv, double scale);
283 double dl_parVecDot(dl_parVec_t *pv, dl_parVec_t *pv2);
285 void dl_parVecReadExtVec(dl_parVec_t *pv, char* spectrum);
287 void dl_writeToTxt(dl_parVec_t *pv, char* spectrum);
288 
289 
290 //double complex int
291 struct zs_parVec;
293 typedef struct zs_parVec zs_parVec_t;
295 zs_parVec_t *new_zs_ParVec_1(MPI_Comm ncomm, int lbound, int ubound);
309 dcomplex_t zs_parVecGetVal(zs_parVec_t *pv, int index);
311 dcomplex_t zs_parVecGetValLoc(zs_parVec_t *pv, int lindex);
313 dcomplex_t *zs_parVecGetArray(zs_parVec_t *pv);
317 MPI_Comm zs_parVecGetComm(zs_parVec_t *pv);
319 int zs_parVecL2G(zs_parVec_t *pv, int local_index);
321 int zs_parVecG2L(zs_parVec_t *pv, int global_index);
323 void zs_parVecSetToVal(zs_parVec_t *pv, dcomplex_t val);
325 void zs_parVecView(zs_parVec_t *pv);
327 void zs_parVecSetVal(zs_parVec_t *pv, int index, dcomplex_t val);
329 void zs_parVecSetValLoc(zs_parVec_t *pv, int lindex, dcomplex_t val);
331 void zs_parVecAdd(zs_parVec_t *pv, zs_parVec_t *pv2);
333 void zs_parVecScale(zs_parVec_t *pv, dcomplex_t scale);
335 dcomplex_t zs_parVecDot(zs_parVec_t *pv, zs_parVec_t *pv2);
337 void zs_parVecReadExtVec(zs_parVec_t *pv, char* spectrum);
339 void zs_writeToTxtCmplx(zs_parVec_t *pv, char* spectrum);
340 
341 
342 //double complex long
343 struct zl_parVec;
345 typedef struct zl_parVec zl_parVec_t;
347 zl_parVec_t *new_zl_ParVec_1(MPI_Comm ncomm, long lbound, long ubound);
361 dcomplex_t zl_parVecGetVal(zl_parVec_t *pv, long index);
363 dcomplex_t zl_parVecGetValLoc(zl_parVec_t *pv, long lindex);
365 dcomplex_t *zl_parVecGetArray(zl_parVec_t *pv);
369 MPI_Comm zl_parVecGetComm(zl_parVec_t *pv);
371 long zl_parVecL2G(zl_parVec_t *pv, long local_index);
373 long zl_parVecG2L(zl_parVec_t *pv, long global_index);
375 void zl_parVecSetToVal(zl_parVec_t *pv, dcomplex_t val);
377 void zl_parVecView(zl_parVec_t *pv);
379 void zl_parVecSetVal(zl_parVec_t *pv, long index, dcomplex_t val);
381 void zl_parVecSetValLoc(zl_parVec_t *pv, long lindex, dcomplex_t val);
383 void zl_parVecAdd(zl_parVec_t *pv, zl_parVec_t *pv2);
385 void zl_parVecScale(zl_parVec_t *pv, dcomplex_t scale);
386 
388 dcomplex_t zl_parVecDot(zl_parVec_t *pv, zl_parVec_t *pv2);
390 void zl_parVecReadExtVec(zl_parVec_t *pv, char* spectrum);
392 void zl_writeToTxtCmplx(zl_parVec_t *pv, char* spectrum);
393 
394 
395 
396 
397 /*parMatrixSparse*/
398 
399 //double int
400 struct ds_parMatSparse;
402 typedef struct ds_parMatSparse ds_parMatSparse_t;
422 void ds_parMatSparse_SetValLocal(ds_parMatSparse_t *pm, int row, int col, double val);
424 void ds_parMatSparse_SetVal(ds_parMatSparse_t *pm, int row, int col, double val);
426 void ds_parMatSparse_AddValLocal(ds_parMatSparse_t *pm, int row, int col, double val);
428 void ds_parMatSparse_AddVal(ds_parMatSparse_t *pm, int row, int col, double val);
430 double ds_parMatSparse_GetValLocal(ds_parMatSparse_t *pm, int row, int col);
432 double ds_parMatSparse_GetVal(ds_parMatSparse_t *pm, int row, int col);
434 
442 void ds_parMatSparse_toCSRArray(ds_parMatSparse_t *pm, int *nrows, int *nnz, int **roffs, int **cols, double **val);
448 void ds_parMatSparse_Wrt2MM(ds_parMatSparse_t *pm, char *file_name);
450 void ds_parMatSparse_initMat(ds_parMatSparse_t *pm, int diagl, int diagu, double Scale, double Sparsity);
451 
452 
453 //double long
454 struct dl_parMatSparse;
456 typedef struct dl_parMatSparse dl_parMatSparse_t;
476 void dl_parMatSparse_SetValLocal(dl_parMatSparse_t *pm, long row, long col, double val);
478 void dl_parMatSparse_SetVal(dl_parMatSparse_t *pm, long row, long col, double val);
480 void dl_parMatSparse_AddValLocal(dl_parMatSparse_t *pm, long row, long col, double val);
482 void dl_parMatSparse_AddVal(dl_parMatSparse_t *pm, long row, long col, double val);
484 double dl_parMatSparse_GetValLocal(dl_parMatSparse_t *pm, long row, long col);
486 double dl_parMatSparse_GetVal(dl_parMatSparse_t *pm, long row, long col);
488 
496 void dl_parMatSparse_toCSRArray(dl_parMatSparse_t *pm, long *nrows, long *nnz, long **roffs, long **cols, double **val);
502 void dl_parMatSparse_Wrt2MM(dl_parMatSparse_t *pm, char *file_name);
504 void dl_parMatSparse_initMat(dl_parMatSparse_t *pm, long diagl, long diagu, double Scale, double Sparsity);
505 
506 //dcomplex_t int
507 struct zs_parMatSparse;
509 typedef struct zs_parMatSparse zs_parMatSparse_t;
529 void zs_parMatSparse_SetValLocal(zs_parMatSparse_t *pm, int row, int col, dcomplex_t val);
531 void zs_parMatSparse_SetVal(zs_parMatSparse_t *pm, int row, int col, dcomplex_t val);
533 void zs_parMatSparse_AddValLocal(zs_parMatSparse_t *pm, int row, int col, dcomplex_t val);
535 void zs_parMatSparse_AddVal(zs_parMatSparse_t *pm, int row, int col, dcomplex_t val);
537 dcomplex_t zs_parMatSparse_GetValLocal(zs_parMatSparse_t *pm, int row, int col);
539 dcomplex_t zs_parMatSparse_GetVal(zs_parMatSparse_t *pm, int row, int col);
541 
549 void zs_parMatSparse_toCSRArray(zs_parMatSparse_t *pm, int *nrows, int *nnz, int **roffs, int **cols, dcomplex_t **val);
555 void zs_parMatSparse_Wrt2MMCmplx(zs_parMatSparse_t *pm, char *file_name);
557 void zs_parMatSparse_initMat(zs_parMatSparse_t *pm, int diagl, int diagu, double Scale, double Sparsity);
558 
559 //dcomplex_t long
560 struct zl_parMatSparse;
562 typedef struct zl_parMatSparse zl_parMatSparse_t;
582 void zl_parMatSparse_SetValLocal(zl_parMatSparse_t *pm, long row, long col, dcomplex_t val);
584 void zl_parMatSparse_SetVal(zl_parMatSparse_t *pm, long row, long col, dcomplex_t val);
586 void zl_parMatSparse_AddValLocal(zl_parMatSparse_t *pm, long row, long col, dcomplex_t val);
588 void zl_parMatSparse_AddVal(zl_parMatSparse_t *pm, long row, long col, dcomplex_t val);
590 dcomplex_t zl_parMatSparse_GetValLocal(zl_parMatSparse_t *pm, long row, long col);
592 dcomplex_t zl_parMatSparse_GetVal(zl_parMatSparse_t *pm, long row, long col);
594 
602 void zl_parMatSparse_toCSRArray(zl_parMatSparse_t *pm, long *nrows, long *nnz, long **roffs, long **cols, dcomplex_t **val);
608 void zl_parMatSparse_Wrt2MMCmplx(zl_parMatSparse_t *pm, char *file_name);
610 void zl_parMatSparse_initMat(zl_parMatSparse_t *pm, long diagl, long diagu, double Scale, double Sparsity);
611 
612 //interface of selected functions
614 zs_parVec_t *zs_specNonHermLoad(parVecMap_t *map, char *spectrum);
616 zl_parVec_t *zl_specNonHermLoad(parVecMapL_t *map, char *spectrum);
618 zs_parVec_t *zs_specNonSymmLoad(parVecMap_t *map, char *spectrum);
620 zl_parVec_t *zl_specNonSymmLoad(parVecMapL_t *map, char *spectrum);
622 ds_parVec_t *ds_specNonSymmLoad(parVecMap_t *map, char *spectrum);
624 dl_parVec_t *dl_specNonSymmLoad(parVecMapL_t *map, char *spectrum);
625 
627 zs_parMatSparse_t *zs_nonherm(int probSize, nilp_t *nilp, initMatrix_t *init, char *spectrum, MPI_Comm comm);
629 zl_parMatSparse_t *zl_nonherm(long probSize, nilpL_t *nilp, initMatrixL_t *init, char *spectrum, MPI_Comm comm);
630 
632 zs_parMatSparse_t *zs_nonherm_2(int probSize, nilp_t *nilp, initMatrix_t *init, zs_parVec_t *spec);
634 zl_parMatSparse_t *zl_nonherm_2(long probSize, nilpL_t *nilp, initMatrixL_t *init, zl_parVec_t *spec);
635 
637 void zs_nonherm_3(int probSize, nilp_t *nilp, zs_parMatSparse_t *Am, zs_parVec_t *spec);
639 void zl_nonherm_3(long probSize, nilpL_t *nilp, zl_parMatSparse_t *Am, zl_parVec_t *spec);
640 
641 //
643 ds_parMatSparse_t *ds_nonsymm(int probSize, nilp_t *nilp, initMatrix_t *init, char *spectrum, MPI_Comm comm);
645 dl_parMatSparse_t *dl_nonsymm(long probSize, nilpL_t *nilp, initMatrixL_t *init, char *spectrum, MPI_Comm comm);
646 
647 //
649 ds_parMatSparse_t *ds_nonsymm_2(int probSize, nilp_t *nilp, initMatrix_t *init, ds_parVec_t *spec);
651 dl_parMatSparse_t *dl_nonsymm_2(long probSize, nilpL_t *nilp, initMatrixL_t *init, dl_parVec_t *spec);
652 
654 void ds_nonsymm_3(int probSize, nilp_t *nilp, ds_parMatSparse_t *Am, ds_parVec_t *spec);
656 void dl_nonsymm_3(long probSize, nilpL_t *nilp, dl_parMatSparse_t *Am, dl_parVec_t *spec);
657 //
659 ds_parMatSparse_t *ds_nonsymmconj(int probSize, nilp_t *nilp, initMatrix_t *init, char *spectrum, MPI_Comm comm);
661 dl_parMatSparse_t *dl_nonsymmconj(long probSize, nilpL_t *nilp, initMatrixL_t *init, char *spectrum, MPI_Comm comm);
662 
663 //
665 ds_parMatSparse_t *ds_nonsymmconj_2(int probSize, nilp_t *nilp, initMatrix_t *init, zs_parVec_t *spec);
667 dl_parMatSparse_t *dl_nonsymmconj_2(long probSize, nilpL_t *nilp, initMatrixL_t *init, zl_parVec_t *spec);
669 void ds_nonsymmconj_3(int probSize, nilp_t *nilp, ds_parMatSparse_t *Am, zs_parVec_t *spec);
671 void dl_nonsymmconj_3(long probSize, nilpL_t *nilp, dl_parMatSparse_t *Am, zl_parVec_t *spec);
672  // end of group5
674 
675 #ifdef __cplusplus
676 }
677 #endif
678 
679 
680 
681 
682 #endif
dl_parVecGetLocSize
long dl_parVecGetLocSize(dl_parVec_t *pv)
C-interface of parVector::GetLocalSize()
Definition: c-smg2s.cc:275
zs_parVecGetComm
MPI_Comm zs_parVecGetComm(zs_parVec_t *pv)
C-interface of parVector::GetComm()
Definition: c-smg2s.cc:394
dl_parVecGetLowerBound
long dl_parVecGetLowerBound(dl_parVec_t *pv)
C-interface of parVector::GetLowerBound()
Definition: c-smg2s.cc:268
parVecMapL2G
int parVecMapL2G(parVecMap_t *pv, int local_index)
C-interfance of parVectorMap::Loc2Glob(S local_index)
Definition: c-smg2s.cc:136
nilpL_getDegree
long nilpL_getDegree(nilpL_t *nilp)
C-interface of Nilpotent::getDegree.
Definition: c-smg2s.cc:74
zl_parVecDot
dcomplex_t zl_parVecDot(zl_parVec_t *pv, zl_parVec_t *pv2)
C-interface of parVector::VecDot(parVector v)
Definition: c-smg2s.cc:529
zs_writeToTxtCmplx
void zs_writeToTxtCmplx(zs_parVec_t *pv, char *spectrum)
C-interface of parVector::writeToCmplx(std::string file_name)
Definition: c-smg2s.cc:436
zs_parMatSparse_GetNNzLoc
int zs_parMatSparse_GetNNzLoc(zs_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNnzLoc()
Definition: c-smg2s.cc:721
ds_parVecG2L
int ds_parVecG2L(ds_parVec_t *pv, int global_index)
C-interface of parVector::Glob2Loc(S global_index)
Definition: c-smg2s.cc:216
dl_parMatSparse_SetVal
void dl_parMatSparse_SetVal(dl_parMatSparse_t *pm, long row, long col, double val)
C-interface of parMatrixSparse::SetValue (S row, S col, T value)
Definition: c-smg2s.cc:666
newNilpL_4
nilpL_t * newNilpL_4(long *nilpvec, long diag, long size)
C-interface of Nilpotent::Nilpotent(std::vector<S> nilpvec, S diag, S size)
Definition: c-smg2s.cc:67
newInitMatrix_1
initMatrix_t * newInitMatrix_1()
C-interface of initMat::initMat()
Definition: c-smg2s.cc:87
zs_parVecGetMap
parVecMap_t * zs_parVecGetMap(zs_parVec_t *pv)
C-interface of parVector::GetVecMap()
Definition: c-smg2s.cc:386
zl_parVecScale
void zl_parVecScale(zl_parVec_t *pv, dcomplex_t scale)
C-interface of parVector::VecScale(T scale)
Definition: c-smg2s.cc:525
zs_parMatSparse_AddValLocal
void zs_parMatSparse_AddValLocal(zs_parMatSparse_t *pm, int row, int col, dcomplex_t val)
C-interface of parMatrixSparse::AddValueLocal(S row, S col, T value)
Definition: c-smg2s.cc:741
dl_parVec_destory
void dl_parVec_destory(dl_parVec_t *pv)
Destory the struct.
Definition: c-smg2s.cc:265
ds_parVecGetGlobSize
int ds_parVecGetGlobSize(ds_parVec_t *pv)
C-interface of parVector::GetGlobalSize()
Definition: c-smg2s.cc:198
parVecMapLGetLocSize
long parVecMapLGetLocSize(parVecMapL_t *pv)
C-interfance of parVectorMap::GetLocalSize()
Definition: c-smg2s.cc:168
nilp_t
struct nilp nilp_t
Creates a type name for nilp which is a C-interface for Nilpotent with `S=int`.
Definition: c-smg2s.h:66
zl_parMatSparse_SetVal
void zl_parMatSparse_SetVal(zl_parMatSparse_t *pm, long row, long col, dcomplex_t val)
C-interface of parMatrixSparse::SetValue (S row, S col, T value)
Definition: c-smg2s.cc:813
new_zs_ParMatSparse_1
zs_parMatSparse_t * new_zs_ParMatSparse_1(zs_parVec_t *pv)
C-interface of parMatrixSparse::parMatrixSparse(parVector< T, S > vec)
Definition: c-smg2s.cc:706
ds_parVecL2G
int ds_parVecL2G(ds_parVec_t *pv, int local_index)
C-interface of parVector::Loc2Glob(S local_index)
Definition: c-smg2s.cc:213
ds_nonsymmconj
ds_parMatSparse_t * ds_nonsymmconj(int probSize, nilp_t *nilp, initMatrix_t *init, char *spectrum, MPI_Comm comm)
C-interface of function nonsymm (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:1074
newNilp_4
nilp_t * newNilp_4(int *nilpvec, int diag, int size)
C-interface of Nilpotent::Nilpotent(std::vector<S> nilpvec, S diag, S size)
Definition: c-smg2s.cc:39
ds_parVecGetUpperBound
int ds_parVecGetUpperBound(ds_parVec_t *pv)
C-interface of parVector::GetUpperBound()
Definition: c-smg2s.cc:191
new_dl_ParVec_2
dl_parVec_t * new_dl_ParVec_2(parVecMapL_t *map)
C-interface of parVector::parVector(parVectorMap<S> map)
Definition: c-smg2s.cc:262
zs_parVecSetVal
void zs_parVecSetVal(zs_parVec_t *pv, int index, dcomplex_t val)
C-interface of parVector::SetValueGlobal(S index, T value)
Definition: c-smg2s.cc:410
new_zl_ParMatSparse_2
zl_parMatSparse_t * new_zl_ParMatSparse_2(parVecMap_t *map)
C-interface of parMatrixSparse::parMatrixSparse(parVectorMap< S > map)
parVecMapL_t
struct parVecMapL parVecMapL_t
Creates a type name for parVecMap which is a C-interface for parVectorMap with `S=long` typedef struc...
Definition: c-smg2s.h:167
zl_parVecGetUpperBound
long zl_parVecGetUpperBound(zl_parVec_t *pv)
C-interface of parVector::GetUpperBound()
Definition: c-smg2s.cc:454
parVecMapLGetGlobSize
long parVecMapLGetGlobSize(parVecMapL_t *pv)
C-interfance of parVectorMap::GetGlobalSize()
Definition: c-smg2s.cc:171
zl_parMatSparse_toCSRArray
void zl_parMatSparse_toCSRArray(zl_parMatSparse_t *pm, long *nrows, long *nnz, long **roffs, long **cols, dcomplex_t **val)
convert a parMatrixSparse matrix into CSR format
Definition: c-smg2s.cc:833
dl_parVecSetToVal
void dl_parVecSetToVal(dl_parVec_t *pv, double val)
C-interface of parVector::SetToValue(T value)
Definition: c-smg2s.cc:299
zs_parVecSetToVal
void zs_parVecSetToVal(zs_parVec_t *pv, dcomplex_t val)
C-interface of parVector::SetToValue(T value)
Definition: c-smg2s.cc:403
ds_parMatSparse_initMat
void ds_parMatSparse_initMat(ds_parMatSparse_t *pm, int diagl, int diagu, double Scale, double Sparsity)
C-interface of parMatrixSparse::initMat(S diag_l, S diag_u, Base< T > scale, T shift,...
Definition: c-smg2s.cc:616
dl_parMatSparse_t
struct dl_parMatSparse dl_parMatSparse_t
Creates a type name for dl_parMatSparse which is a C-interface for parMatrixSparse with `T=double` an...
Definition: c-smg2s.h:456
newInitMatrix_4
initMatrix_t * newInitMatrix_4(int diagl, int diagu, double Scale, double Sparsity)
C-interface of initMat::initMat(S diagl, S diagu, double Scale, double Sparsity)
Definition: c-smg2s.cc:96
dl_parMatSparse_Wrt2MM
void dl_parMatSparse_Wrt2MM(dl_parMatSparse_t *pm, char *file_name)
C-interface of parMatrixSparse::writeToMatrixMarket(std::string file_name)
Definition: c-smg2s.cc:700
dl_parVecG2L
long dl_parVecG2L(dl_parVec_t *pv, long global_index)
C-interface of parVector::Glob2Loc(S global_index)
Definition: c-smg2s.cc:296
ds_writeToTxt
void ds_writeToTxt(ds_parVec_t *pv, char *spectrum)
C-interface of parVector::writeToTxt (std::string file_name)
Definition: c-smg2s.cc:245
ds_parVecSetToVal
void ds_parVecSetToVal(ds_parVec_t *pv, double val)
C-interface of parVector::SetToValue(T value)
Definition: c-smg2s.cc:219
ds_parMatSparse_AddVal
void ds_parMatSparse_AddVal(ds_parMatSparse_t *pm, int row, int col, double val)
C-interface of parMatrixSparse::AddValue(S row, S col, T value)
Definition: c-smg2s.cc:584
zs_nonherm_2
zs_parMatSparse_t * zs_nonherm_2(int probSize, nilp_t *nilp, initMatrix_t *init, zs_parVec_t *spec)
C-interface of function nonherm (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:941
parVecMap_t
struct parVecMap parVecMap_t
Creates a type name for parVecMap which is a C-interface for parVectorMap with `S=int`.
Definition: c-smg2s.h:147
ds_parVecGetComm
MPI_Comm ds_parVecGetComm(ds_parVec_t *pv)
C-interface of parVector::GetComm()
Definition: c-smg2s.cc:210
ds_parMatSparse_GetNCols
int ds_parMatSparse_GetNCols(ds_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNCols()
Definition: c-smg2s.cc:560
ds_nonsymmconj_3
void ds_nonsymmconj_3(int probSize, nilp_t *nilp, ds_parMatSparse_t *Am, zs_parVec_t *spec)
C-interface of function nonsymmconj (S probSize, Nilpotent< S > nilp, parMatrixSparse< T,...
Definition: c-smg2s.cc:1150
nilpL_destory
void nilpL_destory(nilpL_t *nilp)
Destory a nilp struct.
Definition: c-smg2s.cc:71
dl_parMatSparse_GetLowerBound
long dl_parMatSparse_GetLowerBound(dl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetLowerBound()
Definition: c-smg2s.cc:654
ds_parVecDot
double ds_parVecDot(ds_parVec_t *pv, ds_parVec_t *pv2)
C-interface of parVector::VecDot(parVector v)
Definition: c-smg2s.cc:237
dl_nonsymmconj_3
void dl_nonsymmconj_3(long probSize, nilpL_t *nilp, dl_parMatSparse_t *Am, zl_parVec_t *spec)
C-interface of function nonsymmconj (S probSize, Nilpotent< S > nilp, parMatrixSparse< T,...
Definition: c-smg2s.cc:1157
zs_parVecGetGlobSize
int zs_parVecGetGlobSize(zs_parVec_t *pv)
C-interface of parVector::GetGlobalSize()
Definition: c-smg2s.cc:358
parVecMapGetLocSize
int parVecMapGetLocSize(parVecMap_t *pv)
C-interfance of parVectorMap::GetLocalSize()
Definition: c-smg2s.cc:142
zl_parMatSparse_initMat
void zl_parMatSparse_initMat(zl_parMatSparse_t *pm, long diagl, long diagu, double Scale, double Sparsity)
C-interface of parMatrixSparse::initMat(S diag_l, S diag_u, Base< T > scale, T shift,...
Definition: c-smg2s.cc:628
ds_parVecScale
void ds_parVecScale(ds_parVec_t *pv, double scale)
C-interface of parVector::VecScale(T scale)
Definition: c-smg2s.cc:234
zl_parVecGetLowerBound
long zl_parVecGetLowerBound(zl_parVec_t *pv)
C-interface of parVector::GetLowerBound()
Definition: c-smg2s.cc:451
zl_parVecGetMap
parVecMapL_t * zl_parVecGetMap(zl_parVec_t *pv)
C-interface of parVector::GetVecMap()
Definition: c-smg2s.cc:489
dl_nonsymm
dl_parMatSparse_t * dl_nonsymm(long probSize, nilpL_t *nilp, initMatrixL_t *init, char *spectrum, MPI_Comm comm)
C-interface of function nonsymm (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:1006
new_zl_ParMatSparse_1
zl_parMatSparse_t * new_zl_ParMatSparse_1(zl_parVec_t *pv)
C-interface of parMatrixSparse::parMatrixSparse(parVector< T, S > vec)
Definition: c-smg2s.cc:782
new_ds_ParMatSparse_1
ds_parMatSparse_t * new_ds_ParMatSparse_1(ds_parVec_t *pv)
C-interface of parMatrixSparse::parMatrixSparse(parVector< T, S > vec)
Definition: c-smg2s.cc:548
ds_parVecSetVal
void ds_parVecSetVal(ds_parVec_t *pv, int index, double val)
C-interface of parVector::SetValueGlobal(S index, T value)
Definition: c-smg2s.cc:225
dl_parVecL2G
long dl_parVecL2G(dl_parVec_t *pv, long local_index)
C-interface of parVector::Loc2Glob(S local_index)
Definition: c-smg2s.cc:293
newParVecMapL
parVecMapL_t * newParVecMapL(MPI_Comm ncomm, long lbound, long ubound)
C-interfance of parVectorMap::parVectorMap(MPI_Comm ncomm, S lbound, S ubound)
Definition: c-smg2s.cc:156
zl_parMatSparse_GetValLocal
dcomplex_t zl_parMatSparse_GetValLocal(zl_parMatSparse_t *pm, long row, long col)
C-interface of parMatrixSparse::GetValueLocal (S row, S col)
Definition: c-smg2s.cc:825
newInitMatrixL_1
initMatrixL_t * newInitMatrixL_1()
C-interface of initMat::initMat()
Definition: c-smg2s.cc:107
dl_parMatSparse_GetVal
double dl_parMatSparse_GetVal(dl_parMatSparse_t *pm, long row, long col)
C-interface of parMatrixSparse::GetValue (S row, S col)
Definition: c-smg2s.cc:678
ds_parMatSparse_destory
void ds_parMatSparse_destory(ds_parMatSparse_t *pm)
Destory the struct.
Definition: c-smg2s.cc:554
ds_parMatSparse_SetValLocal
void ds_parMatSparse_SetValLocal(ds_parMatSparse_t *pm, int row, int col, double val)
C-interface of parMatrixSparse::SetValueLocal(S row, S col, T value)
Definition: c-smg2s.cc:575
ds_parMatSparse_View
void ds_parMatSparse_View(ds_parMatSparse_t *pm)
C-interface of parMatrixSparse::MatView()
Definition: c-smg2s.cc:609
dl_nonsymm_3
void dl_nonsymm_3(long probSize, nilpL_t *nilp, dl_parMatSparse_t *Am, dl_parVec_t *spec)
C-interface of function nonsymm (S probSize, Nilpotent< S > nilp, parMatrixSparse< T,...
dl_parMatSparse_GetNRows
long dl_parMatSparse_GetNRows(dl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNRows()
Definition: c-smg2s.cc:645
zl_specNonSymmLoad
zl_parVec_t * zl_specNonSymmLoad(parVecMapL_t *map, char *spectrum)
C-interface of function specNonSymmCplex(parVectorMap<S> index_map, std::string spectrum)
Definition: c-smg2s.cc:874
zs_parVecGetLocSize
int zs_parVecGetLocSize(zs_parVec_t *pv)
C-interface of parVector::GetLocalSize()
Definition: c-smg2s.cc:355
ds_nonsymm_3
void ds_nonsymm_3(int probSize, nilp_t *nilp, ds_parMatSparse_t *Am, ds_parVec_t *spec)
C-interface of function nonsymm (S probSize, Nilpotent< S > nilp, parMatrixSparse< T,...
Definition: c-smg2s.cc:1057
dcomplex::imag
double imag
Definition: c-smg2s.h:55
zs_specNonSymmLoad
zs_parVec_t * zs_specNonSymmLoad(parVecMap_t *map, char *spectrum)
C-interface of function specNonSymmCplex(parVectorMap<S> index_map, std::string spectrum)
Definition: c-smg2s.cc:869
zl_parVecSetToVal
void zl_parVecSetToVal(zl_parVec_t *pv, dcomplex_t val)
C-interface of parVector::SetToValue(T value)
Definition: c-smg2s.cc:507
zl_parVec_t
struct zl_parVec zl_parVec_t
Creates a type name for zl_parVec which is a C-interface for parVector with `T=std::complex<double>` ...
Definition: c-smg2s.h:345
dl_parMatSparse_Show
void dl_parMatSparse_Show(dl_parMatSparse_t *pm)
C-interface of parMatrixSparse::show()
Definition: c-smg2s.cc:694
initMatrixL_show
void initMatrixL_show(initMatrixL_t *init)
C-interface of initMat::show()
Definition: c-smg2s.cc:119
dl_parMatSparse_GetValLocal
double dl_parMatSparse_GetValLocal(dl_parMatSparse_t *pm, long row, long col)
C-interface of parMatrixSparse::GetValueLocal (S row, S col)
Definition: c-smg2s.cc:675
zs_nonherm_3
void zs_nonherm_3(int probSize, nilp_t *nilp, zs_parMatSparse_t *Am, zs_parVec_t *spec)
C-interface of function nonherm (S probSize, Nilpotent< S > nilp, parMatrixSparse< T,...
Definition: c-smg2s.cc:967
zl_parMatSparse_AddValLocal
void zl_parMatSparse_AddValLocal(zl_parMatSparse_t *pm, long row, long col, dcomplex_t val)
C-interface of parMatrixSparse::AddValueLocal(S row, S col, T value)
Definition: c-smg2s.cc:817
zs_parVecGetArray
dcomplex_t * zs_parVecGetArray(zs_parVec_t *pv)
C-interface of parVector::GetArray()
Definition: c-smg2s.cc:375
ds_parVecGetMap
parVecMap_t * ds_parVecGetMap(ds_parVec_t *pv)
C-interface of parVector::GetVecMap()
Definition: c-smg2s.cc:250
dl_parMatSparse_GetUpperBound
long dl_parMatSparse_GetUpperBound(dl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetUpperBound()
Definition: c-smg2s.cc:657
newParVecMap_empty
parVecMap_t * newParVecMap_empty()
C-interfance of parVectorMap::parVectorMap()
Definition: c-smg2s.cc:127
ds_parVec_destory
void ds_parVec_destory(ds_parVec_t *pv)
Destory the struct.
Definition: c-smg2s.cc:185
zl_parVecGetComm
MPI_Comm zl_parVecGetComm(zl_parVec_t *pv)
C-interface of parVector::GetComm()
Definition: c-smg2s.cc:498
zl_parMatSparse_GetLowerBound
long zl_parMatSparse_GetLowerBound(zl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetLowerBound()
Definition: c-smg2s.cc:800
zl_parVecG2L
long zl_parVecG2L(zl_parVec_t *pv, long global_index)
C-interface of parVector::Glob2Loc(S global_index)
Definition: c-smg2s.cc:504
zs_parMatSparse_GetLowerBound
int zs_parMatSparse_GetLowerBound(zs_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetLowerBound()
Definition: c-smg2s.cc:724
zl_parMatSparse_GetVal
dcomplex_t zl_parMatSparse_GetVal(zl_parMatSparse_t *pm, long row, long col)
C-interface of parMatrixSparse::GetValue (S row, S col)
Definition: c-smg2s.cc:829
ds_parMatSparse_GetNNzLoc
int ds_parMatSparse_GetNNzLoc(ds_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNnzLoc()
Definition: c-smg2s.cc:563
new_dl_ParMatSparse_2
dl_parMatSparse_t * new_dl_ParMatSparse_2(parVecMapL_t *map)
C-interface of parMatrixSparse::parMatrixSparse(parVectorMap< S > map)
Definition: c-smg2s.cc:639
initMatrixL_destory
void initMatrixL_destory(initMatrixL_t *init)
Destory a initMatrixL struct.
Definition: c-smg2s.cc:122
dl_parMatSparse_AddVal
void dl_parMatSparse_AddVal(dl_parMatSparse_t *pm, long row, long col, double val)
C-interface of parMatrixSparse::AddValue(S row, S col, T value)
Definition: c-smg2s.cc:672
dl_parVecReadExtVec
void dl_parVecReadExtVec(dl_parVec_t *pv, char *spectrum)
C-interface of parVector::ReadExtVec(std::string spectrum)
Definition: c-smg2s.cc:320
newInitMatrixL_4
initMatrixL_t * newInitMatrixL_4(long diagl, long diagu, double Scale, double Sparsity)
C-interface of initMat::initMat(S diagl, S diagu, double Scale, double Sparsity)
Definition: c-smg2s.cc:116
newParVecMapL_empty
parVecMapL_t * newParVecMapL_empty()
C-interfance of parVectorMap::parVectorMap()
Definition: c-smg2s.cc:152
ds_parMatSparse_Show
void ds_parMatSparse_Show(ds_parMatSparse_t *pm)
C-interface of parMatrixSparse::show()
Definition: c-smg2s.cc:606
initMatrix_destory
void initMatrix_destory(initMatrix_t *init)
Destory a initMatrix struct.
Definition: c-smg2s.cc:102
dl_parVecSetVal
void dl_parVecSetVal(dl_parVec_t *pv, long index, double val)
C-interface of parVector::SetValueGlobal(S index, T value)
Definition: c-smg2s.cc:305
dl_nonsymmconj
dl_parMatSparse_t * dl_nonsymmconj(long probSize, nilpL_t *nilp, initMatrixL_t *init, char *spectrum, MPI_Comm comm)
C-interface of function nonsymm (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:1097
parVecMapLL2G
long parVecMapLL2G(parVecMapL_t *pv, long local_index)
C-interfance of parVectorMap::Loc2Glob(S local_index)
Definition: c-smg2s.cc:162
newInitMatrixL_3
initMatrixL_t * newInitMatrixL_3(long diagl, long diagu, double Sparsity)
C-interface of initMat::initMat(S diagl, S diagu, double Sparsity)
Definition: c-smg2s.cc:113
zl_parVecGetGlobSize
long zl_parVecGetGlobSize(zl_parVec_t *pv)
C-interface of parVector::GetGlobalSize()
Definition: c-smg2s.cc:461
newNilpL_1
nilpL_t * newNilpL_1(long nbOne, long size)
C-interface of Nilpotent::Nilpotent(S nbOne, S size)
Definition: c-smg2s.cc:57
dl_parVecAdd
void dl_parVecAdd(dl_parVec_t *pv, dl_parVec_t *pv2)
C-interface of parVector::VecAdd(parVector v)
Definition: c-smg2s.cc:311
initMatrixL_t
struct initMatrixL initMatrixL_t
Creates a type name for initMatrix which is a C-interface for initMat with `S=long`.
Definition: c-smg2s.h:129
newParVecMap
parVecMap_t * newParVecMap(MPI_Comm ncomm, int lbound, int ubound)
C-interfance of parVectorMap::parVectorMap(MPI_Comm ncomm, S lbound, S ubound)
Definition: c-smg2s.cc:130
ds_parVecGetValLoc
double ds_parVecGetValLoc(ds_parVec_t *pv, int lindex)
C-interface of parVector::GetValueLocal(S lindex)
Definition: c-smg2s.cc:204
initMatrix_show
void initMatrix_show(initMatrix_t *init)
C-interface of initMat::show()
Definition: c-smg2s.cc:99
zs_parMatSparse_destory
void zs_parMatSparse_destory(zs_parMatSparse_t *pm)
Destory the struct.
Definition: c-smg2s.cc:712
dl_parMatSparse_destory
void dl_parMatSparse_destory(dl_parMatSparse_t *pm)
Destory the struct.
Definition: c-smg2s.cc:642
new_dl_ParVec_1
dl_parVec_t * new_dl_ParVec_1(MPI_Comm ncomm, long lbound, long ubound)
C-interface of parVector::parVector(MPI_Comm ncomm, S lbound, S ubound)
Definition: c-smg2s.cc:259
zl_parVecAdd
void zl_parVecAdd(zl_parVec_t *pv, zl_parVec_t *pv2)
C-interface of parVector::VecAdd(parVector v)
Definition: c-smg2s.cc:522
ds_parVecSetValLoc
void ds_parVecSetValLoc(ds_parVec_t *pv, int lindex, double val)
C-interface of parVector::SetValueLocal(S row, T value)
Definition: c-smg2s.cc:228
parVecMapLG2L
long parVecMapLG2L(parVecMapL_t *pv, long global_index)
C-interfance of parVectorMap::Glob2Loc(S global_index)
Definition: c-smg2s.cc:165
parVecMapG2L
int parVecMapG2L(parVecMap_t *pv, int global_index)
C-interfance of parVectorMap::Glob2Loc(S global_index)
Definition: c-smg2s.cc:139
zs_parMatSparse_initMat
void zs_parMatSparse_initMat(zs_parMatSparse_t *pm, int diagl, int diagu, double Scale, double Sparsity)
C-interface of parMatrixSparse::initMat(S diag_l, S diag_u, Base< T > scale, T shift,...
Definition: c-smg2s.cc:625
parVecMap_destory
void parVecMap_destory(parVecMap_t *pv)
Destory a parVecMap struct.
Definition: c-smg2s.cc:148
ds_parVecAdd
void ds_parVecAdd(ds_parVec_t *pv, ds_parVec_t *pv2)
C-interface of parVector::VecAdd(parVector v)
Definition: c-smg2s.cc:231
dl_parVecGetValLoc
double dl_parVecGetValLoc(dl_parVec_t *pv, long lindex)
C-interface of parVector::GetValueLocal(S lindex)
Definition: c-smg2s.cc:284
dl_parVecGetUpperBound
long dl_parVecGetUpperBound(dl_parVec_t *pv)
C-interface of parVector::GetUpperBound()
Definition: c-smg2s.cc:271
new_zs_ParVec_1
zs_parVec_t * new_zs_ParVec_1(MPI_Comm ncomm, int lbound, int ubound)
C-interface of parVector::parVector(MPI_Comm ncomm, S lbound, S ubound)
Definition: c-smg2s.cc:339
ds_nonsymm_2
ds_parMatSparse_t * ds_nonsymm_2(int probSize, nilp_t *nilp, initMatrix_t *init, ds_parVec_t *spec)
C-interface of function nonsymm (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:1031
dl_parVecScale
void dl_parVecScale(dl_parVec_t *pv, double scale)
C-interface of parVector::VecScale(T scale)
Definition: c-smg2s.cc:314
zl_parVecGetVal
dcomplex_t zl_parVecGetVal(zl_parVec_t *pv, long index)
C-interface of parVector::GetValue(S index)
Definition: c-smg2s.cc:464
dl_parMatSparse_SetValLocal
void dl_parMatSparse_SetValLocal(dl_parMatSparse_t *pm, long row, long col, double val)
C-interface of parMatrixSparse::SetValueLocal(S row, S col, T value)
Definition: c-smg2s.cc:663
parVecMapGetComm
MPI_Comm parVecMapGetComm(parVecMap_t *pv)
C-interfance of parVectorMap::GetCurrentComm()
Definition: c-smg2s.cc:133
zs_parMatSparse_GetNRows
int zs_parMatSparse_GetNRows(zs_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNRows()
Definition: c-smg2s.cc:715
zs_parVecScale
void zs_parVecScale(zs_parVec_t *pv, dcomplex_t scale)
C-interface of parVector::VecScale(T scale)
Definition: c-smg2s.cc:421
zl_parVecSetValLoc
void zl_parVecSetValLoc(zl_parVec_t *pv, long lindex, dcomplex_t val)
C-interface of parVector::SetValueLocal(S row, T value)
Definition: c-smg2s.cc:518
dl_writeToTxt
void dl_writeToTxt(dl_parVec_t *pv, char *spectrum)
C-interface of parVector::writeToTxt (std::string file_name)
Definition: c-smg2s.cc:325
initMatrix_t
struct initMatrix initMatrix_t
Creates a type name for initMatrix which is a C-interface for initMat with `S=int`.
Definition: c-smg2s.h:112
ds_parVecView
void ds_parVecView(ds_parVec_t *pv)
C-interface of parVector::VecView()
Definition: c-smg2s.cc:222
zs_parVec_t
struct zs_parVec zs_parVec_t
Creates a type name for zs_parVec which is a C-interface for parVector with `T=std::complex<double>` ...
Definition: c-smg2s.h:293
zs_parVecGetLowerBound
int zs_parVecGetLowerBound(zs_parVec_t *pv)
C-interface of parVector::GetLowerBound()
Definition: c-smg2s.cc:348
nilp_show
void nilp_show(nilp_t *nilp)
C-interface of Nilpotent::show.
Definition: c-smg2s.cc:46
dl_parVecDot
double dl_parVecDot(dl_parVec_t *pv, dl_parVec_t *pv2)
C-interface of parVector::VecDot(parVector v)
Definition: c-smg2s.cc:317
ds_parVecGetVal
double ds_parVecGetVal(ds_parVec_t *pv, int index)
C-interface of parVector::GetValue(S index)
Definition: c-smg2s.cc:201
zl_parVecSetVal
void zl_parVecSetVal(zl_parVec_t *pv, long index, dcomplex_t val)
C-interface of parVector::SetValueGlobal(S index, T value)
Definition: c-smg2s.cc:514
zl_parMatSparse_GetNCols
long zl_parMatSparse_GetNCols(zl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNCols()
Definition: c-smg2s.cc:794
zl_parMatSparse_AddVal
void zl_parMatSparse_AddVal(zl_parMatSparse_t *pm, long row, long col, dcomplex_t val)
C-interface of parMatrixSparse::AddValue(S row, S col, T value)
Definition: c-smg2s.cc:821
zs_parVecGetUpperBound
int zs_parVecGetUpperBound(zs_parVec_t *pv)
C-interface of parVector::GetUpperBound()
Definition: c-smg2s.cc:351
ds_specNonSymmLoad
ds_parVec_t * ds_specNonSymmLoad(parVecMap_t *map, char *spectrum)
C-interface of function specNonSymm(parVectorMap<S> index_map, std::string spectrum)
Definition: c-smg2s.cc:880
dl_parMatSparse_toCSRArray
void dl_parMatSparse_toCSRArray(dl_parMatSparse_t *pm, long *nrows, long *nnz, long **roffs, long **cols, double **val)
convert a parMatrixSparse matrix into CSR format
Definition: c-smg2s.cc:681
zl_nonherm
zl_parMatSparse_t * zl_nonherm(long probSize, nilpL_t *nilp, initMatrixL_t *init, char *spectrum, MPI_Comm comm)
C-interface of function nonherm (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:917
dl_parVecGetMap
parVecMapL_t * dl_parVecGetMap(dl_parVec_t *pv)
C-interface of parVector::GetVecMap()
Definition: c-smg2s.cc:329
ds_nonsymmconj_2
ds_parMatSparse_t * ds_nonsymmconj_2(int probSize, nilp_t *nilp, initMatrix_t *init, zs_parVec_t *spec)
C-interface of function nonsymmconj (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:1121
zs_parMatSparse_View
void zs_parMatSparse_View(zs_parMatSparse_t *pm)
C-interface of parMatrixSparse::MatView()
Definition: c-smg2s.cc:774
zl_parMatSparse_destory
void zl_parMatSparse_destory(zl_parMatSparse_t *pm)
Destory the struct.
Definition: c-smg2s.cc:788
dl_parMatSparse_GetComm
MPI_Comm dl_parMatSparse_GetComm(dl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetComm()
Definition: c-smg2s.cc:660
dl_nonsymmconj_2
dl_parMatSparse_t * dl_nonsymmconj_2(long probSize, nilpL_t *nilp, initMatrixL_t *init, zl_parVec_t *spec)
C-interface of function nonsymmconj (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:1135
zl_nonherm_3
void zl_nonherm_3(long probSize, nilpL_t *nilp, zl_parMatSparse_t *Am, zl_parVec_t *spec)
C-interface of function nonherm (S probSize, Nilpotent< S > nilp, parMatrixSparse< T,...
Definition: c-smg2s.cc:974
dl_parVecView
void dl_parVecView(dl_parVec_t *pv)
C-interface of parVector::VecView()
Definition: c-smg2s.cc:302
zl_parMatSparse_View
void zl_parMatSparse_View(zl_parMatSparse_t *pm)
C-interface of parMatrixSparse::MatView()
Definition: c-smg2s.cc:850
dcomplex::real
double real
Definition: c-smg2s.h:53
dl_parMatSparse_View
void dl_parMatSparse_View(dl_parMatSparse_t *pm)
C-interface of parMatrixSparse::MatView()
Definition: c-smg2s.cc:697
nilpL_t
struct nilpL nilpL_t
Creates a type name for nilp which is a C-interface for Nilpotent with `S=long`.
Definition: c-smg2s.h:89
zl_parMatSparse_GetComm
MPI_Comm zl_parMatSparse_GetComm(zl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetComm()
Definition: c-smg2s.cc:806
ds_parVecGetArray
double * ds_parVecGetArray(ds_parVec_t *pv)
C-interface of parVector::GetArray()
Definition: c-smg2s.cc:207
ds_parMatSparse_AddValLocal
void ds_parMatSparse_AddValLocal(ds_parMatSparse_t *pm, int row, int col, double val)
C-interface of parMatrixSparse::AddValueLocal(S row, S col, T value)
Definition: c-smg2s.cc:581
zl_parMatSparse_GetNRows
long zl_parMatSparse_GetNRows(zl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNRows()
Definition: c-smg2s.cc:791
new_ds_ParMatSparse_2
ds_parMatSparse_t * new_ds_ParMatSparse_2(parVecMap_t *map)
C-interface of parMatrixSparse::parMatrixSparse(parVectorMap< S > map)
Definition: c-smg2s.cc:551
new_zl_ParVec_1
zl_parVec_t * new_zl_ParVec_1(MPI_Comm ncomm, long lbound, long ubound)
C-interface of parVector::parVector(MPI_Comm ncomm, S lbound, S ubound)
Definition: c-smg2s.cc:442
newNilp_2
nilp_t * newNilp_2(int nbOne, int diag, int size)
C-interface of Nilpotent::Nilpotent(S nbOne, S diag, S size)
Definition: c-smg2s.cc:32
ds_parMatSparse_Wrt2MM
void ds_parMatSparse_Wrt2MM(ds_parMatSparse_t *pm, char *file_name)
C-interface of parMatrixSparse::writeToMatrixMarket(std::string file_name)
Definition: c-smg2s.cc:612
ds_parMatSparse_GetUpperBound
int ds_parMatSparse_GetUpperBound(ds_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetUpperBound()
Definition: c-smg2s.cc:569
ds_parVecGetLowerBound
int ds_parVecGetLowerBound(ds_parVec_t *pv)
C-interface of parVector::GetLowerBound()
Definition: c-smg2s.cc:188
zs_parVecSetValLoc
void zs_parVecSetValLoc(zs_parVec_t *pv, int lindex, dcomplex_t val)
C-interface of parVector::SetValueLocal(S row, T value)
Definition: c-smg2s.cc:414
nilpL_show
void nilpL_show(nilpL_t *nilp)
C-interface of Nilpotent::show.
Definition: c-smg2s.cc:80
parVecMapGetGlobSize
int parVecMapGetGlobSize(parVecMap_t *pv)
C-interfance of parVectorMap::GetGlobalSize()
Definition: c-smg2s.cc:145
parVecMapL_destory
void parVecMapL_destory(parVecMapL_t *pv)
Destory a parVecMapL struct.
Definition: c-smg2s.cc:174
zs_parVecGetVal
dcomplex_t zs_parVecGetVal(zs_parVec_t *pv, int index)
C-interface of parVector::GetValue(S index)
Definition: c-smg2s.cc:361
zs_parVecGetValLoc
dcomplex_t zs_parVecGetValLoc(zs_parVec_t *pv, int lindex)
C-interface of parVector::GetValueLocal(S lindex)
Definition: c-smg2s.cc:368
parVecMapLGetComm
MPI_Comm parVecMapLGetComm(parVecMapL_t *pv)
C-interfance of parVectorMap::GetCurrentComm()
Definition: c-smg2s.cc:159
new_zl_ParVec_2
zl_parVec_t * new_zl_ParVec_2(parVecMapL_t *map)
C-interface of parVector::parVector(parVectorMap<S> map)
Definition: c-smg2s.cc:445
zs_parVec_destory
void zs_parVec_destory(zs_parVec_t *pv)
Destory the struct.
Definition: c-smg2s.cc:345
newNilp_1
nilp_t * newNilp_1(int nbOne, int size)
C-interface of Nilpotent::Nilpotent(S nbOne, S size)
Definition: c-smg2s.cc:29
zl_parMatSparse_Wrt2MMCmplx
void zl_parMatSparse_Wrt2MMCmplx(zl_parMatSparse_t *pm, char *file_name)
C-interface of parMatrixSparse::writeToMatrixMarketCmplx(std::string file_name)
Definition: c-smg2s.cc:853
ds_parMatSparse_GetNRows
int ds_parMatSparse_GetNRows(ds_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNRows()
Definition: c-smg2s.cc:557
zs_parMatSparse_GetUpperBound
int zs_parMatSparse_GetUpperBound(zs_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetUpperBound()
Definition: c-smg2s.cc:727
ds_parMatSparse_GetLowerBound
int ds_parMatSparse_GetLowerBound(ds_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetLowerBound()
Definition: c-smg2s.cc:566
dl_parVecGetVal
double dl_parVecGetVal(dl_parVec_t *pv, long index)
C-interface of parVector::GetValue(S index)
Definition: c-smg2s.cc:281
newNilpL_2
nilpL_t * newNilpL_2(long nbOne, long diag, long size)
C-interface of Nilpotent::Nilpotent(S nbOne, S diag, S size)
Definition: c-smg2s.cc:60
zs_parMatSparse_SetValLocal
void zs_parMatSparse_SetValLocal(zs_parMatSparse_t *pm, int row, int col, dcomplex_t val)
C-interface of parMatrixSparse::SetValueLocal(S row, S col, T value)
Definition: c-smg2s.cc:733
new_ds_ParVec_2
ds_parVec_t * new_ds_ParVec_2(parVecMap_t *map)
C-interface of parVector::parVector(parVectorMap<S> map)
Definition: c-smg2s.cc:182
zl_parVecL2G
long zl_parVecL2G(zl_parVec_t *pv, long local_index)
C-interface of parVector::Loc2Glob(S local_index)
Definition: c-smg2s.cc:501
dl_parVec_t
struct dl_parVec dl_parVec_t
Creates a type name for dl_parVec which is a C-interface for parVector with `T=double` and `S=long`.
Definition: c-smg2s.h:241
ds_nonsymm
ds_parMatSparse_t * ds_nonsymm(int probSize, nilp_t *nilp, initMatrix_t *init, char *spectrum, MPI_Comm comm)
C-interface of function nonsymm (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:983
newInitMatrixL_2
initMatrixL_t * newInitMatrixL_2(long diagl, long diagu)
C-interface of initMat::initMat(S diagl, S diagu)
Definition: c-smg2s.cc:110
dl_parVecSetValLoc
void dl_parVecSetValLoc(dl_parVec_t *pv, long lindex, double val)
C-interface of parVector::SetValueLocal(S row, T value)
Definition: c-smg2s.cc:308
zs_parMatSparse_Show
void zs_parMatSparse_Show(zs_parMatSparse_t *pm)
C-interface of parMatrixSparse::show()
Definition: c-smg2s.cc:771
zs_parVecView
void zs_parVecView(zs_parVec_t *pv)
C-interface of parVector::VecView()
Definition: c-smg2s.cc:407
nilp_getIndOfZeros
int * nilp_getIndOfZeros(nilp_t *nilp)
C-interface of Nilpotent::getIndOfZeros.
Definition: c-smg2s.cc:52
dl_parVecGetComm
MPI_Comm dl_parVecGetComm(dl_parVec_t *pv)
C-interface of parVector::GetComm()
Definition: c-smg2s.cc:290
zs_parMatSparse_SetVal
void zs_parMatSparse_SetVal(zs_parMatSparse_t *pm, int row, int col, dcomplex_t val)
C-interface of parMatrixSparse::SetValue (S row, S col, T value)
Definition: c-smg2s.cc:737
dl_specNonSymmLoad
dl_parVec_t * dl_specNonSymmLoad(parVecMapL_t *map, char *spectrum)
C-interface of function specNonSymm(parVectorMap<S> index_map, std::string spectrum)
Definition: c-smg2s.cc:885
newNilpL_3
nilpL_t * newNilpL_3(long *nilpvec, long size)
C-interface of Nilpotent::Nilpotent(std::vector<S> nilpvec, S size)
Definition: c-smg2s.cc:63
new_zs_ParVec_2
zs_parVec_t * new_zs_ParVec_2(parVecMap_t *map)
C-interface of parVector::parVector(parVectorMap<S> map)
Definition: c-smg2s.cc:342
zs_parVecAdd
void zs_parVecAdd(zs_parVec_t *pv, zs_parVec_t *pv2)
C-interface of parVector::VecAdd(parVector v)
Definition: c-smg2s.cc:418
dcomplex
A struct determines a complex number with double precision.
Definition: c-smg2s.h:51
zs_parMatSparse_Wrt2MMCmplx
void zs_parMatSparse_Wrt2MMCmplx(zs_parMatSparse_t *pm, char *file_name)
C-interface of parMatrixSparse::writeToMatrixMarketCmplx(std::string file_name)
Definition: c-smg2s.cc:777
newNilp_3
nilp_t * newNilp_3(int *nilpvec, int size)
C-interface of Nilpotent::Nilpotent(std::vector<S> nilpvec, S size)
Definition: c-smg2s.cc:35
zl_writeToTxtCmplx
void zl_writeToTxtCmplx(zl_parVec_t *pv, char *spectrum)
C-interface of parVector::writeToCmplx(std::string file_name)
Definition: c-smg2s.cc:540
zs_parMatSparse_t
struct zs_parMatSparse zs_parMatSparse_t
Creates a type name for zs_parMatSparse which is a C-interface for parMatrixSparse with `T=std::compl...
Definition: c-smg2s.h:509
zs_parVecL2G
int zs_parVecL2G(zs_parVec_t *pv, int local_index)
C-interface of parVector::Loc2Glob(S local_index)
Definition: c-smg2s.cc:397
zl_parMatSparse_SetValLocal
void zl_parMatSparse_SetValLocal(zl_parMatSparse_t *pm, long row, long col, dcomplex_t val)
C-interface of parMatrixSparse::SetValueLocal(S row, S col, T value)
Definition: c-smg2s.cc:809
ds_parVecReadExtVec
void ds_parVecReadExtVec(ds_parVec_t *pv, char *spectrum)
C-interface of parVector::ReadExtVec(std::string spectrum)
Definition: c-smg2s.cc:240
dl_nonsymm_2
dl_parMatSparse_t * dl_nonsymm_2(long probSize, nilpL_t *nilp, initMatrixL_t *init, dl_parVec_t *spec)
C-interface of function nonsymm (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:1044
ds_parVec_t
struct ds_parVec ds_parVec_t
Creates a type name for ds_parVec which is a C-interface for parVector with `T=double` and `S=int`.
Definition: c-smg2s.h:190
ds_parMatSparse_SetVal
void ds_parMatSparse_SetVal(ds_parMatSparse_t *pm, int row, int col, double val)
C-interface of parMatrixSparse::SetValue (S row, S col, T value)
Definition: c-smg2s.cc:578
dl_parVecGetGlobSize
long dl_parVecGetGlobSize(dl_parVec_t *pv)
C-interface of parVector::GetGlobalSize()
Definition: c-smg2s.cc:278
zs_specNonHermLoad
zs_parVec_t * zs_specNonHermLoad(parVecMap_t *map, char *spectrum)
C-interface of function specNonHerm(parVectorMap<S> index_map, std::string spectrum)
Definition: c-smg2s.cc:858
zl_parVecGetValLoc
dcomplex_t zl_parVecGetValLoc(zl_parVec_t *pv, long lindex)
C-interface of parVector::GetValueLocal(S lindex)
Definition: c-smg2s.cc:471
zl_nonherm_2
zl_parMatSparse_t * zl_nonherm_2(long probSize, nilpL_t *nilp, initMatrixL_t *init, zl_parVec_t *spec)
C-interface of function nonherm (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:953
dl_parMatSparse_AddValLocal
void dl_parMatSparse_AddValLocal(dl_parMatSparse_t *pm, long row, long col, double val)
C-interface of parMatrixSparse::AddValueLocal(S row, S col, T value)
Definition: c-smg2s.cc:669
ds_parMatSparse_GetValLocal
double ds_parMatSparse_GetValLocal(ds_parMatSparse_t *pm, int row, int col)
C-interface of parMatrixSparse::GetValueLocal (S row, S col)
Definition: c-smg2s.cc:587
newInitMatrix_3
initMatrix_t * newInitMatrix_3(int diagl, int diagu, double Sparsity)
C-interface of initMat::initMat(S diagl, S diagu, double Sparsity)
Definition: c-smg2s.cc:93
new_zs_ParMatSparse_2
zs_parMatSparse_t * new_zs_ParMatSparse_2(parVecMapL_t *map)
C-interface of parMatrixSparse::parMatrixSparse(parVectorMap< S > map)
zl_parMatSparse_Show
void zl_parMatSparse_Show(zl_parMatSparse_t *pm)
C-interface of parMatrixSparse::show()
Definition: c-smg2s.cc:847
zl_parMatSparse_t
struct zl_parMatSparse zl_parMatSparse_t
Creates a type name for zl_parMatSparse which is a C-interface for parMatrixSparse with `T=std::compl...
Definition: c-smg2s.h:562
zl_parMatSparse_GetUpperBound
long zl_parMatSparse_GetUpperBound(zl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetUpperBound()
Definition: c-smg2s.cc:803
zl_specNonHermLoad
zl_parVec_t * zl_specNonHermLoad(parVecMapL_t *map, char *spectrum)
C-interface of function specNonHerm(parVectorMap<S> index_map, std::string spectrum)
Definition: c-smg2s.cc:863
dl_parMatSparse_GetNNzLoc
long dl_parMatSparse_GetNNzLoc(dl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNnzLoc()
Definition: c-smg2s.cc:651
zs_nonherm
zs_parMatSparse_t * zs_nonherm(int probSize, nilp_t *nilp, initMatrix_t *init, char *spectrum, MPI_Comm comm)
C-interface of function nonherm (S probSize, Nilpotent< S > nilp, initMat< S > init,...
Definition: c-smg2s.cc:893
ds_parVecGetLocSize
int ds_parVecGetLocSize(ds_parVec_t *pv)
C-interface of parVector::GetLocalSize()
Definition: c-smg2s.cc:195
dl_parMatSparse_GetNCols
long dl_parMatSparse_GetNCols(dl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNCols()
Definition: c-smg2s.cc:648
ds_parMatSparse_GetVal
double ds_parMatSparse_GetVal(ds_parMatSparse_t *pm, int row, int col)
C-interface of parMatrixSparse::GetValue (S row, S col)
Definition: c-smg2s.cc:590
zs_parVecG2L
int zs_parVecG2L(zs_parVec_t *pv, int global_index)
C-interface of parVector::Glob2Loc(S global_index)
Definition: c-smg2s.cc:400
ds_parMatSparse_GetComm
MPI_Comm ds_parMatSparse_GetComm(ds_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetComm()
Definition: c-smg2s.cc:572
nilpL_getIndOfZeros
long * nilpL_getIndOfZeros(nilpL_t *nilp)
C-interface of Nilpotent::getIndOfZeros.
Definition: c-smg2s.cc:77
new_ds_ParVec_1
ds_parVec_t * new_ds_ParVec_1(MPI_Comm ncomm, int lbound, int ubound)
C-interface of parVector::parVector(MPI_Comm ncomm, S lbound, S ubound)
Definition: c-smg2s.cc:179
zl_parVecView
void zl_parVecView(zl_parVec_t *pv)
C-interface of parVector::VecView()
Definition: c-smg2s.cc:511
zs_parMatSparse_toCSRArray
void zs_parMatSparse_toCSRArray(zs_parMatSparse_t *pm, int *nrows, int *nnz, int **roffs, int **cols, dcomplex_t **val)
convert a parMatrixSparse matrix into CSR format
Definition: c-smg2s.cc:757
zs_parMatSparse_AddVal
void zs_parMatSparse_AddVal(zs_parMatSparse_t *pm, int row, int col, dcomplex_t val)
C-interface of parMatrixSparse::AddValue(S row, S col, T value)
Definition: c-smg2s.cc:745
zl_parVec_destory
void zl_parVec_destory(zl_parVec_t *pv)
Destory the struct.
Definition: c-smg2s.cc:448
newInitMatrix_2
initMatrix_t * newInitMatrix_2(int diagl, int diagu)
C-interface of initMat::initMat(S diagl, S diagu)
Definition: c-smg2s.cc:90
zs_parMatSparse_GetNCols
int zs_parMatSparse_GetNCols(zs_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNCols()
Definition: c-smg2s.cc:718
zl_parVecGetArray
dcomplex_t * zl_parVecGetArray(zl_parVec_t *pv)
C-interface of parVector::GetArray()
Definition: c-smg2s.cc:478
zs_parMatSparse_GetValLocal
dcomplex_t zs_parMatSparse_GetValLocal(zs_parMatSparse_t *pm, int row, int col)
C-interface of parMatrixSparse::GetValueLocal (S row, S col)
Definition: c-smg2s.cc:749
nilp_getDegree
int nilp_getDegree(nilp_t *nilp)
C-interface of Nilpotent::getDegree.
Definition: c-smg2s.cc:49
zs_parVecDot
dcomplex_t zs_parVecDot(zs_parVec_t *pv, zs_parVec_t *pv2)
C-interface of parVector::VecDot(parVector v)
Definition: c-smg2s.cc:425
zl_parMatSparse_GetNNzLoc
long zl_parMatSparse_GetNNzLoc(zl_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetNnzLoc()
Definition: c-smg2s.cc:797
zs_parVecReadExtVec
void zs_parVecReadExtVec(zs_parVec_t *pv, char *spectrum)
C-interface of parVector::ReadExtVec(std::string spectrum)
Definition: c-smg2s.cc:432
ds_parMatSparse_t
struct ds_parMatSparse ds_parMatSparse_t
Creates a type name for ds_parMatSparse which is a C-interface for parMatrixSparse with `T=double` an...
Definition: c-smg2s.h:402
zl_parVecGetLocSize
long zl_parVecGetLocSize(zl_parVec_t *pv)
C-interface of parVector::GetLocalSize()
Definition: c-smg2s.cc:458
dl_parVecGetArray
double * dl_parVecGetArray(dl_parVec_t *pv)
C-interface of parVector::GetArray()
Definition: c-smg2s.cc:287
zs_parMatSparse_GetVal
dcomplex_t zs_parMatSparse_GetVal(zs_parMatSparse_t *pm, int row, int col)
C-interface of parMatrixSparse::GetValue (S row, S col)
Definition: c-smg2s.cc:753
nilp_destory
void nilp_destory(nilp_t *nilp)
Destory a nilp struct.
Definition: c-smg2s.cc:43
ds_parMatSparse_toCSRArray
void ds_parMatSparse_toCSRArray(ds_parMatSparse_t *pm, int *nrows, int *nnz, int **roffs, int **cols, double **val)
convert a parMatrixSparse matrix into CSR format
Definition: c-smg2s.cc:593
dl_parMatSparse_initMat
void dl_parMatSparse_initMat(dl_parMatSparse_t *pm, long diagl, long diagu, double Scale, double Sparsity)
C-interface of parMatrixSparse::initMat(S diag_l, S diag_u, Base< T > scale, T shift,...
Definition: c-smg2s.cc:619
new_dl_ParMatSparse_1
dl_parMatSparse_t * new_dl_ParMatSparse_1(dl_parVec_t *pv)
C-interface of parMatrixSparse::parMatrixSparse(parVector< T, S > vec)
Definition: c-smg2s.cc:636
zl_parVecReadExtVec
void zl_parVecReadExtVec(zl_parVec_t *pv, char *spectrum)
C-interface of parVector::ReadExtVec(std::string spectrum)
Definition: c-smg2s.cc:536
zs_parMatSparse_GetComm
MPI_Comm zs_parMatSparse_GetComm(zs_parMatSparse_t *pm)
C-interface of parMatrixSparse::GetComm()
Definition: c-smg2s.cc:730