Additionally, boundschecking for some of the container classes can be enabled through configuring Trilinos with --enable-teuchos-abc. Boundschecking incurs a significant performance penalty and so is not recommended for production builds. To enable complex arithmetic in the computational classes, Teuchos must be configured with --enable-teuchos-complex.
--enable-teuchos-abc
configure flag.
--enable-teuchos-debug
or --enable-teuchos-abc
configure flags.
Teuchos::RCP
objects.
dynamic_cast<>
that throws std::bad_cast
exceptions with very detailed error messages on what types are involved.
Teuchos::getConst()
is a silly little templated function that returns a constant reference given any constant object. This function allows a piece of code to access the const
version of a member function given a non-const
reference to an object.
Teuchos::FancyOStream
wraps any std::ostream
object and produces nicely indented outputting. It can also add prefixes to each line of output such as the processor rank.
Teuchos::OSTab
is used in conjunction with a Teuchos::FancyOStream
object to generate exception safe indentation control as well as set other information related to the line prefix.
Teuchos::VerboseObject
is a base class that objects can inherit from that makes producing coordinated informative outputting easier. This class can be inherited by any C++ subclass without requiring any function overrides but to be useful the class object must use the embedded ostream and verbosity level to print its activities.
Teuchos::oblackholestream
is a concrete subclass of std::ostream
that ignores all output. This class is very useful in writing SPMD parallel programs and controlling which processor(s) produce output. Generally only the the root process uses a real std::ostream
object while all of the slave processors use a Teuchos::oblackholestream
for console output.
Teuchos::Describable
defines an interface that subclasses can override that allows the creation of formated output of an object's state complete with indentation control. This class has default definitions for all of its virtual member functions and therefore can be inherited by existing C++ classes without requiring any additional implementation support to get started.
Teuchos contains some utilities that make it easier to write tests