Block-Structured AMR Software Framework
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
AMReX_BoundCond.H
Go to the documentation of this file.
1
2#ifndef AMREX_BOUNDCOND_H_
3#define AMREX_BOUNDCOND_H_
4#include <AMReX_Config.H>
5
6#include <AMReX_BLassert.H>
8
9namespace amrex {
10
20{
21public:
22 //
24 BoundCond () noexcept = default;
25 //
27 // Many codes rely on implicit conversion. So no explicit here.
28 BoundCond (int _bctype) noexcept : bctype(_bctype) {}
29 //
32 operator int () const noexcept
33 {
34 BL_ASSERT(bctype != -1);
35 return bctype;
36 }
37 //
39 BoundCond& operator= (const int _bctype) noexcept
40 {
41 bctype = _bctype;
42 return *this;
43 }
44private:
45 //
47 int bctype = -1;
48};
49
50}
51
52#endif /*_BOUNDCOND_H_*/
#define BL_ASSERT(EX)
Definition AMReX_BLassert.H:39
#define AMREX_GPU_HOST_DEVICE
Definition AMReX_GpuQualifiers.H:20
Maintain an identifier for boundary condition types.
Definition AMReX_BoundCond.H:20
BoundCond & operator=(const int _bctype) noexcept
Set index of boundary condition type.
Definition AMReX_BoundCond.H:39
BoundCond() noexcept=default
Initializes boundary condition type to default.
int bctype
Index of boundary condition type.
Definition AMReX_BoundCond.H:47
Definition AMReX_Amr.cpp:49
const int[]
Definition AMReX_BLProfiler.cpp:1664