1 #ifndef AMREX_OPENBC_H_
2 #define AMREX_OPENBC_H_
3 #include <AMReX_Config.H>
13 static constexpr
int M = 7;
14 static constexpr
int P = 3;
35 #if defined(AMREX_USE_CUDA) || defined(AMREX_USE_HIP)
42 return amrex_openbc_momarray;
83 void useHypre (
bool use_hypre) noexcept;
86 Real a_tol_rel, Real a_tol_abs);
#define AMREX_HIP_OR_CUDA(a, b)
Definition: AMReX_GpuControl.H:21
#define AMREX_GPU_DEVICE
Definition: AMReX_GpuQualifiers.H:18
A collection of Boxes stored in an Array.
Definition: AMReX_BoxArray.H:549
A collection (stored as an array) of FArrayBox objects.
Definition: AMReX_MultiFab.H:38
Open Boundary Poisson Solver.
Definition: AMReX_OpenBC.H:59
Vector< BoxArray > m_grids
Definition: AMReX_OpenBC.H:103
Gpu::DeviceVector< int > m_ngpublocks_d
Definition: AMReX_OpenBC.H:118
Vector< Geometry > m_geom_all
Definition: AMReX_OpenBC.H:137
int m_verbose
Definition: AMReX_OpenBC.H:100
Vector< Geometry > m_geom
Definition: AMReX_OpenBC.H:102
int m_nblocks
Definition: AMReX_OpenBC.H:123
MultiFab m_crse_grown_faces_phi
Definition: AMReX_OpenBC.H:130
Vector< int > m_offset
Definition: AMReX_OpenBC.H:126
std::unique_ptr< MLPoisson > m_poisson_2
Definition: AMReX_OpenBC.H:107
IntVect m_ngrowdomain
Definition: AMReX_OpenBC.H:129
int m_coarsen_ratio
Definition: AMReX_OpenBC.H:112
Vector< DistributionMapping > m_dm_all
Definition: AMReX_OpenBC.H:136
Gpu::DeviceVector< openbc::MomTag > m_momtags_d
Definition: AMReX_OpenBC.H:116
MultiFab m_phind
Definition: AMReX_OpenBC.H:131
BoxArray m_bag
Definition: AMReX_OpenBC.H:132
int m_nthreads_momtag
Definition: AMReX_OpenBC.H:119
void interpolate_potential(MultiFab &solg)
Definition: AMReX_OpenBC.cpp:790
Gpu::PinnedVector< openbc::MomTag > m_momtags_h
Definition: AMReX_OpenBC.H:114
void setVerbose(int v) noexcept
Definition: AMReX_OpenBC.cpp:184
BottomSolver m_bottom_solver_type
Definition: AMReX_OpenBC.H:110
Real solve(const Vector< MultiFab * > &a_sol, const Vector< MultiFab const * > &a_rhs, Real a_tol_rel, Real a_tol_abs)
Definition: AMReX_OpenBC.cpp:205
void useHypre(bool use_hypre) noexcept
Definition: AMReX_OpenBC.cpp:194
std::unique_ptr< MLPoisson > m_poisson_1
Definition: AMReX_OpenBC.H:106
Gpu::PinnedVector< int > m_ngpublocks_h
Definition: AMReX_OpenBC.H:117
std::unique_ptr< MLMG > m_mlmg_2
Definition: AMReX_OpenBC.H:109
OpenBCSolver & operator=(const OpenBCSolver &)=delete
OpenBCSolver(const OpenBCSolver &)=delete
Vector< DistributionMapping > m_dmap
Definition: AMReX_OpenBC.H:104
int m_bottom_verbose
Definition: AMReX_OpenBC.H:101
void compute_potential(Gpu::DeviceVector< openbc::Moments > const &moments)
Definition: AMReX_OpenBC.cpp:725
int m_nblocks_local
Definition: AMReX_OpenBC.H:122
void bcast_moments(Gpu::DeviceVector< openbc::Moments > &moments)
Definition: AMReX_OpenBC.cpp:673
OpenBCSolver(OpenBCSolver &&)=delete
void compute_moments(Gpu::DeviceVector< openbc::Moments > &moments)
Definition: AMReX_OpenBC.cpp:383
Vector< int > m_countvec
Definition: AMReX_OpenBC.H:125
Array< MultiFab, AMREX_SPACEDIM > m_dpdn
Definition: AMReX_OpenBC.H:113
void setBottomVerbose(int v) noexcept
Definition: AMReX_OpenBC.cpp:189
Vector< BoxArray > m_ba_all
Definition: AMReX_OpenBC.H:135
LPInfo m_info
Definition: AMReX_OpenBC.H:105
Vector< IntVect > m_box_offset
Definition: AMReX_OpenBC.H:134
void define(const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo())
Definition: AMReX_OpenBC.cpp:16
std::unique_ptr< MLMG > m_mlmg_1
Definition: AMReX_OpenBC.H:108
Encapsulation of the Orientation of the Faces of a Box.
Definition: AMReX_Orientation.H:29
Definition: AMReX_PODVector.H:246
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition: AMReX_Vector.H:27
std::ostream & operator<<(std::ostream &os, Moments const &mom)
Definition: AMReX_OpenBC.cpp:867
static constexpr int M
Definition: AMReX_OpenBC.H:13
static constexpr int P
Definition: AMReX_OpenBC.H:14
Definition: AMReX_Amr.cpp:49
BottomSolver
Definition: AMReX_MLLinOp.H:30
std::array< T, N > Array
Definition: AMReX_Array.H:24
Definition: AMReX_Array4.H:61
AMREX_GPU_DEVICE openbc::Moments::array_type * dataPtr() noexcept
Definition: AMReX_OpenBC.H:39
Definition: AMReX_GpuMemory.H:125
Definition: AMReX_MLLinOp.H:35
Definition: AMReX_OpenBC.H:25
int offset
Definition: AMReX_OpenBC.H:29
Array4< Real const > gp
Definition: AMReX_OpenBC.H:26
Orientation face
Definition: AMReX_OpenBC.H:28
Box b2d
Definition: AMReX_OpenBC.H:27
Definition: AMReX_OpenBC.H:17
Real z
Definition: AMReX_OpenBC.H:20
array_type mom
Definition: AMReX_OpenBC.H:19
Orientation face
Definition: AMReX_OpenBC.H:21
Real y
Definition: AMReX_OpenBC.H:20
Real x
Definition: AMReX_OpenBC.H:20