-
Notifications
You must be signed in to change notification settings - Fork 25
Lattice offset and disable offset #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Lattice offset and disable offset #164
Conversation
Added in the BEAVRS model with the D-bank partially inserted. Also fixed a flaw in the geometry where the outermost cell was defined such that there could be a rare particle lost between it and the geometry boundary.
It is desirable for input to allow some universes not to be offset as might be done in a lattice. ALternatively, it may be preferable to evaluate their locations in the global reference frame. The former has been done by allowing lattice universes to have an 'offset map', the latter has been done by allowing a chosen universe to be evaluated in global coordinates. This allowed a fix to the BEAVRS inputs to correctly position the instrumentation tubes. There seems to be a dictionary error with the offsetMap. Occasionally it is not recognised as an integer list. This has prevented the creation of a new test in latUniverse. This has been commented out until the dictionary has been fixed.
|
Sorry, also forgot to modify documentation... Will do soon. |
Added description of offsets in latUniverse and global in universe to docs. Also added an example of the offsetMap in the form of a 2D CROCUS input.
valeriaRaffuzzi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple of comments, but in general it looks good!
The lattice test failing worries me though.. is it possible that the interface breaks because it can't distinguish between bool and int arrays? Worth checking as this might be a problem also in actual input files.
| call fatalError(Here,'Entry under keyword ' // keyword // ' has non-logical values (not 0 or 1).') | ||
| else | ||
| do idx = 1, N | ||
| value(idx) = tempInt(idx) == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a pointer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so because tempInt will be destroyed at the end of the subroutine, but I might be doing other bad things here. My Fortran isn't good enough for this... I think in other cases we equate value (pointer) with an allocatable array which I think is allowable? I might be doing something bad in this case. Wisdom from @Mikolaj-A-Kowalski would be appreciated...
| & & | ||
| & 1 2 3 & | ||
| & 4 5 6); " | ||
| !& offsetMap ( 1 1 1 & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be confused with a boolArray?
This might happen also to a real input.
| if (allocated(self % offsetMap)) then | ||
| doOffset = self % offsetMap(coords % localID) == local | ||
| else | ||
| doOffset = self % offset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this user option. Before it was automated without any flag... why making it up to the user in the generic case that applies to all cells? Could that just be the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is automated with a getOrDefault to apply offsets, and applying offsets is the default. This option allows universes to be specified which don't offset their components, e.g., instrumentation tubes, let's call it lattice 1. This universe can then be placed in a regular lattice (with default settings), lattice 2, allowing for an irregular placement of instrumentation tubes without having to make bespoke elements of lattice 2. Does this answer the question?
Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com>
|
I am also concerned about the dictionaries... I will await the dictionary master's comments because I could believe I have done something silly there. |
It is desirable for input to allow some universes not to be offset as might be done in a lattice. Alternatively, it may be preferable to
evaluate their locations in the global reference frame. The former has been done by allowing lattice universes to have an 'offset map', the latter has been done by allowing a chosen universe to be evaluated in global coordinates. The former allows BWR assemblies with different sized pins or geometries like CROCUS. The latter has allowed a fix to the BEAVRS inputs to correctly position the instrumentation tubes.
There seems to be a dictionary error with the offsetMap. Occasionally it is not recognised as an integer list. This has prevented the creation of a new test in latUniverse. This has been commented out until the dictionary has been fixed.
In making these changes at some point I thought dictionary could do with a bool list. In the end, I didn't use it, but it does appear to work. I need to add a test for it though!