From: <lu...@gi...> - 2004-09-22 00:11:05
|
Hi PETSc 2.2.1 complains about following call in the Newmark_System (line 180)=20 void NewmarkSystem::compute_matrix () { // zero the global matrix this->matrix->zero(); with [0]PETSC ERROR: MatZeroEntries() line 3730 in src/mat/interface/matrix.= c [0]PETSC ERROR: Object is in wrong state! [0]PETSC ERROR: Not for matrices where you have set values but not yet = assembled! [0]PETSC ERROR: User provided function() line 170 in unknowndirectory/s= rc/numerics/petsc_matrix.C Any clues what to do with this? Best, Martin --=20 Martin L=FCthi University of Alaska, Fairbanks Dr. sc. nat. tel: +1 (907) 474 7443 fax: +1 (907) 474 7290 mel: lu...@gi... http://gi.alaska.edu/~luthi/ |
From: John P. <pet...@cf...> - 2004-09-22 00:39:57
|
Yes, it looks like one needs to call MatAssemblyBegin() and MatAssembl= yEnd() before trying to call MatZeroEntries(). -John Martin L=FCthi writes: > Hi >=20 > PETSc 2.2.1 complains about following call in the Newmark_System > (line 180)=20 >=20 > void NewmarkSystem::compute_matrix () > { > // zero the global matrix > this->matrix->zero(); >=20 > with >=20 > [0]PETSC ERROR: MatZeroEntries() line 3730 in src/mat/interface/matr= ix.c > [0]PETSC ERROR: Object is in wrong state! > [0]PETSC ERROR: Not for matrices where you have set values but not y= et assembled! > [0]PETSC ERROR: User provided function() line 170 in unknowndirector= y/src/numerics/petsc_matrix.C >=20 > Any clues what to do with this? >=20 |