| setupts.c (9d1d9d8d83bc5cf27c18b81dde12f18fd790c885) | setupts.c (1a7db67c7e812fef07f7c4243fa9e262be8c8a60) |
|---|---|
| 1// Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8/// @file --- 385 unchanged lines hidden (view full) --- 394PetscErrorCode TSSolve_NS(DM dm, User user, AppCtx app_ctx, Physics phys, Vec *Q, PetscScalar *f_time, TS *ts) { 395 MPI_Comm comm = user->comm; 396 TSAdapt adapt; 397 PetscScalar final_time; 398 399 PetscFunctionBeginUser; 400 PetscCall(TSCreate(comm, ts)); 401 PetscCall(TSSetDM(*ts, dm)); | 1// Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8/// @file --- 385 unchanged lines hidden (view full) --- 394PetscErrorCode TSSolve_NS(DM dm, User user, AppCtx app_ctx, Physics phys, Vec *Q, PetscScalar *f_time, TS *ts) { 395 MPI_Comm comm = user->comm; 396 TSAdapt adapt; 397 PetscScalar final_time; 398 399 PetscFunctionBeginUser; 400 PetscCall(TSCreate(comm, ts)); 401 PetscCall(TSSetDM(*ts, dm)); |
| 402 PetscCall(TSSetApplicationContext(*ts, user)); |
|
| 402 if (phys->implicit) { 403 PetscCall(TSSetType(*ts, TSBDF)); 404 if (user->op_ifunction) { 405 PetscCall(TSSetIFunction(*ts, NULL, IFunction_NS, &user)); 406 } else { // Implicit integrators can fall back to using an RHSFunction 407 PetscCall(TSSetRHSFunction(*ts, NULL, RHS_NS, &user)); 408 } 409 if (user->op_ijacobian) { --- 103 unchanged lines hidden --- | 403 if (phys->implicit) { 404 PetscCall(TSSetType(*ts, TSBDF)); 405 if (user->op_ifunction) { 406 PetscCall(TSSetIFunction(*ts, NULL, IFunction_NS, &user)); 407 } else { // Implicit integrators can fall back to using an RHSFunction 408 PetscCall(TSSetRHSFunction(*ts, NULL, RHS_NS, &user)); 409 } 410 if (user->op_ijacobian) { --- 103 unchanged lines hidden --- |