Skip to content

Commit

Permalink
Merge pull request #493 from feathern/typos
Browse files Browse the repository at this point in the history
Code Cleanup for recent PRs
  • Loading branch information
feathern authored Dec 5, 2023
2 parents 7e4a084 + 7b2295e commit fe252e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
27 changes: 13 additions & 14 deletions src/Physics/Initial_Conditions.F90
Original file line number Diff line number Diff line change
Expand Up @@ -636,34 +636,33 @@ subroutine magnetic_file_init()

end subroutine magnetic_file_init

!NICK
subroutine add_to_field(field_index, field_file)
Subroutine Add_To_Field(field_index, field_file)
! initialize magnetic variables from generic input files
Implicit None
Integer, Intent(In) :: field_index
Character*120, Intent(In) :: field_file
Integer :: fcount(3,2)
Type(SphericalBuffer) :: tempfield, tempfield2
fcount(:,:) = 1
call tempfield%init(field_count = fcount, config = 'p1b')
call tempfield%construct('p1b')
call tempfield2%init(field_count = fcount, config = 'p1b')
call tempfield2%construct('p1b')
Call tempfield%init(field_count = fcount, config = 'p1b')
Call tempfield%construct('p1b')
Call tempfield2%init(field_count = fcount, config = 'p1b')
Call tempfield2%construct('p1b')

call get_rhs(field_index,tempfield2%p1b(:,:,:,1))
Call get_rhs(field_index,tempfield2%p1b(:,:,:,1))

if (trim(field_file) .ne. '__nothing__') then
call read_input(field_file, 1, tempfield)
If (trim(field_file) .ne. '__nothing__') Then
Call read_input(field_file, 1, tempfield)

tempfield%p1b = tempfield%p1b+tempfield2%p1b
call set_rhs(field_index, tempfield%p1b(:,:,:,1))
end if
Call set_rhs(field_index, tempfield%p1b(:,:,:,1))
End If


call tempfield%deconstruct('p1b')
call tempfield2%deconstruct('p1b')
Call tempfield%deconstruct('p1b')
Call tempfield2%deconstruct('p1b')

end subroutine add_to_field
End Subroutine add_to_field

!//////////////////////////////////////////////////////////////////////////////////
! Diffusion Init (for linear solve development)
Expand Down
2 changes: 0 additions & 2 deletions src/Physics/PDE_Coefficients.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1287,12 +1287,10 @@ Subroutine Read_Custom_Reference_File(filename)
Read(15) input_constants(1:10)
cset(11) = 1 ! treat this as if c_11 = 1 was specified in the custom reference file
input_constants(11) = 1.0d0
If (my_rank .eq. 0) Call stdout%print('got here')
Else
Read(15) cset(1:n_ra_constants)
Read(15) fset(1:n_ra_functions)
Read(15) input_constants(1:n_ra_constants)
Call stdout%print('actualy got here')
Endif

! Cset(i) is 1 if a constant(i) was set; it is 0 otherwise.
Expand Down

0 comments on commit fe252e7

Please sign in to comment.