Skip to content

Commit

Permalink
Merge pull request #1530 from ExtremeFLOW/bugfix/source_term_handler
Browse files Browse the repository at this point in the history
Appending a source term to a case with no source terms
  • Loading branch information
timfelle authored Oct 3, 2024
2 parents e54714a + 9babc9a commit 5aad601
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/source_terms/source_term_handler.f90
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ subroutine source_term_handler_add_source_term(this, source_term)

integer :: n_sources, i

n_sources = size(this%source_terms)
if(allocated(this%source_terms)) then
n_sources = size(this%source_terms)
else
n_sources = 0
endif

call move_alloc(this%source_terms, temp)
allocate(this%source_terms(n_sources + 1))

Expand Down

0 comments on commit 5aad601

Please sign in to comment.