Hi,

i had a question regarding PCSetOperators(...):

1) what is the difference between PCSetOperators and KSPSetOperators since the 
description and the arguments for both functions are the same (i.e.):
        "Sets the matrix associated with the linear system and a (possibly) 
different 
one associated with the preconditioner"
        
Right now, what i do to set my preconditioner is to call: 
        PCSetType(m_pc, PCJACOBI);
2) Is this sufficient or do i need to call PCSetOperators? 
3) Do PCSetType and PCSetOperators have the same function?

Right now what i basically do to set up my solver context is to call the 
following functions (in this order):
        - KSPCreate //create my context
        - KSPSetOperators //associate my matrix with the context
        - KSPSetType //set my solver type
        - PCSetType
        - KSPSetUp
It seems to work, but i don't know if it is efficient and preferred way (if 
there is such a thing)?

Also, do several successive solves on the same linear system with the same 
preconditioner. So i pass SAME_NONZEROPATTERN as the MatStructure flag to the 
KSPSetOperators call. So do i need to call PCSetOperators and pass it the 
flag as well to reuse the preconditioner?

thanks for all the help
mat


Reply via email to