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 Pyramid18;
69class Quad;
70class Quad4;
71class Quad8;
72class Quad9;
73class Tet;
74class Tet4;
75class Tet10;
76class Tet14;
77class Tri;
78class Tri3;
79class Tri6;
80class Tri7;
81class RemoteElem;
82}
83
85using libMesh::Edge;
86using libMesh::Edge2;
87using libMesh::EDGE2;
88using libMesh::Edge3;
89using libMesh::EDGE3;
90using libMesh::Edge4;
91using libMesh::EDGE4;
93using libMesh::Hex;
94using libMesh::Hex20;
95using libMesh::HEX20;
96using libMesh::Hex27;
97using libMesh::HEX27;
98using libMesh::Hex8;
99using libMesh::HEX8;
101using libMesh::Prism;
102using libMesh::Prism15;
103using libMesh::PRISM15;
104using libMesh::Prism18;
105using libMesh::PRISM18;
106using libMesh::Prism21;
107using libMesh::PRISM21;
108using libMesh::Prism6;
109using libMesh::PRISM6;
110using libMesh::Pyramid;
119using libMesh::Quad;
120using libMesh::Quad4;
121using libMesh::QUAD4;
122using libMesh::Quad8;
123using libMesh::QUAD8;
124using libMesh::Quad9;
125using libMesh::QUAD9;
128using libMesh::Tet;
129using libMesh::Tet10;
130using libMesh::TET10;
131using libMesh::Tet14;
132using libMesh::TET14;
133using libMesh::Tet4;
134using libMesh::TET4;
135using libMesh::Tri;
136using libMesh::Tri3;
137using libMesh::TRI3;
138using libMesh::Tri6;
139using libMesh::TRI6;
140using libMesh::Tri7;
141using libMesh::TRI7;
142
143// Continuity types
144using libMesh::C_ONE;
145using libMesh::C_ZERO;
147using libMesh::H_CURL;
148using libMesh::H_DIV;
150
151// Finite element helper classes
152namespace libMesh
153{
154class FEType;
155class FEInterface;
156class FEMap;
157template <typename T>
158class FEGenericBase;
159// "Forward-declaring" typedefs must match exactly how they were defined
162}
163
164using libMesh::FEBase;
167using libMesh::FEMap;
168using libMesh::FEType;
170
171// Ranges
172namespace libMesh
173{
174template <typename T, typename P>
175class StoredRange;
176}
177
182
183// Mesh classes
184namespace libMesh
185{
186class DistributedMesh;
187class ReplicatedMesh;
188class UnstructuredMesh;
189class MeshBase;
190class BoundingBox;
191}
192
198
199// Solver classes
200namespace libMesh
201{
202class Partitioner;
203class DofObject;
204class OrderWrapper;
206}
211
212// Common data types
216using libMesh::Number;
219using libMesh::Real;
223
224// Common templated types
225namespace libMesh
226{
227template <typename T>
228class NumericVector;
229template <typename T>
230class SparseMatrix;
231template <typename T>
232class TensorValue;
233template <typename>
234class TypeVector;
235template <unsigned int, typename>
236class TypeNTensor;
237template <typename T>
238class TypeTensor;
239template <typename T>
240class VectorValue;
241}
242
250
251// Common FE families
252using libMesh::HERMITE;
263using libMesh::SCALAR;
264
265// Counting from 0 to 20
268using libMesh::EIGHTH;
271using libMesh::FIFTH;
272using libMesh::FIRST;
274using libMesh::FOURTH;
277using libMesh::NINTH;
278using libMesh::Order;
279using libMesh::SECOND;
281using libMesh::SEVENTH;
283using libMesh::SIXTH;
284using libMesh::TENTH;
285using libMesh::THIRD;
287using libMesh::TWELFTH;
289
290// Parallel types
292using libMesh::GHOSTED;
294using libMesh::SERIAL;
295
296// Point locator types
298using libMesh::TREE;
301
302// Common mesh classes
303namespace libMesh
304{
305class BoundaryInfo;
306class Elem;
307class Node;
308class Point;
309}
310
312using libMesh::Elem;
313using libMesh::Node;
314using libMesh::Point;
315
316// Common utilities
324
325// Common defaults
328
329// Declare all the nested namespaces we use in MOOSE without prefacing with
330// libMesh::
331namespace libMesh
332{
333namespace MeshTools
334{
335}
336namespace Predicates
337{
338}
339namespace TensorTools
340{
341}
342namespace Threads
343{
344}
345namespace Utility
346{
347}
348namespace Parallel
349{
350}
351}
352namespace MeshTools = libMesh::MeshTools;
355namespace Threads = libMesh::Threads;
356namespace Utility = libMesh::Utility;
357namespace Parallel = libMesh::Parallel;
358
359// Added to pass downstream app tests
360// All these are all already prefaced with 'libMesh::' in the framework and modules
361#include "libmesh/enum_norm_type.h"
363
364using libMesh::pi;
365using libMesh::zero;
366
367namespace libMesh
368{
369class DoFMap;
370class PerfLog;
371class System;
372class ExplicitSystem;
373class ImplicitSystem;
376class EigenSystem;
377class ExodusII_IO;
378class PointLocatorBase;
379enum FEFamily : int;
380enum QuadratureType : int;
381template <typename T>
382struct ScalarTraits;
383class Mesh;
384class MeshSerializer;
386template <typename T>
387class SimpleRange;
388template <typename Output, typename OutputGradient>
389class ParsedFunction;
390template <typename T>
391class PetscVector;
392template <typename T>
393class PetscMatrix;
395class QTrap;
396class QGauss;
398template <typename T>
399class Preconditioner;
401template <typename T>
404}
405using libMesh::DoFMap;
412using libMesh::Mesh;
416using libMesh::PerfLog;
424using libMesh::QGauss;
425using libMesh::QTrap;
431using 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)