Questions tagged [petsc]
PETSc is an open source suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations.
18
questions with no upvoted or accepted answers
5
votes
0answers
283 views
Is it possible to predict the null space of a structure from contributing elements null spaces?
I am trying to solve an almost incompressible problem with heterogeneous properties by domain decomposition. Solution with CG converges slowly or divergerces completely. My problem becomes ill-...
3
votes
0answers
80 views
Solving saddle point problem having non-invertible top-left block with a PETSc nested matrix
My system is a symmetric FE problem with lagrange multipliers:
$Z=\begin{pmatrix}A & C^T \\ C & 0\end{pmatrix}$
The matrix $A$ is positive semi-definite, non-invertible. The whole matrix is ...
3
votes
0answers
85 views
PETSc SNES for user defined state
How to use PETSc SNES (scalable nonlinear equation solver), when the solution is not a vector but a user defined state?
I am implementing a non-linear mechanics problem (geometrically exact shell 5-...
3
votes
0answers
246 views
Method with low memory requirement for large-scale eigenvalue problem
I am working on the flow stability problem. In this work the main complication is solving generalized eigenvalue problem for a large scale Non-Hermitian matrix. I need only one eigenvalue (most left ...
3
votes
0answers
157 views
Is there an easy way to read a PetscBag into a python dict?
I'm using a PetscBag to store the input parameters of my program. At some point, I'm going to need to use python to plot these parameters against some output parameters, and ...
2
votes
1answer
260 views
Solving nonlinear PDE with finite difference based on Newton-Krylov
I am now working on solving MHD equations with finite difference method, which include nonlinear equations:
$$
\frac{\partial\rho}{\partial t}+\nabla\cdot\left[\left(\rho_0+\rho\right){v}\right]-\...
2
votes
0answers
174 views
Is it worth switching to timesteppers provided by PETSc if I can't write down a Jacobian for my problem? Case study with “the amoeba” toy problem
I am considering using petsc4py instead of scipy.integrate.odeint (which is a wrapper for Fortran solvers) for a problem ...
2
votes
0answers
172 views
preconditioned Uzawa method with Petsc
I am trying to improve the resolution of a Stokes problem (P2/P1 on unstructured mesh) defined by the matrix $M$:
$M=
\begin{pmatrix}
A_u & 0 & B_u \\
0 & A_v & B_v\\
B_u^T & B_v^...
2
votes
0answers
585 views
Jacobian-Free Newton-Krylov vs explicitly forming jacobian in DG
For a given discontinuous galerkin (DG) implementation for Navier-Stokes, targeting 10,000 to 1,000,000 4th order cells in 3D, I'm using PETSc's suite of linear/non-linear solvers on the back-end. It ...
2
votes
0answers
590 views
Cusp Library performance worse than PETSC (GMRES 200 iterations) Why?
I wanted to compare the speeds of the GMRES implementations in the CUSP and the PETSc libraries.
The matrix (A) used for testing was a 3d Laplacian matrix obtained by using the 7 point stencil on a ...
1
vote
0answers
47 views
Orientation of cones and transitive closures of a dmplex in Petsc
From the Petsc manual pages, I fail to understand what the orientations of cones and transitive closures mean.
In particular, how can I relate these numbers to the orientation of the length/area/...
1
vote
0answers
203 views
Getting started with FEM: Ill-conditioned matrix when evaluating flux terms in conservation law?
I have a system of conservation laws of the form
$$ \frac{\partial \mathbf{q}}{\partial t} + \nabla \cdot \mathbf{F}\!\left(\mathbf{q}\right) = 0 $$
I want to use finite elements to solve this ...
1
vote
0answers
61 views
Parallel dense solve with submatrices from mesh refinement with Petsc
For a Bounday Element Method problem I require the solution of a system of linear equations with multiple right-hand sides. Though this is a dense system, I still want to do it via Petsc in parallel. ...
1
vote
0answers
111 views
PETSc - difference between PetscNew and PetscMalloc
I wonder what is the difference between both functions.
In C++, the difference between new and malloc is easier: new allocates memory by calling the constructor.
What about PETSc ? In the example, ...
0
votes
0answers
28 views
Output solution vector in Petsc
I am using petsc to solve a linear elasticity problem discretized by finite elements.The initial mesh is read by a mesh file and the distribution in each processor is done using METIS.I am using only ...
0
votes
0answers
17 views
petsc4py path error running PETSC program in python
I tried to run an example PETSC program in python. I used pyinstaller --onefile example.py to create a binary form and ...
0
votes
0answers
41 views
PETSc configure does not allow mkl_sparse in Cygwin on Windows
I'm trying to use PETSc's AIJMKL sparse matrix in Windows. I'm configuring and building under Cygwin but using it directly in Windows (libpetsc.lib and libpetsc.dll ...
0
votes
0answers
55 views
Petsc matrix with DM objects takes too much memory
I have been learning petsc recently and made a simple solver for stokes equation on 3D staggered grid.
My code is running on server with 200GB ram, but if I run a solver on 256^3 grid, memory used by ...