Block-Structured AMR Software Framework
AMReX_Dim3.H
Go to the documentation of this file.
1 #ifndef AMREX_DIM3_H_
2 #define AMREX_DIM3_H_
3 #include <AMReX_Config.H>
4 
5 #include <AMReX_REAL.H>
6 #include <AMReX_GpuQualifiers.H>
7 
8 #include <iostream>
9 
10 namespace amrex {
11 
12 struct Dim3 { int x; int y; int z; };
13 struct XDim3 { Real x; Real y; Real z; };
14 
15 template <typename T,
16  std::enable_if_t <std::is_same_v<T, Dim3> ||
17  std::is_same_v<T, XDim3>>* = nullptr>
18 std::ostream& operator<< (std::ostream& os, const T& d)
19 {
20  os << '(' << d.x << ',' << d.y << ',' << d.z << ')';
21  return os;
22 }
23 
24 }
25 
26 #endif
Definition: AMReX_Amr.cpp:49
std::ostream & operator<<(std::ostream &os, AmrMesh const &amr_mesh)
Definition: AMReX_AmrMesh.cpp:1236
Definition: AMReX_Dim3.H:12
int x
Definition: AMReX_Dim3.H:12
int z
Definition: AMReX_Dim3.H:12
int y
Definition: AMReX_Dim3.H:12
Definition: AMReX_Dim3.H:13
Real x
Definition: AMReX_Dim3.H:13
Real z
Definition: AMReX_Dim3.H:13
Real y
Definition: AMReX_Dim3.H:13