[petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2023-12-19 Thread Shatanawi, Sawsan Muhammad via petsc-users
Hello everyone, I hope this email finds you well. My Name is Sawsan Shatanawi, and I am currently working on developing a Fortran code for simulating groundwater flow in a 3D system. The code involves solving a nonlinear system, and I have created the matrix to be solved using the PCG solver

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2023-12-20 Thread Shatanawi, Sawsan Muhammad via petsc-users
ding to it again, which is fine, but you are adding new non-zeros to the sparsity pattern. If this is what you want then you can tell the matrix to let you do that. Otherwise you have a bug. Mark On Tue, Dec 19, 2023 at 9:50 PM Shatanawi, Sawsan Muhammad via petsc-users mailto:petsc-users@mcs.anl.go

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2023-12-20 Thread Shatanawi, Sawsan Muhammad via petsc-users
with the KSP solver do call KSPGetPC(ksp,pc,ierr) call PCSetType(pc, PCILU,ierr) Do not call KSPSetUp(). It will be taken care of automatically during the solve On Dec 20, 2023, at 8:52 PM, Shatanawi, Sawsan Muhammad via petsc-users wrote: Hello, I don't think that I set preallocation

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2023-12-20 Thread Shatanawi, Sawsan Muhammad via petsc-users
tell the matrix to let you do that. Otherwise you have a bug. Mark On Tue, Dec 19, 2023 at 9:50 PM Shatanawi, Sawsan Muhammad via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Hello everyone, I hope this email finds you well. My Name is Sawsan Shatanawi, and I am currently

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2023-12-20 Thread Shatanawi, Sawsan Muhammad via petsc-users
EMAIL] On Wed, Dec 20, 2023 at 9:49 PM Shatanawi, Sawsan Muhammad via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Hello Barry, Thank you a lot for your help, Now I am getting the attached error message. Do not destroy the PC from KSPGetPC() THanks, Matt Bests,

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2024-01-10 Thread Shatanawi, Sawsan Muhammad via petsc-users
ers are good to learn anyway. I tend to run debuggers directly (eg, lldb ./a.out -- program-args ...) and use a GUI debugger (eg, Totalview or DDT) if available. Mark On Wed, Dec 20, 2023 at 10:02 PM Shatanawi, Sawsan Muhammad via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Hello

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2024-01-11 Thread Shatanawi, Sawsan Muhammad via petsc-users
VecGetArray() from Fortran. Regardless, definitely should not be writing any new code that uses VecGetArray() from Fortran. Should use VecGetArrayF90(). --Junchao Zhang On Wed, Jan 10, 2024 at 2:38 PM Shatanawi, Sawsan Muhammad via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote:

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2024-01-16 Thread Shatanawi, Sawsan Muhammad via petsc-users
e still support it? This is not the correct calling sequence for VecGetArray() from Fortran. Regardless, definitely should not be writing any new code that uses VecGetArray() from Fortran. Should use VecGetArrayF90(). --Junchao Zhang On Wed, Jan 10, 2024 at 2:38 PM Shatanawi, Sawsan Muhammad v

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2024-05-09 Thread Shatanawi, Sawsan Muhammad via petsc-users
at 2:23 PM Shatanawi, Sawsan Muhammad via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Hello everyone, I hope this email finds you well. My Name is Sawsan Shatanawi, and I was developing a Fortran code for simulating groundwater flow in a 3D system with nonlinear behavior. I

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2024-05-07 Thread Shatanawi, Sawsan Muhammad via petsc-users
egardless, definitely should not be writing any new code that uses VecGetArray() from Fortran. Should use VecGetArrayF90(). --Junchao Zhang On Wed, Jan 10, 2024 at 2:38 PM Shatanawi, Sawsan Muhammad via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Hello all, I hope you are doi

Re: [petsc-users] PETSC Matrix debugging

2024-04-01 Thread Shatanawi, Sawsan Muhammad via petsc-users
This message came from outside your organization. On Mon, Apr 1, 2024 at 1:57 PM Shatanawi, Sawsan Muhammad via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: This Message Is From an External Sender This message came from outside your organization. Hello everyone, I hope this email fin

[petsc-users] PETSC Matrix debugging

2024-04-01 Thread Shatanawi, Sawsan Muhammad via petsc-users
Hello everyone, I hope this email finds you well. Is there a way we can check how the matrix looks like after setting it. I have tried debugging it with gdb- break points- and print statements, but it only gave me one value instead of a matrix. Thank you in advance for your time and

Re: [petsc-users] Help with Integrating PETSc into Fortran Groundwater Flow Simulation Code

2024-05-18 Thread Shatanawi, Sawsan Muhammad via petsc-users
On Fri, May 10, 2024 at 6:30 PM Shatanawi, Sawsan Muhammad via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Good afternoon, I have tried SNESComputeJacobianDefaultColor(), but the arguments needed are confusing me. Would you please have a look at my code and the error messages I a