https://mooseframework.inl.gov
Loading...
Searching...
No Matches
libMeshReducedNamespace.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12// This is the minimal set of headers to make all the types below that cannot be
13// forward-declared as classes available.
14
15// These headers add constants that we want to add to the namespace.
16#include "libmesh/libmesh.h"
17#include "libmesh/remote_elem.h"
18
19// This header declares functions that we want to add to the namespace. If we chose not to include
20// this header, we will need to repeat the function declaration here
21#include "libmesh/int_range.h" // for make_range + several typedefs
22
23// These headers introduce typedefs that we are adding to the local namespace. If we chose not
24// to include these headers, we will need to repeat the typedef here
25#include "libmesh/id_types.h"
26#include "libmesh/vector_value.h"
27#include "libmesh/tensor_value.h"
28
29// These are required for the range typedefs they contain, which cannot be forward-declared
30// without re-defining the typedef. This allows us to add the ranges in the local namespace
31// but at the cost of defining them, including very many headers
32#include "libmesh/elem_range.h"
33#include "libmesh/node_range.h"
34
35// Added for convenience
36#include "libmesh/enum_elem_type.h"
37#include "libmesh/enum_fe_family.h"
38#include "libmesh/enum_order.h"
39#include "libmesh/enum_parallel_type.h"
40#include "libmesh/enum_point_locator_type.h"
41
42// README
43// If you hit a compilation error that the XYZ class shown here is not defined, and it is declared
44// in this header then you forgot to include the libMesh header in your header/source that actually
45// declared the class. We only forward declare it here.
46
47// We want all the types below to be available everywhere
48// Element types
49namespace libMesh
50{
51class Edge;
52class Edge2;
53class Edge3;
54class Edge4;
55class Hex;
56class Hex8;
57class Hex20;
58class Hex27;
59class Prism;
60class Prism15;
61class Prism18;
62class Prism21;
63class Prism6;
64class Pyramid;
65class Pyramid5;
66class Pyramid13;
67class Pyramid14;
68class Quad;
69class Quad4;
70class Quad8;
71class Quad9;
72class Tet;
73class Tet4;
74class Tet10;
75class Tet14;
76class Tri;
77class Tri3;
78class Tri6;
79class Tri7;
80class RemoteElem;
81}
82
83using libMesh::Edge;
84using libMesh::Edge2;
85using libMesh::EDGE2;
86using libMesh::Edge3;
87using libMesh::EDGE3;
88using libMesh::Edge4;
89using libMesh::EDGE4;
91using libMesh::Hex;
92using libMesh::Hex20;
93using libMesh::HEX20;
94using libMesh::Hex27;
95using libMesh::HEX27;
96using libMesh::Hex8;
97using libMesh::HEX8;
99using libMesh::Prism;
100using libMesh::Prism15;
101using libMesh::PRISM15;
102using libMesh::Prism18;
103using libMesh::PRISM18;
104using libMesh::Prism21;
105using libMesh::PRISM21;
106using libMesh::Prism6;
107using libMesh::PRISM6;
108using libMesh::Pyramid;
115using libMesh::Quad;
116using libMesh::Quad4;
117using libMesh::QUAD4;
118using libMesh::Quad8;
119using libMesh::QUAD8;
120using libMesh::Quad9;
121using libMesh::QUAD9;
124using libMesh::Tet;
125using libMesh::Tet10;
126using libMesh::TET10;
127using libMesh::Tet14;
128using libMesh::TET14;
129using libMesh::Tet4;
130using libMesh::TET4;
131using libMesh::Tri;
132using libMesh::Tri3;
133using libMesh::TRI3;
134using libMesh::Tri6;
135using libMesh::TRI6;
136using libMesh::Tri7;
137using libMesh::TRI7;
138
139// Continuity types
140using libMesh::C_ONE;
141using libMesh::C_ZERO;
143using libMesh::H_CURL;
144using libMesh::H_DIV;
146
147// Finite element helper classes
148namespace libMesh
149{
150class FEType;
151class FEInterface;
152class FEMap;
153template <typename T>
154class FEGenericBase;
155// "Forward-declaring" typedefs must match exactly how they were defined
158}
159
160using libMesh::FEBase;
163using libMesh::FEMap;
164using libMesh::FEType;
166
167// Ranges
168namespace libMesh
169{
170template <typename T, typename P>
171class StoredRange;
172}
173
178
179// Mesh classes
180namespace libMesh
181{
182class DistributedMesh;
183class ReplicatedMesh;
184class UnstructuredMesh;
185class MeshBase;
186class BoundingBox;
187}
188
194
195// Solver classes
196namespace libMesh
197{
198class Partitioner;
199class DofObject;
200class OrderWrapper;
202}
207
208// Common data types
212using libMesh::Number;
215using libMesh::Real;
219
220// Common templated types
221namespace libMesh
222{
223template <typename T>
224class NumericVector;
225template <typename T>
226class SparseMatrix;
227template <typename T>
228class TensorValue;
229template <typename>
230class TypeVector;
231template <unsigned int, typename>
232class TypeNTensor;
233template <typename T>
234class TypeTensor;
235template <typename T>
236class VectorValue;
237}
238
246
247// Common FE families
254using libMesh::SCALAR;
255
256// Counting from 0 to 20
259using libMesh::EIGHTH;
262using libMesh::FIFTH;
263using libMesh::FIRST;
265using libMesh::FOURTH;
268using libMesh::NINTH;
269using libMesh::Order;
270using libMesh::SECOND;
272using libMesh::SEVENTH;
274using libMesh::SIXTH;
275using libMesh::TENTH;
276using libMesh::THIRD;
278using libMesh::TWELFTH;
280
281// Parallel types
283using libMesh::GHOSTED;
285using libMesh::SERIAL;
286
287// Point locator types
289using libMesh::TREE;
292
293// Common mesh classes
294namespace libMesh
295{
296class BoundaryInfo;
297class Elem;
298class Node;
299class Point;
300}
301
303using libMesh::Elem;
304using libMesh::Node;
305using libMesh::Point;
306
307// Common utilities
315
316// Common defaults
319
320// Declare all the nested namespaces we use in MOOSE without prefacing with
321// libMesh::
322namespace libMesh
323{
324namespace MeshTools
325{
326}
327namespace Predicates
328{
329}
330namespace TensorTools
331{
332}
333namespace Threads
334{
335}
336namespace Utility
337{
338}
339namespace Parallel
340{
341}
342}
343namespace MeshTools = libMesh::MeshTools;
346namespace Threads = libMesh::Threads;
347namespace Utility = libMesh::Utility;
348namespace Parallel = libMesh::Parallel;
349
350// Added to pass downstream app tests
351// All these are all already prefaced with 'libMesh::' in the framework and modules
352#include "libmesh/enum_norm_type.h"
354
355using libMesh::pi;
356using libMesh::zero;
357
358namespace libMesh
359{
360class DoFMap;
361class PerfLog;
362class System;
363class ExplicitSystem;
364class ImplicitSystem;
367class EigenSystem;
368class ExodusII_IO;
369class PointLocatorBase;
370enum FEFamily : int;
371enum QuadratureType : int;
372template <typename T>
373struct ScalarTraits;
374class Mesh;
375class MeshSerializer;
377template <typename T>
378class SimpleRange;
379template <typename Output, typename OutputGradient>
380class ParsedFunction;
381template <typename T>
382class PetscVector;
383template <typename T>
384class PetscMatrix;
386class QTrap;
387class QGauss;
389template <typename T>
390class Preconditioner;
392template <typename T>
395}
396using libMesh::DoFMap;
403using libMesh::Mesh;
407using libMesh::PerfLog;
415using libMesh::QGauss;
416using libMesh::QTrap;
422using libMesh::System;
void ErrorVector unsigned int
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
SIDE_DISCONTINUOUS
uint8_t unique_id_type
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
auto index_range(const T &sizable)
Tnew cast_ref(Told &oldvar)
int8_t boundary_id_type
void libmesh_ignore(const Args &...)
FEGenericBase< RealGradient > FEVectorBase
int8_t dof_id_signed_type
const unsigned int invalid_uint
const Real pi
const Number zero
dof_id_type numeric_index_type
Real Number
const RemoteElem * remote_elem
static constexpr Real TOLERANCE
uint8_t dof_id_type
TREE_LOCAL_ELEMENTS
Tnew cast_int(Told oldvar)
PreconditionerType
Tnew cast_ptr(Told *oldvar)
FEGenericBase< Real > FEBase
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
uint8_t processor_id_type
IntRange< T > make_range(T beg, T end)