History log of /petsc/src/ts/interface/ts.c (Results 126 – 150 of 1763)
Revision Date Author Comments
# 735e9a4a 13-Jan-2024 Satish Balay <balay@mcs.anl.gov>

Merge branch 'stefanozampini/fix-docs' into 'release'

fix docs

See merge request petsc/petsc!7181


# 346ce620 08-Jan-2024 Stefano Zampini <stefano.zampini@gmail.com>

TS: fix docs


# a144a63f 09-Jan-2024 Stefano Zampini <stefano.zampini@gmail.com>

TSSetFunctionDomainError: fix docs


# bff66efa 15-Dec-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'ilya-fursov/ts-fixevent2' into 'main'

TSEvent: refactor and fix bugs, add TSSetPostEventStep()

See merge request petsc/petsc!6752


# ca4445c7 20-Jul-2023 Ilya Fursov <ilya.foursov.7bd@gmail.com>

TSEvent: refactor and fix bugs, add TSSetPostEventStep()

Refactor the core algorithm for resolution of events: TSEventHandler()
and the helper functions, fixing the existing bugs.

Chang

TSEvent: refactor and fix bugs, add TSSetPostEventStep()

Refactor the core algorithm for resolution of events: TSEventHandler()
and the helper functions, fixing the existing bugs.

Change event indicator functions from PetscScalar to PetscReal.
Change the API of TSSetEventHandler(): in the user `indicator()` callback,
the 'fvalue' argument type changed from PetscScalar[] to PetscReal[].

Add TSSetPostEventStep(), deprecate TSSetPostEventIntervalStep().
Deprecate option -ts_event_post_eventinterval_step.

Fix bugs in interaction of TSEvent with tspan.
Add six new test examples.

Below are the examples of bugs fixed by this patch.
The source codes (ex3.c, ex3span.c, ex4.c, ex5.c) can be found
in src/ts/event/tests. To run them with the older Petsc versions,
one would need to comment out "#define NEW_VERSION".
Behaviour for three library versions is reported below:
* ORIG: current Petsc version, before the proposed patch.
* 6688: independently of the proposed patch, Merge Request 6688 was
developed, which fixed some bugs with zero-crossing directions.
* NEW : the proposed patch.

./ex3 -ts_monitor -ts_event_monitor -ts_view -ts_type beuler \
-ts_adapt_type basic -flg -V 1e9 -ts_adapt_dt_min 1e-6 -change5 1 -dir 1
* ORIG: fails to resolve 5 out of 6 events, and resolves 23 incorrect events.
* 6688: fails to exit the TSEvent iteration via the step size (bracket size)
criterion.
* NEW : ok, resolves all 6 events.

./ex4 -ts_adapt_type basic -ts_type rk -ts_dt 0.25 -ts_event_tol 1e-8 \
-dir 0 -ts_adapt_dt_min 1e-10 -ts_view -ts_monitor -ts_event_monitor
* ORIG: only reaches t = 0.0300236 after 10000 TS steps.
* 6688: only reaches t = 0.0300236 after 10000 TS steps.
* NEW : ok, reaches the final time t = 4.0 after 96 TS steps, resolving
all 16 events.

./ex5 -ts_monitor -ts_event_monitor -ts_type rk -ts_adapt_type basic \
-ts_view -ts_dt 0.25 -flg -dir 0
* ORIG: only reaches t = 4.0 after 10000 TS steps, erroneously reports
event at t = 4.0 around 5000 times.
* 6688: only reaches t = 4.0 after 10000 TS steps.
* NEW : ok, reaches the final time t = 10.0 after 99 TS steps, resolving
all 34 events.

./ex5 -ts_monitor -ts_event_monitor -ts_type rk -ts_adapt_type basic \
-ts_view -ts_dt 0.25 -flg -dir 1
* ORIG: fails, starts taking negative time steps, no events are correctly
resolved.
* 6688: ok, but slower: 90 TS steps to resolve all 17 events.
* NEW : ok, and faster: 48 TS steps to resolve all 17 events.

./ex5 -ts_monitor -ts_event_monitor -ts_type rk -ts_adapt_type basic \
-ts_view -ts_dt 0.25 -flg -dir -1
* ORIG: fails, starts taking 'nan' time steps.
* 6688: mostly fails, only reaches t = 4.99993 after 10000 TS steps.
* NEW : ok, reaches the final time t = 10.0 after 74 TS steps, resolving
all 17 events.

The same run in parallel:
mpirun -n 2 ./ex5 -ts_monitor -ts_event_monitor -ts_type rk \
-ts_adapt_type basic -ts_view -ts_dt 0.25 -flg -dir -1
* ORIG: fails, starts taking negative time steps, exits with runtime error.
* 6688: mostly fails, only reaches t = 3, besides, the parallel run is not
consistent with the serial run (see above).
* NEW : ok, reaches the final time t = 10.0 after 74 TS steps, resolving
all 17 events.

./ex3span -ts_monitor -ts_event_monitor
* ORIG: (confused by events) misses tspan points: 4.02, 4.21, 4.98, 5.01,
5.21, 5.98, 6, 6.01, 6.02, 6.21, 6.99, 7.21, 8.01, 8.21, 9.01.
* 6688: (confused by events) misses tspan points: 4.02, 4.21, 4.98, 5.01,
5.21, 5.98, 6, 6.01, 6.02, 6.21, 6.99, 7.21, 8.01, 8.21, 9.01.
* NEW : ok.

./ex3span -ts_monitor -ts_event_monitor -ts_event_post_event_step 0.5
* ORIG: misses the majority of tspan points (except 0.01 and 0.21),
and also resolves the last event location at wrong time t = 9.21.
* 6688: misses the majority of tspan points (except 0.01 and 0.21),
and also resolves the last event location at wrong time t = 9.21.
* NEW : ok.

show more ...


# e6053022 02-Dec-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'barry/2023-11-21/fix-thread-safety-petscoptionsgetviewer' into 'main'

Fix PetscOptionsGetViewer() so it works in a thread-safe way

See merge request petsc/petsc!7047


# cd791dc2 21-Nov-2023 Barry Smith <bsmith@mcs.anl.gov>

Fix PetscOptionsGetViewer() so it works in a thread-safe way

When PetscOptionsGetViewer() returns, for example, PETSC_VIEWER_STDOUT_SELF the same object is shared
by all threads that call PetscOptio

Fix PetscOptionsGetViewer() so it works in a thread-safe way

When PetscOptionsGetViewer() returns, for example, PETSC_VIEWER_STDOUT_SELF the same object is shared
by all threads that call PetscOptionsGetViewer(). In the previous code PetscObjectReference() and
dereference (via PetscViewerDestroy() where called on the viewer by multiple threads after the viewer
was accessed thus corrupting the object.

This branch introduces a PetscOptionsRestoreViewer() that allows not doing the referencing and dereferencing
on persistant viewers, thus removing the specific race condition above.

Other possible solutions include

Use a lock on each PetscObjectReference/Dereference() just in case they are shared. Could be time consuming so one
could mark each object as either threadshared or independent and only do the locks on threadshared objects. This lowers
the cost but would require more extensive changes to PETSc infrastructure. And I do not know if this shared/not shared model
is what we need in the long run, though it might be.

show more ...


# 345114b4 09-Nov-2023 Satish Balay <balay@mcs.anl.gov>

Merge remote-tracking branch 'origin/release'


# 43de91f2 07-Nov-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'barry/2023-11-05/housekeep-some-manualpages/release' into 'release'

Some manual page housekeeping

See merge request petsc/petsc!6998


# 8847d985 05-Nov-2023 Barry Smith <bsmith@mcs.anl.gov>

Fixes for use of Calling Sequence of ... in the manual page


# 294d477b 31-Oct-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'release'


# 6ee5ebf2 31-Oct-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'barry/2023-10-27/fix-not-collective-lda/release' into 'release'

fix Not Collective listing in manual page for MatDenseSetLDA.

See merge request petsc/petsc!6972


# 8f14a041 27-Oct-2023 Barry Smith <bsmith@mcs.anl.gov>

Remove unneeded on in Collective statements and fix Collective over

Commit-type: documentation


# ad4c700a 04-Oct-2023 Satish Balay <balay@mcs.anl.gov>

Merge remote-tracking branch 'origin/release'


# 4c755a4e 04-Oct-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'jolivet/fix-typos' into 'release'

Fix typos

See merge request petsc/petsc!6908


# baca6076 04-Oct-2023 Pierre Jolivet <pierre@joliv.et>

Fix typos


# 7752c31b 22-Sep-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'caidao22-main-patch-19448' into 'main'

Update ts.c

See merge request petsc/petsc!6778


# 37c11d98 22-Sep-2023 Hong Zhang <hongzhang@anl.gov>

Update ts.c


# 28328812 17-Aug-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'stefanozampini/ts-dirk' into 'main'

Diagonally Implicit Runge Kutta

See merge request petsc/petsc!6774


# 5dbbf88e 03-Aug-2023 Stefano Zampini <stefano.zampini@gmail.com>

TSSolve: fix bug when u is NULL and interpolate is requested


# 186cd71f 24-Jul-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'jacobf/2023-07-19/lint-apply-ts' into 'main'

Manual linter fixes: ts

See merge request petsc/petsc!6736


# 42747ad1 21-Jul-2023 Jacob Faibussowitsch <jacob.fai@gmail.com>

... and apply it


# 14d0ab18 19-Jul-2023 Jacob Faibussowitsch <jacob.fai@gmail.com>

Manual linter fixes: ts


# cfd92c66 22-Jul-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'tisaac/feature-type-generic-petsc-valid-pointer' into 'main'

Implement a type generic PetscValidPointer

See merge request petsc/petsc!6693


# 292bffcb 19-Jul-2023 Toby Isaac <toby.isaac@gmail.com>

Fix PetscAssertPointer that should be PetscValidHeaderSpecific


12345678910>>...71