MADNESS 0.10.1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
madness::BoundaryConditions< NDIM > Class Template Reference

This class is used to specify boundary conditions for all operators. More...

#include <funcdefaults.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.
 
std::vector< bool > is_periodic () const
 Convenience for application of integral operators.
 
BCTypeoperator() (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]
 

Detailed Description

template<std::size_t NDIM>
class madness::BoundaryConditions< NDIM >

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.

Constructor & Destructor Documentation

◆ BoundaryConditions() [1/2]

template<std::size_t NDIM>
madness::BoundaryConditions< NDIM >::BoundaryConditions ( BCType  code = BC_FREE)
inline

Constructor. Default boundary condition set to free space.

References madness::BoundaryConditions< NDIM >::bc, and NDIM.

◆ BoundaryConditions() [2/2]

template<std::size_t NDIM>
madness::BoundaryConditions< NDIM >::BoundaryConditions ( const BoundaryConditions< NDIM > &  other)
inline

Copy constructor is deep.

Member Function Documentation

◆ code_as_string()

template<std::size_t NDIM>
static const char * madness::BoundaryConditions< NDIM >::code_as_string ( BCType  code)
inlinestatic

Translates code into human readable string.

Parameters
codeCode for boundary condition
Returns
String describing boundary condition code

Referenced by madness::operator<<().

◆ is_periodic()

template<std::size_t NDIM>
std::vector< bool > madness::BoundaryConditions< NDIM >::is_periodic ( ) const
inline

◆ operator()() [1/2]

template<std::size_t NDIM>
BCType & madness::BoundaryConditions< NDIM >::operator() ( std::size_t  d,
int  i 
)
inline

Returns reference to boundary condition.

Parameters
dDimension (0,...,NDIM-1) for boundary condition
iSide (0=left, 1=right) for boundary condition
Returns
Value of boundary condition

References madness::BoundaryConditions< NDIM >::bc, d, and MADNESS_ASSERT.

◆ operator()() [2/2]

template<std::size_t NDIM>
BCType madness::BoundaryConditions< NDIM >::operator() ( std::size_t  d,
int  i 
) const
inline

Returns value of boundary condition.

Parameters
dDimension (0,...,NDIM-1) for boundary condition
iSide (0=left, 1=right) for boundary condition
Returns
Value of boundary condition

References madness::BoundaryConditions< NDIM >::bc, d, and MADNESS_ASSERT.

◆ operator=()

template<std::size_t NDIM>
BoundaryConditions< NDIM > & madness::BoundaryConditions< NDIM >::operator= ( const BoundaryConditions< NDIM > &  other)
inline

Assignment makes deep copy.

References madness::BoundaryConditions< NDIM >::bc, and NDIM.

◆ serialize()

template<std::size_t NDIM>
template<typename Archive >
void madness::BoundaryConditions< NDIM >::serialize ( const Archive &  ar)
inline

Member Data Documentation

◆ bc

template<std::size_t NDIM>
BCType madness::BoundaryConditions< NDIM >::bc[NDIM *2]
private

The documentation for this class was generated from the following file: