Re: [petsc-users] Treatment of piecewise residual function in SNES

2020-05-06 Thread Yingjie Wu
ion, with a discontinuous derivative, > or a piecewise function which is itself discontinuous? > > Thanks, > > Matt > > On Tue, May 5, 2020 at 11:05 PM Yingjie Wu wrote: > >> Dear PETSc developers >> Hi, >> >> I have been using SNES to solve a nonlin

[petsc-users] Treatment of piecewise residual function in SNES

2020-05-05 Thread Yingjie Wu
Dear PETSc developers Hi, I have been using SNES to solve a nonlinear problem recently, but this nonlinear problem is different from the ordinary problem, in which its residual function is a piecewise function. I have the following questions during calculation: 1. As I am not very familiar

Re: [petsc-users] Problems about tolerances set in TS

2020-04-30 Thread Yingjie Wu
tings are correct or > if they are overwritten in some callback functions by mistake. > > Hong (Mr.) > > > On Apr 29, 2020, at 10:16 PM, Yingjie Wu wrote: > > > > Command: mpiexec -n 1 ./SGts -snes_fd -pc_type lu > -ts_erro

Re: [petsc-users] Problems about tolerances set in TS

2020-04-28 Thread Yingjie Wu
find out why the nonlinear solver does not converge > first. If you have a hand-written Jacobian, you can validate it with > -snes_test_jacobian 1 (for a small test case). > > Hong (Mr.) > > > On Apr 28, 2020, at 8:21 AM, Yingjie Wu wrote: > > > > Dear PETSc devel

[petsc-users] Problems about tolerances set in TS

2020-04-28 Thread Yingjie Wu
Dear PETSc developers Hi, I have recently used TS to solve nonlinear equations with time terms. since the convergence of my model is not very good, i would like to set to iterative fixed nonlinear steps per time step. If the problem does not meet the SNES convergence criteria after fixed number

Re: [petsc-users] Problem in using TS objects

2020-01-27 Thread Yingjie Wu
e previous switch "-snes_fd" still available for transient calculation? 3. For the new merge request you have mentioned, where should I get the information so as to get its new developments? Thanks again for your help. Yingjie Jed Brown 于2020年1月27日周一 下午9:54写道: > Yingjie Wu w

[petsc-users] Problem in using TS objects

2020-01-27 Thread Yingjie Wu
Dear PETSc developers Hi, Recently, I am using PETSc to write a one-dimensional hydrodynamics solver. At present, I use SNES object to complete the development of steady-state (excluding time term) program, and the result is very good. I want to continue with the dynamic solver, but have some

Re: [petsc-users] CMake error in PETSc

2019-12-09 Thread Yingjie Wu
ave attached a new CMakeList.txt for you to try. > >I uses the environmental variables PETSC_DIR and PETSC_ARCH to find the > configuration file AND use the compilers from the configuration file. It > works for me, please let me know if you have trouble. > >Barry > > >

Re: [petsc-users] CMake error in PETSc

2019-12-08 Thread Yingjie Wu
se) so we > can reproduce the problem and find a fix. > >Barry > > > > On Dec 8, 2019, at 10:06 PM, Yingjie Wu wrote: > > > > Hi, > > Thank you for your response. > > This problem has not been solved. I've been reporting errors in the > proces

Re: [petsc-users] CMake error in PETSc

2019-12-08 Thread Yingjie Wu
, Yingjie Matthew Knepley 于2019年12月6日周五 下午11:46写道: > It sounds like your C++ compiler is name mangling the symbol, but the > library has no mangling. > Why are you using C++. > > Thanks, > > Matt > > On Fri, Dec 6, 2019 at 10:44 AM Yingjie Wu wrote: > >

Re: [petsc-users] CMake error in PETSc

2019-12-06 Thread Yingjie Wu
e for target 'all' failed make: *** [all] Error 2 Thanks, Yingjie Jed Brown 于2019年12月6日周五 上午10:54写道: > Yingjie Wu writes: > > > I'm so sorry that I've ignored your previous advices. > > > > I added a global variable that seems works: > > > > > > expor

Re: [petsc-users] CMake error in PETSc

2019-12-05 Thread Yingjie Wu
that some of the options before running fit become unavailable: mpiexec -n 1 ./example01cmke -snes_view Options-snes _ view are not used and how should I solve this problem? Thank you for your response. Yingjie Yingjie Wu 于2019年12月5日周四 下午9:25写道: > Hi, > > I installed the lates

Re: [petsc-users] CMake error in PETSc

2019-12-05 Thread Yingjie Wu
Process name: [[6716,1],0] Exit code:127 -- Thanks, Yingjie Jed Brown 于2019年12月5日周四 下午1:17写道: > Yingjie Wu writes: > > > Hi, > > I tried to use PKG to find the library file of PETSc, but there were

Re: [petsc-users] CMake error in PETSc

2019-12-04 Thread Yingjie Wu
ile:83: recipe for target 'all' failed make: *** [all] Error 2 Thanks, Yingjie Jed Brown 于2019年12月5日周四 上午12:05写道: > Yingjie Wu writes: > > > Thank you for your response. > > > > I have two questions about using FindPkgConfig: > > > > > >1. Is

Re: [petsc-users] CMake error in PETSc

2019-12-04 Thread Yingjie Wu
:31写道: > Yingjie Wu writes: > > > Dear Petsc developers > > Hi, > > Because I use some external library files, I want to compile the PETSc > > program with CMake. I follow the library search program > > > https://github.com/CoolProp/CoolProp/blob/b

Re: [petsc-users] CMake error in PETSc

2019-12-04 Thread Yingjie Wu
Hi, I feel very sorry because I sent the wrong site. I fork the module: https://github.com/jedbrown/cmake-modules Thanks, Yingjie Yingjie Wu 于2019年12月4日周三 下午11:14写道: > Dear Petsc developers > Hi, > Because I use some external library files, I want to compile the PETSc > program w

[petsc-users] CMake error in PETSc

2019-12-04 Thread Yingjie Wu
Dear Petsc developers Hi, Because I use some external library files, I want to compile the PETSc program with CMake. I follow the library search program https://github.com/CoolProp/CoolProp/blob/b493de51a44078e4f5bbb8712e89305fd91f8b85/CMakeLists.txt recommended on GitHub. And wrote a

[petsc-users] Question about changing time step during calculation

2019-11-17 Thread Yingjie Wu via petsc-users
Dear Petsc developers Hi, Recently I am trying to using TS to solve time-dependent nonlinear PDEs. In my program, next time step is based on the results of previous time step. I want to add this control in TSmonitor() to change time step length in calculation. I referred to user guide but I didn't

[petsc-users] Problem about Scaling

2019-09-24 Thread Yingjie Wu via petsc-users
Respected Petsc developers Hi, I am currently using SNES to solve some non-linear PDEs. The model is a two-dimensional X-Y geometry. Because the magnitude of different physical variables is too large, it is difficult to find the direction in Krylov subspace, and the residual descends very slowly

Re: [petsc-users] Problems about GMRES restart and Scaling

2019-03-21 Thread Yingjie Wu via petsc-users
is actually a lot like my example, setting up: -da_grid_x 200 -da_grid_y 200 -snes_mf There will also be a residual rise in step 1290 of KSP But not all examples will produce this phenomenon. Thanks, Yingjie Smith, Barry F. 于2019年3月21日周四 上午1:18写道: > > > > On Mar 20, 2019, at 5:52 AM

Re: [petsc-users] Problems about GMRES restart and Scaling

2019-03-20 Thread Yingjie Wu via petsc-users
with expectations. Thanks, Yingjie Matthew Knepley 于2019年3月20日周三 下午8:00写道: > On Wed, Mar 20, 2019 at 6:53 AM Yingjie Wu via petsc-users < > petsc-users@mcs.anl.gov> wrote: > >> Dear PETSc developers: >> Hi, >> Recently, I used PETSc to solve a non-linear P

[petsc-users] Problems about SNES

2019-01-16 Thread Yingjie Wu via petsc-users
Dear PETSc developers: Hi, During the process of testing the program, I found some questions about SNES. These are some basic questions that I have overlooked. Please help me to answer them. 1. Because my program uses - snes_mf_operator, there is no Jacobian matrix. Linear and non-linear step

Re: [petsc-users] Problems about Picard and NolinearGS

2019-01-04 Thread Yingjie Wu via petsc-users
am very interested in quasi-Newton method, which may not be well understood at the moment. I look forward to your reply. Thanks, Yingjie Matthew Knepley 于2019年1月3日周四 上午8:36写道: > On Thu, Jan 3, 2019 at 7:36 AM Yingjie Wu via petsc-users < > petsc-users@mcs.anl.gov> wrote: > >

Re: [petsc-users] Problems about Picard and NolinearGS

2018-12-26 Thread Yingjie Wu via petsc-users
> On Dec 26, 2018, at 7:48 AM, Yingjie Wu via petsc-users < > petsc-users@mcs.anl.gov> wrote: > > > > Dear Petsc developers: > > Hi, > > 1. I tried to use the Picard solver in Petsc, but the program didn't > converge. My program is still a thermal program that co

[petsc-users] Problems about Picard and NolinearGS

2018-12-26 Thread Yingjie Wu via petsc-users
Dear Petsc developers: Hi, 1. I tried to use the Picard solver in Petsc, but the program didn't converge. My program is still a thermal program that contains multiple physical fields, and is a PDEs' problem. The error message is as follows. The reason I use Picard is that it can guarantee

[petsc-users] Problems about parallel version in SNES_MF

2018-12-25 Thread Yingjie Wu via petsc-users
Dear Petsc developers: Hi, I am currently using Petsc to solve a two-dimensional system of non-linear PDEs, which is a thermal problem, including pressure field, temperature field and velocity field. Since it is not easy to construct Jacobian matrix explicitly, I adopt snes_mf method and provide a

[petsc-users] How to fix max linear steps in SNES

2018-11-08 Thread Yingjie Wu via petsc-users
Dear Petsc developer: Hi, I recently debugged my program, which is a two-dimensional nonlinear PDEs problem, and solved by SNES. I find that the residual drop in KSP is slow. I want to fix the number of steps in the linear step, because I can not choose a suitable ksp_rtol. I use the command:

Re: [petsc-users] Problems about Assemble DMComposite Precondition Matrix

2018-11-05 Thread Yingjie Wu via petsc-users
ark > > On Mon, Nov 5, 2018 at 10:00 AM Yingjie Wu via petsc-users < > petsc-users@mcs.anl.gov> wrote: > >> Dear Petsc developer: >> Hi, >> I have recently studied the preconditioner of the program, and some >> problems have arisen. Please help me to solve the

Re: [petsc-users] Problems about Compiling Multifile Program

2018-10-24 Thread Yingjie Wu
> > On Wed, 24 Oct 2018, Yingjie Wu wrote: > > > Thank you very much for your reply. > > > > Because the files I added are written in c++, including definitions of > > classes and functions. I encountered a mistake when I used your method. > > myprogram: c

Re: [petsc-users] Problems about Compiling Multifile Program

2018-10-24 Thread Yingjie Wu
is : unknown type name 'class' It seems that I did not compile using the c++ compiler. How should I set it up so that it can compile successfully? Thanks, Yingjie Matthew Knepley 于2018年10月24日周三 上午1:46写道: > On Tue, Oct 23, 2018 at 11:37 AM Yingjie Wu wrote: > >> Dear Petsc deve

[petsc-users] Problems about Compiling Multifile Program

2018-10-23 Thread Yingjie Wu
Dear Petsc developer: Hi, Thank you very much for your continuous help, I recently encountered some difficulties in developing programs on Petsc. 1. I want to use my class definition (class1. h) and class functions (class1. cpp) files in my Petsc program (myprogram. c) and compile my program. I

Re: [petsc-users] Some Problems in Modifying Parallel Programs

2018-10-15 Thread Yingjie Wu
15, 2018 at 11:13 AM Yingjie Wu wrote: > >> Thank you very much, Matt. >> >> My problem is actually a two-dimensional problem, and the matrix in my >> binary file is actually a two-dimensional array, each point corresponding >> to a value on the two-dimensional

Re: [petsc-users] Some Problems in Modifying Parallel Programs

2018-10-15 Thread Yingjie Wu
) Thanks, Yingjie Matthew Knepley 于2018年10月15日周一 下午10:52写道: > On Mon, Oct 15, 2018 at 10:42 AM Yingjie Wu wrote: > >> Dear Petsc developer: >> Hi, >> Thank you very much for your previous reply. >> I recently wanted to modify my program to parallel version, an

[petsc-users] Some Problems in Modifying Parallel Programs

2018-10-15 Thread Yingjie Wu
Dear Petsc developer: Hi, Thank you very much for your previous reply. I recently wanted to modify my program to parallel version, and encountered some problems in modifying it. 1. There are functions (read matrix) in the program that reads files,will they affect my parallelism? The codes are as

[petsc-users] Problems about Matrix-Free and DM object

2018-10-11 Thread Yingjie Wu
Dear Petsc developer: Hi, Thank you very much for your previous reply. I feel that I have learned a lot about the matrix-free method. I was studying the example /src/snes/example/tutorials/ex28.c recently. One of its tests is as follows: -u_da_grid_x 20 -snes_converged_reason -snes_monitor_short

Re: [petsc-users] Problems about Block Jocabi and Matrix-Free Method in SNES

2018-10-10 Thread Yingjie Wu
really want to learn something about matrix-free method from the examples, and I hope to get your reply. Thanks, Yingjie Matthew Knepley 于2018年10月9日周二 下午11:34写道: > On Mon, Oct 8, 2018 at 11:33 PM Yingjie Wu wrote: > >> Dear Petsc developer: >> Hi, >> >> I've been st

[petsc-users] Problems about Block Jocabi and Matrix-Free Method in SNES

2018-10-08 Thread Yingjie Wu
Dear Petsc developer: Hi, I've been studying Petsc recently about Precontioner and Metrix-Free, and I have some questions that puzzle me. 1. I want to test block Jacobi preconditioner, so I chose /snes/example/tutorial/ex3.c as an example. According to the reference in the example, the input

Re: [petsc-users] Implementation of Power Iteration method in PETSc

2018-09-26 Thread Yingjie Wu
; http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex34.c.html > > The motivation of the algorithm is also for neutron calculations (a > moose-based application). > > Fande, > > On Wed, Sep 26, 2018 at 10:02 AM Yingjie Wu wrote: > >> Dear Petsc develop

[petsc-users] Implementation of Power Iteration method in PETSc

2018-09-26 Thread Yingjie Wu
Dear Petsc developer: Hi, Thank you very much for your previous reply, they really helped me a lot. I've been doing neutron calculations recently, and I want to use the power Iteration method to calculate the neutron flux, essentially to solve linear equations, but after each solution is done,

[petsc-users] Problem about DIVERGED_FUNCTION_COUNT

2018-09-19 Thread Yingjie Wu
Dear Petsc developer: Hi, Thank you very much for your previous reply . I recently wrote an example of neutron diffusion, which shows that the nonlinear residuals are gradually decreasing, but the program terminates in the tenth step of the nonlinear step.The program output information is as

[petsc-users] Problems ablout setting up variables and SNES

2018-09-17 Thread Yingjie Wu
Dear Petsc developer: Hi, Thank you very much for your previous reply, recently I encountered some problems in the implementation of the program. 1. Previously I used DMDA to create distributed variables (Variables are different in each grids). Now I want to add a single variable (independent of

[petsc-users] Approximation of matrix vector product by finite difference method

2018-09-07 Thread Yingjie Wu
: > On Thu, Sep 6, 2018 at 4:47 AM Yingjie Wu wrote: > >> Dear Petsc developer: >> Hi, >> Thank you for your previous help. >> I recently modeled on PETSc's SNES example and wrote a computer program >> myself. This program is mainly for solving nonlinea

[petsc-users] Questions about residual function can't be reduced

2018-09-06 Thread Yingjie Wu
Dear Petsc developer: Hi, Thank you for your previous help. I recently modeled on PETSc's SNES example and wrote a computer program myself. This program is mainly for solving nonlinear equations of thermal hydraulics. ∇·(λ∇T) - ∇_y(ρ*Cp*u) - T_source = 0 w*ρ*u = ρg - ∇_y(P) ∇·( 1/w * ∇P )

[petsc-users] Questions about x-window and matlab engine in PETSc

2018-08-30 Thread Yingjie Wu
Dear PETSc developer, Hi, Thank you very much for helping me solve the problem before. Recently, I reinstalled my system and reinstalled PETSc and found the following problems: 1. when I ran the example src/vec/vec/example/tutorial/ex3, there was a error: [0] PETSC ERROR: PETSc installed without

[petsc-users] Question about I/O in PETSc

2018-08-25 Thread Yingjie Wu
Dear PETSc developer: Hello, I am a student of nuclear energy science from Tsinghua University. I want to do some work of neutron numerical simulation based on PETSc. At present, some examples of learning and testing PETSc have the following questions: 1. How to input data to PETSc conveniently?