Skip to content

Refactor boundary flags - #2

Merged
mrhardman merged 3 commits into
mainfrom
refactor-boundary-flags
Apr 1, 2026
Merged

Refactor boundary flags#2
mrhardman merged 3 commits into
mainfrom
refactor-boundary-flags

Conversation

@mrhardman

Copy link
Copy Markdown
Collaborator

This PR refactors the flags controlling boundary conditions, by adding

    impose_lower_boundary_condition::Bool=true,
    impose_upper_boundary_condition::Bool=true

permitting the user to include boundary points and also not impose a boundary condition there. This is useful in the case of cylindrical coordinates, where we may wish to define a coordinate on [0,L] and only impose boundary conditions at L. The previous implementation would require the use of points (0,L] to achieve the same outcome.

Use this feature on [0,L] by writing

radial = FiniteElementCoordinate("radial", ScalarCoordinateInputs(ngrid_radial,
                                nelement_radial,
                                0.0,Lradial,include_boundary_points),
                                weight_function=((r)-> 2.0*pi*r),
                                impose_lower_boundary_condition=false)

as compared to the option for (0,L] below.

 radial = FiniteElementCoordinate("radial", ScalarCoordinateInputs(ngrid_radial,
                                nelement_radial,
                                0.0,Lradial,exclude_lower_boundary_point),
                                weight_function=((r)-> 2.0*pi*r))

…oundary_condition` to permit cylindrical coordinates (r,z) where the r=0 is included on the grid but no boundary condition is imposed at r=0.
…igin, but no boundary condition is imposed there.
@mrhardman
mrhardman merged commit e1dec8a into main Apr 1, 2026
1 check passed
@mrhardman
mrhardman deleted the refactor-boundary-flags branch April 1, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant