|
MADNESS 0.10.1
|
This class is used to specify boundary conditions for all operators. More...
#include <bc.h>
Public Member Functions | |
| BoundaryConditions (BCType code=BC_FREE) | |
| Constructor. Default boundary condition set to free space. | |
| BoundaryConditions (const BoundaryConditions< NDIM > &other) | |
| Copy constructor is deep. | |
| template<std::size_t N = NDIM, typename = std::enable_if_t<N!=0>> | |
| BoundaryConditions (const std::array< BCType, N *2 > &bc_per_boundary) | |
| Constructor sets boundary condition per boundary. | |
| template<std::size_t N = NDIM, typename = std::enable_if_t<N!=0>> | |
| BoundaryConditions (const std::array< BCType, N > &bc_per_axis) | |
| Constructor sets boundary condition per axis. | |
| template<std::size_t ND = NDIM> | |
| std::enable_if_t< ND<=NDIM, array_of_bools< ND > > | is_periodic () const |
| Convenience for application of integral operators. | |
| bool | is_periodic_all () const |
| Checks whether the boundary condition along all axes is periodic. | |
| bool | is_periodic_any () const |
| Checks whether the boundary condition along any axis is periodic. | |
| std::array< LatticeRange, NDIM > | lattice_range () const |
| template<std::size_t ND = NDIM> | |
| std::enable_if_t< ND<=NDIM, std::array< KernelRange, ND > > | make_range (unsigned int r, std::optional< double > sigma={}) const |
| Convenience for construction of range-restricted integral operators. | |
| std::vector< KernelRange > | make_range_vector (unsigned int r, std::optional< double > sigma={}) const |
| Convenience for construction of range-restricted integral operators. | |
| BCType & | operator() (std::size_t d, int i) |
| Returns reference to boundary condition. | |
| BCType | operator() (std::size_t d, int i) const |
| Returns value of boundary condition. | |
| BoundaryConditions< NDIM > & | operator= (const BoundaryConditions< NDIM > &other) |
| Assignment makes deep copy. | |
| template<typename Archive> | |
| void | serialize (const Archive &ar) |
Static Public Member Functions | |
| static const char * | code_as_string (BCType code) |
| Translates code into human readable string. | |
Private Attributes | |
| BCType | bc [NDIM *2] |
This class is used to specify boundary conditions for all operators.
Exterior boundary conditions (i.e., on the simulation domain) are associated with operators (not functions). The types of boundary conditions available are in the enum BCType.
The default boundary conditions are obtained from the FunctionDefaults. For non-zero Dirichlet and Neumann conditions additional information must be provided when derivative operators are constructed. For integral operators, only periodic and free space are supported.
|
inline |
Constructor. Default boundary condition set to free space.
References bc, madness::BC_FREE, and NDIM.
Referenced by BoundaryConditions(), and operator=().
|
inline |
|
inline |
|
inline |
Copy constructor is deep.
References BoundaryConditions().
|
inlinestatic |
Translates code into human readable string.
| code | Code for boundary condition |
|
inline |
Convenience for application of integral operators.
References bc, madness::BC_PERIODIC, d, MADNESS_ASSERT, and v.
Referenced by lattice_range().
|
inline |
Checks whether the boundary condition along all axes is periodic.
References bc, madness::BC_PERIODIC, d, MADNESS_ASSERT, and NDIM.
|
inline |
Checks whether the boundary condition along any axis is periodic.
References bc, madness::BC_PERIODIC, d, MADNESS_ASSERT, and NDIM.
|
inline |
References is_periodic(), and NDIM.
Referenced by main().
|
inline |
Convenience for construction of range-restricted integral operators.
constructs array of KernelRange objects for every dimension; for every periodic dimension the range is restricted according to r and sigma
| r | range extent in simulation cell units; kernel is restricted to [-r/2, r/2] |
| sigma | optional smoothing paramter (in simulation cell units); if given, use erf-attenuated range restriction ( |
References sigma.
|
inline |
Convenience for construction of range-restricted integral operators.
r and sigma | r | range extent in simulation cell units; kernel is restricted to [-r/2, r/2] |
| sigma | optional smoothing paramter (in simulation cell units); if given, use erf-attenuated range restriction ( |
References sigma.
|
inline |
Returns reference to boundary condition.
| d | Dimension (0,...,NDIM-1) for boundary condition |
| i | Side (0=left, 1=right) for boundary condition |
References bc, d, and MADNESS_ASSERT.
|
inline |
Returns value of boundary condition.
| d | Dimension (0,...,NDIM-1) for boundary condition |
| i | Side (0=left, 1=right) for boundary condition |
References bc, d, and MADNESS_ASSERT.
|
inline |
Assignment makes deep copy.
References BoundaryConditions(), bc, and NDIM.
|
inline |
References bc.
|
private |