I know that sp variable is in use by a sparse matrix.. How do I generate new sp(sparsity pattern) with new matrix couplings?
The destructor of sparsity pattern has been called?? I am still wondering that... Could you give me a explain more? On Thu, July 17, 2008 8:32 am, Isabel Gil wrote: > Hi! > > I think the problem you have is that the destructor of Sparsity pattern > has been called, however a variable of this class is yet in use by a > Sparse Matrix, for example. > > Best regards > Isa > > [EMAIL PROTECTED] wrote: >> Dear All, >> >> Could we use block sparsity pattern again the same class? >> >> For example, >> >> I am solving the problem separated into two parts. >> >> One is for solving stoke equation, the other is for solving othres. >> >> In order to reduce the consumption of memory, I was supposed to separate >> into two sections, But, if I set as : >> >> BlockSparsityPattern sp; >> >> When I solve the stokes equation, I would like to generate pattern for >> u-u >> ,u-p, p-u couplings into sp sparsity pattern, After solving stokes >> equation, I also generate only for mass matrix with same sparsity >> pattern(sp). >> >> But, I found the error like >> >> --------------------------------------------------------- >> >> An error occurred in line <103> of file <source/subscriptor.cc> in >> function >> virtual dealii::Subscriptor::~Subscriptor() >> The violated condition was: >> counter == 0 >> The name and call sequence of the exception was: >> ExcInUse (counter, object_info->name(), infostring) >> Additional Information: >> Object of class N6dealii15SparsityPatternE is still used by 1 other >> objects. >> from Subscriber SparseMatrix >> >> Stacktrace: >> ----------- >> #0 /home/miranus/ysh/deal.II/lib/libbase.g.so: >> dealii::Subscriptor::~Subscriptor() >> #1 /home/miranus/ysh/deal.II/lib/liblac.g.so: >> dealii::SparsityPattern::~SparsityPattern() >> #2 /home/miranus/ysh/deal.II/lib/liblac.g.so: >> dealii::BlockSparsityPatternBase<dealii::SparsityPattern>::reinit(unsigned >> int, unsigned int) >> #3 /home/miranus/ysh/deal.II/lib/libdeal_II_2d.g.so: >> dealii::BlockSparsityPattern::reinit(unsigned int, unsigned int) >> #4 /home/miranus/ysh/deal.II/lib/liblac.g.so: >> dealii::BlockSparsityPattern::copy_from(dealii::BlockCompressedSetSparsityPattern >> const&) >> #5 ./testNoDG: StokOldrydB<2>::MakeSparseMatrix(unsigned int) >> #6 ./testNoDG: StokOldrydB<2>::assembleSysOldrodBNODG(unsigned int) >> #7 ./testNoDG: StokOldrydB<2>::run() >> #8 ./testNoDG: main >> -------------------------------------------------------- >> >> Could we generate twice with same name of sparsity pattern/ >> >> If I separate sparsitypatter name like sp0 , sp1 and then generate them >> each other, Total memory consumption is the sum of sp0, sp1? >> >> for example, If memory consumption of sp0 is 100 bytes, sp1 is 150 >> bytes, >> total occupied memory for a generation of sparsity pattern is 250 bytes? >> >> If then, I have a problem of soring out to reduce memory problem. >> >> Could you give a advice? >> >> How could we reinitialize the SparsityPattern? and so on.. >> >> >> >> >> >> >> _______________________________________________ >> > _______________________________________________
