libmesh.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 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 #ifndef LIBMESH_LIBMESH_H
21 #define LIBMESH_LIBMESH_H
22 
23 
24 // Local includes
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/libmesh_base.h"
28 #include "libmesh/parallel.h"
29 
30 // C++ includes
31 #include <string>
32 #include <vector>
33 
42 namespace libMesh
43 {
44 
45 
58 {
59 public:
60 #ifdef LIBMESH_HAVE_MPI
61 
68  LibMeshInit(int argc, const char* const* argv,
69  MPI_Comm COMM_WORLD_IN=MPI_COMM_WORLD);
70 #else
71  LibMeshInit(int argc, const char* const* argv);
72 #endif
73 
74  virtual ~LibMeshInit();
75 
76  const Parallel::Communicator& comm() const { return _comm; }
77 
78 private:
80 };
81 
88  bool initialized ();
89 
96  bool closed ();
97 
101  void enableFPE(bool on);
102 
107  bool on_command_line (const std::string& arg);
108 
114  template <typename T>
115  T command_line_value (const std::string &, T);
116  template <typename T>
117  T command_line_value (const std::vector<std::string> &, T);
118 
123  template <typename T>
124  void command_line_vector (const std::string &, std::vector<T>&);
125 
129 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
130  extern const Number imaginary;
131 #endif
132 
142 
146  const Real pi =
147  static_cast<Real>(3.1415926535897932384626433832795029L);
148 
152  const Number zero = 0.;
153 
158  const unsigned int invalid_uint = static_cast<unsigned int>(-1);
159 
160 } // namespace libMesh
161 
162 #endif // LIBMESH_LIBMESH_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:05 UTC

Hosted By:
SourceForge.net Logo