mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge branch 'master' of github.com:mit-crpg/openmc
This commit is contained in:
commit
8ead123486
2 changed files with 8 additions and 4 deletions
|
|
@ -78,9 +78,13 @@ contains
|
|||
cmfd%egrid = (/0.0_8,20.0_8/)
|
||||
cmfd % indices(4) = 1 ! one energy group
|
||||
end if
|
||||
|
||||
|
||||
! set global albedo
|
||||
cmfd % albedo = mesh_ % albedo
|
||||
if (associated(mesh_ % albedo)) then
|
||||
cmfd % albedo = mesh_ % albedo
|
||||
else
|
||||
cmfd % albedo = (/1.0, 1.0, 1.0, 1.0, 1.0, 1.0/)
|
||||
end if
|
||||
|
||||
! get acceleration map
|
||||
if (associated(mesh_ % map)) then
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ contains
|
|||
call MatGetRow(ctx%loss%M, irow, ncols, cols, vals, ierr)
|
||||
|
||||
! set that row to Jacobian matrix
|
||||
call MatSetValues(jac_prec, 1, irow, ncols, cols(1:ncols), vals, &
|
||||
call MatSetValues(jac_prec, 1, (/irow/), ncols, cols(1:ncols), vals, &
|
||||
INSERT_VALUES, ierr)
|
||||
|
||||
! restore the row
|
||||
|
|
@ -283,7 +283,7 @@ contains
|
|||
! set values in last row of matrix
|
||||
if (rank == n_procs_cmfd - 1) then
|
||||
phi_tmp = -phi_tmp ! negate the transpose
|
||||
call MatSetValues(jac_prec, 1, n, n, (/(k,k=0,n-1)/), phi_tmp, &
|
||||
call MatSetValues(jac_prec, 1, (/n/), n, (/(k,k=0,n-1)/), phi_tmp, &
|
||||
INSERT_VALUES, ierr)
|
||||
call MatSetValue(jac_prec, n, n, ONE, INSERT_VALUES, ierr)
|
||||
end if
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue