libmesh_common.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 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_COMMON_H
21 #define LIBMESH_LIBMESH_COMMON_H
22 
23 // The library configuration options
24 #include "libmesh/libmesh_config.h"
25 
26 // Use actual timestamps or constant dummies (to aid ccache)
27 #ifdef LIBMESH_ENABLE_TIMESTAMPS
28 # define LIBMESH_TIME __TIME__
29 # define LIBMESH_DATE __DATE__
30 #else
31 # define LIBMESH_TIME "notime"
32 # define LIBMESH_DATE "nodate"
33 #endif
34 
35 // C/C++ includes everyone should know about
36 #include <cstdlib>
37 #ifdef __PGI
38 // BSK, Thu Feb 20 08:32:06 CST 2014 - For some reason, unless PGI gets
39 // <cmath> early this nonsense shows up:
40 // "/software/x86_64/pgi/12.9/linux86-64/12.9/include/CC/cmath", line 57: error:
41 // the global scope has no "abs"
42 // using _STLP_VENDOR_CSTD::abs;
43 // So include <cmath> as early as possible under the PGI compilers.
44 # include <cmath>
45 #endif
46 #include <complex>
47 #include <typeinfo> // std::bad_cast
48 
49 
50 // Include the MPI definition
51 #ifdef LIBMESH_HAVE_MPI
52 # include "libmesh/ignore_warnings.h"
53 # include <mpi.h>
55 #endif
56 
57 // _basic_ library functionality
58 #include "libmesh/libmesh_base.h"
60 extern "C" {
62 }
63 
64 // Proxy class for libMesh::out/err output
65 #include "libmesh/ostream_proxy.h"
66 
67 // Here we add missing types to the standard namespace. For example,
68 // std::max(double, float) etc... are well behaved but not defined
69 // by the standard. This also includes workarounds for super-strict
70 // implementations, for example Sun Studio and PGI C++. However,
71 // this necessarily requires breaking the ISO-C++ standard, and is
72 // really just a hack. As such, only do it if we are building the
73 // libmesh library itself. Specifically, *DO NOT* export this to
74 // user code or install this header.
75 #ifdef LIBMESH_IS_COMPILING_ITSELF
77 #endif
78 
79 // Make sure the libmesh_nullptr define is available for backwards
80 // compatibility, although we no longer use it in the library.
82 
83 namespace libMesh
84 {
85 
86 
87 // A namespace for functions used in the bodies of the macros below.
88 // The macros generally call these functions with __FILE__, __LINE__,
89 // __DATE__, and __TIME__ in the appropriate order. These should not
90 // be called by users directly! The implementations can be found in
91 // libmesh_common.C.
92 namespace MacroFunctions
93 {
94 void here(const char * file, int line, const char * date, const char * time);
95 void stop(const char * file, int line, const char * date, const char * time);
96 void report_error(const char * file, int line, const char * date, const char * time);
97 }
98 
99 // Undefine any existing macros
100 #ifdef Real
101 # undef Real
102 #endif
103 
104 //#ifdef REAL
105 //# undef REAL
106 //#endif
107 
108 #ifdef Complex
109 # undef Complex
110 #endif
111 
112 #ifdef COMPLEX
113 # undef COMPLEX
114 #endif
115 
116 #ifdef MPI_REAL
117 # undef MPI_REAL
118 #endif
119 
120 // Check to see if TOLERANCE has been defined by another
121 // package, if so we might want to change the name...
122 #ifdef TOLERANCE
123 DIE A HORRIBLE DEATH HERE...
124 # undef TOLERANCE
125 #endif
126 
127 
128 
129 // Define the type to use for real numbers
130 
131 typedef LIBMESH_DEFAULT_SCALAR_TYPE Real;
132 
133 // Define a corresponding tolerance. This is what should be
134 // considered "good enough" when doing floating point comparisons.
135 // For example, v == 0 is changed to std::abs(v) < TOLERANCE.
136 
137 #ifndef LIBMESH_DEFAULT_SINGLE_PRECISION
138 #ifdef LIBMESH_DEFAULT_TRIPLE_PRECISION
139 static const Real TOLERANCE = 1.e-8;
140 # define MPI_REAL MPI_LONG_DOUBLE
141 #else
142 static const Real TOLERANCE = 1.e-6;
143 # define MPI_REAL MPI_DOUBLE
144 #endif
145 #else
146 static const Real TOLERANCE = 2.5e-3;
147 # define MPI_REAL MPI_FLOAT
148 #endif
149 
150 // Define the type to use for complex numbers
151 // Always use std::complex<double>, as required by Petsc?
152 // If your version of Petsc doesn't support
153 // std::complex<other_precision>, then you'd better just leave
154 // Real==double
155 typedef std::complex<Real> Complex;
156 typedef std::complex<Real> COMPLEX;
157 
158 
159 // Helper functions for complex/real numbers
160 // to clean up #ifdef LIBMESH_USE_COMPLEX_NUMBERS elsewhere
161 template<typename T> inline T libmesh_real(T a) { return a; }
162 template<typename T> inline T libmesh_conj(T a) { return a; }
163 
164 template<typename T>
165 inline T libmesh_real(std::complex<T> a) { return std::real(a); }
166 
167 template<typename T>
168 inline std::complex<T> libmesh_conj(std::complex<T> a) { return std::conj(a); }
169 
170 // isnan isn't actually C++ standard yet; in contexts where it's not defined in
171 // cmath, libmesh_isnan will just end up returning false.
172 inline bool libmesh_isnan(float a) { return libmesh_C_isnan_float(a); }
173 inline bool libmesh_isnan(double a) { return libmesh_C_isnan_double(a); }
174 inline bool libmesh_isnan(long double a) { return libmesh_C_isnan_longdouble(a); }
175 
176 template <typename T>
177 inline bool libmesh_isnan(std::complex<T> a) { return (libmesh_isnan(std::real(a)) || libmesh_isnan(std::imag(a))); }
178 
179 // Same goes for isinf, which can be implemented in terms of isnan.
180 // http://stackoverflow.com/a/2249173/659433
181 template <typename T>
182 inline bool libmesh_isinf(T x) { return !libmesh_isnan(x) && libmesh_isnan(x - x); }
183 
184 template <typename T>
185 inline bool libmesh_isinf(std::complex<T> a) { return (libmesh_isinf(std::real(a)) || libmesh_isinf(std::imag(a))); }
186 
187 // Define the value type for unknowns in simulations.
188 // This is either Real or Complex, depending on how
189 // the library was configures
190 #if defined (LIBMESH_USE_REAL_NUMBERS)
191 typedef Real Number;
192 #elif defined (LIBMESH_USE_COMPLEX_NUMBERS)
193 typedef Complex Number;
194 #else
195 DIE A HORRIBLE DEATH HERE...
196 #endif
197 
198 
199 // Define the value type for error estimates.
200 // Since AMR/C decisions don't have to be precise,
201 // we default to float for memory efficiency.
202 typedef float ErrorVectorReal;
203 #define MPI_ERRORVECTORREAL MPI_FLOAT
204 
205 
206 #ifdef LIBMESH_HAVE_MPI
207 
211 extern MPI_Comm GLOBAL_COMM_WORLD;
212 #else
213 
218 extern int GLOBAL_COMM_WORLD;
219 #endif
220 
221 // Let's define a couple output streams - these will default
222 // to cout/cerr, but LibMeshInit (or the user) can also set them to
223 // something more sophisticated.
224 //
225 // We use a proxy class rather than references so they can be
226 // reseated at runtime.
227 
230 
231 // This global variable is to help us deprecate AutoPtr. We can't
232 // just use libmesh_deprecated() because then you get one print out
233 // per template instantiation, instead of one total print out.
234 extern bool warned_about_auto_ptr;
235 
236 // These are useful macros that behave like functions in the code.
237 // If you want to make sure you are accessing a section of code just
238 // stick a libmesh_here(); in it, for example
239 #define libmesh_here() \
240  do { \
241  libMesh::MacroFunctions::here(__FILE__, __LINE__, LIBMESH_DATE, LIBMESH_TIME); \
242  } while (0)
243 
244 // the libmesh_stop() macro will stop the code until a SIGCONT signal
245 // is received. This is useful, for example, when determining the
246 // memory used by a given operation. A libmesh_stop() could be
247 // inserted before and after a questionable operation and the delta
248 // memory can be obtained from a ps or top. This macro only works for
249 // serial cases.
250 #define libmesh_stop() \
251  do { \
252  libMesh::MacroFunctions::stop(__FILE__, __LINE__, LIBMESH_DATE, LIBMESH_TIME); \
253  } while (0)
254 
255 // The libmesh_dbg_var() macro indicates that an argument to a function
256 // is used only in debug mode (i.e., when NDEBUG is not defined).
257 #ifndef NDEBUG
258 #define libmesh_dbg_var(var) var
259 #else
260 #define libmesh_dbg_var(var)
261 #endif
262 
263 // The libmesh_assert() macro acts like C's assert(), but throws a
264 // libmesh_error() (including stack trace, etc) instead of just exiting
265 #ifdef NDEBUG
266 
267 #define libmesh_assert_msg(asserted, msg) ((void) 0)
268 #define libmesh_exceptionless_assert_msg(asserted, msg) ((void) 0)
269 #define libmesh_assert_equal_to_msg(expr1,expr2, msg) ((void) 0)
270 #define libmesh_assert_not_equal_to_msg(expr1,expr2, msg) ((void) 0)
271 #define libmesh_assert_less_msg(expr1,expr2, msg) ((void) 0)
272 #define libmesh_assert_greater_msg(expr1,expr2, msg) ((void) 0)
273 #define libmesh_assert_less_equal_msg(expr1,expr2, msg) ((void) 0)
274 #define libmesh_assert_greater_equal_msg(expr1,expr2, msg) ((void) 0)
275 
276 #else
277 
278 #define libmesh_assert_msg(asserted, msg) \
279  do { \
280  if (!(asserted)) { \
281  libMesh::err << "Assertion `" #asserted "' failed." << std::endl; \
282  libmesh_error_msg(msg); \
283  } } while (0)
284 
285 #define libmesh_exceptionless_assert_msg(asserted, msg) \
286  do { \
287  if (!(asserted)) { \
288  libMesh::err << "Assertion `" #asserted "' failed." << std::endl; \
289  libmesh_exceptionless_error(); \
290  } } while (0)
291 
292 #define libmesh_assert_equal_to_msg(expr1,expr2, msg) \
293  do { \
294  if (!(expr1 == expr2)) { \
295  libMesh::err << "Assertion `" #expr1 " == " #expr2 "' failed.\n" #expr1 " = " << (expr1) << "\n" #expr2 " = " << (expr2) << '\n' << msg << std::endl; \
296  libmesh_error(); \
297  } } while (0)
298 
299 #define libmesh_assert_not_equal_to_msg(expr1,expr2, msg) \
300  do { \
301  if (!(expr1 != expr2)) { \
302  libMesh::err << "Assertion `" #expr1 " != " #expr2 "' failed.\n" #expr1 " = " << (expr1) << "\n" #expr2 " = " << (expr2) << '\n' << msg << std::endl; \
303  libmesh_error(); \
304  } } while (0)
305 
306 #define libmesh_assert_less_msg(expr1,expr2, msg) \
307  do { \
308  if (!(expr1 < expr2)) { \
309  libMesh::err << "Assertion `" #expr1 " < " #expr2 "' failed.\n" #expr1 " = " << (expr1) << "\n" #expr2 " = " << (expr2) << '\n' << msg << std::endl; \
310  libmesh_error(); \
311  } } while (0)
312 
313 #define libmesh_assert_greater_msg(expr1,expr2, msg) \
314  do { \
315  if (!(expr1 > expr2)) { \
316  libMesh::err << "Assertion `" #expr1 " > " #expr2 "' failed.\n" #expr1 " = " << (expr1) << "\n" #expr2 " = " << (expr2) << '\n' << msg << std::endl; \
317  libmesh_error(); \
318  } } while (0)
319 
320 #define libmesh_assert_less_equal_msg(expr1,expr2, msg) \
321  do { \
322  if (!(expr1 <= expr2)) { \
323  libMesh::err << "Assertion `" #expr1 " <= " #expr2 "' failed.\n" #expr1 " = " << (expr1) << "\n" #expr2 " = " << (expr2) << '\n' << msg << std::endl; \
324  libmesh_error(); \
325  } } while (0)
326 
327 #define libmesh_assert_greater_equal_msg(expr1,expr2, msg) \
328  do { \
329  if (!(expr1 >= expr2)) { \
330  libMesh::err << "Assertion `" #expr1 " >= " #expr2 "' failed.\n" #expr1 " = " << (expr1) << "\n" #expr2 " = " << (expr2) << '\n' << msg << std::endl; \
331  libmesh_error(); \
332  } } while (0)
333 #endif
334 
335 
336 #define libmesh_assert(asserted) libmesh_assert_msg(asserted, "")
337 #define libmesh_exceptionless_assert(asserted) libmesh_exceptionless_assert_msg(asserted, "")
338 #define libmesh_assert_equal_to(expr1,expr2) libmesh_assert_equal_to_msg(expr1,expr2, "")
339 #define libmesh_assert_not_equal_to(expr1,expr2) libmesh_assert_not_equal_to_msg(expr1,expr2, "")
340 #define libmesh_assert_less(expr1,expr2) libmesh_assert_less_msg(expr1,expr2, "")
341 #define libmesh_assert_greater(expr1,expr2) libmesh_assert_greater_msg(expr1,expr2, "")
342 #define libmesh_assert_less_equal(expr1,expr2) libmesh_assert_less_equal_msg(expr1,expr2, "")
343 #define libmesh_assert_greater_equal(expr1,expr2) libmesh_assert_greater_equal_msg(expr1,expr2, "")
344 
345 // The libmesh_error() macro prints a message and throws a LogicError
346 // exception
347 //
348 // The libmesh_not_implemented() macro prints a message and throws a
349 // NotImplemented exception
350 //
351 // The libmesh_file_error(const std::string & filename) macro prints a message
352 // and throws a FileError exception
353 //
354 // The libmesh_convergence_failure() macro
355 // throws a ConvergenceFailure exception
356 #define libmesh_error_msg(msg) \
357  do { \
358  libMesh::err << msg << std::endl; \
359  std::stringstream msg_stream; \
360  msg_stream << msg; \
361  libMesh::MacroFunctions::report_error(__FILE__, __LINE__, LIBMESH_DATE, LIBMESH_TIME); \
362  LIBMESH_THROW(libMesh::LogicError(msg_stream.str())); \
363  } while (0)
364 
365 #define libmesh_error() libmesh_error_msg("")
366 
367 #define libmesh_exceptionless_error_msg(msg) \
368  do { \
369  libMesh::err << msg << std::endl; \
370  libMesh::MacroFunctions::report_error(__FILE__, __LINE__, LIBMESH_DATE, LIBMESH_TIME); \
371  std::terminate(); \
372  } while (0)
373 
374 #define libmesh_exceptionless_error() libmesh_exceptionless_error_msg("")
375 
376 #define libmesh_not_implemented_msg(msg) \
377  do { \
378  libMesh::err << msg << std::endl; \
379  libMesh::MacroFunctions::report_error(__FILE__, __LINE__, LIBMESH_DATE, LIBMESH_TIME); \
380  LIBMESH_THROW(libMesh::NotImplemented()); \
381  } while (0)
382 
383 #define libmesh_not_implemented() libmesh_not_implemented_msg("")
384 
385 #define libmesh_file_error_msg(filename, msg) \
386  do { \
387  libMesh::err << "Error with file `" << filename << "'" << std::endl; \
388  libMesh::MacroFunctions::report_error(__FILE__, __LINE__, LIBMESH_DATE, LIBMESH_TIME); \
389  libMesh::err << msg << std::endl; \
390  LIBMESH_THROW(libMesh::FileError(filename)); \
391  } while (0)
392 
393 #define libmesh_file_error(filename) libmesh_file_error_msg(filename,"")
394 
395 #define libmesh_convergence_failure() \
396  do { \
397  LIBMESH_THROW(libMesh::ConvergenceFailure()); \
398  } while (0)
399 
400 // The libmesh_example_requires() macro prints a message and calls
401 // "return 77;" if the condition specified by the macro is not true. This
402 // macro is used in the example executables, which should run when the
403 // configure-time libMesh options support them but which should exit
404 // without failure otherwise.
405 //
406 // This macro only works in main(), because we have no better way than
407 // "return" from main to immediately exit successfully - std::exit()
408 // gets seen by at least some MPI stacks as failure.
409 //
410 // 77 is the automake code for a skipped test.
411 
412 #define libmesh_example_requires(condition, option) \
413  do { \
414  if (!(condition)) { \
415  libMesh::out << "Configuring libMesh with " << option << " is required to run this example." << std::endl; \
416  return 77; \
417  } } while (0)
418 
419 // The libmesh_do_once macro helps us avoid redundant repeated
420 // repetitions of the same warning messages
421 #undef libmesh_do_once
422 #define libmesh_do_once(do_this) \
423  do { \
424  static bool did_this_already = false; \
425  if (!did_this_already) { \
426  did_this_already = true; \
427  do_this; \
428  } } while (0)
429 
430 
431 // The libmesh_warning macro outputs a file/line/time stamped warning
432 // message, if warnings are enabled.
433 #ifdef LIBMESH_ENABLE_WARNINGS
434 #define libmesh_warning(message) \
435  libmesh_do_once(libMesh::out << message \
436  << __FILE__ << ", line " << __LINE__ << ", compiled " << LIBMESH_DATE << " at " << LIBMESH_TIME << " ***" << std::endl;)
437 #else
438 #define libmesh_warning(message) ((void) 0)
439 #endif
440 
441 // The libmesh_experimental macro warns that you are using
442 // bleeding-edge code
443 #undef libmesh_experimental
444 #define libmesh_experimental() \
445  libmesh_warning("*** Warning, This code is untested, experimental, or likely to see future API changes: ");
446 
447 
448 // The libmesh_deprecated macro warns that you are using obsoleted code
449 #undef libmesh_deprecated
450 #ifndef LIBMESH_ENABLE_DEPRECATED
451 #define libmesh_deprecated() \
452  libmesh_error_msg("*** Error, This code is deprecated, and likely to be removed in future library versions! ");
453 #else
454 #define libmesh_deprecated() \
455  libmesh_warning("*** Warning, This code is deprecated, and likely to be removed in future library versions! ");
456 #endif
457 
458 // A function template for ignoring unused variables. This is a way
459 // to shut up unused variable compiler warnings on a case by case
460 // basis.
461 template<class ...Args> inline void libmesh_ignore( const Args&... ) { }
462 
463 
464 // cast_ref and cast_ptr do a dynamic cast and assert
465 // the result, if we have RTTI enabled and we're in debug or
466 // development modes, but they just do a faster static cast if we're
467 // in optimized mode.
468 //
469 // Use these casts when you're certain that a cast will succeed in
470 // correct code but you want to be able to double-check.
471 template <typename Tnew, typename Told>
472 inline Tnew cast_ref(Told & oldvar)
473 {
474 #if !defined(NDEBUG) && defined(LIBMESH_HAVE_RTTI) && defined(LIBMESH_ENABLE_EXCEPTIONS)
475  try
476  {
477  Tnew newvar = dynamic_cast<Tnew>(oldvar);
478  return newvar;
479  }
480  catch (std::bad_cast &)
481  {
482  libMesh::err << "Failed to convert " << typeid(Told).name()
483  << " reference to " << typeid(Tnew).name()
484  << std::endl;
485  libMesh::err << "The " << typeid(Told).name()
486  << " appears to be a "
487  << typeid(*(&oldvar)).name() << std::endl;
488  libmesh_error();
489  }
490 #else
491  return(static_cast<Tnew>(oldvar));
492 #endif
493 }
494 
495 #ifdef LIBMESH_ENABLE_DEPRECATED
496 template <typename Tnew, typename Told>
497 inline Tnew libmesh_cast_ref(Told & oldvar)
498 {
499  // we use the less redundantly named libMesh::cast_ref now
500  libmesh_deprecated();
501  return cast_ref<Tnew>(oldvar);
502 }
503 #endif
504 
505 // We use two different function names to avoid an odd overloading
506 // ambiguity bug with icc 10.1.008
507 template <typename Tnew, typename Told>
508 inline Tnew cast_ptr (Told * oldvar)
509 {
510 #if !defined(NDEBUG) && defined(LIBMESH_HAVE_RTTI)
511  Tnew newvar = dynamic_cast<Tnew>(oldvar);
512  if (!newvar)
513  {
514  libMesh::err << "Failed to convert " << typeid(Told).name()
515  << " pointer to " << typeid(Tnew).name()
516  << std::endl;
517  libMesh::err << "The " << typeid(Told).name()
518  << " appears to be a "
519  << typeid(*oldvar).name() << std::endl;
520  libmesh_error();
521  }
522  return newvar;
523 #else
524  return(static_cast<Tnew>(oldvar));
525 #endif
526 }
527 
528 
529 template <typename Tnew, typename Told>
530 inline Tnew libmesh_cast_ptr (Told * oldvar)
531 {
532  // we use the less redundantly named libMesh::cast_ptr now
533  return cast_ptr<Tnew>(oldvar);
534 }
535 
536 
537 // cast_int asserts that the value of the castee is within the
538 // bounds which are exactly representable by the output type, if we're
539 // in debug or development modes, but it just does a faster static
540 // cast if we're in optimized mode.
541 //
542 // Use these casts when you're certain that a cast will succeed in
543 // correct code but you want to be able to double-check.
544 template <typename Tnew, typename Told>
545 inline Tnew cast_int (Told oldvar)
546 {
547  libmesh_assert_equal_to
548  (oldvar, static_cast<Told>(static_cast<Tnew>(oldvar)));
549 
550  return(static_cast<Tnew>(oldvar));
551 }
552 
553 
554 template <typename Tnew, typename Told>
555 inline Tnew libmesh_cast_int (Told oldvar)
556 {
557  // we use the less redundantly named libMesh::cast_int now
558  return cast_int<Tnew>(oldvar);
559 }
560 
561 
562 // build a integer representation of version
563 #define LIBMESH_VERSION_ID(major,minor,patch) (((major) << 16) | ((minor) << 8) | ((patch) & 0xFF))
564 
565 
566 // libmesh_override is simply a synonym for override as we now require
567 // a C++11 compiler that supports this keyword.
568 #define libmesh_override override
569 
570 // libmesh_delete is simply a synonym for '=delete' as we now require
571 // a C++11 compiler that supports this keyword.
572 #define libmesh_delete =delete
573 
574 // libmesh_final is simply a synonym for 'final' as we now require
575 // a C++11 compiler that supports this keyword.
576 #define libmesh_final final
577 
578 // Define backwards-compatible fallthrough attribute. We could
579 // eventually also add support for other compiler-specific fallthrough
580 // attributes.
581 #ifdef LIBMESH_HAVE_CXX17_FALLTHROUGH_ATTRIBUTE
582 #define libmesh_fallthrough() [[fallthrough]]
583 #elif defined(LIBMESH_HAVE_DOUBLE_UNDERSCORE_ATTRIBUTE_FALLTHROUGH)
584 #define libmesh_fallthrough() __attribute__((fallthrough))
585 #else
586 #define libmesh_fallthrough() ((void) 0)
587 #endif
588 
589 } // namespace libMesh
590 
591 
592 // Backwards compatibility
593 namespace libMeshEnums
594 {
595 using namespace libMesh;
596 }
597 
598 #endif // LIBMESH_LIBMESH_COMMON_H
T libmesh_real(T a)
std::string name(const ElemQuality q)
Definition: elem_quality.C:42
T libmesh_conj(T a)
Tnew cast_ref(Told &oldvar)
int libmesh_C_isnan_double(double a)
Definition: libmesh_isnan.c:26
Tnew cast_ptr(Told *oldvar)
bool warned_about_auto_ptr
static const Real TOLERANCE
MPI_Comm GLOBAL_COMM_WORLD
Definition: libmesh.C:195
Tnew libmesh_cast_ptr(Told *oldvar)
DIE A HORRIBLE DEATH HERE typedef float ErrorVectorReal
bool libmesh_isinf(T x)
Tnew cast_int(Told oldvar)
void libmesh_ignore(const Args &...)
std::complex< Real > COMPLEX
void stop(const char *file, int line, const char *date, const char *time)
int libmesh_C_isnan_float(float a)
Definition: libmesh_isnan.c:25
Tnew libmesh_cast_ref(Told &oldvar)
OStreamProxy err(std::cerr)
std::complex< Real > Complex
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool libmesh_isnan(float a)
static PetscErrorCode Mat * A
void here(const char *file, int line, const char *date, const char *time)
void report_error(const char *file, int line, const char *date, const char *time)
OStreamProxy out(std::cout)
Tnew libmesh_cast_int(Told oldvar)
int libmesh_C_isnan_longdouble(long double a)
Definition: libmesh_isnan.c:27