Changeset 16441
- Timestamp:
- 10/16/13 23:22:45 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/AllocateSystemMatricesx/AllocateSystemMatricesx.cpp
r16438 r16441 39 39 40 40 /*if our matrices are coming from issm, we don't do dynamic allocation like Petsc 41 * does, and this routine is essentially useless. Force oldalloc in this case: */41 * does, and this routine is essentially useless. Force standard alloc in this case: */ 42 42 toolkittype=ToolkitOptions::GetToolkitType(); 43 if(strcmp(toolkittype,"issm")==0)oldalloc=true;44 43 45 44 if(oldalloc){ … … 53 52 m=flocalsize; n=flocalsize; /*local sizes*/ 54 53 M=fsize; N=fsize; /*global sizes*/ 55 MatrixNonzeros(&d_nnz,&o_nnz,femmodel,FsetEnum,FsetEnum); 56 Kff=new Matrix<IssmDouble>(m,n,M,N,d_nnz,o_nnz); 57 xDelete<int>(d_nnz); 58 xDelete<int>(o_nnz); 54 if(strcmp(toolkittype,"issm")==0){ 55 Kff=new Matrix<IssmDouble>(m,n,M,N,NULL,NULL); 56 } 57 else{ 58 MatrixNonzeros(&d_nnz,&o_nnz,femmodel,FsetEnum,FsetEnum); 59 Kff=new Matrix<IssmDouble>(m,n,M,N,d_nnz,o_nnz); 60 xDelete<int>(d_nnz); 61 xDelete<int>(o_nnz); 62 } 59 63 } 60 64 if(pKfs){ 61 65 m=flocalsize; n=slocalsize; /*local sizes*/ 62 66 M=fsize; N=ssize; /*global sizes*/ 63 MatrixNonzeros(&d_nnz,&o_nnz,femmodel,FsetEnum,SsetEnum); 64 Kfs=new Matrix<IssmDouble>(m,n,M,N,d_nnz,o_nnz); 65 xDelete<int>(d_nnz); 66 xDelete<int>(o_nnz); 67 if(strcmp(toolkittype,"issm")==0){ 68 Kfs=new Matrix<IssmDouble>(m,n,M,N,NULL,NULL); 69 } 70 else{ 71 MatrixNonzeros(&d_nnz,&o_nnz,femmodel,FsetEnum,SsetEnum); 72 Kfs=new Matrix<IssmDouble>(m,n,M,N,d_nnz,o_nnz); 73 xDelete<int>(d_nnz); 74 xDelete<int>(o_nnz); 75 } 67 76 } 68 77 if(pdf) df =new Vector<IssmDouble>(flocalsize,fsize);
Note:
See TracChangeset
for help on using the changeset viewer.