[petsc-users] Question about how to use DS to do the discretization

2024-03-23 Thread Gong Yujie
Dear PETSc group, I'm reading the DS part for the discretization start from SNES ex17.c which is a demo for solving linear elasticity problem. I have two questions for the details. The first question is for the residual function. Is the residual calculated as this? The dot product is a little

[petsc-users] Question on output vector in vtk file

2023-12-11 Thread Gong Yujie
Dear PETSc developers, I have a DMPlex DM with 1 field 1dof. I'd like to output a vector with block size equals to 3. It seems that there is no response using command line option or using some code about PetscViewer. The DM is generated with (note that I'm not using PetscFE for discretization,

[petsc-users] Performance problem about output mesh in vtk format

2023-11-05 Thread Gong Yujie
Dear PETSc developers, I'm trying to output a result data in vtk format and find that it is quite slow. Then I try to check this issue by a simple test code:   PetscCall(PetscInitialize(&argc,&argv,(char*)0,NULL));   DM  dm,dmParallel,dmAux;   PetscBool in

[petsc-users] Scalability problem using PETSc with local installed OpenMPI

2023-10-10 Thread Gong Yujie
Dear PETSc developers, I installed OpenMPI3 first and then installed PETSc with that mpi. Currently, I'm facing a scalability issue, in detail, I tested that using OpenMPI to calculate an addition of two distributed arrays and I get a good scalability. The problem is when I calculate the additi

[petsc-users] Can I use PETSc DMPlex to output the surface mesh?

2022-11-02 Thread Gong Yujie
Dear development team, Now I'm doing a project about visualization. In the process of visualization, the surface mesh is preferred. I have two questions about the DMPlex mesh. 1. Can I output the 3D volume mesh in DMPlex as a .obj or .fbx file? Both these two meshes are just surface mesh.

[petsc-users] DMPlex adding boundary without PETSc discretization

2022-10-20 Thread Gong Yujie
Dear development team, I'm trying to write a code to solve a partial differential equation. I didn't use PETSc's discretization. I have a question about the implementation of the boundary condition (Dirichlet boundary condition). When implementing the Dirichlet boundary condition. I need to set

[petsc-users] Vector field ordering question

2022-10-05 Thread Gong Yujie
Dear development team, I'm trying to write a code to deal with a multi-field problem. Currently I find that the vector ordering for the field is (a1,a2,a3,b1,b2,b3), here assume a1,a2,a3 belongs to one field and bs for another field. Can I get a point-block ordering for the unknowns as (a1,b1,a

[petsc-users] Question about the performance of KSP solver

2022-02-27 Thread Gong Yujie
Hi, I'm using the GMRES with ASM preconditioner with sub-domain solver ILU(2) to solve an elasticity problem. First, I use 16 cores to test the computation time, then use 32 cores to run the same code with the same parameters. But I just get about 10% speed up. From the log file I found that t

[petsc-users] Question about DMPlex for parallel computing

2021-10-17 Thread Gong Yujie
Hi, I'm learning to use DMPlex to write a parallel program. I've tried to write a sequential code earlier successfully, but when to write a parallel code, there are many things different. There are some questions I'm curious about. 1. Are the functions as DMPlexCreateGmshFromFile() and othe