MCPcopy Create free account
hub / github.com/IBAMR/IBAMR / deallocateSolverState

Method deallocateSolverState

src/IB/CIBSaddlePointSolver.cpp:543–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541} // initializeSolverState
542
543void
544CIBSaddlePointSolver::deallocateSolverState()
545{
546 if (!d_is_initialized) return;
547
548 IBTK_TIMER_START(t_deallocate_solver_state);
549
550 // Deallocate the operator and preconditioner states only if we are not
551 // re-initializing the solver.
552 if (!d_reinitializing_solver)
553 {
554 d_A->deallocateOperatorState();
555 d_LInv->deallocateSolverState();
556 d_mob_solver->deallocateSolverState();
557 }
558
559 // Delete the solution and RHS vectors.
560 VecDestroy(&d_petsc_b);
561 d_petsc_x = nullptr;
562 d_petsc_b = nullptr;
563
564 // Destroy the KSP solver.
565 destroyKSP();
566
567 // Deallocate the interpolation operators.
568 d_hier_bdry_fill->deallocateOperatorState();
569 d_hier_bdry_fill.setNull();
570 d_transaction_comps.clear();
571 d_fill_pattern.setNull();
572
573 // Indicate that the solver is NOT initialized.
574 d_is_initialized = false;
575
576 IBTK_TIMER_STOP(t_deallocate_solver_state);
577 return;
578} // deallocateSolverState
579
580/////////////////////////////// PRIVATE //////////////////////////////////////
581

Callers

nothing calls this directly

Calls 3

setNullMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected