dropping columns/rows from matrix?

Barry Smith bsmith at mcs.anl.gov
Fri Nov 23 20:38:52 CST 2007


On Nov 23, 2007, at 8:13 PM, Peter Schröder wrote:

> Barry Smith wrote:
>>   We use MatGetSubMatrix() to do this. Rather than dropping/adding  
>> rows and columns just grab the
>> part you want and use it then destroy it and grab another part you  
>> want. We've done this with active set
>> methods and the time to do the MatGetSubMatrix() has been  
>> surprisingly small percentage of the time.
> Aaaah. Ok. Even if the submatrix is everyone but one column/row?  
> Very well.
>
     Yup :-). Only a couple of percent of the active set solver was  
spent in the GetSubMatrix()


> The one other way I had thought might be to fix one of the variables  
> (some entry of the x vector is forced to zero) and ignore the  
> corresponding part of the residual. But this may be too hacky an  
> approach given the overall structure of Petsc.
>
> I'll use MatGetSubMatrix() for now.
>
> peter
>




More information about the petsc-users mailing list