On Thu, Dec 8, 2022 at 2:56 PM Barry Smith wrote:
>
>You would use *PETSC_NULL_DM*LABEL but Matt needs to customize the
> PETSc Fortran stub for DMAddField() for you to handle accepting the NULL
> from PETSc.
>
Sorry, I missed this message. The customization is done.
Thanks,
Matt
n analytical one to implement.
>>
>> Best, Yi
>>
>> -Original Message-
>> From: Jed Brown
>> Sent: Wednesday, December 20, 2023 5:40 PM
>> To: Yi Hu ; petsc-users@mcs.anl.gov
>> Subject: Re: [petsc-users] fortran interface to snes matrix-fr
etsc-users@mcs.anl.gov
> Subject: Re: [petsc-users] fortran interface to snes matrix-free jacobian
>
> Are you wanting an analytic matrix-free operator or one created for you based
> on finite differencing? If the latter, just use -snes_mf or -snes_mf_operator.
>
> https://petsc.o
implement.
>
> Best, Yi
>
> -Original Message-
> From: Jed Brown
> Sent: Wednesday, December 20, 2023 5:40 PM
> To: Yi Hu ; petsc-users@mcs.anl.gov
> Subject: Re: [petsc-users] fortran interface to snes matrix-free jacobian
>
> Are you wanting an analytic matr
Dear Jed,
Thanks for your reply. I have an analytical one to implement.
Best, Yi
-Original Message-
From: Jed Brown
Sent: Wednesday, December 20, 2023 5:40 PM
To: Yi Hu ; petsc-users@mcs.anl.gov
Subject: Re: [petsc-users] fortran interface to snes matrix-free jacobian
Are you wanting
Are you wanting an analytic matrix-free operator or one created for you based
on finite differencing? If the latter, just use -snes_mf or -snes_mf_operator.
https://petsc.org/release/manual/snes/#jacobian-evaluation
Yi Hu writes:
> Dear PETSc team,
>
> My solution scheme relies on a matrix-
Dear PETSc team,
My solution scheme relies on a matrix-free jacobian in the SNES solver. I saw
the useful C interface like MatCreateSNESMF(), DMSNESCreateJacobianMF(). I am
wondering if you have the fortran equivalence?
I think for my problem in the main program I need to do
DMDASNESsetJaco
Thanks, that clears things up nicely.
Bruce
From: Barry Smith
Date: Wednesday, December 13, 2023 at 6:28 AM
To: Sanjay Govindjee
Cc: Palmer, Bruce J , petsc-users@mcs.anl.gov
Subject: Re: [petsc-users] Fortran Interface
fixed
On Dec 12, 2023, at 11:17 PM, Sanjay Govindjee wrote:
did you
;> type. What type should I use? Is there something called PETSC_NULL_VOID or
>>> PETSC_NULL_CONTEXT or do I use something else?
>>>
>>> From: Matthew Knepley mailto:knep...@gmail.com>>
>>> Date: Tuesday, December 12, 2023 at 8:33 AM
>>> To: Pa
set this to null, but apparently you have to specify the
>> type. What type should I use? Is there something called PETSC_NULL_VOID or
>> PETSC_NULL_CONTEXT or do I use something else?
>>
>>
>> *From: *Matthew Knepley
>> *Date: *Tuesday, December 12, 2023 at 8:
hat type should I use? Is there something called PETSC_NULL_VOID or
> PETSC_NULL_CONTEXT or do I use something else?
>
>
> *From: *Matthew Knepley
> *Date: *Tuesday, December 12, 2023 at 8:33 AM
> *To: *Palmer, Bruce J
> *Cc: *petsc-users@mcs.anl.gov
> *Subject: *Re: [p
do I use something else?
>
> From: Matthew Knepley mailto:knep...@gmail.com>>
> Date: Tuesday, December 12, 2023 at 8:33 AM
> To: Palmer, Bruce J mailto:bruce.pal...@pnnl.gov>>
> Cc: petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov>
> mailto:petsc-users@
PETSC_NULL_CONTEXT or do I use something else?
From: Matthew Knepley
Date: Tuesday, December 12, 2023 at 8:33 AM
To: Palmer, Bruce J
Cc: petsc-users@mcs.anl.gov
Subject: Re: [petsc-users] Fortran Interface
Check twice before you click! This email originated from outside PNNL.
On Tue, Dec 12, 2023 at
it makes it relatively easy to
fix everything up if you make changes.
Bruce
From: Barry Smith
Date: Tuesday, December 12, 2023 at 9:07 AM
To: Palmer, Bruce J
Cc: Matthew Knepley , petsc-users@mcs.anl.gov
Subject: Re: [petsc-users] Fortran Interface
It is unlikely we will ever be able to
:
Thanks! It might be useful if there were a link to this page near the
top of the C/Fortran API page.
Bruce
*From:*Matthew Knepley
*Date:*Tuesday, December 12, 2023 at 8:33 AM
*To:*Palmer, Bruce J
*Cc:*petsc-users@mcs.anl.gov
*Subject:*Re: [petsc-users] Fortran Interface
Check twice before
Date: Tuesday, December 12, 2023 at 8:33 AM
> To: Palmer, Bruce J mailto:bruce.pal...@pnnl.gov>>
> Cc: petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov>
> mailto:petsc-users@mcs.anl.gov>>
> Subject: Re: [petsc-users] Fortran Interface
>
> Check twice befo
Thanks! It might be useful if there were a link to this page near the top of
the C/Fortran API page.
Bruce
From: Matthew Knepley
Date: Tuesday, December 12, 2023 at 8:33 AM
To: Palmer, Bruce J
Cc: petsc-users@mcs.anl.gov
Subject: Re: [petsc-users] Fortran Interface
Check twice before you
On Tue, Dec 12, 2023 at 11:27 AM Palmer, Bruce J via petsc-users <
petsc-users@mcs.anl.gov> wrote:
> Does documentation for the PETSc fortran interface still exist? I looked
> at the web pages for 3.20 (petsc.org/release) but if you go under the tab
> C/Fortran API, only descriptions for the C int
Does documentation for the PETSc fortran interface still exist? I looked at the
web pages for 3.20 (petsc.org/release) but if you go under the tab C/Fortran
API, only descriptions for the C interface are there.
Bruce Palmer
You would use PETSC_NULL_DMLABEL but Matt needs to customize the PETSc
Fortran stub for DMAddField() for you to handle accepting the NULL from PETSc.
Barry
> On Dec 8, 2022, at 1:05 PM, Nicholas Arnold-Medabalimi
> wrote:
>
> Hi Petsc Users
>
> I am trying to use DMAddField in a F
Hi Petsc Users
I am trying to use DMAddField in a Fortran code. I had some questions on
casting/passing NULL. I follow how to pass NULL for standard types (INT,
CHAR, etc).
Is there a method/best practice for passing NULL for Petsc type arguments?
(In this case DMAddLabel I'd want to pass NULL to
Dear Barry
thank you very much for this very detailed answer. It's perfectly clear now.
I'll start writing the missing interfaces
I need to wait until I have made progress on writing the interfaces before
deciding whether to create a pull request or send part of the interface
definitions.
In any ca
PETSc uses the Sowing packages bfort tool for automatically generating
"Fortran stub functions" and interface definitions. There are certain C
functions that bfort cannot handling including (at least)
1) functions with character string arguments
2) functions with function pointer argument
> On Feb 26, 2018, at 5:38 PM, Sanjay Govindjee wrote:
>
> If PETSc is expecting an integer, I presume it is fine to pass
> PETSC_NULL_INTEGER(1)?
Not if the function has an interface definition. Fortran interfaces
distinguish between passing an integer a and an integer a(1) so you can
o
If PETSc is expecting an integer, I presume it is fine to pass
PETSC_NULL_INTEGER(1)?
On 2/26/18 11:53 PM, Smith, Barry F. wrote:
PETSC_NULL_INTEGER is actually declared as an array of size 1 (this is why you
get the confusing message about no specific subroutine that matches).
PETSC_NULL_INT
> On Feb 26, 2018, at 4:47 PM, frank wrote:
>
> Hello,
>
> It works after changing PETSC_NULL_INTEGER to 0. Thank you so much.
>
> Does this mean the 3rd argument is a Fortran integer rather than PestcInt?
No it is actually a PetscInt so technically you should declare
PetscInt zero
It should be
> call MatNullSpaceCreate( PETSC_COMM_WORLD, PETSC_TRUE, 0, dummyVecs,
> nullspace, ierr)
If this doesn't work please send your test code that I can compile myself and
figure out what is going on.
Barry
> On Feb 26, 2018, at 4:18 PM, frank wrote:
>
> Hello,
>
> I ha
Hello,
I have a question of the Fortran interface of subroutine MatNullSpaceCreate.
I tried to call the subroutine in the following form:
Vec :: dummyVec, dummyVecs(1)
MatNullSpace :: nullspace
INTEGER :: ierr
(a) call MatNullSpaceCreate( PETSC_COMM_WORLD, PETSC_TRUE,
1. You really need to profile. Copying a vector is cheap.
>>>You are right. Maybe I make a big thing for this copy in/out and it is
not that problematic or slow even for the whole 2D matrix. I have to test
it with a large one to see.
> 2. If you make your functions (to evaluate residuals, etc)
Hossein Talebi writes:
> Exactly, I personally look for:
>
> 1) type checking during the function calls. This helps also not looking
> into the manual for every single petsc function call.
>
> 2) low level access to petsc data structure. For example in my own code I
> already have my own hadnling
Exactly, I personally look for:
1) type checking during the function calls. This helps also not looking
into the manual for every single petsc function call.
2) low level access to petsc data structure. For example in my own code I
already have my own hadnling of parallel vectors and matrices. Wh
Hossein Talebi writes:
> What was in my mind is to create an interface additional to what is already
> there in petsc. So this should be compiled along with anyone's code if the
> used ocmpiler supports F03 or the necessary features of F03.
I don't think anyone will want to manually maintain the
Well, when dealing with Fortran I also often encounter software which
cannot be changed or upgraded to a more modern style.
What was in my mind is to create an interface additional to what is already
there in petsc. So this should be compiled along with anyone's code if the
used ocmpiler supports
On 10/27/2013 12:36 PM, Hossein Talebi wrote:
Thank you for your answer.
It is not true that F2003 support is that limited: Gfortran, Intel
Fortran, Cray Fortran, IBM Fortran and PGI Fortran all support nearly
full F2003. Some other ones support the C portability of F2003
although not support
Thank you for your answer.
It is not true that F2003 support is that limited: Gfortran, Intel Fortran,
Cray Fortran, IBM Fortran and PGI Fortran all support nearly full F2003.
Some other ones support the C portability of F2003 although not supporting
the rest.
* I can contribute on creating this
On Sun, 27 Oct 2013, Matthew Knepley wrote:
> On Sun, Oct 27, 2013 at 6:16 AM, Hossein Talebi
> wrote:
>
> > Hello All,
> >
> > I am trying to use petsc with Fortran. The initial mechanism to use petsc
> > with FORTRAN77 that works fine. However, I found the Fortran 90 interfaces
> > difficult
On Sun, Oct 27, 2013 at 6:16 AM, Hossein Talebi wrote:
> Hello All,
>
> I am trying to use petsc with Fortran. The initial mechanism to use petsc
> with FORTRAN77 that works fine. However, I found the Fortran 90 interfaces
> difficult to work with. The very first issue is one has to recompile pet
Hello All,
I am trying to use petsc with Fortran. The initial mechanism to use petsc
with FORTRAN77 that works fine. However, I found the Fortran 90 interfaces
difficult to work with. The very first issue is one has to recompile petsc
with the Fortran compiler in case different to the one which w
38 matches
Mail list logo