libMesh
point.C
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2025 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 
21 // Local includes
22 #include "libmesh/point.h"
23 
24 // C++ includes
25 #include <type_traits> // std::is_trivially_copyable
26 
27 
28 // Boost doesn't satisfy `is_trivially_copyable` for its float128
29 // wrapper, but surely it's memcpyable anyway?
30 #if !LIBMESH_DEFAULT_QUADRUPLE_PRECISION
31 static_assert(std::is_trivially_copyable<libMesh::TypeVector<libMesh::Point>>::value,
32  "Someone made Point non-TriviallyCopyable");
33 #endif // !LIBMESH_DEFAULT_QUADRUPLE_PRECISION
34 
35 // ------------------------------------------------------------
36 // Point class member functions
37 // unsigned int Point::key() const
38 // {
39 // unsigned int tempx,tempy,tempz;
40 
41 // int i,j=2,cnt=0;
42 // unsigned int index[3];
43 // const Real deg = 1.e12;
44 
45 // tempx = static_cast<unsigned int>(((*this)(0)*deg));
46 // tempy = static_cast<unsigned int>(((*this)(1)*deg));
47 // tempz = static_cast<unsigned int>(((*t!his)(2)*deg));
48 
49 // index[0]=0;
50 // index[1]=0;
51 // index[2]=0;
52 
53 // for (i=sizeof(unsigned int)*8-1;i>=0;i--)
54 // {
55 // index[j] += (tempx >> i) & 01;
56 // index[j] = index[j] << 01;
57 
58 // if (( cnt % (sizeof(unsigned int)*8) == 0) && (cnt !=0 ) )
59 // {
60 // cnt = 0;
61 // j--;
62 // }
63 // else
64 // cnt++;
65 
66 // index[j] += (tempy >> i) & 01;
67 // index[j] = index[j] << 01;
68 
69 // if (( cnt % (sizeof(unsigned int)*8) == 0) && (cnt !=0 ) )
70 // {
71 // cnt = 0;
72 // j--;
73 // }
74 // else
75 // cnt++;
76 
77 // index[j] += (tempz >> i) & 01;
78 // index[j] = index[j] << 01;
79 
80 // if (( cnt % (sizeof(unsigned int)*8) == 0) && (cnt !=0 ) )
81 // {
82 // cnt = 0;
83 // j--;
84 // }
85 // else
86 // cnt++;
87 // }
88 
89 // return index[2];
90 // }
This class defines a vector in LIBMESH_DIM dimensional space of type T.
Definition: tensor_tools.h:34
static const bool value
Definition: xdr_io.C:54