Skip to content

Hexagon and truncated hexagon#205

Open
ChasingNeutrons wants to merge 13 commits into
CambridgeNuclear:mainfrom
ChasingNeutrons:truncHex
Open

Hexagon and truncated hexagon#205
ChasingNeutrons wants to merge 13 commits into
CambridgeNuclear:mainfrom
ChasingNeutrons:truncHex

Conversation

@ChasingNeutrons

Copy link
Copy Markdown
Collaborator

I've developed an axis-parallel hexagon. It is regular in all directions, i.e., has the same width. Its main limitation is that it can't handle reflective boundaries. This is due to the difficulty of handling reflective boundaries by transform. However, I imagine for most cases of interest where this is used as a boundary that periodic boundaries will be sufficient. I have added unit tests and modified the documentation. I have also added a truncated hexagon, which does allow any boundary conditions along the perpendicular direction.

@valeriaRaffuzzi valeriaRaffuzzi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good! I am approving it despite some comments because they are all related to the documentation and comments in the code, rather than changes or suggestions to the code itself. So feel free to merge directly after fixing the comments :)

Thanks for the implementation!

Comment thread docs/Input Manual.rst
xY for the three types, respectively) while the first axis is perpendicular to the flat surfaces. Likewise,
choosing ``2`` is flat-topped. Can have periodic and vacuum boundaries, but not reflective.

- origin: (x y z) position of the centre of the hexagon. [cm]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add: 'the entry in the axis along the cylinder direction is ignored'.

!!
!! Errors:
!! fatalError for -ve id or meaningful halfspace.
!! fatalError for unrecognised oritnetation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo orientation

!! See surface_inter for more details
!!
!! Errors:
!! fatalError for -ve id or meaningful halfspace.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does meaningful halfspace mean?


! Load id
call dict % get(id,'id')
if (id <= 0) call fatalError(Here, 'ID must be <= 0. Is: '//numToChar(id))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type ID must be >0

!! Works by:
!! 1) Determine a plane in which direction is the closest
!! 2) Use normal for this plane and project distance
!! 3) Determinie halfspace based on sign of the projection

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: determine

Comment on lines +125 to +126
!! fatalError for -ve id or meaningful halfspace.
!! fatalError for unrecognised oritnetation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above:
meaningful halfspace?
orientation*

!! Works by:
!! 1) Determine a plane in which direction is the closest
!! 2) Use normal for this plane and project distance
!! 3) Determinie halfspace based on sign of the projection

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Determine

real(defReal), dimension(2) :: rl, e, v1, v2, n, nBest
character(100), parameter :: Here = 'explicitBC (truncHexagon_class.f90)'

! Get position in the plane & direction

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove & direction

real(defReal) :: hw
integer(shortInt) :: orient

! Select type of squareCylinder and axis

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: type of hexagon

Comment on lines +347 to +352
! Reflective
!BC = REFLECTIVE_BC
!call this % surf % setBC(BC)

! Shift left by one lattice starting just off centre
!r([ax, p1, p2]) = [ZERO, -5.5_defReal, 1.5_defReal]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these commented lines leftover from squareCylinder, or is the test actually correct and just waiting for the implementation to be uncommented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants