[petsc-users] Using PETSc solvers and preconditioners with mfem

Julian Andrej juan at tf.uni-kiel.de
Tue Oct 25 13:10:38 CDT 2016


We have an implementation which models a real physical application but
don't have the manpower to implement different preconditioner themes
(like with fieldsplit) or try out different time solving schemes
(which is way too easy with TS). Specifically we create a bunch of
operators (Boundary and Face integrators) which model
actuator/observer domains on a predefined mesh.

On Tue, Oct 25, 2016 at 7:19 PM, Stefano Zampini
<stefano.zampini at gmail.com> wrote:
> I have a working conversion from HypreParCSR to PETSc MPIAIJ format.
> I could add this code to PETSc, maybe in the contrib folder. Barry, what do you think?
>
>
>> We tried a similar approach to get MFEM objects to PETSc and the real
>> problem is that all other convenient functions like creating
>> gridfunctions and projections, you have to convert them every time
>> which is basically nothing more than a bad workaround.
>
> So far, my interface covers matrices and Krylov solvers (PCFieldSplit and PCBDDC are explicitly supported).
>
> Can you tell me how would you like to use these objects with PETSc? What you would like to achieve?
>
> So far, my work on the PETSc interface to MFEM originated from a wishlist for solvers, but I could expand it.
>
>
>> Stefano Zampini
>> replied to the issue on github and was stating that there is some
>> intention to get MFEM working with PETSc but there is no specific
>> timeframe.
>>
>
> There’s currently an open pull request for PETSc solvers inside the private MFEM repo.
> However, I don’t know when the code, if merged, will be released.
>
>
>> Regards
>> Julian Andrej
>>
>> On Tue, Oct 25, 2016 at 6:30 PM, Abdullah Ali Sivas
>> <abdullahasivas at gmail.com> wrote:
>>> I will check that. I am preallocating but it may be that I am not allocating
>>> big enough. I still have to figure out nuance differences between these
>>> formats to solve the bugs. I appreciate your answer and hope Satish knows
>>> it.
>>>
>>> Thank you,
>>> Abdullah Ali Sivas
>>>
>>>
>>> On 2016-10-25 12:15 PM, Matthew Knepley wrote:
>>>
>>> On Tue, Oct 25, 2016 at 10:54 AM, Abdullah Ali Sivas
>>> <abdullahasivas at gmail.com> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I want to use PETSc with mfem and I know that mfem people will figure out
>>>> a way to do it in few months. But for now as a temporary solution I just
>>>> thought of converting hypre PARCSR matrices (that is what mfem uses as
>>>> linear solver package) into PETSc MPIAIJ matrices and I have a semi-working
>>>> code with some bugs. Also my code is dauntingly slow and seems like not
>>>> scaling. I have used MatHYPRE_IJMatrixCopy from myhp.c of PETSc and
>>>> hypre_ParCSRMatrixPrintIJ from par_csr_matrix.c of hypre as starting points.
>>>> Before starting I checked whether there was anything done similar to this, I
>>>> could not find anything.
>>>>
>>>> My question is, are you aware of such a conversion code (i.e. something
>>>> like hypre_ParCSRtoPETScMPIAIJ( hypre_ParCSRMatrix *matrix, Mat *A)?
>>>
>>> No, but maybe Satish knows. Slow running times most likely come from lack of
>>> preallocation for the target matrix.
>>>
>>>  Thanks,
>>>
>>>     Matt
>>>>
>>>> Thanks in advance,
>>>> Abdullah Ali Sivas
>>>
>>>
>>>
>>>
>>> --
>>> 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
>>>
>>>
>


More information about the petsc-users mailing list