Skip to content

Commit

Permalink
Merge pull request #129 from eslickj/main
Browse files Browse the repository at this point in the history
Fix check for time variable existance in PETSc wrapper.
  • Loading branch information
John Eslick committed Dec 15, 2021
2 parents bece567 + 3d60514 commit 4e70269
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions petsc/fg_dae.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PetscErrorCode FormDAEFunction(TS ts, PetscReal t, Vec x, Vec xdot, Vec f, void
real x_asl[n_var];

/* Take values from petsc vectors and put into ASL vector */
if(sol_ctx->dae_map_t > 0) x_asl[sol_ctx->dae_map_t] = t;
if(sol_ctx->dae_map_t >= 0) x_asl[sol_ctx->dae_map_t] = t;
ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr);
ierr = VecGetArrayRead(xdot, &xxdot); CHKERRQ(ierr);
for(i=0;i<sol_ctx->n_var_state;++i){
Expand Down Expand Up @@ -42,7 +42,7 @@ PetscErrorCode FormDAEJacobian(

/* Compute Jacobian entries */
/* Take values from petsc vectors and put into ASL vector */
if(sol_ctx->dae_map_t > 0) x_asl[sol_ctx->dae_map_t] = t;
if(sol_ctx->dae_map_t >= 0) x_asl[sol_ctx->dae_map_t] = t;
ierr = VecGetArrayRead(x, &xx); CHKERRQ(ierr);
ierr = VecGetArrayRead(xdot, &xxdot); CHKERRQ(ierr);
for(i=0;i<sol_ctx->n_var_state;++i){
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.1 (DATE) (PLAT)
2.5.2 (DATE) (PLAT)

0 comments on commit 4e70269

Please sign in to comment.