Destroy solver.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver_object), | intent(inout) | :: | self | Solver object. |
elemental subroutine destroy(self)
!< Destroy solver.
class(solver_object), intent(inout) :: self !< Solver object.
type(solver_object) :: fresh !< Fresh instance of solver object.
self = fresh
if (allocated(self%time_integrator)) deallocate(self%time_integrator)
if (allocated(self%convective_operator)) deallocate(self%convective_operator)
if (allocated(self%diffusive_operator)) deallocate(self%diffusive_operator)
if (allocated(self%turbulence_model)) deallocate(self%turbulence_model)
endsubroutine destroy