[petsc-users] About MatLUFactor()

Hong Zhang hzhang at mcs.anl.gov
Fri Feb 25 18:43:10 CST 2011


Customized MatMatSolve_SeqDense()  is added to petsc-dev.

Hong

On Fri, Feb 25, 2011 at 11:36 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>   A custom MatMatSolve_SeqDense() will work much better than the one that does a single solve at a time because it will use Blas 3 unstead of 2.
>
>   Barry
>
> On Feb 25, 2011, at 11:25 AM, Hong Zhang wrote:
>
>> Golam:
>>> Oh, It thought MatMatSolve() was there as you mention something about it in
>>> the FAQ. Please add it then.
>>
>> Checking carefully, I realize that petsc supports MatMatSolve() for
>> all matrix types
>> by calling MatMatSolve_Basic() which calls MatSolve() for each rhs vector,
>> except  few matrix types (seqdense is not included) that we provided
>> more efficient implementation.
>>
>> A simplified ex1.c  with MatMatSolve() for petsc-dev is attached
>> (note: this only works with petsc-dev)
>> for your info.
>>
>> Hong
>>
>>
>>
>>>
>>> Thanks,
>>> Golam
>>>
>>> On Thu, Feb 24, 2011 at 7:31 PM, Hong Zhang <hzhang at mcs.anl.gov> wrote:
>>>>
>>>> For sequential dense in-place LU factorization, see
>>>> /src/mat/examples/tests/ex1.c.
>>>> For parallel, you need install PLAPACK.
>>>>
>>>> It seems we do not have MatMatSolve() for dense matrix format. I can
>>>> add it if you need it.
>>>>
>>>> Hong
>>>>
>>>> On Thu, Feb 24, 2011 at 8:43 PM, Golam Rabbani <mgrabbani at gmail.com>
>>>> wrote:
>>>>> Hi,
>>>>>
>>>>> I need to use MatLUFactor(), but do not know what to pass for the last 3
>>>>> arguments. Would you please explain a bit; I did not find any example
>>>>> code
>>>>> for this one.
>>>>>
>>>>> PetscErrorCode  MatLUFactor(Mat mat,IS row,IS col,const MatFactorInfo
>>>>> *info)
>>>>>
>>>>> My matrix is a dense one and the result from this call will be used in
>>>>> MatMatSolve().
>>>>>
>>>>> Regards,
>>>>> Golam
>>>>>
>>>
>>>
>> <ex1.c>
>
>


More information about the petsc-users mailing list