[petsc-users] PetscLayoutCreate for Fortran
Matthew Knepley
knepley at gmail.com
Tue May 13 13:11:58 CDT 2014
On Tue, May 13, 2014 at 12:47 PM, Hossein Talebi
<talebi.hossein at gmail.com>wrote:
> Thank you.
>
> If I understand correctly, before inserting the values into the Mat and
> Vec, I should call VecScatter as in the ''ex30f.F" example to set Vec and
> Mat with the new indexes, right?
>
VecScatter is a way to send information among processes, so if you need to
reorganize your
information before inserting into the Vec, then yes you would use it.
Thanks,
Matt
>
> On Tue, May 13, 2014 at 6:45 PM, Matthew Knepley <knepley at gmail.com>wrote:
>
>> On Tue, May 13, 2014 at 11:42 AM, Hossein Talebi <
>> talebi.hossein at gmail.com> wrote:
>>
>>>
>>> I have already decomposed the Finite Element system using Metis. I just
>>> need to have the global rows exactly like how I define and I like to have
>>> the answer in the same layout so I don't have to move things around the
>>> processes again.
>>>
>>> No, I don't need it for something else.
>>>
>>
>> PetscLayout is only for contiguous sets of indices. If you want to
>> distribute them, you need to use VecScatter.
>>
>> Thanks,
>>
>> Matt
>>
>>
>>> Cheers
>>> Hossein
>>>
>>>
>>>
>>>
>>> On Tue, May 13, 2014 at 6:36 PM, Matthew Knepley <knepley at gmail.com>wrote:
>>>
>>>> On Tue, May 13, 2014 at 11:07 AM, Hossein Talebi <
>>>> talebi.hossein at gmail.com> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>>
>>>>> I am using PETSC from Fortran. I would like to define my own layout
>>>>> i.e. which row belongs to which CPU since I have already done the domain
>>>>> decomposition. It appears that "PetscLayoutCreate" and the other
>>>>> routine do this. But in the manual it says it is not provided in Fortran.
>>>>>
>>>>> Is there any way that I can do this using Fortran? Anyone has an
>>>>> example?
>>>>>
>>>>
>>>> You can do this for Vec and Mat directly. Do you want it for something
>>>> else?
>>>>
>>>> Thanks,
>>>>
>>>> Matt
>>>>
>>>>
>>>>> Cheers
>>>>> Hossein
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> What most experimenters take for granted before they begin their
>>>> experiments is infinitely more interesting than any results to which their
>>>> experiments lead.
>>>> -- Norbert Wiener
>>>>
>>>
>>>
>>>
>>> --
>>> www.permix.org
>>>
>>
>>
>>
>> --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which their
>> experiments lead.
>> -- Norbert Wiener
>>
>
>
>
> --
> www.permix.org
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140513/b4e72611/attachment-0001.html>
More information about the petsc-users
mailing list