I initially learned Petsc and am now trying to use FreeFem to call Petsc. However, when I attempted to use it to solve problems, I found that FreeFem offers very little documentation regarding Petsc-related functions (such as ChangeNumbering, SNESSolve, plotMPI, etc.) on the official website. The “Functions” section in the documentation only covers some basic functions, while the usage of other functions can only be explored blindly through examples. In Petsc’s official documentation,every function is well-explained.
Would it be possible to improve the related content on the FreeFem website? Perhaps I have missed some study materials. If there are relevant pages, could you please share the link with me?
Watching a YouTube series to find a signature and description for a function is quite… hard. Examples in the link to the tutorial have minimal comments. The PDF has the following description for ChangeNumbering:
ChangeNumbering(Mat,K[int]), without specifying what obligatory arguments are, and worse, in all examples the function is used with 3 parameters, for example: ChangeNumbering(T, w[], u, exchange = true, inverse = true);
Is there no other way to learn than to blind experimenting? I am currently trying to understand this thing from an example: TSSolve(T, funcJ, funcRes, wPETSc, sparams = "-ts_type beuler -ts_dt 0.1 -ts_max_time 100 -ts_exact_final_time interpolate -ts_max_snes_failures -1 -ts_view -pc_type lu -ts_adapt_type basic -ts_rtol 1e-3", monitor = funcM);
, that on the PETSc website has a highly different signature: PetscErrorCode TSSolve(TS ts, Vec u)
and it is really hard to even guess where to look for explanations
From the article you provided, I understand that w/wPETSc is the solution and funcJ is the j function provided to TSSetIJacobian. In the article, there is no explanation of what M or f are. In the example, it seems M is a vector of 1s while f is the stiffness matrix, which appears counterintuitive, so I think I am wrong. Do you know what these symbols mean?