# exafmm / include / types.h

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66``` ```#ifndef types_h #define types_h #include "macros.h" #include #include #include #include "vec.h" // Basic type definitions typedef float real_t; //!< Floating point type typedef vec<3,float> fvec3; //!< Vector of 3 single precision types typedef vec<3,real_t> vec3; //!< Vector of 3 floating point types typedef vec<4,real_t> vec4; //!< Vector of 4 floating point types typedef vec<8,int> ivec8; //!< Vector of 8 integer types typedef std::pair vec3Pair; //!< Pair of vec3 // Compile-time parameters const int P = 5; //!< Order of expansions const float EPS2 = .0; //!< Softening parameter (squared) #if COMkernel const int MTERM = P*(P+1)*(P+2)/6-3; //!< Number of Cartesian mutlipole terms #else const int MTERM = P*(P+1)*(P+2)/6; //!< Number of Cartesian mutlipole terms #endif const int LTERM = (P+1)*(P+2)*(P+3)/6; //!< Number of Cartesian local terms typedef vec vecM; //!< Multipole coefficient type for Cartesian typedef vec vecL; //!< Local coefficient type for Cartesian //! Structure of aligned source for SIMD struct Source { vec3 X; //!< Position real_t SRC; //!< Scalar source values } __attribute__ ((aligned (16))); //! Structure of bodies struct Body : public Source { int IBODY; //!< Initial body numbering for sorting back int IPROC; //!< Initial process numbering for partitioning back int ICELL; //!< Cell index vec4 TRG; //!< Scalar+vector3 target values }; typedef std::vector Bodies; //!< Vector of bodies typedef std::vector::iterator B_iter; //!< Iterator of body vector //! Structure of cells struct Cell { int NCHILD; //!< Number of child cells int NCBODY; //!< Number of child bodies int NDBODY; //!< Number of descendant bodies int PARENT; //!< Index of parent cell int CHILD; //!< Index of child cells long long ICELL; //!< Cell index B_iter BODY; //!< Iterator of first body vec3 X; //!< Cell center real_t R; //!< Cell radius real_t RMAX; //!< Max cell radius real_t RCRIT; //!< Critical cell radius vecM M; //!< Multipole coefficients vecL L; //!< Local coefficients }; typedef std::vector Cells; //!< Vector of cells typedef std::vector::iterator C_iter; //!< Iterator of cell vector typedef std::queue CellQueue; //!< Queue of cell iterators #endif ```
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.