Reference documentation for deal.II version 9.2.0
|
This module contains classes that are used in the exception mechanism of deal.II. More...
Modules | |
TrilinosWrappers | |
The classes in this module are wrappers around functionality provided by the Trilinos library. They provide a modern object-oriented interface that is compatible with the interfaces of the other linear algebra classes in deal.II. All classes and functions in this group reside in a namespace TrilinosWrappers . | |
Macros | |
#define | DeclException0(Exception0) |
#define | DeclExceptionMsg(Exception, defaulttext) |
#define | DeclException1(Exception1, type1, outsequence) |
#define | DeclException2(Exception2, type1, type2, outsequence) |
#define | DeclException3(Exception3, type1, type2, type3, outsequence) |
#define | DeclException4(Exception4, type1, type2, type3, type4, outsequence) |
#define | DeclException5( Exception5, type1, type2, type3, type4, type5, outsequence) |
#define | Assert(cond, exc) |
#define | AssertNothrow(cond, exc) |
#define | AssertThrow(cond, exc) |
#define | AssertDimension(dim1, dim2) |
#define | AssertVectorVectorDimension(VEC, DIM1, DIM2) |
#define | AssertIndexRange(index, range) |
#define | AssertIsFinite(number) |
#define | AssertThrowMPI(error_code) AssertThrow(error_code == MPI_SUCCESS, ::ExcMPI(error_code)) |
#define | AssertCuda(error_code) |
#define | AssertNothrowCuda(error_code) |
#define | AssertCudaKernel() |
#define | AssertCusparse(error_code) |
#define | AssertNothrowCusparse(error_code) |
#define | AssertCusolver(error_code) |
Data storage and access | |
static ::ExceptionBase & | GeneralDataStorage::ExcNameNotFound (std::string arg1) |
static ::ExceptionBase & | GeneralDataStorage::ExcNameHasBeenFound (std::string arg1) |
static ::ExceptionBase & | GeneralDataStorage::ExcTypeMismatch (std::string arg1, const char *arg2, const char *arg3) |
Bitwise operators | |
std::ostream & | Differentiation::SD::operator<< (std::ostream &stream, const Expression &expression) |
std::istream & | Differentiation::SD::operator>> (std::istream &stream, Expression &expression) |
Comparison operators | |
Expression | Differentiation::SD::operator== (const Expression &lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator!= (const Expression &lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator< (const Expression &lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator> (const Expression &lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator<= (const Expression &lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator>= (const Expression &lhs, const Expression &rhs) |
Logical operators | |
Expression | Differentiation::SD::operator! (const Expression &expression) |
Expression | Differentiation::SD::operator& (const Expression &lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator| (const Expression &lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator^ (const Expression &lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator&& (const Expression &lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator|| (const Expression &lhs, const Expression &rhs) |
Mathematical operators | |
Expression | Differentiation::SD::operator+ (Expression lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator- (Expression lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator* (Expression lhs, const Expression &rhs) |
Expression | Differentiation::SD::operator/ (Expression lhs, const Expression &rhs) |
template<typename NumberType , typename = typename std::enable_if< std::is_constructible<Expression, NumberType>::value>::type> | |
Expression | Differentiation::SD::operator+ (const NumberType &lhs, const Expression &rhs) |
template<typename NumberType , typename = typename std::enable_if< std::is_constructible<Expression, NumberType>::value>::type> | |
Expression | Differentiation::SD::operator+ (const Expression &lhs, const NumberType &rhs) |
template<typename NumberType , typename = typename std::enable_if< std::is_constructible<Expression, NumberType>::value>::type> | |
Expression | Differentiation::SD::operator- (const NumberType &lhs, const Expression &rhs) |
template<typename NumberType , typename = typename std::enable_if< std::is_constructible<Expression, NumberType>::value>::type> | |
Expression | Differentiation::SD::operator- (const Expression &lhs, const NumberType &rhs) |
template<typename NumberType , typename = typename std::enable_if< std::is_constructible<Expression, NumberType>::value>::type> | |
Expression | Differentiation::SD::operator* (const NumberType &lhs, const Expression &rhs) |
template<typename NumberType , typename = typename std::enable_if< std::is_constructible<Expression, NumberType>::value>::type> | |
Expression | Differentiation::SD::operator* (const Expression &lhs, const NumberType &rhs) |
template<typename NumberType , typename = typename std::enable_if< std::is_constructible<Expression, NumberType>::value>::type> | |
Expression | Differentiation::SD::operator/ (const NumberType &lhs, const Expression &rhs) |
template<typename NumberType , typename = typename std::enable_if< std::is_constructible<Expression, NumberType>::value>::type> | |
Expression | Differentiation::SD::operator/ (const Expression &lhs, const NumberType &rhs) |
Constructors | |
Differentiation::SD::Expression::Expression () | |
Differentiation::SD::Expression::Expression (const bool value) | |
template<typename NumberType , typename = typename std::enable_if< std::is_arithmetic<NumberType>::value>::type> | |
Differentiation::SD::Expression::Expression (const NumberType &value) | |
template<typename NumberType , typename = typename std::enable_if< std::is_arithmetic<NumberType>::value>::type> | |
Differentiation::SD::Expression::Expression (const std::complex< NumberType > &value) | |
Differentiation::SD::Expression::Expression (const SymEngine::integer_class &value) | |
template<typename NumberType , typename = typename std::enable_if< std::is_integral<NumberType>::value>::type> | |
Differentiation::SD::Expression::Expression (const NumberType &numerator, const NumberType &denominator) | |
Differentiation::SD::Expression::Expression (const SymEngine::rational_class &value) | |
Differentiation::SD::Expression::Expression (const Expression &condition, const Expression &expression_if_true, const Expression &expression_if_false) | |
Differentiation::SD::Expression::Expression (const std::vector< std::pair< Expression, Expression >> &condition_expression, const Expression &expression_otherwise) | |
Differentiation::SD::Expression::Expression (const std::vector< std::pair< Expression, Expression >> &condition_expression) | |
Differentiation::SD::Expression::Expression (const char *symbol) | |
Differentiation::SD::Expression::Expression (const std::string &symb_expr, const bool parse_as_expression=false) | |
Differentiation::SD::Expression::Expression (const std::string &symbol_func, const types::symbol_vector &arguments) | |
Differentiation::SD::Expression::Expression (const Expression &rhs)=default | |
Differentiation::SD::Expression::Expression (const SymEngine::Expression &rhs) | |
Differentiation::SD::Expression::Expression (const SymEngine::RCP< const SymEngine::Basic > &rhs) | |
Differentiation::SD::Expression::Expression (Expression &&rhs)=default | |
Differentiation::SD::Expression::Expression (SymEngine::RCP< const SymEngine::Basic > &&rhs) | |
virtual | Differentiation::SD::Expression::~Expression ()=default |
Expression & | Differentiation::SD::Expression::parse (const std::string &expression) |
std::ostream & | Differentiation::SD::Expression::print (std::ostream &stream) const |
void | Differentiation::SD::Expression::save (std::ostream &stream) const |
void | Differentiation::SD::Expression::load (std::istream &stream) |
template<class Archive > | |
void | Differentiation::SD::Expression::save (Archive &archive, const unsigned int version) const |
template<class Archive > | |
void | Differentiation::SD::Expression::load (Archive &archive, const unsigned int version) |
template<class Archive > | |
void | Differentiation::SD::Expression::serialize (Archive &archive, const unsigned int version) |
Values | |
const SymEngine::Expression & | Differentiation::SD::Expression::get_expression () const |
const SymEngine::Basic & | Differentiation::SD::Expression::get_value () const |
const SymEngine::RCP< const SymEngine::Basic > & | Differentiation::SD::Expression::get_RCP () const |
Math and relational operators with (potentially) symbolic types | |
Expression & | Differentiation::SD::Expression::operator= (const Expression &rhs) |
Expression & | Differentiation::SD::Expression::operator= (Expression &&rhs) noexcept |
Expression & | Differentiation::SD::Expression::operator+= (const Expression &rhs) |
Expression & | Differentiation::SD::Expression::operator-= (const Expression &rhs) |
Expression & | Differentiation::SD::Expression::operator*= (const Expression &rhs) |
Expression & | Differentiation::SD::Expression::operator/= (const Expression &rhs) |
Math and relational operators with numeric types | |
template<typename NumberType > | |
Expression & | Differentiation::SD::Expression::operator= (const NumberType &rhs) |
Expression | Differentiation::SD::Expression::operator- () const |
template<typename NumberType > | |
Expression & | Differentiation::SD::Expression::operator+= (const NumberType &rhs) |
template<typename NumberType > | |
Expression & | Differentiation::SD::Expression::operator-= (const NumberType &rhs) |
template<typename NumberType > | |
Expression & | Differentiation::SD::Expression::operator*= (const NumberType &rhs) |
template<typename NumberType > | |
Expression & | Differentiation::SD::Expression::operator/= (const NumberType &rhs) |
Differentiation | |
Expression | Differentiation::SD::Expression::differentiate (const Expression &symbol) const |
Expression | Differentiation::SD::Expression::differentiate (const SymEngine::RCP< const SymEngine::Symbol > &symbol) const |
Expression | Differentiation::SD::Expression::differentiate (const SymEngine::RCP< const SymEngine::Basic > &symbol) const |
Dictionary-based substitution | |
Expression | Differentiation::SD::Expression::substitute (const types::substitution_map &substitution_values) const |
Expression | Differentiation::SD::Expression::substitute (const SymEngine::map_basic_basic &substitution_values) const |
Expression | Differentiation::SD::Expression::substitute (const Expression &symbol, const Expression &value) const |
template<typename NumberType > | |
Expression | Differentiation::SD::Expression::substitute (const Expression &symbol, const NumberType &value) const |
template<typename ReturnType > | |
ReturnType | Differentiation::SD::Expression::substitute_and_evaluate (const types::substitution_map &substitution_values) const |
template<typename ReturnType > | |
ReturnType | Differentiation::SD::Expression::substitute_and_evaluate (const SymEngine::map_basic_basic &substitution_values) const |
Conversion operators | |
SymEngine::Expression | Differentiation::SD::Expression::expression |
template<typename ResultType > | |
Differentiation::SD::Expression::operator ResultType () const | |
Differentiation::SD::Expression::operator const SymEngine::Expression & () const | |
Differentiation::SD::Expression::operator const SymEngine::RCP< const SymEngine::Basic > & () const | |
SymEngine::Expression & | Differentiation::SD::Expression::get_expression () |
Independent variables | |
void | Differentiation::SD::BatchOptimizer< ReturnType >::register_symbols (const types::substitution_map &substitution_map) |
void | Differentiation::SD::BatchOptimizer< ReturnType >::register_symbols (const SymEngine::map_basic_basic &substitution_map) |
void | Differentiation::SD::BatchOptimizer< ReturnType >::register_symbols (const types::symbol_vector &symbols) |
void | Differentiation::SD::BatchOptimizer< ReturnType >::register_symbols (const SymEngine::vec_basic &symbols) |
types::symbol_vector | Differentiation::SD::BatchOptimizer< ReturnType >::get_independent_symbols () const |
std::size_t | Differentiation::SD::BatchOptimizer< ReturnType >::n_independent_variables () const |
Symbol substitution | |
void | Differentiation::SD::BatchOptimizer< ReturnType >::substitute (const types::substitution_map &substitution_map) const |
void | Differentiation::SD::BatchOptimizer< ReturnType >::substitute (const SymEngine::map_basic_basic &substitution_map) const |
void | Differentiation::SD::BatchOptimizer< ReturnType >::substitute (const types::symbol_vector &symbols, const std::vector< ReturnType > &values) const |
void | Differentiation::SD::BatchOptimizer< ReturnType >::substitute (const SymEngine::vec_basic &symbols, const std::vector< ReturnType > &values) const |
bool | Differentiation::SD::BatchOptimizer< ReturnType >::values_substituted () const |
Cell iterator functions returning ranges of iterators | |
static ::ExceptionBase & | DoFHandler< dim, spacedim >::ExcGridsDoNotMatch () |
static ::ExceptionBase & | DoFHandler< dim, spacedim >::ExcInvalidBoundaryIndicator () |
static ::ExceptionBase & | DoFHandler< dim, spacedim >::ExcNewNumbersNotConsecutive (types::global_dof_index arg1) |
static ::ExceptionBase & | DoFHandler< dim, spacedim >::ExcInvalidLevel (int arg1) |
static ::ExceptionBase & | DoFHandler< dim, spacedim >::ExcFacesHaveNoLevel () |
static ::ExceptionBase & | DoFHandler< dim, spacedim >::ExcEmptyLevel (int arg1) |
Exceptions | |
static ::ExceptionBase & | DoFTools::ExcFiniteElementsDontMatch () |
static ::ExceptionBase & | DoFTools::ExcGridNotCoarser () |
static ::ExceptionBase & | DoFTools::ExcGridsDontMatch () |
static ::ExceptionBase & | DoFTools::ExcNoFESelected () |
static ::ExceptionBase & | DoFTools::ExcInvalidBoundaryIndicator () |
Support points and interpolation | |
static ::ExceptionBase & | FiniteElement< dim, spacedim >::ExcShapeFunctionNotPrimitive (int arg1) |
static ::ExceptionBase & | FiniteElement< dim, spacedim >::ExcFENotPrimitive () |
static ::ExceptionBase & | FiniteElement< dim, spacedim >::ExcUnitShapeValuesDoNotExist () |
static ::ExceptionBase & | FiniteElement< dim, spacedim >::ExcFEHasNoSupportPoints () |
static ::ExceptionBase & | FiniteElement< dim, spacedim >::ExcEmbeddingVoid () |
static ::ExceptionBase & | FiniteElement< dim, spacedim >::ExcProjectionVoid () |
static ::ExceptionBase & | FiniteElement< dim, spacedim >::ExcWrongInterfaceMatrixSize (int arg1, int arg2) |
static ::ExceptionBase & | FiniteElement< dim, spacedim >::ExcInterpolationNotImplemented () |
Functions to support hp | |
static ::ExceptionBase & | FE_Q_Base< PolynomialType, dim, spacedim >::ExcFEQCannotHaveDegree0 () |
Functions which should be in DoFTools | |
static ::ExceptionBase & | FETools::ExcInvalidFEName (std::string arg1) |
static ::ExceptionBase & | FETools::ExcInvalidFEDimension (char arg1, int arg2) |
static ::ExceptionBase & | FETools::ExcInvalidFE () |
static ::ExceptionBase & | FETools::ExcFENotPrimitive () |
static ::ExceptionBase & | FETools::ExcTriangulationMismatch () |
static ::ExceptionBase & | FETools::ExcHangingNodesNotAllowed () |
static ::ExceptionBase & | FETools::ExcGridNotRefinedAtLeastOnce () |
static ::ExceptionBase & | FETools::ExcMatrixDimensionMismatch (int arg1, int arg2, int arg3, int arg4) |
static ::ExceptionBase & | FETools::ExcLeastSquaresError (double arg1) |
static ::ExceptionBase & | FETools::ExcNotGreaterThan (int arg1, int arg2) |
Access to the raw data | |
static ::ExceptionBase & | FEValuesBase< dim, spacedim >::ExcAccessToUninitializedField (std::string arg1) |
static ::ExceptionBase & | FEValuesBase< dim, spacedim >::ExcFEDontMatch () |
static ::ExceptionBase & | FEValuesBase< dim, spacedim >::ExcShapeFunctionNotPrimitive (int arg1) |
static ::ExceptionBase & | FEValuesBase< dim, spacedim >::ExcFENotPrimitive () |
Exceptions | |
static ::ExceptionBase & | Mapping< dim, spacedim >::ExcInvalidData () |
static ::ExceptionBase & | Mapping< dim, spacedim >::ExcTransformationFailed () |
static ::ExceptionBase & | Mapping< dim, spacedim >::ExcDistortedMappedCell (Point< spacedim > arg1, double arg2, int arg3) |
Exceptions | |
static ::ExceptionBase & | GridGenerator::ExcInvalidRadii () |
static ::ExceptionBase & | GridGenerator::ExcInvalidRepetitions (int arg1) |
static ::ExceptionBase & | GridGenerator::ExcInvalidRepetitionsDimension (int arg1) |
static ::ExceptionBase & | GridGenerator::ExcInvalidInputOrientation () |
Exceptions | |
static ::ExceptionBase & | GridTools::ExcInvalidNumberOfPartitions (int arg1) |
static ::ExceptionBase & | GridTools::ExcNonExistentSubdomain (int arg1) |
static ::ExceptionBase & | GridTools::ExcTriangulationHasBeenRefined () |
static ::ExceptionBase & | GridTools::ExcScalingFactorNotPositive (double arg1) |
template<int N> | |
static ::ExceptionBase & | GridTools::ExcPointNotFoundInCoarseGrid (Point< N > arg1) |
template<int N> | |
static ::ExceptionBase & | GridTools::ExcPointNotFound (Point< N > arg1) |
static ::ExceptionBase & | GridTools::ExcVertexNotUsed (unsigned int arg1) |
Exceptions | |
static ::ExceptionBase & | Triangulation< dim, spacedim >::ExcInvalidLevel (int arg1, int arg2) |
static ::ExceptionBase & | Triangulation< dim, spacedim >::ExcTriangulationNotEmpty (int arg1, int arg2) |
static ::ExceptionBase & | Triangulation< dim, spacedim >::ExcGridReadError () |
static ::ExceptionBase & | Triangulation< dim, spacedim >::ExcFacesHaveNoLevel () |
static ::ExceptionBase & | Triangulation< dim, spacedim >::ExcEmptyLevel (int arg1) |
static ::ExceptionBase & | Triangulation< dim, spacedim >::ExcNonOrientableTriangulation () |
static ::ExceptionBase & | Triangulation< dim, spacedim >::ExcBoundaryIdNotFound (types::boundary_id arg1) |
static ::ExceptionBase & | Triangulation< dim, spacedim >::ExcInconsistentCoarseningFlags () |
Exceptions | |
static ::ExceptionBase & | TriaRawIterator< Accessor >::ExcDereferenceInvalidCell (Accessor arg1) |
static ::ExceptionBase & | TriaRawIterator< Accessor >::ExcDereferenceInvalidObject (Accessor arg1) |
static ::ExceptionBase & | TriaRawIterator< Accessor >::ExcAdvanceInvalidObject () |
static ::ExceptionBase & | TriaRawIterator< Accessor >::ExcInvalidComparison () |
Advancement of iterators | |
static ::ExceptionBase & | TriaIterator< Accessor >::ExcAssignmentOfUnusedObject () |
Advancement of iterators | |
static ::ExceptionBase & | TriaActiveIterator< Accessor >::ExcAssignmentOfInactiveObject () |
Cell iterator functions returning ranges of iterators | |
static ::ExceptionBase & | hp::DoFHandler< dim, spacedim >::ExcNoFESelected () |
static ::ExceptionBase & | hp::DoFHandler< dim, spacedim >::ExcGridsDoNotMatch () |
static ::ExceptionBase & | hp::DoFHandler< dim, spacedim >::ExcInvalidBoundaryIndicator () |
static ::ExceptionBase & | hp::DoFHandler< dim, spacedim >::ExcMatrixHasWrongSize (int arg1) |
static ::ExceptionBase & | hp::DoFHandler< dim, spacedim >::ExcFunctionNotUseful () |
static ::ExceptionBase & | hp::DoFHandler< dim, spacedim >::ExcNewNumbersNotConsecutive (types::global_dof_index arg1) |
static ::ExceptionBase & | hp::DoFHandler< dim, spacedim >::ExcInvalidFEIndex (int arg1, int arg2) |
static ::ExceptionBase & | hp::DoFHandler< dim, spacedim >::ExcInvalidLevel (int arg1) |
static ::ExceptionBase & | hp::DoFHandler< dim, spacedim >::ExcFacesHaveNoLevel () |
static ::ExceptionBase & | hp::DoFHandler< dim, spacedim >::ExcEmptyLevel (int arg1) |
Exceptions | |
static ::ExceptionBase & | hp::FECollection< dim, spacedim >::ExcNoFiniteElements () |
static ::ExceptionBase & | hp::FECollection< dim, spacedim >::ExcNoDominatedFiniteElementAmongstChildren () |
Input/Output | |
SmartPointer< const BlockSparsityPattern, BlockSparseMatrix< number > > | BlockSparseMatrix< number >::sparsity_pattern |
static ::ExceptionBase & | BlockSparseMatrix< number >::ExcBlockDimensionMismatch () |
void | BlockSparseMatrix< number >::print_formatted (std::ostream &out, const unsigned int precision=3, const bool scientific=true, const unsigned int width=0, const char *zero_string=" ", const double denominator=1.) const |
Multiplications | |
static ::ExceptionBase & | FullMatrix< number >::ExcEmptyMatrix () |
static ::ExceptionBase & | FullMatrix< number >::ExcNotRegular (number arg1) |
static ::ExceptionBase & | FullMatrix< number >::ExcInvalidDestination (size_type arg1, size_type arg2, size_type arg3) |
static ::ExceptionBase & | FullMatrix< number >::ExcSourceEqualsDestination () |
static ::ExceptionBase & | FullMatrix< number >::ExcMatrixNotPositiveDefinite () |
2: Implementation of VectorSpaceVector | |
static ::ExceptionBase & | LinearAlgebra::distributed::BlockVector< Number >::ExcVectorTypeNotCompatible () |
static ::ExceptionBase & | LinearAlgebra::distributed::BlockVector< Number >::ExcIteratorRangeDoesNotMatchVectorSize () |
6: Mixed stuff | |
static ::ExceptionBase & | LinearAlgebra::distributed::Vector< Number, MemorySpace >::ExcVectorTypeNotCompatible () |
static ::ExceptionBase & | LinearAlgebra::distributed::Vector< Number, MemorySpace >::ExcNotAllowedForCuda () |
static ::ExceptionBase & | LinearAlgebra::distributed::Vector< Number, MemorySpace >::ExcNonMatchingElements (Number arg1, Number arg2, unsigned int arg3) |
static ::ExceptionBase & | LinearAlgebra::distributed::Vector< Number, MemorySpace >::ExcAccessToNonLocalElement (size_type arg1, size_type arg2, size_type arg3, size_type arg4) |
Construction and setup | |
Constructors, destructor, functions initializing, copying and filling an object. | |
SparsityPattern::SparsityPattern () | |
SparsityPattern::SparsityPattern (const SparsityPattern &) | |
SparsityPattern::SparsityPattern (const size_type m, const size_type n, const unsigned int max_per_row) | |
SparsityPattern::SparsityPattern (const size_type m, const size_type n, const std::vector< unsigned int > &row_lengths) | |
SparsityPattern::SparsityPattern (const size_type m, const unsigned int max_per_row) | |
SparsityPattern::SparsityPattern (const size_type m, const std::vector< unsigned int > &row_lengths) | |
SparsityPattern::SparsityPattern (const SparsityPattern &original, const unsigned int max_per_row, const size_type extra_off_diagonals) | |
SparsityPattern::~SparsityPattern () override=default | |
SparsityPattern & | SparsityPattern::operator= (const SparsityPattern &) |
virtual void | SparsityPattern::reinit (const size_type m, const size_type n, const ArrayView< const unsigned int > &row_lengths) override |
void | SparsityPattern::compress () |
template<typename ForwardIterator > | |
void | SparsityPattern::copy_from (const size_type n_rows, const size_type n_cols, const ForwardIterator begin, const ForwardIterator end) |
void | SparsityPattern::copy_from (const DynamicSparsityPattern &dsp) |
void | SparsityPattern::copy_from (const SparsityPattern &sp) |
template<typename number > | |
void | SparsityPattern::copy_from (const FullMatrix< number > &matrix) |
template<typename ForwardIterator > | |
void | SparsityPattern::add_entries (const size_type row, ForwardIterator begin, ForwardIterator end, const bool indices_are_sorted=false) |
Querying information | |
bool | SparsityPattern::operator== (const SparsityPattern &) const |
bool | SparsityPattern::stores_only_added_elements () const |
std::size_t | SparsityPattern::memory_consumption () const |
Accessing entries | |
size_type | SparsityPattern::operator() (const size_type i, const size_type j) const |
Partitioners | |
static ::ExceptionBase & | TrilinosWrappers::PreconditionBase::ExcNonMatchingMaps (std::string arg1) |
Input/Output | |
static ::ExceptionBase & | TrilinosWrappers::SparseMatrix::ExcTrilinosError (int arg1) |
static ::ExceptionBase & | TrilinosWrappers::SparseMatrix::ExcInvalidIndex (size_type arg1, size_type arg2) |
static ::ExceptionBase & | TrilinosWrappers::SparseMatrix::ExcSourceEqualsDestination () |
static ::ExceptionBase & | TrilinosWrappers::SparseMatrix::ExcMatrixNotCompressed () |
static ::ExceptionBase & | TrilinosWrappers::SparseMatrix::ExcAccessToNonLocalElement (size_type arg1, size_type arg2, size_type arg3, size_type arg4) |
static ::ExceptionBase & | TrilinosWrappers::SparseMatrix::ExcAccessToNonPresentElement (size_type arg1, size_type arg2) |
4: Mixed stuff | |
static ::ExceptionBase & | TrilinosWrappers::MPI::Vector::ExcDifferentParallelPartitioning () |
static ::ExceptionBase & | TrilinosWrappers::MPI::Vector::ExcTrilinosError (int arg1) |
static ::ExceptionBase & | TrilinosWrappers::MPI::Vector::ExcAccessToNonLocalElement (size_type arg1, size_type arg2, size_type arg3, size_type arg4) |
This module contains classes that are used in the exception mechanism of deal.II.
Exceptions are used in two different ways:
Static assertions: These are checks that are only enabled in debug mode, not in release (or optimized, production) mode. In deal.II, static assertions are typically used to check that parameters to functions satisfy certain properties, that internal data structures are consistent, and similar assertions. For example, static assertions are used to make sure that two vectors that are added together have the same number of components – everything else would not make any sense anyway.
Such checks are performed by the Assert
macro in several thousand places within the library. Also, several tutorial programs starting with step-5 show how to do this.
If a static assertion is violated, the exception mechanism generates an exception of a type that indicates what exactly goes wrong, displays appropriate information including the exact location where the problem was detected, and then aborts the program – if you try to add two vectors of different length, there is nothing that can be done within the program to cope with the situation, you have to go fix the program code instead. There is generally not even a reason to throw
an exception object using the usual C++ exception mechanism because there is nothing a function higher up could do in such cases to rectify the situation and deal with it in a useful way – it's not that the program received bad data; the program is just buggy, and one can not intelligently work around that.
(It is sometimes useful to change the behavior of the Assert
macro from aborting a program to throwing exceptions. On the other hand, exceptions are not allowed to propagate out of destructors of classes. For this purpose, there is a variant of the macro, called AssertNothrow
, that can be used in destructors. These use cases are discussed further down below on this page.)
Dynamic assertions: These are used to check conditions that depend on external things that may be different from one program run to the next, such as whether an output file can be written to.
These are things that shouldn't be checked statically, because it is not guaranteed that a program for which the condition is satisfied in a debug mode run, will also have the condition satisfied in a subsequent release mode run – in other words, it is not sufficient to only check these situations in debug mode.
Rather, one has to check them every time during execution of a program. Within deal.II, this is done using the AssertThrow
macro introduced in step-9, step-13, and following tutorial programs. The macro checks a condition, and if violated throws an exception of one of the types declared in this module, using the C++ throw
mechanism. Since these are run-time exceptions, this gives the program the chance to catch the exception and, for example, write the output to a writable file instead.
The error handling mechanism in deal.II
is generally used in two ways. The first uses error checking in debug mode only and is useful for programs which are not fully tested. When the program shows no errors anymore, one may switch off error handling and get better performance by this, since checks for errors are done quite frequently in the library (a typical speed up is a factor of four!). This mode of exception generation is most useful for internal consistency checks such as range checking or checking of the validity of function arguments. Errors of this kind usually are programming errors and the program should abort with as detailed a message as possible, including location and reason for the generation of the exception.
The second mode is for error checks which should always be on, such as for I/O errors, failing memory requests and the like. It does not make much sense to turn this mode off, since this kind of errors may happen in tested and untested programs likewise. Exceptions of this kind do not terminate the program, rather they throw exceptions in the C++
manner, allowing the program to catch them and eventually do something about it. As it may be useful to have some information printed out if an exception could not be handled properly, additional information is passed along as for the first mode. The latter makes it necessary to provide a family of macros which enter this additional information into the exception class; this could in principle be done by the programmer himself each time by hand, but since the information can be obtained automatically, a macro is provided for this.
Both modes use exception classes, which need to have special features in additional to the C++
standard's std::exception
class. Such a class is declared by the following lines of code:
This declares an exception class named ExcDomain
, which has two variables as additional information (named arg1
and arg2
by default) and which outputs the given sequence (which is appended to an std::ostream
variable's name, thus the weird syntax). There are other DeclExceptionN
macros for exception classes with more or no parameters. By convention, the name of all exception classes starts with Exc...
and most of them are declared locally to the class it is to be used in (a few very frequently found ones are also declared in the StandardExceptions namespace and are available everywhere). Declaring exceptions globally is possible but pollutes the global namespace, is less readable and most of the time unnecessary.
Since exception classes are declared the same way for both modes of error checking, it is possible to use an exception declared through the DeclExceptionN(...)
macro family for both static as well as dynamic checks.
To use the exception mechanism for debug mode error checking, write lines like the following in your source code:
which by macro expansion does essentially the following (though the actual code is slightly more complicated):
That is, it issues an error only if the preprocessor variable DEBUG
is set and if the given condition (in this case n < dim
is violated).
If the exception was declared using the DeclException0 (...)
macro, i.e., without any additional parameters, its name has nonetheless to be given with parentheses: Assert (i>m, ExcSomewhat());
If the DEBUG
preprocessor directive is set, the call Assert (cond, exc);
is basically converted by the preprocessor into the following sequence:
(Note that function names and exact calling sequences may change over time, but the general principle remains the same.) I.e., if the given condition is violated, then the file and line in which the exception occurred as well as the condition itself and the call sequence of the exception object is passed to the deal_II_exceptions::internals::issue_error_noreturn() function. Additionally an object of the form given by exc
is created (this is normally an unnamed object like in ExcDomain (n, dim)
of class ExcDomain
) and transferred to this function.
__PRETTY_FUNCTION__
is a macro defined by some compilers and gives the name of the function. If another compiler is used, we try to set this function to something reasonable, if the compiler provides us with that, and "(not available)"
otherwise.
In issue_error_noreturn
, the given data is transferred into the exc
object by calling the set_fields() function; Afterwards the program is either aborted (and information about the exception is printed to deallog) or the exception is thrown. The Assert
macro does the first path (print and abort); AssertThrow
does the second (throw). This behavior is consistent with the descriptions of static and dynamic assertions earlier in this document. If it can be obtained from the operating system, the output may also contain a stacktrace to show where the error happened. Several of the Tutorial programs programs show a typical output.
If the preprocessor variable DEBUG
is not set then the Assert
macro is expanded to {}
.
Sometimes, there is no useful condition for an exception other than that the program flow should not have reached a certain point, e.g. a default
section of a switch
statement. In this case, raise the exception by the following construct:
See the step-7 and several other of the tutorial programs for a use of this construct.
As mentioned above, the program is terminated once a call to Assert
fails. However, there is one case where we do not want to do this, namely when a C++ exception is active. The usual case where this happens is that someone throws an exception through the AssertThrow
mechanism (see below) which, while the stack is unwound, leads to the destruction of other objects in stack frames above. If other objects refer to the objects being thus destroyed, some destructors raise an exception through Assert
. If we would abort the program then, we would only ever see the message that an object is being destroyed which is still referenced from somewhere, but we would never see the original exception that triggered this. (You can see it in the debugger by putting a break point on the function __throw
, but you cannot see it from the program itself.) In that case, we use a C++ standard library function to detect the presence of another active exception and do not terminate the program to allow that the thrown exception propagates to some place where its message can be displayed.
Since it is common that one failed assertion leads to a whole chain of others, we only ever print the very first message. If the program is then aborted, that is no problem. If it is not (since a C++ exception is active), only the first is displayed and a message about suppressed follow-up messages is shown.
C++ has a mechanism to indicate that something exceptional has happened: exceptions that can be triggered by throw
statements and captured by catch
clauses, see for example https://en.wikipedia.org/wiki/C%2B%2B#Exception_handling and http://www.cplusplus.com/doc/tutorial/exceptions/ .
At some fundamental level, a typical C++ exception is an object that is placed in some special place, and then the function exits the current scope (e.g., the current function) through an exceptional return path. This is often enough to tell what problem triggered the exception, but more frequently it would be nice if one had more information: for example, in which line of the code the problem happened, or what non-existent entry of a sparse matrix the code wanted to write into.
Dynamic assertions in deal.II therefore extend this mechanism a bit. Typically, one would raise an exception by code such as
and catch it using the statement
std::exception
is a standard C++
class providing basic functionality for exceptions, such as the virtual function what()
that returns some information on the exception itself. This information is useful if an exception can't be handled properly, in which case as precise a description as possible should be printed.
The problem here is that to get significant and useful information out of what()
, it is necessary to overload this function in our exception class and call the throw
operator with additional arguments to the exception class. The first thing, overloading the what
function is done using the DeclExceptionN
macros, but putting the right information, which is the same as explained above for the Assert
expansion, requires some work if one would want to write it down each time:
For this purpose, the macro AssertThrow
was invented. It does mainly the same job as does the Assert
macro, but it does not abort the program; rather, it throws an exception as shown above. The mode of usage is
The condition to be checked is incorporated into the macro in order to allow passing the violated condition as a string. The expansion of the AssertThrow
macro is not affected by the DEBUG
preprocessor variable.
There is a whole family of DeclExceptionX
macros where X
is to be replaced by the number of additional parameters (0 to 5 presently). These macros are used to declare exception classes in the following way:
The first argument denotes the name of the exception class to be created. The next arguments are the types of the parameters (in this case there two types, corresponding to the X
in DeclExceptionX
) and finally the output sequence with which you can print additional information.
The syntax of the output sequence is a bit weird but gets clearer once you see how this macro is defined (again schematically, actual function names and definitions may change over time and be different):
If declared as specified, you can later use this exception class in the following manner:
and the output if the condition fails will be
Obviously for the DeclException0(name)
macro, no types and also no output sequence is allowed.
Assert:
The AssertNothrow
macroThe default implementation of the Assert
macro, as discussed above, prints detailed information about what exactly went wrong to the screen and then aborts the program. Aborting the program is useful because it allows easily finding the place where something went wrong – including all of the information how we got to that place – by running the program in a debugger.
On the other hand, there are cases where aborting a program may be undesirable and one needs to exit in a somewhat more graceful way – even if there is really not very much one can do in these cases to still produce a meaningful result. An example is if a deal.II program is run a one module in a bigger framework of software. Think, for example, of a case where a deal.II program computed the flow field that corresponds to a set of input variables provided by some optimization routine: if the optimizer on the outside provided a negative density as input (a condition one might want to check via Assert
), then this clearly makes no sense, and the flow solver cannot produce a meaningful answer; but it should tell that to the optimizer nicely, rather than just aborting the entire process (optimizer and flow solver).
For this purpose, one can call deal_II_exceptions::disable_abort_on_exception() that switches what Assert
does from aborting the program to essentially the same as AssertThrow
does, namely using the C++ throw
mechanism to raise an exception. This exception can then be caught at a higher level – e.g., in the optimization routine that sits atop the flow solver, and that can then decide what it wants to do with the situation.
This is all nice and good, but C++ does not allow throwing exceptions inside the destructors of classes, or in a function that is currently being called from a destructor higher up in the call stack. To this end, there is a separate macro, AssertNothrow
, that can be used in destructors: It acts just like Assert
usually does – in particular, it only checks the condition in debug mode – but it is immune to the effect of deal_II_exceptions::disable_abort_on_exception(): It will only ever abort the program, and never throw an exception.
#define DeclException0 | ( | Exception0 | ) |
Declare an exception class derived from ExceptionBase without parameters.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 473 of file exceptions.h.
#define DeclExceptionMsg | ( | Exception, | |
defaulttext | |||
) |
Declare an exception class derived from ExceptionBase that can take one runtime argument, but if none is given in the place where you want to throw the exception, it simply reverts to the default text provided when declaring the exception class through this macro.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included. Definition at line 496 of file exceptions.h.
#define DeclException1 | ( | Exception1, | |
type1, | |||
outsequence | |||
) |
Declare an exception class derived from ExceptionBase with one additional parameter.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included. Definition at line 518 of file exceptions.h.
#define DeclException2 | ( | Exception2, | |
type1, | |||
type2, | |||
outsequence | |||
) |
Declare an exception class derived from ExceptionBase with two additional parameters.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included. Definition at line 541 of file exceptions.h.
#define DeclException3 | ( | Exception3, | |
type1, | |||
type2, | |||
type3, | |||
outsequence | |||
) |
Declare an exception class derived from ExceptionBase with three additional parameters.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included. Definition at line 564 of file exceptions.h.
#define DeclException4 | ( | Exception4, | |
type1, | |||
type2, | |||
type3, | |||
type4, | |||
outsequence | |||
) |
Declare an exception class derived from ExceptionBase with four additional parameters.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included. Definition at line 587 of file exceptions.h.
#define DeclException5 | ( | Exception5, | |
type1, | |||
type2, | |||
type3, | |||
type4, | |||
type5, | |||
outsequence | |||
) |
Declare an exception class derived from ExceptionBase with five additional parameters.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included. Definition at line 613 of file exceptions.h.
#define Assert | ( | cond, | |
exc | |||
) |
A macro that serves as the main routine in the exception mechanism for debug mode error checking. It asserts that a certain condition is fulfilled, otherwise issues an error and aborts the program.
A more detailed description can be found in the Exceptions and assertions module. It is first used in step-5 and step-6. See also the ExceptionBase
class for more information.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1419 of file exceptions.h.
#define AssertNothrow | ( | cond, | |
exc | |||
) |
A variant of the Assert
macro above that exhibits the same runtime behavior as long as disable_abort_on_exception was not called.
However, if disable_abort_on_exception was called, this macro merely prints the exception that would be thrown to deallog and continues normally without throwing an exception.
A more detailed description can be found in the Exceptions and assertions module, in the discussion about the corner case at the bottom of the page.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1483 of file exceptions.h.
#define AssertThrow | ( | cond, | |
exc | |||
) |
A macro that serves as the main routine in the exception mechanism for dynamic error checking. It asserts that a certain condition is fulfilled, otherwise throws an exception via the C++ throw
mechanism. This exception can be caught via a catch
clause, as is shown in step-6 and all following tutorial programs.
A more detailed description can be found in the Exceptions and assertions module. It is first used in step-9 and step-13. See also the ExceptionBase
class for more information.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1531 of file exceptions.h.
#define AssertDimension | ( | dim1, | |
dim2 | |||
) |
Special assertion for dimension mismatch.
Since this is used very often and always repeats the arguments, we introduce this special assertion for ExcDimensionMismatch in order to keep the user codes shorter.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1579 of file exceptions.h.
#define AssertVectorVectorDimension | ( | VEC, | |
DIM1, | |||
DIM2 | |||
) |
An assertion that tests whether vec
has size dim1
, and each entry of the vector is itself an array that has the size dim2
.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1607 of file exceptions.h.
#define AssertIndexRange | ( | index, | |
range | |||
) |
An assertion that tests that a given index is within the half-open range [0,range)
. It throws an exception object ExcIndexRange(index,0,range)
if the assertion fails.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1649 of file exceptions.h.
#define AssertIsFinite | ( | number | ) |
An assertion that checks whether a number is finite or not. We explicitly cast the number to std::complex to match the signature of the exception (see there for an explanation of why we use std::complex at all) and to satisfy the fact that std::complex has no implicit conversions.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1681 of file exceptions.h.
#define AssertThrowMPI | ( | error_code | ) | AssertThrow(error_code == MPI_SUCCESS, ::ExcMPI(error_code)) |
An assertion that checks whether or not an error code returned by an MPI function is equal to MPI_SUCCESS
. If the check fails then an exception of type ExcMPI is thrown with the given error code as an argument.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1707 of file exceptions.h.
#define AssertCuda | ( | error_code | ) |
An assertion that checks that the error code produced by calling a CUDA routine is equal to cudaSuccess.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1734 of file exceptions.h.
#define AssertNothrowCuda | ( | error_code | ) |
The non-throwing equivalent of AssertCuda.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1762 of file exceptions.h.
#define AssertCudaKernel | ( | ) |
An assertion that checks that the kernel was launched and executed successfully.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1791 of file exceptions.h.
#define AssertCusparse | ( | error_code | ) |
An assertion that checks that the error code produced by calling a cuSPARSE routine is equal to CUSPARSE_STATUS_SUCCESS.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1822 of file exceptions.h.
#define AssertNothrowCusparse | ( | error_code | ) |
The non-throwing equivalent of AssertCusparse.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1853 of file exceptions.h.
#define AssertCusolver | ( | error_code | ) |
An assertion that checks that the error code produced by calling a cuSOLVER routine is equal to CUSOLVER_STATUS_SUCCESS.
#undef
this macro, as well as all other macros defined by deal.II that are not prefixed with either DEAL
or deal
, by including the header deal.II/base/undefine_macros.h
after all other deal.II headers have been included.Definition at line 1885 of file exceptions.h.
using DataOutBase::EpsFlags::ColorFunction = RgbValues (*)(const double value, const double min_value, const double max_value) |
Definition of a function pointer type taking a value and returning a triple of color values in RGB values.
Besides the actual value by which the color is to be computed, min and max values of the data to be colorized are given as well.
Definition at line 953 of file data_out_base.h.
|
private |
Definition at line 1482 of file data_out_base.h.
Exception for when an entry in an XML parameter file does not match the provided pattern. The arguments are, in order, the entry value, entry name, and a description of the pattern.
Definition at line 1712 of file parameter_handler.h.
using Patterns::Tools::Convert< Tensor< rank, dim, Number > >::T = Tensor<rank, dim, Number> |
Definition at line 1935 of file patterns.h.
using Patterns::Tools::Convert< Point< dim, Number > >::T = Point<dim, Number> |
Definition at line 2002 of file patterns.h.
using Patterns::Tools::Convert< std::unique_ptr< FunctionParser< dim > > >::T = std::unique_ptr<FunctionParser<dim> > |
Definition at line 2032 of file patterns.h.
using Patterns::Tools::Convert< ComponentMask >::T = ComponentMask |
Definition at line 2098 of file patterns.h.
using Patterns::Tools::Convert< std::complex< Number > >::T = std::complex<Number> |
Definition at line 2132 of file patterns.h.
using Patterns::Tools::Convert< std::string >::T = std::string |
Definition at line 2196 of file patterns.h.
using Patterns::Tools::Convert< std::pair< Key, Value > >::T = std::pair<Key, Value> |
Definition at line 2227 of file patterns.h.
using Patterns::Tools::Convert< std::tuple< Args... > >::T = std::tuple<Args...> |
Definition at line 2266 of file patterns.h.
|
private |
The data type used in counter_map.
Definition at line 222 of file subscriptor.h.
|
private |
The iterator type used in counter_map.
Definition at line 227 of file subscriptor.h.
|
private |
A map type used to indicate which dependent variable is associated with which entry in the output vector.
Definition at line 1998 of file symengine_optimizer.h.
using BlockVectorBase< VectorType >::BlockType = VectorType |
Typedef the type of the underlying vector.
Definition at line 456 of file block_vector_base.h.
using BlockVectorBase< VectorType >::value_type = typename BlockType::value_type |
Definition at line 468 of file block_vector_base.h.
using BlockVectorBase< VectorType >::pointer = value_type * |
Definition at line 469 of file block_vector_base.h.
using BlockVectorBase< VectorType >::const_pointer = const value_type * |
Definition at line 470 of file block_vector_base.h.
using BlockVectorBase< VectorType >::iterator = ::internal::BlockVectorIterators::Iterator<BlockVectorBase, false> |
Definition at line 472 of file block_vector_base.h.
using BlockVectorBase< VectorType >::const_iterator = ::internal::BlockVectorIterators::Iterator<BlockVectorBase, true> |
Definition at line 474 of file block_vector_base.h.
using BlockVectorBase< VectorType >::reference = typename BlockType::reference |
Definition at line 475 of file block_vector_base.h.
using BlockVectorBase< VectorType >::const_reference = typename BlockType::const_reference |
Definition at line 476 of file block_vector_base.h.
using BlockVectorBase< VectorType >::size_type = types::global_dof_index |
Definition at line 477 of file block_vector_base.h.
using BlockVectorBase< VectorType >::real_type = typename BlockType::real_type |
Declare a type that has holds real-valued numbers with the same precision as the template argument to this class. If the template argument of this class is a real data type, then real_type equals the template argument. If the template argument is a std::complex type then real_type equals the type underlying the complex numbers.
This alias is used to represent the return type of norms.
Definition at line 488 of file block_vector_base.h.
|
private |
Define number type of matrix.
Definition at line 390 of file precondition_block.h.
using PreconditionBlockJacobi< MatrixType, inverse_type >::size_type = types::global_dof_index |
Declare type for container size.
Definition at line 396 of file precondition_block.h.
using PreconditionBlockSOR< MatrixType, inverse_type >::size_type = types::global_dof_index |
Declare type for container size.
Definition at line 667 of file precondition_block.h.
using PreconditionBlockSOR< MatrixType, inverse_type >::number = typename MatrixType::value_type |
Define number type of matrix.
Definition at line 677 of file precondition_block.h.
using PreconditionBlockSSOR< MatrixType, inverse_type >::size_type = types::global_dof_index |
Declare type for container size.
Definition at line 832 of file precondition_block.h.
using PreconditionBlockSSOR< MatrixType, inverse_type >::number = typename MatrixType::value_type |
Define number type of matrix.
Definition at line 837 of file precondition_block.h.
Declare type for container size.
Definition at line 871 of file sparsity_pattern.h.
Typedef an iterator class that allows to walk over all nonzero elements of a sparsity pattern.
Definition at line 877 of file sparsity_pattern.h.
Typedef an iterator class that allows to walk over all nonzero elements of a sparsity pattern.
Since the iterator does not allow to modify the sparsity pattern, this type is the same as that for const_iterator
.
Definition at line 886 of file sparsity_pattern.h.
using GrowingVectorMemory< VectorType >::size_type = types::global_dof_index |
Declare type for container size.
Definition at line 326 of file vector_memory.h.
|
private |
A type that describes this entries of an array that represents the vectors stored by this object. The first component of the pair is be a flag telling whether the vector is used, the second a pointer to the vector itself.
Definition at line 403 of file vector_memory.h.
Enum denoting the possibilities whether the scaling should be done such that the given size
equals the width or the height of the resulting picture.
Enumerator | |
---|---|
width | Scale to given width. |
height | Scale to given height. |
Definition at line 820 of file data_out_base.h.
A data type providing the different possible zlib compression levels. These map directly to constants defined by zlib.
Definition at line 1133 of file data_out_base.h.
Declare what a multiple entry is: a variant entry (in curly braces {
, }
) or an array (in double curly braces {{
, }}
).
Enumerator | |
---|---|
variant | A variant entry. |
array | An array entry. |
Definition at line 2185 of file parameter_handler.h.
Files can be used for input or output. This can be specified in the constructor by choosing the flag type
.
Enumerator | |
---|---|
input | Open for input. |
output | Open for output. |
Definition at line 1093 of file patterns.h.
|
strong |
An enumeration to distinguish between different optimization methods that can be used by SymEngine to more rapidly evaluate complex symbolic expressions.
Definition at line 99 of file symengine_optimizer.h.
|
strong |
An enumeration to specify which special techniques, over and above those used with the chosen OptimizerType, to be applied to the set of expressions that are to be optimized.
Definition at line 145 of file symengine_optimizer.h.
|
static |
An entry with this name does not exist in the AnyData object.
|
static |
The requested type and the stored type are different.
|
static |
Exception indicating that a function expected a vector to have a certain name, but we store a different name in that position.
|
static |
An entry with this name does not exist in the internal boost::any map.
|
static |
An entry with this name does not exist in the internal boost::any map.
|
static |
The requested type and the stored type are different.
|
static |
Exception
DataOutBase::Patch< dim, spacedim >::Patch |
Default constructor. Sets n_subdivisions to one, points_are_available to false, and patch_index to no_neighbor.
Definition at line 1611 of file data_out_base.cc.
bool DataOutBase::Patch< dim, spacedim >::operator== | ( | const Patch< dim, spacedim > & | patch | ) | const |
Compare the present patch for equality with another one. This is used in a few of the automated tests in our testsuite.
Definition at line 1629 of file data_out_base.cc.
std::size_t DataOutBase::Patch< dim, spacedim >::memory_consumption |
Return an estimate for the memory consumption, in bytes, of this object. This is not exact (but will usually be close) because calculating the memory usage of trees (e.g., std::map
) is difficult.
Definition at line 1668 of file data_out_base.cc.
void DataOutBase::Patch< dim, spacedim >::swap | ( | Patch< dim, spacedim > & | other_patch | ) |
Swap the current object's contents with those of the given argument.
Definition at line 1684 of file data_out_base.cc.
|
static |
Exception
DataOutBase::Patch< 0, spacedim >::Patch |
Default constructor. Sets points_are_available to false, and patch_index to no_neighbor.
Definition at line 1712 of file data_out_base.cc.
bool DataOutBase::Patch< 0, spacedim >::operator== | ( | const Patch< 0, spacedim > & | patch | ) | const |
Compare the present patch for equality with another one. This is used in a few of the automated tests in our testsuite.
Definition at line 1723 of file data_out_base.cc.
std::size_t DataOutBase::Patch< 0, spacedim >::memory_consumption |
Return an estimate for the memory consumption, in bytes, of this object. This is not exact (but will usually be close) because calculating the memory usage of trees (e.g., std::map
) is difficult.
Definition at line 1757 of file data_out_base.cc.
void DataOutBase::Patch< 0, spacedim >::swap | ( | Patch< 0, spacedim > & | other_patch | ) |
Swap the current object's contents with those of the given argument.
Definition at line 1768 of file data_out_base.cc.
|
static |
Exception
|
static |
Declare all flags with name and type as offered by this class, for use in input files.
This method does nothing, but child classes may override this method to add fields to prm
.
Definition at line 571 of file data_out_base.h.
void DataOutBase::OutputFlagsBase< FlagsType >::parse_parameters | ( | const ParameterHandler & | prm | ) |
Read the parameters declared in declare_parameters() and set the flags for this output format accordingly.
This method does nothing, but child classes may override this method to add fields to prm
.
Definition at line 577 of file data_out_base.h.
std::size_t DataOutBase::OutputFlagsBase< FlagsType >::memory_consumption |
Return an estimate for the memory consumption, in bytes, of this object. This is not exact (but will usually be close) because calculating the memory usage of trees (e.g., std::map
) is difficult.
Definition at line 583 of file data_out_base.h.
DataOutBase::DXFlags::DXFlags | ( | const bool | write_neighbors = false , |
const bool | int_binary = false , |
||
const bool | coordinates_binary = false , |
||
const bool | data_binary = false |
||
) |
Constructor.
Definition at line 1870 of file data_out_base.cc.
|
static |
Declare all flags with name and type as offered by this class, for use in input files.
Definition at line 1883 of file data_out_base.cc.
void DataOutBase::DXFlags::parse_parameters | ( | const ParameterHandler & | prm | ) |
Read the parameters declared in declare_parameters() and set the flags for this output format accordingly.
The flags thus obtained overwrite all previous contents of this object.
Definition at line 1914 of file data_out_base.cc.
DataOutBase::UcdFlags::UcdFlags | ( | const bool | write_preamble = false | ) |
Constructor.
Definition at line 1778 of file data_out_base.cc.
|
static |
Declare all flags with name and type as offered by this class, for use in input files.
Definition at line 1923 of file data_out_base.cc.
void DataOutBase::UcdFlags::parse_parameters | ( | const ParameterHandler & | prm | ) |
Read the parameters declared in declare_parameters() and set the flags for this output format accordingly.
The flags thus obtained overwrite all previous contents of this object.
Definition at line 1937 of file data_out_base.cc.
DataOutBase::GnuplotFlags::GnuplotFlags | ( | ) |
Default constructor. Sets up the dimension labels with the default values of "x"
, "y"
, and "z"
.
Definition at line 1784 of file data_out_base.cc.
DataOutBase::GnuplotFlags::GnuplotFlags | ( | const std::vector< std::string > & | space_dimension_labels | ) |
Constructor which sets up non-default values for the dimension labels.
Definition at line 1793 of file data_out_base.cc.
std::size_t DataOutBase::GnuplotFlags::memory_consumption | ( | ) | const |
Return an estimate for the memory consumption, in bytes, of this object.
Definition at line 1800 of file data_out_base.cc.
|
static |
Exception to raise when there are not enough specified dimension labels.
DataOutBase::PovrayFlags::PovrayFlags | ( | const bool | smooth = false , |
const bool | bicubic_patch = false , |
||
const bool | external_data = false |
||
) |
Constructor.
Definition at line 1807 of file data_out_base.cc.
|
static |
Declare all flags with name and type as offered by this class, for use in input files.
Definition at line 1963 of file data_out_base.cc.
void DataOutBase::PovrayFlags::parse_parameters | ( | const ParameterHandler & | prm | ) |
Read the parameters declared in declare_parameters() and set the flags for this output format accordingly.
The flags thus obtained overwrite all previous contents of this object.
Definition at line 1985 of file data_out_base.cc.
|
inline |
Return true
if the color represented by the three color values is a grey scale, i.e. all components are equal.
Definition at line 3443 of file data_out_base.h.
|
static |
Default colorization function. This one does what one usually wants: It shifts colors from black (lowest value) through blue, green and red to white (highest value). For the exact definition of the color scale refer to the implementation.
This function was originally written by Stefan Nauber.
Definition at line 2023 of file data_out_base.cc.
|
static |
This is an alternative color function producing a grey scale between black (lowest values) and white (highest values). You may use it by setting the color_function variable to the address of this function.
Definition at line 2111 of file data_out_base.cc.
|
static |
This is one more alternative color function producing a grey scale between white (lowest values) and black (highest values), i.e. the scale is reversed to the previous one. You may use it by setting the color_function variable to the address of this function.
Definition at line 2124 of file data_out_base.cc.
DataOutBase::EpsFlags::EpsFlags | ( | const unsigned int | height_vector = 0 , |
const unsigned int | color_vector = 0 , |
||
const SizeType | size_type = width , |
||
const unsigned int | size = 300 , |
||
const double | line_width = 0.5 , |
||
const double | azimut_angle = 60 , |
||
const double | turn_angle = 30 , |
||
const double | z_scaling = 1.0 , |
||
const bool | draw_mesh = true , |
||
const bool | draw_cells = true , |
||
const bool | shade_cells = true , |
||
const ColorFunction | color_function = &default_color_function |
||
) |
Constructor.
Definition at line 1994 of file data_out_base.cc.
|
static |
Declare all flags with name and type as offered by this class, for use in input files.
For coloring, only the color functions declared in this class are offered.
Definition at line 2137 of file data_out_base.cc.
void DataOutBase::EpsFlags::parse_parameters | ( | const ParameterHandler & | prm | ) |
Read the parameters declared in declare_parameters() and set the flags for this output format accordingly.
The flags thus obtained overwrite all previous contents of this object.
Definition at line 2204 of file data_out_base.cc.
DataOutBase::TecplotFlags::TecplotFlags | ( | const char * | tecplot_binary_file_name = nullptr , |
const char * | zone_name = nullptr , |
||
const double | solution_time = -1.0 |
||
) |
Constructor.
Definition at line 2234 of file data_out_base.cc.
std::size_t DataOutBase::TecplotFlags::memory_consumption | ( | ) | const |
Return an estimate for the memory consumption, in bytes, of this object.
Definition at line 2245 of file data_out_base.cc.
DataOutBase::VtkFlags::VtkFlags | ( | const double | time = std::numeric_limits<double>::min() , |
const unsigned int | cycle = std::numeric_limits<unsigned int>::min() , |
||
const bool | print_date_and_time = true , |
||
const ZlibCompressionLevel | compression_level = best_compression , |
||
const bool | write_higher_order_cells = false |
||
) |
Constructor.
Definition at line 2254 of file data_out_base.cc.
DataOutBase::SvgFlags::SvgFlags | ( | const unsigned int | height_vector = 0 , |
const int | azimuth_angle = 37 , |
||
const int | polar_angle = 45 , |
||
const unsigned int | line_thickness = 1 , |
||
const bool | margin = true , |
||
const bool | draw_colorbar = true |
||
) |
Constructor.
Definition at line 1944 of file data_out_base.cc.
DataOutBase::DataOutFilterFlags::DataOutFilterFlags | ( | const bool | filter_duplicate_vertices = false , |
const bool | xdmf_hdf5_output = false |
||
) |
Constructor.
Definition at line 1816 of file data_out_base.cc.
|
static |
Declare all flags with name and type as offered by this class, for use in input files.
Definition at line 1824 of file data_out_base.cc.
void DataOutBase::DataOutFilterFlags::parse_parameters | ( | const ParameterHandler & | prm | ) |
Read the parameters declared in declare_parameters
and set the flags for this output format accordingly.
The flags thus obtained overwrite all previous contents of this object.
Definition at line 1862 of file data_out_base.cc.
std::size_t DataOutBase::DataOutFilterFlags::memory_consumption | ( | ) | const |
Determine an estimate for the memory consumption (in bytes) of this object.
DataOutBase::DataOutFilter::DataOutFilter | ( | ) |
Default constructor.
Definition at line 313 of file data_out_base.cc.
DataOutBase::DataOutFilter::DataOutFilter | ( | const DataOutBase::DataOutFilterFlags & | flags | ) |
Destructor with a given set of flags. See DataOutFilterFlags for possible flags.
Definition at line 321 of file data_out_base.cc.
void DataOutBase::DataOutFilter::write_point | ( | const unsigned int | index, |
const Point< dim > & | p | ||
) |
Write a point with the specified index into the filtered data set. If the point already exists and we are filtering redundant values, the provided index will internally refer to another recorded point.
Definition at line 331 of file data_out_base.cc.
void DataOutBase::DataOutFilter::write_cell | ( | const unsigned int | index, |
const unsigned int | start, | ||
const unsigned int | d1, | ||
const unsigned int | d2, | ||
const unsigned int | d3 | ||
) |
Record a deal.II cell in the internal reordered format.
Definition at line 460 of file data_out_base.cc.
void DataOutBase::DataOutFilter::write_data_set | ( | const std::string & | name, |
const unsigned int | dimension, | ||
const unsigned int | set_num, | ||
const Table< 2, double > & | data_vectors | ||
) |
Filter and record a data set. If there are multiple values at a given vertex and redundant values are being removed, one is arbitrarily chosen as the recorded value. In the future this can be expanded to average/min/max multiple values at a given vertex.
Definition at line 491 of file data_out_base.cc.
void DataOutBase::DataOutFilter::fill_node_data | ( | std::vector< double > & | node_data | ) | const |
Resize and fill a vector with all the filtered node vertex points, for output to a file.
Definition at line 369 of file data_out_base.cc.
void DataOutBase::DataOutFilter::fill_cell_data | ( | const unsigned int | local_node_offset, |
std::vector< unsigned int > & | cell_data | ||
) | const |
Resize and fill a vector with all the filtered cell vertex indices, for output to a file.
Definition at line 384 of file data_out_base.cc.
std::string DataOutBase::DataOutFilter::get_data_set_name | ( | const unsigned int | set_num | ) | const |
Get the name of the data set indicated by the set number.
Definition at line 399 of file data_out_base.cc.
Get the dimensionality of the data set indicated by the set number.
Definition at line 407 of file data_out_base.cc.
Get the raw double valued data of the data set indicated by the set number.
Definition at line 415 of file data_out_base.cc.
unsigned int DataOutBase::DataOutFilter::n_nodes | ( | ) | const |
Return the number of nodes in this DataOutFilter. This may be smaller than the original number of nodes if filtering is enabled.
Definition at line 423 of file data_out_base.cc.
unsigned int DataOutBase::DataOutFilter::n_cells | ( | ) | const |
Return the number of filtered cells in this DataOutFilter. Cells are not filtered so this will be the original number of cells.
Definition at line 431 of file data_out_base.cc.
unsigned int DataOutBase::DataOutFilter::n_data_sets | ( | ) | const |
Return the number of filtered data sets in this DataOutFilter. Data sets are not filtered so this will be the original number of data sets.
Definition at line 439 of file data_out_base.cc.
void DataOutBase::DataOutFilter::flush_points | ( | ) |
Empty functions to do base class inheritance.
Definition at line 447 of file data_out_base.cc.
void DataOutBase::DataOutFilter::flush_cells | ( | ) |
Empty functions to do base class inheritance.
Definition at line 453 of file data_out_base.cc.
|
inline |
Definition at line 1460 of file data_out_base.h.
|
private |
Record a cell vertex index based on the internal reordering.
Definition at line 360 of file data_out_base.cc.
|
static |
Exception
|
static |
An output function did not receive any patches for writing.
|
static |
Exception
|
static |
Exception
DataOutInterface< dim, spacedim >::DataOutInterface |
Constructor.
Definition at line 6740 of file data_out_base.cc.
|
virtualdefault |
Destructor. Does nothing, but is declared virtual since this class has virtual functions.
void DataOutInterface< dim, spacedim >::write_dx | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it to out
in OpenDX format. See DataOutBase::write_dx.
Definition at line 6749 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_eps | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it to out
in EPS format. See DataOutBase::write_eps.
Definition at line 6801 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_gmv | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it to out
in GMV format. See DataOutBase::write_gmv.
Definition at line 6814 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_gnuplot | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it to out
in GNUPLOT format. See DataOutBase::write_gnuplot.
Definition at line 6775 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_povray | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it to out
in POVRAY format. See DataOutBase::write_povray.
Definition at line 6788 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_tecplot | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it to out
in Tecplot format. See DataOutBase::write_tecplot.
Definition at line 6827 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_tecplot_binary | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it in the Tecplot binary output format. Note that the name of the output file must be specified through the TecplotFlags interface.
Definition at line 6840 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_ucd | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it to out
in UCD format for AVS. See DataOutBase::write_ucd.
Definition at line 6762 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_vtk | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it to out
in Vtk format. See DataOutBase::write_vtk.
Definition at line 6853 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_vtu | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it to out
in Vtu (VTK's XML) format. See DataOutBase::write_vtu.
Some visualization programs, such as ParaView, can read several separate VTU files to parallelize visualization. In that case, you need a .pvtu
file that describes which VTU files form a group. The DataOutInterface::write_pvtu_record() function can generate such a master record. Likewise, DataOutInterface::write_visit_record() does the same for older versions of VisIt (although VisIt can also read pvtu
records since version 2.5.1). Finally, DataOutInterface::write_pvd_record() can be used to group together the files that jointly make up a time dependent simulation.
Definition at line 6864 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_vtu_in_parallel | ( | const std::string & | filename, |
MPI_Comm | comm | ||
) | const |
Collective MPI call to write the solution from all participating nodes (those in the given communicator) to a single compressed .vtu file on a shared file system. The communicator can be a sub communicator of the one used by the computation. This routine uses MPI I/O to achieve high performance on parallel filesystems. Also see DataOutInterface::write_vtu().
Definition at line 6886 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_pvtu_record | ( | std::ostream & | out, |
const std::vector< std::string > & | piece_names | ||
) | const |
Some visualization programs, such as ParaView, can read several separate VTU files that all form part of the same simulation, in order to parallelize visualization. In that case, you need a .pvtu
file that describes which VTU files (written, for example, through the DataOutInterface::write_vtu() function) form a group. The current function can generate such a master record.
The master record file generated by this function contains a list of (scalar or vector) fields that describes which fields can actually be found in the individual files that comprise the set of parallel VTU files along with the names of these files. This function gets the names and types of fields through the get_dataset_names() and get_nonscalar_data_ranges() functions of this class. The second argument to this function specifies the names of the files that form the parallel set.
pvtu
files that each describe one time step of a time dependent simulation, see the DataOutBase::write_pvd_record() function.pvtu
records. However, it can read visit records as written by the write_visit_record() function. Definition at line 6988 of file data_out_base.cc.
std::string DataOutInterface< dim, spacedim >::write_vtu_with_pvtu_record | ( | const std::string & | directory, |
const std::string & | filename_without_extension, | ||
const unsigned int | counter, | ||
const MPI_Comm & | mpi_communicator, | ||
const unsigned int | n_digits_for_counter = numbers::invalid_unsigned_int , |
||
const unsigned int | n_groups = 0 |
||
) | const |
This function writes several .vtu files and a .pvtu record in parallel and constructs the filenames automatically. It is a combination of DataOutInterface::write_vtu() or DataOutInterface::write_vtu_in_parallel(), and DataOutInterface::write_pvtu_record().
For example, running write_vtu_with_pvtu_record("output/", "solution", 3, comm, 4, 2)
on 10 processes generates the files
where the .0.vtu
file contains the output of the first half of the processes grouped together, and the .1.vtu
the data from the remaining half.
A specified directory
and a filename_without_extension
form the first part of the filename. The filename is then extended with a counter
labeling the current timestep/iteration/etc., the processor ID, and finally the .vtu/.pvtu ending. Since the number of timesteps to be written depends on the application, the number of digits to be reserved in the filename can be specified as parameter n_digits_for_counter
, and the number is not padded with leading zeros if this parameter is left at its default value numbers::invalid_unsigned_int. If more than one file identifier is needed (e.g. time step number and iteration counter of solver), the last identifier is used as counter
, while all other identifiers have to be added to filename_without_extension
when calling this function.
In a parallel setting, several files are typically written per time step. The number of files written in parallel depends on the number of MPI processes (see parameter mpi_communicator
), and a specified number of n_groups
with default value 0. The background is that VTU file output supports grouping files from several CPUs into a given number of files using MPI I/O when writing on a parallel filesystem. The default value of n_groups
is 0, meaning that every MPI rank will write one file. A value of 1 will generate one big file containing the solution over the whole domain, while a larger value will create n_groups
files (but not more than there are MPI ranks).
Note that only one processor needs to generate the .pvtu file, where processor zero is chosen to take over this job.
The return value is the filename of the master file for the pvtu record.
directory
and filename_without_extension
, i.e., the user has to make sure that directory
contains a trailing character, e.g. "/", that separates the directory from the filename.Definition at line 7001 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_svg | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it to out
in SVG format. See DataOutBase::write_svg.
Definition at line 6875 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_deal_II_intermediate | ( | std::ostream & | out | ) | const |
Obtain data through get_patches() and write it to out
in deal.II intermediate format. See DataOutBase::write_deal_II_intermediate.
Note that the intermediate format is what its name suggests: a direct representation of internal data. It isn't standardized and will change whenever we change our internal representation. You can only expect to process files written in this format using the same version of deal.II that was used for writing.
Definition at line 7082 of file data_out_base.cc.
XDMFEntry DataOutInterface< dim, spacedim >::create_xdmf_entry | ( | const DataOutBase::DataOutFilter & | data_filter, |
const std::string & | h5_filename, | ||
const double | cur_time, | ||
MPI_Comm | comm | ||
) | const |
Create an XDMFEntry based on the data in the data_filter. This assumes the mesh and solution data were written to a single file. See write_xdmf_file() for an example of usage.
Definition at line 7095 of file data_out_base.cc.
XDMFEntry DataOutInterface< dim, spacedim >::create_xdmf_entry | ( | const DataOutBase::DataOutFilter & | data_filter, |
const std::string & | h5_mesh_filename, | ||
const std::string & | h5_solution_filename, | ||
const double | cur_time, | ||
MPI_Comm | comm | ||
) | const |
Create an XDMFEntry based on the data in the data_filter. This assumes the mesh and solution data were written to separate files. See write_xdmf_file() for an example of usage.
Definition at line 7109 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_xdmf_file | ( | const std::vector< XDMFEntry > & | entries, |
const std::string & | filename, | ||
MPI_Comm | comm | ||
) | const |
Write an XDMF file based on the provided vector of XDMFEntry objects. Below is an example of how to use this function with HDF5 and the DataOutFilter:
Definition at line 7182 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_hdf5_parallel | ( | const DataOutBase::DataOutFilter & | data_filter, |
const std::string & | filename, | ||
MPI_Comm | comm | ||
) | const |
Write the data in data_filter
to a single HDF5 file containing both the mesh and solution values. Below is an example of how to use this function with the DataOutFilter:
Definition at line 7355 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_hdf5_parallel | ( | const DataOutBase::DataOutFilter & | data_filter, |
const bool | write_mesh_file, | ||
const std::string & | mesh_filename, | ||
const std::string & | solution_filename, | ||
MPI_Comm | comm | ||
) | const |
Write the data in data_filter to HDF5 file(s). If write_mesh_file is false, the mesh data will not be written and the solution file will contain only the solution values. If write_mesh_file is true and the filenames are the same, the resulting file will contain both mesh data and solution values.
Definition at line 7367 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write_filtered_data | ( | DataOutBase::DataOutFilter & | filtered_data | ) | const |
DataOutFilter is an intermediate data format that reduces the amount of data that will be written to files. The object filled by this function can then later be used again to write data in a concrete file format; see, for example, DataOutBase::write_hdf5_parallel().
Definition at line 7227 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::write | ( | std::ostream & | out, |
const DataOutBase::OutputFormat | output_format = DataOutBase::default_format |
||
) | const |
Write data and grid to out
according to the given data format. This function simply calls the appropriate write_*
function. If no output format is requested, the default_format
is written.
An error occurs if no format is provided and the default format is default_format
.
Definition at line 7757 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::set_default_format | ( | const DataOutBase::OutputFormat | default_format | ) |
Set the default format. The value set here is used anytime, output for format default_format
is requested.
Definition at line 7827 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::set_flags | ( | const FlagType & | flags | ) |
Set the flags to be used for output. This method expects flags
to be a member of one of the child classes of OutputFlagsBase
.
Definition at line 7837 of file data_out_base.cc.
std::string DataOutInterface< dim, spacedim >::default_suffix | ( | const DataOutBase::OutputFormat | output_format = DataOutBase::default_format | ) | const |
A function that returns the same string as the respective function in the base class does; the only exception being that if the parameter is omitted, then the value for the present default format is returned, i.e. the correct suffix for the format that was set through set_default_format() or parse_parameters() before calling this function.
Definition at line 7872 of file data_out_base.cc.
|
static |
Declare parameters for all output formats by declaring subsections within the parameter file for each output format and call the respective declare_parameters
functions of the flag classes for each output format.
Some of the declared subsections may not contain entries, if the respective format does not export any flags.
Note that the top-level parameters denoting the number of subdivisions per patch and the output format are not declared, since they are only passed to virtual functions and are not stored inside objects of this type. You have to declare them yourself.
Definition at line 7885 of file data_out_base.cc.
void DataOutInterface< dim, spacedim >::parse_parameters | ( | ParameterHandler & | prm | ) |
Read the parameters declared in declare_parameters() and set the flags for the output formats accordingly.
The flags thus obtained overwrite all previous contents of the flag objects as default-constructed or set by the set_flags() function.
Definition at line 7938 of file data_out_base.cc.
std::size_t DataOutInterface< dim, spacedim >::memory_consumption |
Return an estimate for the memory consumption, in bytes, of this object. This is not exact (but will usually be close) because calculating the memory usage of trees (e.g., std::map
) is difficult.
Definition at line 7985 of file data_out_base.cc.
|
protectedpure virtual |
This is the abstract function through which derived classes propagate preprocessed data in the form of Patch structures (declared in the base class DataOutBase) to the actual output function. You need to overload this function to allow the output functions to know what they shall print.
Implemented in DataOut_DoFData< DoFHandler< dim >, DoFHandler< dim > ::dimension, DoFHandler< dim > ::space_dimension >, DataOut_DoFData< DoFHandler< dim >, DoFHandler< dim > ::dimension - 1, DoFHandler< dim > ::dimension >, and DataOut_DoFData< DoFHandler< dim >, DoFHandler< dim > ::dimension+1 >.
|
protectedpure virtual |
Abstract virtual function through which the names of data sets are obtained by the output functions of the base class.
Implemented in DataOut_DoFData< DoFHandler< dim >, DoFHandler< dim > ::dimension, DoFHandler< dim > ::space_dimension >, DataOut_DoFData< DoFHandler< dim >, DoFHandler< dim > ::dimension - 1, DoFHandler< dim > ::dimension >, and DataOut_DoFData< DoFHandler< dim >, DoFHandler< dim > ::dimension+1 >.
|
protectedvirtual |
This functions returns information about how the individual components of output files that consist of more than one data set are to be interpreted.
It returns a list of index pairs and corresponding name and type indicating which components of the output are to be considered vector- or tensor-valued rather than just a collection of scalar data. The index pairs are inclusive; for example, if we have a Stokes problem in 2d with components (u,v,p), then the corresponding vector data range should be (0,1), and the returned list would consist of only a single element with a tuple such as (0,1,"velocity",component_is_part_of_vector).
Since some of the derived classes do not know about non-scalar data, this function has a default implementation that simply returns an empty string, meaning that all data is to be considered a collection of scalar fields.
Reimplemented in DataOut_DoFData< DoFHandler< dim >, DoFHandler< dim > ::dimension, DoFHandler< dim > ::space_dimension >, DataOut_DoFData< DoFHandler< dim >, DoFHandler< dim > ::dimension - 1, DoFHandler< dim > ::dimension >, and DataOut_DoFData< DoFHandler< dim >, DoFHandler< dim > ::dimension+1 >.
Definition at line 8008 of file data_out_base.cc.
|
protected |
Validate that the names of the datasets returned by get_dataset_names() and get_nonscalar_data_ranges() are valid. This currently consists of checking that names are not used more than once. If an invalid state is encountered, an Assert() will be triggered in debug mode.
Definition at line 8020 of file data_out_base.cc.
void DataOutReader< dim, spacedim >::read | ( | std::istream & | in | ) |
Read a sequence of patches as written previously by DataOutBase::write_deal_II_intermediate
and store them in the present object. This overwrites any previous content.
Definition at line 8076 of file data_out_base.cc.
void DataOutReader< dim, spacedim >::merge | ( | const DataOutReader< dim, spacedim > & | other | ) |
This function can be used to merge the patches read by the other object into the patches that this present object stores. This is sometimes handy if one has, for example, a domain decomposition algorithm where each block is represented by a DoFHandler of its own, but one wants to output the solution on all the blocks at the same time. Alternatively, it may also be used for parallel programs, where each process only generates output for its share of the cells, even if all processes can see all cells.
For this to work, the input files for the present object and the given argument need to have the same number of output vectors, and they need to use the same number of subdivisions per patch. The output will probably look rather funny if patches in both objects overlap in space.
If you call read() for this object after merging in patches, the previous state is overwritten, and the merged-in patches are lost.
This function will fail if either this or the other object did not yet set up any patches.
Definition at line 8187 of file data_out_base.cc.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
overrideprotectedvirtual |
This is the function through which this class propagates preprocessed data in the form of Patch structures (declared in the base class DataOutBase) to the actual output function.
It returns the patches as read the last time a stream was given to the read() function.
Definition at line 8249 of file data_out_base.cc.
|
overrideprotectedvirtual |
Abstract virtual function through which the names of data sets are obtained by the output functions of the base class.
Return the names of the variables as read the last time we read a file.
Definition at line 8258 of file data_out_base.cc.
|
overrideprotectedvirtual |
This functions returns information about how the individual components of output files that consist of more than one data set are to be interpreted.
It returns a list of index pairs and corresponding name indicating which components of the output are to be considered vector-valued rather than just a collection of scalar data. The index pairs are inclusive; for example, if we have a Stokes problem in 2d with components (u,v,p), then the corresponding vector data range should be (0,1), and the returned list would consist of only a single element with a tuple such as (0,1,"velocity").
Since some of the derived classes do not know about vector data, this function has a default implementation that simply returns an empty string, meaning that all data is to be considered a collection of scalar fields.
Definition at line 8271 of file data_out_base.cc.
XDMFEntry::XDMFEntry | ( | ) |
Default constructor that creates an invalid object.
Definition at line 8280 of file data_out_base.cc.
XDMFEntry::XDMFEntry | ( | const std::string & | filename, |
const double | time, | ||
const unsigned int | nodes, | ||
const unsigned int | cells, | ||
const unsigned int | dim | ||
) |
Simplified constructor that calls the complete constructor for cases where solution_filename == mesh_filename
, and dim==spacedim
.
Definition at line 8293 of file data_out_base.cc.
XDMFEntry::XDMFEntry | ( | const std::string & | mesh_filename, |
const std::string & | solution_filename, | ||
const double | time, | ||
const unsigned int | nodes, | ||
const unsigned int | cells, | ||
const unsigned int | dim | ||
) |
Simplified constructor that calls the complete constructor for cases where dim==spacedim
.
Definition at line 8303 of file data_out_base.cc.
XDMFEntry::XDMFEntry | ( | const std::string & | mesh_filename, |
const std::string & | solution_filename, | ||
const double | time, | ||
const unsigned int | nodes, | ||
const unsigned int | cells, | ||
const unsigned int | dim, | ||
const unsigned int | spacedim | ||
) |
Constructor that sets all members to provided parameters.
Definition at line 8314 of file data_out_base.cc.
void XDMFEntry::add_attribute | ( | const std::string & | attr_name, |
const unsigned int | dimension | ||
) |
Record an attribute and associated dimensionality.
Definition at line 8334 of file data_out_base.cc.
|
inline |
Read or write the data of this object for serialization
Definition at line 3375 of file data_out_base.h.
std::string XDMFEntry::get_xdmf_content | ( | const unsigned int | indent_level | ) | const |
Get the XDMF content associated with this entry. If the entry is not valid, this returns an empty string.
Definition at line 8360 of file data_out_base.cc.
std::ostream & DataOutBase::operator<< | ( | std::ostream & | out, |
const Patch< dim, spacedim > & | patch | ||
) |
Output operator for an object of type DataOutBase::Patch
. This operator dumps the intermediate graphics format represented by the patch data structure. It may later be converted into regular formats for a number of graphics programs.
Definition at line 8443 of file data_out_base.cc.
std::istream & DataOutBase::operator>> | ( | std::istream & | in, |
Patch< dim, spacedim > & | patch | ||
) |
Input operator for an object of type DataOutBase::Patch
. This operator reads the intermediate graphics format represented by the patch data structure, using the format in which it was written using the operator<<.
Definition at line 8475 of file data_out_base.cc.
|
static |
Exception.
|
static |
Exception denoting a division by zero.
|
static |
Exception raised if a number is not finite.
This exception should be used to catch infinite or not a number results of arithmetic operations that do not result from a division by zero (use ExcDivideByZero for those).
The exception uses std::complex as its argument to ensure that we can use it for all scalar arguments (real or complex-valued).
|
static |
Trying to allocate a new object failed due to lack of free memory.
|
static |
A memory handler reached a point where all allocated objects should have been released. Since this exception is thrown, some were still allocated.
|
static |
An error occurred reading or writing a file.
|
static |
An error occurred opening the named file.
The constructor takes a single argument of type std::string
naming the file.
|
static |
Exception denoting a part of the library or application program that has not yet been implemented. In many cases, this only indicates that there wasn't much need for something yet, not that this is difficult to implement. It is therefore quite worth the effort to take a look at the corresponding place and see whether it can be implemented without too much effort.
|
static |
This exception usually indicates that some condition which the programmer thinks must be satisfied at a certain point in an algorithm, is not fulfilled. This might be due to some programming error above, due to changes to the algorithm that did not preserve this assertion, or due to assumptions the programmer made that are not valid at all (i.e. the exception is thrown although there is no error here). Within the library, this exception is most often used when we write some kind of complicated algorithm and are not yet sure whether we got it right; we then put in assertions after each part of the algorithm that check for some conditions that should hold there, and throw an exception if they do not.
We usually leave in these assertions even after we are confident that the implementation is correct, since if someone later changes or extends the algorithm, these exceptions will indicate to them if they violate assumptions that are used later in the algorithm. Furthermore, it sometimes happens that an algorithm does not work in very rare corner cases. These cases will then be trapped sooner or later by the exception, so that the algorithm can then be fixed for these cases as well.
|
static |
This exception is used in functions that may not be called (i.e. in pure functions) but could not be declared pure since the class is intended to be used anyway, even though the respective function may only be called if a derived class is used.
|
static |
This exception is used if some object is found uninitialized.
|
static |
The object is in a state not suitable for this operation.
|
static |
This exception is raised if a functionality is not possible in the given dimension. Mostly used to throw function calls in 1d.
The constructor takes a single int
, denoting the dimension.
|
static |
This exception is raised if a functionality is not possible in the given combination of dimension and space-dimension.
The constructor takes two int
, denoting the dimension and the space dimension.
|
static |
A number is zero, but it should not be here.
|
static |
The object should have been filled with something before this member function is called.
|
static |
This exception is raised whenever the sizes of two objects were assumed to be equal, but were not.
Parameters to the constructor are the first and second size, both of type int
.
|
static |
The first dimension should be either equal to the second or the third, but it is neither.
|
static |
This exception indicates that an index is not within the expected range. For example, it may be that you are trying to access an element of a vector which does not exist.
The constructor takes three int
arguments, namely
|
static |
This exception indicates that an index is not within the expected range. For example, it may be that you are trying to access an element of a vector which does not exist.
The constructor takes three arguments, namely
This generic exception differs from ExcIndexRange by allowing to specify the type of indices.
|
static |
A number is too small.
|
static |
A generic exception definition for the ExcLowerRange above.
|
static |
This exception indicates that the first argument should be an integer multiple of the second, but is not.
|
static |
This exception is thrown if the iterator you access has corrupted data. It might for instance be, that the container it refers does not have an entry at the point the iterator refers.
Typically, this will be an internal error of deal.II, because the increment and decrement operators should never yield an invalid iterator.
|
static |
This exception is thrown if the iterator you incremented or decremented was already at its final state.
|
static |
This exception works around a design flaw in the DeclException0
macro: exceptions declared through DeclException0 do not allow one to specify a message that is displayed when the exception is raised, as opposed to the other exceptions which allow to show a text along with the given parameters.
When throwing this exception, you can give a message as a std::string
as argument to the exception that is then displayed. The argument can, of course, be constructed at run-time, for example including the name of a file that can't be opened, or any other text you may want to assemble from different pieces.
|
static |
Parallel vectors with ghost elements are read-only vectors.
|
static |
Some of our numerical classes allow for setting all entries to zero using the assignment operator =
.
In many cases, this assignment operator makes sense only for the argument zero. In other cases, this exception is thrown.
|
static |
This function requires support for the LAPACK library.
|
static |
This function requires support for the MPI library.
|
static |
This function requires support for the NetCDF library.
|
static |
This function requires support for the FunctionParser library.
|
static |
This function requires support for the Assimp library.
|
static |
This exception is raised if an error happened in a CUDA kernel.
The constructor takes a single char*
, the output of cudaGetErrorString.
|
static |
This exception is raised if an error happened in a cuSPARSE function.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
private |
Initialize fp and vars on the current thread. This function may only be called once per thread. A thread can test whether the function has already been called by testing whether 'fp.get().size()==0' (not initialized) or >0 (already initialized).
Definition at line 137 of file function_parser.cc.
|
static |
Exception.
|
static |
Exception.
|
static |
Exception
|
static |
Exception
|
static |
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception for when there are an unequal number of 'subsection' and 'end' statements. The first argument is the name of the file and the second argument is a formatted list of the subsection path before and after entering the parser.
|
static |
Exception for when, during parsing of a parameter file, the parser encounters a subsection in the file that was not previously declared.
|
static |
General exception for a line that could not be parsed, taking, as arguments, the line number, file name, and a brief description of why the line cannot be parsed.
|
static |
Exception for an entry in a parameter file that does not match the provided pattern. The arguments are, in order, the line number, file name, entry value, entry name, and a description of the pattern.
|
static |
Exception for when an XML file cannot be read at all. This happens when there is no top-level XML element called "ParameterHandler" or when there are multiple top level elements.
|
static |
Exception for when the file given in an include statement cannot be open. The arguments are, in order, the line number of the include statement, current parameter file name, and the name of the file intended for inclusion.
|
private |
Return the string that identifies the current path into the property tree. This is only a path, i.e. it is not terminated by the path_separator character.
This function simply calls collate_path_string() with subsection_path
as argument
Definition at line 358 of file parameter_handler.cc.
|
private |
Given the name of an entry as argument, the function computes a full path into the parameter tree using the current subsection.
Definition at line 366 of file parameter_handler.cc.
|
private |
This function computes a full path into the parameter tree given a path from the current subsection and the name of an entry.
Definition at line 380 of file parameter_handler.cc.
|
private |
Scan one line of input. input_filename
and current_line_n
are the name of the input file and the number of the line presently scanned (these are used in exception messages to show where parse errors occurred). This function will raise an exception if the line contains an undeclared subsection or entry, if the line's entry does not match its given pattern, or if the line could not be understood as a valid parameter file expression.
The function modifies its argument, but also takes it by value, so the caller's variable is not changed.
If skip_undefined
is true
, the parser will skip undefined sections and entries. This is useful for partially parsing a parameter file, for example to obtain only the spatial dimension of the problem. By default all entries and subsections are expected to be declared.
Definition at line 1802 of file parameter_handler.cc.
|
private |
Print out the parameters of the subsection given by the target_subsection_path
argument, as well as all subsections within it recursively. This function is called from the print_parameters() function, and is implemented for all style
arguments other than XML and JSON (where we can output the entire set of parameters via BOOST functions). The indent_level
argument indicates how many spaces the output should be indented, so that subsections properly nest inside the output of higher sections.
Definition at line 1367 of file parameter_handler.cc.
|
virtualdefault |
Destructor. It doesn't actually do anything, but is declared to force derived classes to have a virtual destructor.
|
pure virtual |
create_new
must provide a clean object, either by creating a new one or by cleaning an old one.
|
pure virtual |
Get the parameters and run any necessary action.
MultipleParameterLoop::MultipleParameterLoop | ( | ) |
Constructor
Definition at line 2071 of file parameter_handler.cc.
|
overridevirtualdefault |
Destructor. Declare this only to have a virtual destructor, which is safer as we have virtual functions. It actually does nothing spectacular.
|
overridevirtual |
Read input from a stream until the stream returns the eof
condition or error. The second argument can be used to denote the name of the file (if that's what the input stream represents) we are reading from; this is only used when creating output for error messages.
If non-empty last_line
is provided, the ParameterHandler object will stop parsing lines after encountering last_line
. This is handy when adding extra data that shall be parsed manually.
If skip_undefined
is true
, the parameter handler will skip undefined sections and entries. This is useful for partially parsing a parameter file, for example to obtain only the spatial dimension of the problem. By default all entries and subsections are expected to be declared.
parse_input
functions implemented by ParameterHandler overridden with new behavior by this class. This is because the other two parse_input
functions just reformat their inputs and then call this version. Reimplemented from ParameterHandler.
Definition at line 2078 of file parameter_handler.cc.
void MultipleParameterLoop::loop | ( | MultipleParameterLoop::UserClass & | uc | ) |
run the central loop.
Definition at line 2095 of file parameter_handler.cc.
std::size_t MultipleParameterLoop::memory_consumption | ( | ) | const |
Determine an estimate for the memory consumption (in bytes) of this object.
Definition at line 2229 of file parameter_handler.cc.
|
inline |
Constructor
Definition at line 2200 of file parameter_handler.h.
MultipleParameterLoop::Entry::Entry | ( | const std::vector< std::string > & | Path, |
const std::string & | Name, | ||
const std::string & | Value | ||
) |
Construct an object with given subsection path, name and value. The splitting up into the different variants is done later by split_different_values
.
Definition at line 2240 of file parameter_handler.cc.
void MultipleParameterLoop::Entry::split_different_values | ( | ) |
Split the entry value into the different branches.
Definition at line 2252 of file parameter_handler.cc.
std::size_t MultipleParameterLoop::Entry::memory_consumption | ( | ) | const |
Determine an estimate for the memory consumption (in bytes) of this object.
Definition at line 2304 of file parameter_handler.cc.
|
private |
Initialize the different branches, i.e. construct the combinations.
Definition at line 2109 of file parameter_handler.cc.
|
private |
Traverse the section currently set by enter_subsection()/leave_subsection() and see which of the entries are variant or array entries. Then fill the multiple_choices variable using this information.
Definition at line 2150 of file parameter_handler.cc.
|
private |
Transfer the entry values for one run to the entry tree.
Definition at line 2181 of file parameter_handler.cc.
|
static |
Exception
|
static |
Exception
|
static |
This class was not registered in the path search mechanism.
|
static |
The PathSearch class could not find a file with this name in its path list.
|
static |
Exception.
Patterns::Map::Map | ( | const PatternBase & | key_pattern, |
const PatternBase & | value_pattern, | ||
const unsigned int | min_elements = 0 , |
||
const unsigned int | max_elements = max_int_value , |
||
const std::string & | separator = "," , |
||
const std::string & | key_value_separator = ":" |
||
) |
Constructor. Take the given parameter as the specification of valid elements of the list.
The four other arguments can be used to denote minimal and maximal allowable lengths of the list as well as the separators used to delimit pairs of the map and the symbol used to separate keys and values.
Definition at line 825 of file patterns.cc.
Patterns::Map::Map | ( | const Map & | other | ) |
Copy constructor.
Definition at line 853 of file patterns.cc.
|
overridevirtual |
Return true
if the string is a comma-separated list of strings each of which match the pattern given to the constructor.
Implements Patterns::PatternBase.
Definition at line 865 of file patterns.cc.
|
overridevirtual |
Return a description of the pattern that valid strings are expected to match.
Implements Patterns::PatternBase.
Definition at line 895 of file patterns.cc.
|
overridevirtual |
Return a copy of the present object, which is newly allocated on the heap. Ownership of that object is transferred to the caller of this function.
Implements Patterns::PatternBase.
Definition at line 945 of file patterns.cc.
|
static |
Create a new object if the start of description matches description_init. Ownership of that object is transferred to the caller of this function.
Definition at line 969 of file patterns.cc.
|
overridevirtual |
Determine an estimate for the memory consumption (in bytes) of this object.
Reimplemented from Patterns::PatternBase.
Definition at line 957 of file patterns.cc.
const PatternBase & Patterns::Map::get_key_pattern | ( | ) | const |
Return a reference to the key pattern.
Definition at line 1024 of file patterns.cc.
const PatternBase & Patterns::Map::get_value_pattern | ( | ) | const |
Return a reference to the value pattern.
Definition at line 1032 of file patterns.cc.
const std::string & Patterns::Map::get_separator | ( | ) | const |
Return the separator of the map entries.
Definition at line 1040 of file patterns.cc.
const std::string & Patterns::Map::get_key_value_separator | ( | ) | const |
Return the key-value separator.
Definition at line 1047 of file patterns.cc.
|
static |
Exception.
Patterns::Tuple::Tuple | ( | const std::vector< std::unique_ptr< PatternBase >> & | patterns, |
const std::string & | separator = ":" |
||
) |
Constructor. Use a vector of unique pointers to Patterns to construct the tuple.
patterns | The pattern each object of the Tuple should match |
separator | An optional string used to delimit each element Constructor. |
Definition at line 1057 of file patterns.cc.
Patterns::Tuple::Tuple | ( | const std::vector< std::unique_ptr< PatternBase >> & | patterns, |
const char * | separator | ||
) |
Constructor. Same as above, specialized for const char *. This is necessary to avoid compilers errors due to the variadic constructors provided below.
Definition at line 1072 of file patterns.cc.
Patterns::Tuple::Tuple | ( | const std::string & | separator, |
const PatternTypes &... | patterns | ||
) |
Constructor. Creates a Tuple from more than one class derived from PatternBase.
separator | What separator to use. |
patterns | The list of patterns to use |
Definition at line 1434 of file patterns.h.
Patterns::Tuple::Tuple | ( | const char * | separator, |
const PatternTypes &... | patterns | ||
) |
Constructor. This is needed to allow users to specify directly the separator without using std::string(";").
Since we support a pure variadic templates version, without this specialization, the compiler will fail with cryptic errors.
Definition at line 1426 of file patterns.h.
Patterns::Tuple::Tuple | ( | const Patterns &... | patterns | ) |
Constructor. Same as above, using the default separator.
patterns | The list of patterns to use |
Patterns::Tuple::Tuple | ( | const Tuple & | other | ) |
Copy constructor.
Definition at line 1079 of file patterns.cc.
|
overridevirtual |
Return true
if the string is a list of strings each of which matches the patterns given to the constructor.
Implements Patterns::PatternBase.
Definition at line 1090 of file patterns.cc.
|
overridevirtual |
Return a description of the pattern that valid strings are expected to match.
Definition at line 1109 of file patterns.cc.
|
overridevirtual |
Return a copy of the present object, which is newly allocated on the heap. Ownership of that object is transferred to the caller of this function.
Implements Patterns::PatternBase.
Definition at line 1159 of file patterns.cc.
|
static |
Create a new object if the start of description matches description_init. Ownership of that object is transferred to the caller of this function.
Definition at line 1175 of file patterns.cc.
|
overridevirtual |
Determine an estimate for the memory consumption (in bytes) of this object.
Reimplemented from Patterns::PatternBase.
Definition at line 1166 of file patterns.cc.
const PatternBase & Patterns::Tuple::get_pattern | ( | const unsigned int | i | ) | const |
Return a reference to the i-th pattern in the tuple.
Definition at line 1223 of file patterns.cc.
const std::string & Patterns::Tuple::get_separator | ( | ) | const |
Return the separator of the tuple entries.
Definition at line 1231 of file patterns.cc.
Patterns::MultipleSelection::MultipleSelection | ( | const std::string & | seq | ) |
Constructor. seq
is a list of valid options separated by "|".
Definition at line 1241 of file patterns.cc.
|
overridevirtual |
Return true
if the string is an element of the description list passed to the constructor.
Implements Patterns::PatternBase.
Definition at line 1256 of file patterns.cc.
|
overridevirtual |
Return a description of the pattern that valid strings are expected to match. Here, this is the list of valid strings passed to the constructor.
Implements Patterns::PatternBase.
Definition at line 1319 of file patterns.cc.
|
overridevirtual |
Return a copy of the present object, which is newly allocated on the heap. Ownership of that object is transferred to the caller of this function.
Implements Patterns::PatternBase.
Definition at line 1354 of file patterns.cc.
|
static |
Create a new object if the start of description matches description_init. Ownership of that object is transferred to the caller of this function.
Definition at line 1370 of file patterns.cc.
|
overridevirtual |
Determine an estimate for the memory consumption (in bytes) of this object.
Reimplemented from Patterns::PatternBase.
Definition at line 1361 of file patterns.cc.
|
static |
Exception.
Patterns::Bool::Bool | ( | ) |
Constructor.
Definition at line 1392 of file patterns.cc.
|
overridevirtual |
Return a description of the pattern that valid strings are expected to match.
Definition at line 1399 of file patterns.cc.
|
overridevirtual |
Return a copy of the present object, which is newly allocated on the heap. Ownership of that object is transferred to the caller of this function.
Reimplemented from Patterns::Selection.
Definition at line 1427 of file patterns.cc.
|
static |
Create a new object if the start of description matches description_init. Ownership of that object is transferred to the caller of this function.
Definition at line 1435 of file patterns.cc.
|
default |
Constructor. (Allow for at least one non-virtual function in this class, as otherwise sometimes no virtual table is emitted.)
|
overridevirtual |
Return true
if the string matches its constraints, i.e. always.
Implements Patterns::PatternBase.
Definition at line 1452 of file patterns.cc.
|
overridevirtual |
Return a description of the pattern that valid strings are expected to match. Here, this is the string "[Anything]"
.
Implements Patterns::PatternBase.
Definition at line 1460 of file patterns.cc.
|
overridevirtual |
Return a copy of the present object, which is newly allocated on the heap. Ownership of that object is transferred to the caller of this function.
Implements Patterns::PatternBase.
Definition at line 1488 of file patterns.cc.
|
static |
Create a new object if the start of description matches description_init. Ownership of that object is transferred to the caller of this function.
Definition at line 1496 of file patterns.cc.
Constructor. The type of the file can be specified by choosing the flag.
Definition at line 1511 of file patterns.cc.
|
overridevirtual |
Return true
if the string matches its constraints, i.e. always.
Implements Patterns::PatternBase.
Definition at line 1518 of file patterns.cc.
|
overridevirtual |
Return a description of the pattern that valid strings are expected to match. Here, this is the string "[Filename]"
.
Definition at line 1526 of file patterns.cc.
|
overridevirtual |
Return a copy of the present object, which is newly allocated on the heap. Ownership of that object is transferred to the caller of this function.
Implements Patterns::PatternBase.
Definition at line 1562 of file patterns.cc.
|
static |
Create a new object if the start of description matches description_init. Ownership of that object is transferred to the caller of this function.
Definition at line 1570 of file patterns.cc.
|
default |
Constructor.
|
overridevirtual |
Return true
if the string matches its constraints, i.e. always.
Implements Patterns::PatternBase.
Definition at line 1602 of file patterns.cc.
|
overridevirtual |
Return a description of the pattern that valid strings are expected to match. Here, this is the string "[Filename]"
.
Implements Patterns::PatternBase.
Definition at line 1610 of file patterns.cc.
|
overridevirtual |
Return a copy of the present object, which is newly allocated on the heap. Ownership of that object is transferred to the caller of this function.
Implements Patterns::PatternBase.
Definition at line 1638 of file patterns.cc.
|
static |
Create a new object if the start of description matches description_init. Ownership of that object is transferred to the caller of this function.
Definition at line 1646 of file patterns.cc.
|
staticdelete |
Return a std::unique_ptr to a Pattern that can be used to interpret a string as the type of the template argument, and the other way around.
While the current function (in the general Convert template) is deleted, it is implemented and available in the specializations of the Convert class template for particular kinds of template arguments T
.
|
staticdelete |
Return a string containing a textual version of the variable s. Use the pattern passed to perform the conversion, or create and use a default one.
While the current function (in the general Convert template) is deleted, it is implemented and available in the specializations of the Convert class template for particular kinds of template arguments T
.
|
staticdelete |
Convert a string to a value, using the given pattern. Use the pattern passed to perform the conversion, or create and use a default one.
While the current function (in the general Convert template) is deleted, it is implemented and available in the specializations of the Convert class template for particular kinds of template arguments T
.
std::string Patterns::Tools::to_string | ( | const T & | t | ) |
A utility function that simplifies the conversion to strings of arbitrarily complex types.
This function calls the method Convert<T>::to_string() with the default pattern. An example usage is the following:
See the documentation of the class Patterns::Tools::Convert, and of the helper class Patterns::Tools::RankInfo for details on the way separators are selected when outputting STL container types.
Definition at line 2360 of file patterns.h.
void Patterns::Tools::to_value | ( | const std::string & | s, |
T & | t | ||
) |
A utility function that simplifies the conversion from strings to arbitrary types.
This function calls the method Convert<T>::to_value() with the default pattern. An example usage is the following:
See the documentation of the class Patterns::Tools::Convert, and of the helper class Patterns::Tools::RankInfo for details on the separators you should use in your string patterns when converting from a string to a container type.
Notice that the current content of variable t
is ignored. Its type is used to infer how to interpret the string. If the string is successfully parsed, then t
will be set to the parsed content of s
.
Definition at line 2368 of file patterns.h.
|
static |
Exception.
|
inlinestatic |
Definition at line 1505 of file patterns.h.
|
inlinestatic |
Definition at line 1535 of file patterns.h.
|
inlinestatic |
Definition at line 1553 of file patterns.h.
|
constexpr |
Definition at line 1671 of file patterns.h.
|
constexpr |
Definition at line 1678 of file patterns.h.
|
constexpr |
Definition at line 1687 of file patterns.h.
|
constexpr |
Definition at line 1694 of file patterns.h.
|
inlinestatic |
Definition at line 1786 of file patterns.h.
|
inlinestatic |
Definition at line 1799 of file patterns.h.
|
inlinestatic |
Definition at line 1825 of file patterns.h.
|
inlinestatic |
Definition at line 1854 of file patterns.h.
|
inlinestatic |
Definition at line 1871 of file patterns.h.
|
inlinestatic |
Definition at line 1901 of file patterns.h.
|
inlinestatic |
Definition at line 1937 of file patterns.h.
|
inlinestatic |
Definition at line 1950 of file patterns.h.
|
inlinestatic |
Definition at line 1975 of file patterns.h.
|
inlinestatic |
Definition at line 2005 of file patterns.h.
|
inlinestatic |
Definition at line 2011 of file patterns.h.
|
inlinestatic |
Definition at line 2020 of file patterns.h.
|
inlinestatic |
Definition at line 2035 of file patterns.h.
|
inlinestatic |
Definition at line 2049 of file patterns.h.
|
inlinestatic |
Definition at line 2071 of file patterns.h.
|
inlinestatic |
Definition at line 2101 of file patterns.h.
|
inlinestatic |
Definition at line 2107 of file patterns.h.
|
inlinestatic |
Definition at line 2119 of file patterns.h.
|
inlinestatic |
Definition at line 2135 of file patterns.h.
|
inlinestatic |
Definition at line 2148 of file patterns.h.
|
inlinestatic |
Convert a string to a value, using the given pattern, or a default one.
Definition at line 2171 of file patterns.h.
|
inlinestatic |
Definition at line 2199 of file patterns.h.
|
inlinestatic |
Definition at line 2205 of file patterns.h.
|
inlinestatic |
Definition at line 2214 of file patterns.h.
|
inlinestatic |
Definition at line 2230 of file patterns.h.
|
inlinestatic |
Definition at line 2241 of file patterns.h.
|
inlinestatic |
Definition at line 2252 of file patterns.h.
|
inlinestatic |
Definition at line 2269 of file patterns.h.
|
inlinestatic |
Definition at line 2279 of file patterns.h.
|
inlinestatic |
Definition at line 2297 of file patterns.h.
|
inlinestaticprivate |
Definition at line 2316 of file patterns.h.
|
inlinestaticprivate |
Definition at line 2327 of file patterns.h.
|
inlinestaticprivate |
Definition at line 2337 of file patterns.h.
|
inlinestaticprivate |
Definition at line 2347 of file patterns.h.
|
static |
Exception
|
staticprivate |
|
staticprivate |
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
staticprivate |
This static function creates a quadrature object according to the name given as a string, and the appropriate order (if the name is "gauss"). It is called from the constructor.
Definition at line 24 of file quadrature_selector.cc.
|
static |
Exception: Object may not be deleted, since it is used.
|
static |
A subscriber with the identification string given to Subscriptor::unsubscribe() did not subscribe to the object.
|
inline |
Read or write the data of this object to or from a stream for the purpose of serialization.
This function does not actually serialize any of the member variables of this class. The reason is that what this class stores is only who subscribes to this object, but who does so at the time of storing the contents of this object does not necessarily have anything to do with who subscribes to the object when it is restored. Consequently, we do not want to overwrite the subscribers at the time of restoring, and then there is no reason to write the subscribers out in the first place.
Definition at line 301 of file subscriptor.h.
|
privatenoexcept |
Check that there are no objects subscribing to this object. If this check passes then it is safe to destroy the current object. It this check fails then this function will either abort or print an error message to deallog (by using the AssertNothrow mechanism), but will not throw an exception.
Definition at line 52 of file subscriptor.cc.
|
static |
Exception for range check. Do not use global exception since this way we can output which index is the wrong one.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
TableHandler::Column::Column | ( | ) |
Constructor needed by std::map
.
Definition at line 147 of file table_handler.cc.
TableHandler::Column::Column | ( | const std::string & | tex_caption | ) |
Constructor.
Definition at line 136 of file table_handler.cc.
void TableHandler::Column::pad_column_below | ( | const unsigned int | length | ) |
Pad this column with default constructed elements to the number of rows given by the argument.
Definition at line 159 of file table_handler.cc.
void TableHandler::Column::save | ( | Archive & | ar, |
const unsigned int | version | ||
) | const |
Write the data of this object to a stream for the purpose of serialization.
Definition at line 978 of file table_handler.h.
void TableHandler::Column::load | ( | Archive & | ar, |
const unsigned int | version | ||
) |
Read the data of this object from a stream for the purpose of serialization.
Definition at line 987 of file table_handler.h.
void TableHandler::Column::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) |
Write and read the data of this object from a stream for the purpose of serialization.
void TableHandler::Column::invalidate_cache | ( | ) |
Invalidates the string cache of all the entries and recomputes the maximum length max_length.
Definition at line 179 of file table_handler.cc.
|
protected |
Help function that gives a vector of the keys of all columns that are mentioned in column_order
, where each supercolumn key is replaced by its subcolumn keys.
This function implicitly checks the consistency of the data. The result is returned in sel_columns
.
Definition at line 775 of file table_handler.cc.
|
protected |
Builtin function, that gives the number of rows in the table and that checks if the number of rows is equal in every column. This function is e.g. called before writing output.
Definition at line 754 of file table_handler.cc.
|
static |
|
static |
|
private |
Initialize tfp and vars on the current thread. This function may only be called once per thread. A thread can test whether the function has already been called by testing whether 'tfp.get().size()==0' (not initialized) or >0 (already initialized).
Definition at line 146 of file tensor_function_parser.cc.
|
static |
Exception
|
inline |
Add another task object to the collection.
Definition at line 1805 of file thread_management.h.
|
inline |
Return how many tasks have been put into this group. This function does not distinguish how many of these tasks have already run and have finished, are still waiting to be scheduled to a CPU resource, or are currently running. Tasks that have been joined already are also still counted.
Definition at line 1820 of file thread_management.h.
|
inline |
Wait for all tasks in the collection to finish. It is not a problem if some of them have already been waited for, i.e. you may call this function more than once, and you can also add new task objects between subsequent calls to this function if you want.
Definition at line 1833 of file thread_management.h.
|
static |
Exception denoting that a class requires some specialization in order to be used.
|
static |
Exception denoting that ADOL-C is a required feature.
|
static |
This exception is raised whenever the an auto-differentiable number does not support the required number of derivative operations
The first parameter to the constructor is the number of derivative operations that it provides, and the second is the minimum number that are required. Both parameters are of type int
.
|
static |
An exception which states that a function has been disabled due to the configuration of ADOL-C with the advanced branching feature enabled.
|
static |
An exception to indicate that the string sent to the SymEngine parser is not valid.
Differentiation::SD::Expression::Expression | ( | ) |
Default constructor.
Definition at line 48 of file symengine_number_types.cc.
|
explicit |
Constructor for boolean types.
Definition at line 53 of file symengine_number_types.cc.
|
explicit |
Constructor for arithmetic number types.
|
explicit |
Constructor for complex numbers templated on arithmetic number types.
Differentiation::SD::Expression::Expression | ( | const SymEngine::integer_class & | value | ) |
Constructor for integer types.
Definition at line 58 of file symengine_number_types.cc.
Differentiation::SD::Expression::Expression | ( | const NumberType & | numerator, |
const NumberType & | denominator | ||
) |
Constructor for rational types.
It is expected that both the numerator
and denominator
be integral types.
Differentiation::SD::Expression::Expression | ( | const SymEngine::rational_class & | value | ) |
Constructor for rational types.
Definition at line 63 of file symengine_number_types.cc.
Differentiation::SD::Expression::Expression | ( | const Expression & | condition, |
const Expression & | expression_if_true, | ||
const Expression & | expression_if_false | ||
) |
Constructor for a piecewise defined function.
The generated expression may be interpreted as the result of the teniary operator, i.e. (condition ? expression_if_true : expression_if_false)
.
The condition
can be any expression that renders an expression that is convertible to a SymEngine::Boolean operator. This includes:
An example of this constructor's use is as follows:
Definition at line 68 of file symengine_number_types.cc.
Differentiation::SD::Expression::Expression | ( | const std::vector< std::pair< Expression, Expression >> & | condition_expression, |
const Expression & | expression_otherwise | ||
) |
Constructor for a piecewise defined function.
The generated expression may be interpreted as the result of the set of nested if-elseif-else statements, i.e. (in pseudo-code)
if the input vector has more than 2 elements.
This variant takes the piecewise evaluated conditions and its results as the first argument, and the default return value as the second argument.
Definition at line 84 of file symengine_number_types.cc.
Differentiation::SD::Expression::Expression | ( | const std::vector< std::pair< Expression, Expression >> & | condition_expression | ) |
Constructor for a piecewise defined function.
The generated expression may be interpreted as the result of the set of nested if-elseif statements, i.e. (in pseudo-code)
if the input vector has more than 2 elements.
This variant takes only the piecewise evaluated conditions and its results. If none of the conditions are met upon evaluation then the returned result will be NaN.
Definition at line 111 of file symengine_number_types.cc.
Differentiation::SD::Expression::Expression | ( | const char * | symbol | ) |
Constructor for symbolic types.
This constructor initializes a symbolic type with a character array representing its symbolic value.
Definition at line 122 of file symengine_number_types.cc.
Differentiation::SD::Expression::Expression | ( | const std::string & | symb_expr, |
const bool | parse_as_expression = false |
||
) |
Constructor for symbolic types.
This constructor initializes a symbolic type with a string representing its symbolic value. If the parse_as_expression
flag is false
, then the symb_expr
(potentially composed of multiple characters) will be interpreted as a single symbol. If the parse_as_expression
flag is true
, then the symb_expr
will be parsed as a symbolic expression (potentially composed of multiple symbols, constants, etc.).
Definition at line 127 of file symengine_number_types.cc.
Differentiation::SD::Expression::Expression | ( | const std::string & | symbol_func, |
const types::symbol_vector & | arguments | ||
) |
Constructor for function symbol types.
This constructor initializes a function symbol with a string representing its symbolic name.
Definition at line 145 of file symengine_number_types.cc.
|
default |
Copy constructor.
|
explicit |
Copy constructor.
Definition at line 153 of file symengine_number_types.cc.
Differentiation::SD::Expression::Expression | ( | const SymEngine::RCP< const SymEngine::Basic > & | rhs | ) |
Copy constructor.
This allows us to create our class straight from the results of SymEngine operations. This is especially important for operations like "diff", because the returned result is not primitive, but rather a set of compound operations.
Definition at line 158 of file symengine_number_types.cc.
|
default |
Move constructor.
Differentiation::SD::Expression::Expression | ( | SymEngine::RCP< const SymEngine::Basic > && | rhs | ) |
Move constructor.
This allows us to create our class straight from the results of SymEngine operations. This is especially important for operations like "diff", because the returned result is not primitive, but rather a set of compound operations.
Definition at line 163 of file symengine_number_types.cc.
|
virtualdefault |
Destructor.
Expression & Differentiation::SD::Expression::parse | ( | const std::string & | expression | ) |
Utilities Parse an expression from a string representing a symbolic expression
. This overwrites any existing value or expression that this object represents.
Definition at line 172 of file symengine_number_types.cc.
std::ostream & Differentiation::SD::Expression::print | ( | std::ostream & | stream | ) | const |
Print the value stored by this object.
Since the stored value could be one of a number of types, we leave SymEngine to cast and output the correct representation of the data.
Definition at line 180 of file symengine_number_types.cc.
void Differentiation::SD::Expression::save | ( | std::ostream & | stream | ) | const |
Save the value stored by this object to the stream
.
Each expression will be saved on a new line of the stream
.
Definition at line 188 of file symengine_number_types.cc.
void Differentiation::SD::Expression::load | ( | std::istream & | stream | ) |
Load the value stored in the stream
into this object.
It is expected that each expression appears on its own on single line of stream
.
Definition at line 198 of file symengine_number_types.cc.
void Differentiation::SD::Expression::save | ( | Archive & | archive, |
const unsigned int | version | ||
) | const |
Write the data of this object to a stream for the purpose of serialization.
This effectively saves the value stored in this object to the archive
with the given version
number.
void Differentiation::SD::Expression::load | ( | Archive & | archive, |
const unsigned int | version | ||
) |
Read the data of this object from a stream for the purpose of serialization.
This effectively loads into this object the value stored in of the archive
with the given version
number. In doing so, the previous contents of this object are thrown away.
void Differentiation::SD::Expression::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) |
Write and read the data of this object from a stream for the purpose of serialization.
This effectively saves or loads the value stored into/out of the archive
with the given version
number into this object. If deserializing data, then the previous contents of this object are thrown away.
SE::Expression & Differentiation::SD::Expression::get_expression | ( | ) | const |
Return the value or expression that this class instance represents.
Definition at line 213 of file symengine_number_types.cc.
const SE::Basic & Differentiation::SD::Expression::get_value | ( | ) | const |
Return the primitive SymEngine data type that stores the value or expression represented by this object.
Definition at line 227 of file symengine_number_types.cc.
const SE::RCP< const SE::Basic > & Differentiation::SD::Expression::get_RCP | ( | ) | const |
Return the pointer to the primitive SymEngine data type that stores the value or expression represented by this object.
Definition at line 234 of file symengine_number_types.cc.
Expression & Differentiation::SD::Expression::operator= | ( | const Expression & | rhs | ) |
Assignment operator.
Sets the data of this object's expression
equal to that of the rhs
object.
Definition at line 320 of file symengine_number_types.cc.
|
noexcept |
Assignment operator.
Sets the data of this object's expression
equal to that of the rhs
object.
Definition at line 330 of file symengine_number_types.cc.
Expression & Differentiation::SD::Expression::operator+= | ( | const Expression & | rhs | ) |
Addition assignment.
The rhs
expression
is added in-place to that of this object's expression
.
Definition at line 347 of file symengine_number_types.cc.
Expression & Differentiation::SD::Expression::operator-= | ( | const Expression & | rhs | ) |
Subtraction assignment.
The rhs
expression
is subtracted in-place from that of this object's expression
.
Definition at line 355 of file symengine_number_types.cc.
Expression & Differentiation::SD::Expression::operator*= | ( | const Expression & | rhs | ) |
Multiplication assignment.
This object's expression
is multiplied in-place by that of the rhs
expression
.
Definition at line 363 of file symengine_number_types.cc.
Expression & Differentiation::SD::Expression::operator/= | ( | const Expression & | rhs | ) |
Division assignment.
This object's expression
is divided in-place by that of the rhs
expression
.
Definition at line 371 of file symengine_number_types.cc.
Expression& Differentiation::SD::Expression::operator= | ( | const NumberType & | rhs | ) |
Assignment operator.
Set the data of this object's expression
equal to the numerical value of the rhs
.
Expression Differentiation::SD::Expression::operator- | ( | ) | const |
Negation operator.
Return a the result of pre-multipying this object's expression
by -1
.
Definition at line 340 of file symengine_number_types.cc.
Expression& Differentiation::SD::Expression::operator+= | ( | const NumberType & | rhs | ) |
Addition assignment.
The numerical value of the rhs
is added in-place to that of this object's expression
.
Expression& Differentiation::SD::Expression::operator-= | ( | const NumberType & | rhs | ) |
Subtraction assignment.
The numerical value of the rhs
is subtracted in-place from that of this object's expression
.
Expression& Differentiation::SD::Expression::operator*= | ( | const NumberType & | rhs | ) |
Multiplication assignment.
This object's expression
is multiplied in-place by that of the numerical value of the rhs
.
Expression& Differentiation::SD::Expression::operator/= | ( | const NumberType & | rhs | ) |
Division assignment.
This object's expression
is divided in-place by that of the numerical value of the rhs
.
Expression Differentiation::SD::Expression::differentiate | ( | const Expression & | symbol | ) | const |
Return the derivative of this object's expression
with respect to the given symbol
.
Definition at line 261 of file symengine_number_types.cc.
Expression Differentiation::SD::Expression::differentiate | ( | const SymEngine::RCP< const SymEngine::Symbol > & | symbol | ) | const |
Return the derivative of this object's expression
with respect to the given symbol
.
Definition at line 244 of file symengine_number_types.cc.
Expression Differentiation::SD::Expression::differentiate | ( | const SymEngine::RCP< const SymEngine::Basic > & | symbol | ) | const |
Return the derivative of this object's expression
with respect to the potential symbol
.
Definition at line 252 of file symengine_number_types.cc.
Expression Differentiation::SD::Expression::substitute | ( | const types::substitution_map & | substitution_values | ) | const |
Perform substitution of all symbols found in this object's expression
that match a key in the substitution_values
map.
substitution_values
that is paired with a key) need not necessarily be numerical, but may also be another symbolic type.Definition at line 294 of file symengine_number_types.cc.
Expression Differentiation::SD::Expression::substitute | ( | const SymEngine::map_basic_basic & | substitution_values | ) | const |
Perform substitution of all symbols found in this object's expression
that match a key in the substitution_values
map.
This function is like the one above, but takes in a SymEngine map (one that maps a SymEngine::RCP<const SymEngine::Basic>
to another SymEngine::RCP<const SymEngine::Basic>
) as an argument.
substitution_values
that is paired with a key) need not necessarily be numerical, but may also be another symbolic type.Definition at line 286 of file symengine_number_types.cc.
Expression Differentiation::SD::Expression::substitute | ( | const Expression & | symbol, |
const Expression & | value | ||
) | const |
Perform substitution of all symbols found in this object's expression
that match the symbol
. Each symbol
will be substituted with the given value
.
Definition at line 303 of file symengine_number_types.cc.
Expression Differentiation::SD::Expression::substitute | ( | const Expression & | symbol, |
const NumberType & | value | ||
) | const |
Perform substitution of all symbols found in this object's expression
that match the symbol
. Each symbol
will be substituted with the given value
.
ReturnType Differentiation::SD::Expression::substitute_and_evaluate | ( | const types::substitution_map & | substitution_values | ) | const |
Full substitution and evaluation. This creates a Expression by symbol substitution and then immediately computes its numerical value.
ReturnType Differentiation::SD::Expression::substitute_and_evaluate | ( | const SymEngine::map_basic_basic & | substitution_values | ) | const |
Full substitution and evaluation. This creates a Expression by symbol substitution and then immediately computes its numerical value.
This function is like the one above, but takes in a SymEngine map (one that maps a SymEngine::RCP<const SymEngine::Basic>
to another SymEngine::RCP<const SymEngine::Basic>
) as an argument.
|
explicit |
Conversion operator for real integer or floating point values, and complex integer or floating point values.
const NumberType val = static_cast<NumberType>(Expression);
or, probably less desirably,
const NumberType val = NumberType(Expression);
|
explicit |
Conversion operator that returns the value or expression that this class instance represents.
Definition at line 270 of file symengine_number_types.cc.
Differentiation::SD::Expression::operator const SymEngine::RCP< const SymEngine::Basic > & | ( | ) | const |
Conversion operator that returns a SymEngine reference counted pointer to the fundamental type.
|
protected |
Return the value or expression that this class instance represents.
std::ostream & Differentiation::SD::operator<< | ( | std::ostream & | stream, |
const Expression & | expression | ||
) |
Bitwise left shift operator.
This is used to output the expression
to the input stream
.
Definition at line 379 of file symengine_number_types.cc.
std::istream & Differentiation::SD::operator>> | ( | std::istream & | stream, |
Expression & | expression | ||
) |
Bitwise right shift operator.
This is used to read in an expression
from the input stream
.
Definition at line 387 of file symengine_number_types.cc.
Expression Differentiation::SD::operator== | ( | const Expression & | lhs, |
const Expression & | rhs | ||
) |
Equality operator.
Return whether the lhs
is equal to the rhs
.
Definition at line 397 of file symengine_number_types.cc.
Expression Differentiation::SD::operator!= | ( | const Expression & | lhs, |
const Expression & | rhs | ||
) |
Non-equality operator.
Return whether the lhs
is not equal to the rhs
.
Definition at line 404 of file symengine_number_types.cc.
Expression Differentiation::SD::operator< | ( | const Expression & | lhs, |
const Expression & | rhs | ||
) |
Less than operator.
Return whether the lhs
is less than the rhs
.
Definition at line 411 of file symengine_number_types.cc.
Expression Differentiation::SD::operator> | ( | const Expression & | lhs, |
const Expression & | rhs | ||
) |
Greater than operator.
Return whether the lhs
is greater than the rhs
.
Definition at line 418 of file symengine_number_types.cc.
Expression Differentiation::SD::operator<= | ( | const Expression & | lhs, |
const Expression & | rhs | ||
) |
Less than or equals operator.
Return whether the lhs
is less than, or equal to, the rhs
.
Definition at line 425 of file symengine_number_types.cc.
Expression Differentiation::SD::operator>= | ( | const Expression & | lhs, |
const Expression & | rhs | ||
) |
Greater than or equals operator.
Return whether the lhs
is greater than, or equal to, the rhs
.
Definition at line 432 of file symengine_number_types.cc.
Expression Differentiation::SD::operator! | ( | const Expression & | expression | ) |
Logical not operator.
Definition at line 438 of file symengine_number_types.cc.
Expression Differentiation::SD::operator& | ( | const Expression & | lhs, |
const Expression & | rhs | ||
) |
Logical and operator.
Definition at line 450 of file symengine_number_types.cc.
Expression Differentiation::SD::operator| | ( | const Expression & | lhs, |
const Expression & | rhs | ||
) |
Logical inclusive or operator.
Definition at line 467 of file symengine_number_types.cc.
Expression Differentiation::SD::operator^ | ( | const Expression & | lhs, |
const Expression & | rhs | ||
) |
Logical exclusive or (xor) operator.
Definition at line 484 of file symengine_number_types.cc.
Expression Differentiation::SD::operator&& | ( | const Expression & | lhs, |
const Expression & | rhs | ||
) |
And operator.
Definition at line 501 of file symengine_number_types.cc.
Expression Differentiation::SD::operator|| | ( | const Expression & | lhs, |
const Expression & | rhs | ||
) |
Inclusive or operator.
Definition at line 508 of file symengine_number_types.cc.
Expression Differentiation::SD::operator+ | ( | Expression | lhs, |
const Expression & | rhs | ||
) |
Addition operator.
Return the result of adding the rhs
to the lhs
.
Definition at line 515 of file symengine_number_types.cc.
Expression Differentiation::SD::operator- | ( | Expression | lhs, |
const Expression & | rhs | ||
) |
Subtraction operator.
Return the result of subtracting the rhs
from the lhs
.
Definition at line 523 of file symengine_number_types.cc.
Expression Differentiation::SD::operator* | ( | Expression | lhs, |
const Expression & | rhs | ||
) |
Multiplication operator.
Return the result of multiplying the lhs
by the rhs
.
Definition at line 530 of file symengine_number_types.cc.
Expression Differentiation::SD::operator/ | ( | Expression | lhs, |
const Expression & | rhs | ||
) |
Division operator.
Return the result of dividing the lhs
by the rhs
.
Definition at line 538 of file symengine_number_types.cc.
|
inline |
General addition operator.
Return the result of adding the rhs
to the lhs
. The lhs
type may be any supported number type, and the result is promoted to a Expression. The type conversion makes writing scalar expressions using Expression more natural.
Definition at line 1090 of file symengine_number_types.h.
|
inline |
General addition operator.
Return the result of adding the rhs
to the lhs
. The rhs
type may be any supported number type, and the result is promoted to a Expression. The type conversion makes writing scalar expressions using Expression more natural.
Definition at line 1107 of file symengine_number_types.h.
|
inline |
General subtraction operator.
Return the result of subtracting the rhs
from the lhs
. The lhs
type may be any supported number type, and the result is promoted to a Expression. The type conversion makes writing scalar expressions using Expression more natural.
Definition at line 1124 of file symengine_number_types.h.
|
inline |
General subtraction operator.
Return the result of subtracting the rhs
from the lhs
. The rhs
type may be any supported number type, and the result is promoted to a Expression. The type conversion makes writing scalar expressions using Expression more natural.
Definition at line 1141 of file symengine_number_types.h.
|
inline |
General multiplication operator.
Return the result of multiplying the lhs
by the rhs
. The lhs
type may be any supported number type, and the result is promoted to a Expression. The type conversion makes writing scalar expressions using Expression more natural.
Definition at line 1157 of file symengine_number_types.h.
|
inline |
General multiplication operator.
Return the result of multiplying the lhs
by the rhs
. The rhs
type may be any supported number type, and the result is promoted to a Expression. The type conversion makes writing scalar expressions using Expression more natural.
Definition at line 1173 of file symengine_number_types.h.
|
inline |
General division operator.
Return the result of dividing the lhs
by the rhs
. The lhs
type may be any supported number type, and the result is promoted to a Expression. The type conversion makes writing scalar expressions using Expression more natural.
Definition at line 1190 of file symengine_number_types.h.
|
inline |
General division operator.
Return the result of dividing the lhs
by the rhs
. The lhs
type may be any supported number type, and the result is promoted to a Expression. The type conversion makes writing scalar expressions using Expression more natural.
Definition at line 1207 of file symengine_number_types.h.
|
static |
An exception to indicate that the SymEngine library has not been built against the LLVM compiler.
|
static |
An exception to indicate that SymEngine's LLVM optimizer doesn't work with the desired return type.
|
inline |
Output operator that outputs the selected optimizer type.
Definition at line 123 of file symengine_optimizer.h.
|
inline |
A global operator that returns an object in which all bits are individually set in the following way: If the corresponding bit in either the first or second argument are set, then the output bit it set. Otherwise the output bit remains unset. This or
type operation is performed for each bit composing the input arguments (and output) in an individual manner.
Definition at line 180 of file symengine_optimizer.h.
|
inline |
Global operator that sets the bits from the second argument also in the first one.
Definition at line 192 of file symengine_optimizer.h.
|
inline |
A global operator that returns an object in which all bits are individually set in the following way: If the corresponding bit in both the first or second argument are set, then the output bit it set. Otherwise the output bit remains unset. This and
type operation is performed for each bit composing the input arguments (and output) in an individual manner.
Definition at line 211 of file symengine_optimizer.h.
|
inline |
Global operator which clears all the bits in the first argument if they are not also set in the second argument.
Definition at line 224 of file symengine_optimizer.h.
|
inline |
A utility function that checks whether or not CSE has been selected as an optimization flag.
Definition at line 238 of file symengine_optimizer.h.
|
inline |
A utility function that returns the optimization level that is to be employed when the LLVM optimizer is invoked.
Definition at line 248 of file symengine_optimizer.h.
|
inline |
Output operator that outputs optimization flags as a set of or'd text values.
Definition at line 275 of file symengine_optimizer.h.
TensorType<rank, dim, NumberType> Differentiation::SD::internal::tensor_evaluate_optimized | ( | const TensorType< rank, dim, Expression > & | symbol_tensor, |
const BatchOptimizer< NumberType > & | optimizer | ||
) |
A convenience function that returns the numeric equivalent of an input symbol_tensor
, computed through the optimizer
.
NumberType | The number type that is returned as a result of operations performed by the optimizer. |
rank | The rank of the output tensor. |
dim | The dimension of the output tensor. |
TensorType | The type of tensor to be evaluated and returned (i.e. Tensor or SymmetricTensor). |
[in] | symbol_tensor | The symbolic tensor that is to be evaluated. |
[in] | optimizer | The optimizer that can evaluate the input symbol_tensor . |
symbol_tensor
evaluates to. Definition at line 1137 of file symengine_optimizer.h.
SymmetricTensor<4, dim, NumberType> Differentiation::SD::internal::tensor_evaluate_optimized | ( | const SymmetricTensor< 4, dim, Expression > & | symbol_tensor, |
const BatchOptimizer< NumberType > & | optimizer | ||
) |
A convenience function that returns the numeric equivalent of an input symbol_tensor
, computed through the optimizer
. This is a specialization for rank-4 symmetric tensors.
NumberType | The number type that is returned as a result of operations performed by the optimizer. |
rank | The rank of the output tensor. |
dim | The dimension of the output tensor. |
TensorType | The type of tensor to be evaluated and returned (i.e. Tensor or SymmetricTensor). |
[in] | symbol_tensor | The symbolic tensor that is to be evaluated. |
[in] | optimizer | The optimizer that can evaluate the input symbol_tensor . |
symbol_tensor
evaluates to. Definition at line 1171 of file symengine_optimizer.h.
void Differentiation::SD::internal::register_functions | ( | BatchOptimizer< NumberType > & | optimizer, |
const T & | function | ||
) |
A helper function to register a single function
with the optimizer
.
NumberType | The number type that is returned as a result of operations performed by the optimizer. |
T | A compatible type that may be used to represent a single dependent variable. This includes scalar Expressions, Tensors of Expressions and SymmetricTensors of Expressions. |
optimizer | The instance of the BatchOptimizer to register the function with. |
function | A symbolic expression (scalar or tensor) that represents a dependent variable. |
Definition at line 1210 of file symengine_optimizer.h.
void Differentiation::SD::internal::register_functions | ( | BatchOptimizer< NumberType > & | optimizer, |
const std::vector< T > & | functions | ||
) |
A helper function to register a vector of functions
with the optimizer
.
NumberType | The number type that is returned as a result of operations performed by the optimizer. |
T | A compatible type that may be used to represent a single dependent variable. This includes scalar Expressions, Tensors of Expressions and SymmetricTensors of Expressions. |
optimizer | The instance of the BatchOptimizer to register the function with. |
functions | A vector of symbolic expressions (scalar or tensor) that each represent a dependent variable. |
Definition at line 1236 of file symengine_optimizer.h.
void Differentiation::SD::internal::register_functions | ( | BatchOptimizer< NumberType > & | optimizer, |
const T & | function, | ||
const Args &... | other_functions | ||
) |
A helper function to register the symbolic dependent variables collectively given by function
and other_functions
with the optimizer
.
NumberType | The number type that is returned as a result of operations performed by the optimizer. |
T | A compatible type that may be used to represent a single dependent variable. This includes scalar Expressions, Tensors of Expressions and SymmetricTensors of Expressions. |
Args | The parameter pack that collects all other types of dependent variables to be registered. |
optimizer | The instance of the BatchOptimizer to register the function with. |
function | A valid symbolic expression (or collection of symbolic expression) that represents one (or more) dependent variable. |
other_functions | One or more other valid symbolic expression(s) that represent dependent variable(s). |
Definition at line 1265 of file symengine_optimizer.h.
types::symbol_vector Differentiation::SD::internal::unroll_to_expression_vector | ( | const TensorType< rank, dim, Expression > & | symbol_tensor | ) |
A utility function that unrolls the input symbol_tensor
into a vector of Expressions.
rank | The rank of the input tensor. |
dim | The dimension of the input tensor. |
TensorType | The type of tensor to be evaluated and returned (i.e. Tensor or SymmetricTensor). |
symbol_tensor |
Definition at line 1289 of file symengine_optimizer.h.
types::symbol_vector Differentiation::SD::internal::unroll_to_expression_vector | ( | const SymmetricTensor< 4, dim, Expression > & | symbol_tensor | ) |
A utility function that unrolls the input symbol_tensor
into a vector of Expressions. This is a specialization for rank-4 symmetric tensors.
dim | The dimension of the input tensor. |
symbol_tensor |
Definition at line 1316 of file symengine_optimizer.h.
Differentiation::SD::BatchOptimizer< ReturnType >::BatchOptimizer |
Default constructor.
By default, dictionary substitution will be selected when this constructor is called. In order to select a specific optimization approach, a call to set_optimization_method() is necessary.
Definition at line 36 of file symengine_optimizer.cc.
Differentiation::SD::BatchOptimizer< ReturnType >::BatchOptimizer | ( | const enum OptimizerType & | optimization_method, |
const enum OptimizationFlags & | optimization_flags = OptimizationFlags::optimize_all |
||
) |
Constructor.
[in] | optimization_method | The optimization method that is to be employed. |
[in] | optimization_flags | The optimization flags that indicate which expression manipulation mechanisms are to be employed. |
optimization_method
is not implemented for the required ReturnType
, or the desired feature is not active, then an error will be thrown. Currently the LLVM optimization method is not compatible with complex numbers. Definition at line 46 of file symengine_optimizer.cc.
Differentiation::SD::BatchOptimizer< ReturnType >::BatchOptimizer | ( | const BatchOptimizer< ReturnType > & | other | ) |
Copy constructor
The copy_initialized
flag, which is set to true
by default, determines whether or not all of the optimized data is copied over from the other
optimizer instance. Only with the flag set to false
is it possible to re-optimize the data stored in this class with a different optimization scheme.
Definition at line 57 of file symengine_optimizer.cc.
|
default |
Move constructor.
|
default |
Destructor.
void Differentiation::SD::BatchOptimizer< ReturnType >::print | ( | Stream & | stream, |
const bool | print_cse = false |
||
) | const |
Print some information on state of the internal data structures stored in the class.
Stream | The type for the output stream. |
stream | The output stream to print to. |
print_cse | A flag to indicate whether or not all common subexpressions should be printed to the stream . |
void Differentiation::SD::BatchOptimizer< ReturnType >::save | ( | Archive & | archive, |
const unsigned int | version | ||
) | const |
Write the data of this object from a stream for the purpose of serialization.
This effectively saves the value stored into the archive
with the given version
number into this object.
void Differentiation::SD::BatchOptimizer< ReturnType >::load | ( | Archive & | archive, |
const unsigned int | version | ||
) |
Read the data of this object from a stream for the purpose of serialization.
This effectively loads the value stored out of the archive
with the given version
number into this object. In doing so, the previous contents of this object are thrown away.
void Differentiation::SD::BatchOptimizer< ReturnType >::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) |
Write and read the data of this object from a stream for the purpose of serialization.
This effectively saves or loads the value stored into/out of the archive
with the given version
number into this object. If deserializing data, then the previous contents of this object are thrown away.
void Differentiation::SD::BatchOptimizer< ReturnType >::register_symbols | ( | const types::substitution_map & | substitution_map | ) |
Register a collection of symbols that represents an independent variable. These symbols are stored as the key
to the substitution_map
.
Definition at line 148 of file symengine_optimizer.cc.
void Differentiation::SD::BatchOptimizer< ReturnType >::register_symbols | ( | const SymEngine::map_basic_basic & | substitution_map | ) |
Register a collection of symbols that represents an independent variable. These symbols are stored as the key
to the substitution_map
.
Definition at line 175 of file symengine_optimizer.cc.
void Differentiation::SD::BatchOptimizer< ReturnType >::register_symbols | ( | const types::symbol_vector & | symbols | ) |
Register a collection of symbols that represents independent variables.
substitution_values
vector or map matches the internal ordering of the registered symbols. This function is therefore typically used in conjunction with the substitute() function that takes in a vector of values. With this pair of functions to the class interface, the management of symbol ordering is maintained by the user. void Differentiation::SD::BatchOptimizer< ReturnType >::register_symbols | ( | const SymEngine::vec_basic & | symbols | ) |
Register a collection of symbols that represents independent variables.
substitution_values
vector or map matches the internal ordering of the registered symbols. This function is therefore typically used in conjunction with the substitute() function that takes in a vector of values. With this pair of functions to the class interface, the management of symbol ordering is maintained by the user. Definition at line 207 of file symengine_optimizer.cc.
SD::types::symbol_vector Differentiation::SD::BatchOptimizer< ReturnType >::get_independent_symbols |
Return a vector of symbols that have been registered as independent variables.
Definition at line 218 of file symengine_optimizer.cc.
std::size_t Differentiation::SD::BatchOptimizer< ReturnType >::n_independent_variables |
The number of independent variables that this optimizer will recognize. This is equal to the number of unique symbols passed to this class instance through the register_symbols() function.
Definition at line 227 of file symengine_optimizer.cc.
void Differentiation::SD::BatchOptimizer< ReturnType >::register_function | ( | const Expression & | function | ) |
Register a scalar symbolic expression that represents a dependent variable.
Definition at line 236 of file symengine_optimizer.cc.
void Differentiation::SD::BatchOptimizer< ReturnType >::register_function | ( | const Tensor< rank, dim, Expression > & | function_tensor | ) |
Register a tensor of symbolic expressions that represents a dependent variable.
void Differentiation::SD::BatchOptimizer< ReturnType >::register_function | ( | const SymmetricTensor< rank, dim, Expression > & | function_tensor | ) |
Register a symmetric tensor of symbolic expressions that represents a dependent variable.
void Differentiation::SD::BatchOptimizer< ReturnType >::register_functions | ( | const types::symbol_vector & | functions | ) |
Register a collection of symbolic expressions that represent dependent variables.
void Differentiation::SD::BatchOptimizer< ReturnType >::register_functions | ( | const SymEngine::vec_basic & | functions | ) |
Register a collection of symbolic expressions that represent multiple dependent variables.
Definition at line 263 of file symengine_optimizer.cc.
void Differentiation::SD::BatchOptimizer< ReturnType >::register_functions | ( | const std::vector< T > & | functions | ) |
Register a collection of symbolic expressions that represent multiple dependent variables.
T | A compatible type that may be used to represent a single dependent variable. This includes scalar Expressions, Tensors of Expressions and SymmetricTensors of Expressions. |
functions | A vector of symbolic dependent variables. |
void Differentiation::SD::BatchOptimizer< ReturnType >::register_functions | ( | const T & | functions, |
const Args &... | other_functions | ||
) |
Register a collection of symbolic expressions that represent dependent variables.
T | A compatible type that may be used to represent a single dependent variable. This includes scalar Expressions, Tensors of Expressions, SymmetricTensors of Expressions, and std::vector s of Expressions. |
Args | A variadic template that represents a collection of any compatible symbolic dependent variable types. |
functions | One or more symbolic dependent variables. |
other_functions | An arbitrary collection of symbolic dependent variables. |
const SD::types::symbol_vector & Differentiation::SD::BatchOptimizer< ReturnType >::get_dependent_functions |
Return a vector of expressions that have been registered as dependent variables.
Definition at line 274 of file symengine_optimizer.cc.
std::size_t Differentiation::SD::BatchOptimizer< ReturnType >::n_dependent_variables |
The number of dependent symbolic expressions that this optimizer will optimize. This is equal to the number of unique symbolic functions / expressions passed to this class instance through the register_functions() method.
Definition at line 283 of file symengine_optimizer.cc.
void Differentiation::SD::BatchOptimizer< ReturnType >::set_optimization_method | ( | const enum OptimizerType & | optimization_method, |
const enum OptimizationFlags & | optimization_flags = OptimizationFlags::optimize_all |
||
) |
Select the optimization_method
for the batch optimizer to employ, in conjunction with the optimization_flags
.
It is required that the this class instance is not yet optimized, i.e. that the optimize() method has not yet been called.
method
is not implemented for the required ReturnType
, or the desired feature is not active, then a safe default will be selected. Definition at line 72 of file symengine_optimizer.cc.
enum OptimizerType Differentiation::SD::BatchOptimizer< ReturnType >::optimization_method |
Return the optimization method that has been selected for use.
Definition at line 95 of file symengine_optimizer.cc.
enum OptimizationFlags Differentiation::SD::BatchOptimizer< ReturnType >::optimization_flags |
Return the optimization flags that have been selected for use.
Definition at line 104 of file symengine_optimizer.cc.
bool Differentiation::SD::BatchOptimizer< ReturnType >::use_symbolic_CSE |
State whether the internal selection of optimization methods and flags will render an optimizer that uses common subexpression elimination (CSE).
Definition at line 113 of file symengine_optimizer.cc.
void Differentiation::SD::BatchOptimizer< ReturnType >::optimize |
Perform the optimization of all registered dependent functions using the registered symbols.
Definition at line 300 of file symengine_optimizer.cc.
bool Differentiation::SD::BatchOptimizer< ReturnType >::optimized |
Returns a flag which indicates whether the optimize() function has been called and the class is finalized.
Definition at line 122 of file symengine_optimizer.cc.
void Differentiation::SD::BatchOptimizer< ReturnType >::substitute | ( | const types::substitution_map & | substitution_map | ) | const |
Perform batch substitution of all of the registered symbols into the registered functions. The result is cached and can be extracted by calls to evaluate().
substitution_map
overwrites any previously computed results. Definition at line 377 of file symengine_optimizer.cc.
void Differentiation::SD::BatchOptimizer< ReturnType >::substitute | ( | const SymEngine::map_basic_basic & | substitution_map | ) | const |
Perform batch substitution of all of the registered symbols into the registered functions. The result is cached and can be extracted by calls to evaluate().
substitution_map
overwrites any previously computed results. Definition at line 416 of file symengine_optimizer.cc.
void Differentiation::SD::BatchOptimizer< ReturnType >::substitute | ( | const types::symbol_vector & | symbols, |
const std::vector< ReturnType > & | values | ||
) | const |
Perform batch substitution of all of the registered symbols into the registered functions. The result is cached and can be extracted by calls to evaluate(). It is expected that there is a 1-1 correspondence between each of the symbols
and values
.
values
overwrites any previously computed results. void Differentiation::SD::BatchOptimizer< ReturnType >::substitute | ( | const SymEngine::vec_basic & | symbols, |
const std::vector< ReturnType > & | values | ||
) | const |
Perform batch substitution of all of the registered symbols into the registered functions. The result is cached and can be extracted by calls to evaluate(). It is expected that there is a 1-1 correspondence between each of the symbols
and values
.
values
overwrites any previously computed results. Definition at line 441 of file symengine_optimizer.cc.
bool Differentiation::SD::BatchOptimizer< ReturnType >::values_substituted |
Returns a flag to indicate whether the substitute() function has been called and if there are meaningful values that will be returned upon evaluation.
Definition at line 139 of file symengine_optimizer.cc.
const std::vector< ReturnType > & Differentiation::SD::BatchOptimizer< ReturnType >::evaluate |
Returns the result of a value substitution into the optimized counterpart of all dependent functions. This function fetches all of those cached values.
These values were computed by substituting a substitution_values
map during substitute() call.
Definition at line 511 of file symengine_optimizer.cc.
ReturnType Differentiation::SD::BatchOptimizer< ReturnType >::evaluate | ( | const Expression & | func | ) | const |
Returns the result of a value substitution into the optimized counterpart of func
. This function fetches that one cached value.
This value was computed by substituting a substitution_values
map during substitute() call.
Definition at line 526 of file symengine_optimizer.cc.
std::vector< ReturnType > Differentiation::SD::BatchOptimizer< ReturnType >::evaluate | ( | const std::vector< Expression > & | funcs | ) | const |
Returns the result of a value substitution into the optimized counterpart of funcs
. This function fetches that subset of cached values.
This value was computed by substituting a substitution_values
map during substitute() call.
Definition at line 623 of file symengine_optimizer.cc.
Tensor<rank, dim, ReturnType> Differentiation::SD::BatchOptimizer< ReturnType >::evaluate | ( | const Tensor< rank, dim, Expression > & | funcs | ) | const |
Returns the result of a tensor value substitution into the optimized counterpart of funcs
. This function fetches those cached tensor components.
This value was computed by substituting a substitution_values
map during substitute() call.
SymmetricTensor<rank, dim, ReturnType> Differentiation::SD::BatchOptimizer< ReturnType >::evaluate | ( | const SymmetricTensor< rank, dim, Expression > & | funcs | ) | const |
Returns the result of a tensor value substitution into the optimized counterpart of funcs
. This function fetches those cached symmetric tensor components.
This value was computed by substituting a substitution_values
map during substitute() call.
|
private |
A check to see if a function is exactly equal to one of the logical results of a differentiation operation.
Definition at line 639 of file symengine_optimizer.cc.
|
private |
A check to see if a function is exactly equal to one of the logical results of a differentiation operation.
Definition at line 649 of file symengine_optimizer.cc.
|
private |
Register a single symbol that represents a dependent variable.
Definition at line 682 of file symengine_optimizer.cc.
|
private |
Register a collection of symbols that represent dependent variables.
Definition at line 710 of file symengine_optimizer.cc.
|
private |
Create an instance of the selected optimizer.
Definition at line 744 of file symengine_optimizer.cc.
|
private |
Perform batch substitution of all of the registered symbols into the registered functions. The result is cached and can be extracted by calls to evaluate().
substitution_values
overwrites any previously computed results.substitution_values
vector matches the internal ordering of the registered symbols. This function is therefore typically used in conjunction with the register_symbols() function that takes in a vector of symbols. With this pair of functions to the class interface, the management of symbol ordering is maintained by the user. Definition at line 454 of file symengine_optimizer.cc.
|
static |
Exceptions for child classes
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
A function has been called for a cell which should be active, but is refined.
|
static |
Exception
|
static |
Exceptions for child classes
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
A function has been called for a cell which should be active, but is refined.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
The triangulation level you accessed is empty.
|
static |
Exception
|
static |
Exception
|
static |
The function is only implemented for Discontinuous Galerkin Finite elements.
|
static |
|
static |
|
static |
Exception
|
static |
The DoFHandler or hp::DoFHandler was not initialized with a finite element. Please call DoFHandler::distribute_dofs() etc. first.
|
static |
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Attempt to access support points of a finite element that is not Lagrangian.
|
static |
Attempt to access embedding matrices of a finite element that did not implement these matrices.
|
static |
Attempt to access restriction matrices of a finite element that did not implement these matrices.
Exception
|
static |
Exception
|
static |
Exception
|
static |
Attempt to construct an FE_Q object of degree 0
|
static |
The string used for get_fe_by_name() cannot be translated to a finite element.
Either the string is badly formatted or you are using a custom element that must be added using add_fe_name() first.
|
static |
The string used for get_fe_by_name() cannot be translated to a finite element.
Dimension arguments in finite element names should be avoided. If they are there, the dimension should be dim
or d
. Here, you gave a numeric dimension argument, which does not match the template dimension of the finite element class.
|
static |
Exception
|
static |
The finite element must be primitive.
|
static |
Exception
|
static |
A continuous element is used on a mesh with hanging nodes, but the constraint matrices are missing.
|
static |
You need at least two grid levels.
|
static |
The dimensions of the matrix used did not match the expected dimensions.
|
static |
Exception thrown if an embedding matrix was computed inaccurately.
|
static |
Exception thrown if one variable may not be greater than another.
|
static |
This exception is thrown if FEValuesBase is asked to return the value of a field which was not required by the UpdateFlags for this FEValuesBase.
|
static |
Mismatch between the FEValues FiniteElement and cell->get_dof_handler().get_fe()
|
static |
A given shape function is not primitive, but it needs to be.
|
static |
The given FiniteElement is not a primitive element, see FiniteElement::is_primitive().
|
static |
|
static |
|
static |
Exception
|
static |
Computing the mapping between a real space point and a point in reference space failed, typically because the given point lies outside the cell where the inverse mapping is not unique.
|
static |
deal.II assumes the Jacobian determinant to be positive. When the cell geometry is distorted under the image of the mapping, the mapping becomes invalid and this exception is thrown.
|
static |
Exception
|
static |
Exception.
|
static |
Exception which is thrown when the mapping is being evaluated at non-active cell.
|
static |
Exception.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception for input that is not properly oriented.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
|
static |
|
static |
|
static |
Exception
|
static |
An exception thrown if the vector with cell criteria contains negative values
|
static |
One of the threshold parameters causes trouble. Or the refinement and coarsening thresholds overlap.
|
static |
An exception that is thrown whenever the edges of a mesh are not orientable.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
staticprivate |
|
static |
Exception.
|
static |
Exception.
|
static |
Exception
|
static |
The function raising this exception can only operate on an empty Triangulation, i.e., a Triangulation without grid cells.
|
static |
Trying to re-read a grid, an error occurred.
|
static |
Exception
|
static |
The triangulation level you accessed is empty.
|
static |
Exception
|
static |
Exception
Requested boundary_id not found
|
static |
Exception
|
static |
|
static |
The cell is not an active cell, but it already has children. Some operations, like setting refinement flags or accessing degrees of freedom are only possible on active cells.
|
static |
Trying to access the children of a cell which is in fact active.
|
static |
Trying to access the parent of a cell which is in the coarsest level of the triangulation.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
You are trying to access the level of a face, but faces have no inherent level. The level of a face can only be determined by the level of an adjacent face, which in turn implies that a face can have several levels.
|
static |
You are trying to get the periodic neighbor for a face, which does not have a periodic neighbor. For more information on this, refer to entry for periodic boundaries.
|
static |
|
static |
|
static |
|
static |
|
static |
Exception for TriaObjects with level, i.e. cells.
|
static |
Exception.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Triangulation objects can either access a user pointer or a user index. What you tried to do is trying to access one of those after using the other.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
The triangulation level you accessed is empty.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
Exception
|
static |
Exception
|
protected |
Release all memory and return to a state just like after having called the default constructor. It also forgets the sparsity pattern it was previously tied to.
This calls clear for all sub-matrices and then resets this object to have no blocks at all.
This function is protected since it may be necessary to release additional structures. A derived class can make it public again, if it is sufficient.
|
protected |
This function collects the sizes of the sub-objects and stores them in internal arrays, in order to be able to relay global indices into the matrix to indices into the subobjects. You must call this function each time after you have changed the size of the sub-objects.
Derived classes should call this function whenever the size of the sub- objects has changed and the X_block_indices
arrays need to be updated.
Note that this function is not public since not all derived classes need to export its interface. For example, for the usual deal.II SparseMatrix class, the sizes are implicitly determined whenever reinit() is called, and individual blocks cannot be resized. For that class, this function therefore does not have to be public. On the other hand, for the PETSc classes, there is no associated sparsity pattern object that determines the block sizes, and for these the function needs to be publicly available. These classes therefore export this function.
|
protected |
Matrix-vector multiplication: let \(dst = M*src\) with \(M\) being this matrix.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protected |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block column.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protected |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block row.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protected |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protected |
Matrix-vector multiplication: let \(dst = M^T*src\) with \(M\) being this matrix. This function does the same as vmult() but takes the transposed matrix.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protected |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block row.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protected |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block column.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protected |
Matrix-vector multiplication. Just like the previous function, but only applicable if the matrix has only one block.
Due to problems with deriving template arguments between the block and non-block versions of the vmult/Tvmult functions, the actual functions are implemented in derived classes, with implementations forwarding the calls to the implementations provided here under a unique name for which template arguments can be derived by the compiler.
|
protected |
Some matrix types, in particular PETSc, need to synchronize set and add operations. This has to be done for all matrices in the BlockMatrix. This routine prepares adding of elements by notifying all blocks. Called by all internal routines before adding elements.
|
protected |
Notifies all blocks to let them prepare for setting elements, see prepare_add_operation().
|
inline |
Copy operator. This is needed because the default copy operator of this class is deleted (since std::mutex is not copyable) and hence the default copy operator of the enclosing class is also deleted.
The implementation here simply does nothing – TemporaryData objects are just scratch objects that are resized at the beginning of their use, so there is no point actually copying anything.
Definition at line 1055 of file block_matrix_base.h.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
default |
Initialize the matrix empty, that is with no memory allocated. This is useful if you want such objects as member variables in other classes. You can make the structure usable by calling the reinit() function.
Initialize the matrix with the given number of block rows and columns. The blocks themselves are still empty, and you have to call collect_sizes() after you assign them sizes.
Definition at line 333 of file block_sparsity_pattern.cc.
|
inline |
Forwarding to BlockSparsityPatternBase::reinit().
Definition at line 986 of file block_sparsity_pattern.h.
void BlockSparsityPattern::reinit | ( | const BlockIndices & | row_indices, |
const BlockIndices & | col_indices, | ||
const std::vector< std::vector< unsigned int >> & | row_lengths | ||
) |
Initialize the pattern with two BlockIndices for the block structures of matrix rows and columns as well as a row length vector.
The row length vector should be in the format produced by DoFTools. Alternatively, there is a simplified version, where each of the inner vectors has length one. Then, the corresponding entry is used as the maximal row length.
For the diagonal blocks, the inner SparsityPattern is initialized with optimized diagonals, while this is not done for the off-diagonal blocks.
Definition at line 340 of file block_sparsity_pattern.cc.
bool BlockSparsityPattern::is_compressed | ( | ) | const |
Return whether the structure is compressed or not, i.e. whether all sub- matrices are compressed.
Definition at line 378 of file block_sparsity_pattern.cc.
std::size_t BlockSparsityPattern::memory_consumption | ( | ) | const |
Determine an estimate for the memory consumption (in bytes) of this object.
Definition at line 389 of file block_sparsity_pattern.cc.
void BlockSparsityPattern::copy_from | ( | const BlockDynamicSparsityPattern & | dsp | ) |
Copy data from an object of type BlockDynamicSparsityPattern, i.e. resize this object to the size of the given argument, and copy over the contents of each of the subobjects. Previous content of this object is lost.
Definition at line 407 of file block_sparsity_pattern.cc.
|
default |
Initialize the matrix empty, that is with no memory allocated. This is useful if you want such objects as member variables in other classes. You can make the structure usable by calling the reinit() function.
BlockDynamicSparsityPattern::BlockDynamicSparsityPattern | ( | const size_type | n_rows, |
const size_type | n_columns | ||
) |
Initialize the matrix with the given number of block rows and columns. The blocks themselves are still empty, and you have to call collect_sizes() after you assign them sizes.
Definition at line 425 of file block_sparsity_pattern.cc.
BlockDynamicSparsityPattern::BlockDynamicSparsityPattern | ( | const std::vector< size_type > & | row_block_sizes, |
const std::vector< size_type > & | col_block_sizes | ||
) |
Initialize the pattern with two BlockIndices for the block structures of matrix rows and columns. This function is equivalent to calling the previous constructor with the length of the two index vector and then entering the index values.
Definition at line 433 of file block_sparsity_pattern.cc.
BlockDynamicSparsityPattern::BlockDynamicSparsityPattern | ( | const std::vector< IndexSet > & | partitioning | ) |
Initialize the pattern with symmetric blocks. The number of IndexSets in the vector determine the number of rows and columns of blocks. The size of each block is determined by the size() of the respective IndexSet. Each block only stores the rows given by the values in the IndexSet, which is useful for distributed memory parallel computations and usually corresponds to the locally owned DoFs.
Definition at line 446 of file block_sparsity_pattern.cc.
BlockDynamicSparsityPattern::BlockDynamicSparsityPattern | ( | const BlockIndices & | row_indices, |
const BlockIndices & | col_indices | ||
) |
Initialize the pattern with two BlockIndices for the block structures of matrix rows and columns.
Definition at line 460 of file block_sparsity_pattern.cc.
void BlockDynamicSparsityPattern::reinit | ( | const std::vector< size_type > & | row_block_sizes, |
const std::vector< size_type > & | col_block_sizes | ||
) |
Resize the pattern to a tensor product of matrices with dimensions defined by the arguments.
The matrix will have as many block rows and columns as there are entries in the two arguments. The block at position (i,j) will have the dimensions row_block_sizes[i]
times col_block_sizes[j]
.
Definition at line 469 of file block_sparsity_pattern.cc.
void BlockDynamicSparsityPattern::reinit | ( | const std::vector< IndexSet > & | partitioning | ) |
Resize the pattern with symmetric blocks determined by the size() of each IndexSet. See the constructor taking a vector of IndexSets for details.
Definition at line 482 of file block_sparsity_pattern.cc.
void BlockDynamicSparsityPattern::reinit | ( | const BlockIndices & | row_indices, |
const BlockIndices & | col_indices | ||
) |
Resize the matrix to a tensor product of matrices with dimensions defined by the arguments. The two BlockIndices objects must be initialized and the sparsity pattern will have the same block structure afterwards.
Definition at line 495 of file block_sparsity_pattern.cc.
|
inline |
Access to column number field. Return the column number of the index
th entry in row row
.
Definition at line 957 of file block_sparsity_pattern.h.
|
static |
Exception
|
inlinestatic |
Definition at line 514 of file block_vector.h.
|
inlinestatic |
Definition at line 523 of file block_vector.h.
|
static |
Exception thrown when one performs arithmetical comparisons on iterators belonging to two different block vectors.
|
private |
Move forward one element.
|
private |
Move backward one element.
|
default |
Default constructor.
|
default |
Copy constructor.
|
defaultnoexcept |
Move constructor. Each block of the argument vector is moved into the current object if the underlying VectorType
is move-constructible, otherwise they are copied.
void BlockVectorBase< VectorType >::collect_sizes | ( | ) |
Update internal structures after resizing vectors. Whenever you reinited a block of a block vector, the internal data structures are corrupted. Therefore, you should call this function after all blocks got their new size.
void BlockVectorBase< VectorType >::compress | ( | ::VectorOperation::values | operation | ) |
Call the compress() function on all the subblocks of the matrix.
This functionality only needs to be called if using MPI based vectors and exists in other objects for compatibility.
See Compressing distributed objects for more information.
BlockType& BlockVectorBase< VectorType >::block | ( | const unsigned int | i | ) |
Access to a single block.
const BlockType& BlockVectorBase< VectorType >::block | ( | const unsigned int | i | ) | const |
Read-only access to a single block.
const BlockIndices& BlockVectorBase< VectorType >::get_block_indices | ( | ) | const |
Return a reference on the object that describes the mapping between block and global indices. The use of this function is highly deprecated and it should vanish in one of the next versions
unsigned int BlockVectorBase< VectorType >::n_blocks | ( | ) | const |
Number of blocks.
std::size_t BlockVectorBase< VectorType >::size | ( | ) | const |
Return dimension of the vector. This is the sum of the dimensions of all components.
IndexSet BlockVectorBase< VectorType >::locally_owned_elements | ( | ) | const |
Return an index set that describes which elements of this vector are owned by the current processor. Note that this index set does not include elements this vector may store locally as ghost elements but that are in fact owned by another processor. As a consequence, the index sets returned on different processors if this is a distributed vector will form disjoint sets that add up to the complete index set. Obviously, if a vector is created on only one processor, then the result would satisfy
For block vectors, this function returns the union of the locally owned elements of the individual blocks, shifted by their respective index offsets.
iterator BlockVectorBase< VectorType >::begin | ( | ) |
Return an iterator pointing to the first element.
const_iterator BlockVectorBase< VectorType >::begin | ( | ) | const |
Return an iterator pointing to the first element of a constant block vector.
iterator BlockVectorBase< VectorType >::end | ( | ) |
Return an iterator pointing to the element past the end.
const_iterator BlockVectorBase< VectorType >::end | ( | ) | const |
Return an iterator pointing to the element past the end of a constant block vector.
value_type BlockVectorBase< VectorType >::operator() | ( | const size_type | i | ) | const |
Access components, returns U(i).
reference BlockVectorBase< VectorType >::operator() | ( | const size_type | i | ) |
Access components, returns U(i) as a writeable reference.
value_type BlockVectorBase< VectorType >::operator[] | ( | const size_type | i | ) | const |
Access components, returns U(i).
Exactly the same as operator().
reference BlockVectorBase< VectorType >::operator[] | ( | const size_type | i | ) |
Access components, returns U(i) as a writeable reference.
Exactly the same as operator().
void BlockVectorBase< VectorType >::extract_subvector_to | ( | const std::vector< size_type > & | indices, |
std::vector< OtherNumber > & | values | ||
) | const |
Instead of getting individual elements of a vector via operator(), this function allows getting a whole set of elements at once. The indices of the elements to be read are stated in the first argument, the corresponding values are returned in the second.
If the current vector is called v
, then this function is the equivalent to the code
indices
and values
arrays must be identical. void BlockVectorBase< VectorType >::extract_subvector_to | ( | ForwardIterator | indices_begin, |
const ForwardIterator | indices_end, | ||
OutputIterator | values_begin | ||
) | const |
Instead of getting individual elements of a vector via operator(), this function allows getting a whole set of elements at once. In contrast to the previous function, this function obtains the indices of the elements by dereferencing all elements of the iterator range provided by the first two arguments, and puts the vector values into memory locations obtained by dereferencing a range of iterators starting at the location pointed to by the third argument.
If the current vector is called v
, then this function is the equivalent to the code
values_begin
as there are iterators between indices_begin
and indices_end
. BlockVectorBase& BlockVectorBase< VectorType >::operator= | ( | const value_type | s | ) |
Copy operator: fill all components of the vector with the given scalar value.
BlockVectorBase& BlockVectorBase< VectorType >::operator= | ( | const BlockVectorBase< VectorType > & | V | ) |
Copy operator for arguments of the same type.
|
default |
Move assignment operator. Move each block of the given argument vector into the current object if VectorType
is move-constructible, otherwise copy them.
BlockVectorBase& BlockVectorBase< VectorType >::operator= | ( | const BlockVectorBase< VectorType2 > & | V | ) |
Copy operator for template arguments of different types.
BlockVectorBase& BlockVectorBase< VectorType >::operator= | ( | const VectorType & | v | ) |
Copy operator from non-block vectors to block vectors.
bool BlockVectorBase< VectorType >::operator== | ( | const BlockVectorBase< VectorType2 > & | v | ) | const |
Check for equality of two block vector types. This operation is only allowed if the two vectors already have the same block structure.
value_type BlockVectorBase< VectorType >::operator* | ( | const BlockVectorBase< VectorType > & | V | ) | const |
\(U = U * V\): scalar product.
real_type BlockVectorBase< VectorType >::norm_sqr | ( | ) | const |
Return the square of the \(l_2\)-norm.
value_type BlockVectorBase< VectorType >::mean_value | ( | ) | const |
Return the mean value of the elements of this vector.
real_type BlockVectorBase< VectorType >::l1_norm | ( | ) | const |
Return the \(l_1\)-norm of the vector, i.e. the sum of the absolute values.
real_type BlockVectorBase< VectorType >::l2_norm | ( | ) | const |
Return the \(l_2\)-norm of the vector, i.e. the square root of the sum of the squares of the elements.
real_type BlockVectorBase< VectorType >::linfty_norm | ( | ) | const |
Return the maximum absolute value of the elements of this vector, which is the \(l_\infty\)-norm of a vector.
value_type BlockVectorBase< VectorType >::add_and_dot | ( | const value_type | a, |
const BlockVectorBase< VectorType > & | V, | ||
const BlockVectorBase< VectorType > & | W | ||
) |
Performs a combined operation of a vector addition and a subsequent inner product, returning the value of the inner product. In other words, the result of this function is the same as if the user called
The reason this function exists is that this operation involves less memory transfer than calling the two functions separately on deal.II's vector classes (Vector<Number> and LinearAlgebra::distributed::Vector<double>). This method only needs to load three vectors, this
, V
, W
, whereas calling separate methods means to load the calling vector this
twice. Since most vector operations are memory transfer limited, this reduces the time by 25% (or 50% if W
equals this
).
For complex-valued vectors, the scalar product in the second step is implemented as \(\left<v,w\right>=\sum_i v_i \bar{w_i}\).
bool BlockVectorBase< VectorType >::in_local_range | ( | const size_type | global_index | ) | const |
Return true if the given global index is in the local range of this processor. Asks the corresponding block.
bool BlockVectorBase< VectorType >::all_zero | ( | ) | const |
Return whether the vector contains only elements with value zero. This function is mainly for internal consistency check and should seldom be used when not in debug mode since it uses quite some time.
bool BlockVectorBase< VectorType >::is_non_negative | ( | ) | const |
Return true
if the vector has no negative entries, i.e. all entries are zero or positive. This function is used, for example, to check whether refinement indicators are really all positive (or zero).
BlockVectorBase& BlockVectorBase< VectorType >::operator+= | ( | const BlockVectorBase< VectorType > & | V | ) |
Addition operator. Fast equivalent to U.add(1, V)
.
BlockVectorBase& BlockVectorBase< VectorType >::operator-= | ( | const BlockVectorBase< VectorType > & | V | ) |
Subtraction operator. Fast equivalent to U.add(-1, V)
.
void BlockVectorBase< VectorType >::add | ( | const std::vector< size_type > & | indices, |
const std::vector< Number > & | values | ||
) |
A collective add operation: This function adds a whole set of values stored in values
to the vector components specified by indices
.
void BlockVectorBase< VectorType >::add | ( | const std::vector< size_type > & | indices, |
const Vector< Number > & | values | ||
) |
This is a second collective add operation. As a difference, this function takes a deal.II vector of values.
void BlockVectorBase< VectorType >::add | ( | const size_type | n_elements, |
const size_type * | indices, | ||
const Number * | values | ||
) |
Take an address where n_elements
are stored contiguously and add them into the vector. Handles all cases which are not covered by the other two add()
functions above.
void BlockVectorBase< VectorType >::add | ( | const value_type | s | ) |
\(U(0-DIM)+=s\). Addition of s
to all components. Note that s
is a scalar and not a vector.
void BlockVectorBase< VectorType >::add | ( | const value_type | a, |
const BlockVectorBase< VectorType > & | V | ||
) |
U+=a*V. Simple addition of a scaled vector.
void BlockVectorBase< VectorType >::add | ( | const value_type | a, |
const BlockVectorBase< VectorType > & | V, | ||
const value_type | b, | ||
const BlockVectorBase< VectorType > & | W | ||
) |
U+=a*V+b*W. Multiple addition of scaled vectors.
void BlockVectorBase< VectorType >::sadd | ( | const value_type | s, |
const BlockVectorBase< VectorType > & | V | ||
) |
U=s*U+V. Scaling and simple vector addition.
void BlockVectorBase< VectorType >::sadd | ( | const value_type | s, |
const value_type | a, | ||
const BlockVectorBase< VectorType > & | V | ||
) |
U=s*U+a*V. Scaling and simple addition.
void BlockVectorBase< VectorType >::sadd | ( | const value_type | s, |
const value_type | a, | ||
const BlockVectorBase< VectorType > & | V, | ||
const value_type | b, | ||
const BlockVectorBase< VectorType > & | W | ||
) |
U=s*U+a*V+b*W. Scaling and multiple addition.
void BlockVectorBase< VectorType >::sadd | ( | const value_type | s, |
const value_type | a, | ||
const BlockVectorBase< VectorType > & | V, | ||
const value_type | b, | ||
const BlockVectorBase< VectorType > & | W, | ||
const value_type | c, | ||
const BlockVectorBase< VectorType > & | X | ||
) |
U=s*U+a*V+b*W+c*X. Scaling and multiple addition.
BlockVectorBase& BlockVectorBase< VectorType >::operator*= | ( | const value_type | factor | ) |
Scale each element of the vector by a constant value.
BlockVectorBase& BlockVectorBase< VectorType >::operator/= | ( | const value_type | factor | ) |
Scale each element of the vector by the inverse of the given value.
void BlockVectorBase< VectorType >::scale | ( | const BlockVector2 & | v | ) |
Multiply each element of this vector by the corresponding element of v
.
void BlockVectorBase< VectorType >::equ | ( | const value_type | a, |
const BlockVector2 & | V | ||
) |
U=a*V. Assignment.
void BlockVectorBase< VectorType >::update_ghost_values | ( | ) | const |
Update the ghost values by calling update_ghost_values
for each block.
std::size_t BlockVectorBase< VectorType >::memory_consumption | ( | ) | const |
Determine an estimate for the memory consumption (in bytes) of this object.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
private |
Return the location of entry \((i,j)\) within the val array.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
The operation is only allowed after the SparsityPattern has been set up and compress() was called.
|
static |
This operation changes the structure of the SparsityPattern and is not possible after compress() has been called.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Attempt to perform an operation between two incompatible vector types.
|
staticprotected |
|
static |
This function only works for quadratic matrices.
|
static |
The operation cannot be finished since the matrix is singular.
|
static |
Block indices of two block objects are different.
|
static |
An error of a Trilinos function was encountered. Check the Trilinos documentation for details.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Attempt to perform an operation between two incompatible vector types.
|
static |
Exception
|
static |
Attempt to perform an operation between two incompatible vector types.
|
static |
Attempt to perform an operation not implemented on the device.
|
static |
Exception
|
static |
Exception
|
static |
Attempt to perform an operation between two incompatible vector types.
|
static |
A LAPACK function returned an error code.
|
static |
Exception thrown when a matrix is not in a suitable state for an operation. For instance, a LAPACK routine may have left the matrix in an unusable state, then vmult does not make sense anymore.
|
static |
Exception thrown when a matrix does not have suitable properties for an operation.
|
static |
This exception is thrown if a certain LAPACK function is not available because no LAPACK installation was detected during configuration.
|
static |
The block number computed from an index by using BlockIndices does not match the block coordinates stored in this object.
|
staticprivate |
PArpackExcInfoPdnaupds.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception.
|
static |
Exception
PetscScalar SparseMatrix< number >::matrix_norm_square | ( | const Vector & | v | ) | const |
Return the square of the norm of the vector \(v\) with respect to the norm induced by this matrix, i.e. \(\left(v^\ast,Mv\right)\). This is useful, e.g. in the finite element context, where the \(L_2\) norm of a function equals the matrix norm with respect to the mass matrix of the vector representing the nodal values of the finite element function.
Obviously, the matrix needs to be quadratic for this operation.
The implementation of this function is not as efficient as the one in the MatrixBase
class used in deal.II (i.e. the original one, not the PETSc wrapper class) since PETSc doesn't support this operation and needs a temporary vector.
Definition at line 679 of file petsc_parallel_sparse_matrix.cc.
PetscScalar SparseMatrix< number >::matrix_scalar_product | ( | const Vector & | u, |
const Vector & | v | ||
) | const |
Compute the matrix scalar product \(\left(u^\ast,Mv\right)\).
The implementation of this function is not as efficient as the one in the MatrixBase
class used in deal.II (i.e. the original one, not the PETSc wrapper class) since PETSc doesn't support this operation and needs a temporary vector.
Definition at line 688 of file petsc_parallel_sparse_matrix.cc.
IndexSet SparseMatrix< number >::locally_owned_domain_indices | ( | ) | const |
Return the partitioning of the domain space of this matrix, i.e., the partitioning of the vectors this matrix has to be multiplied with.
Definition at line 697 of file petsc_parallel_sparse_matrix.cc.
IndexSet SparseMatrix< number >::locally_owned_range_indices | ( | ) | const |
Return the partitioning of the range space of this matrix, i.e., the partitioning of the vectors that result from matrix-vector products.
Definition at line 723 of file petsc_parallel_sparse_matrix.cc.
void SparseMatrix< number >::mmult | ( | SparseMatrix & | C, |
const SparseMatrix & | B, | ||
const MPI::Vector & | V = MPI::Vector() |
||
) | const |
Perform the matrix-matrix multiplication \(C = AB\), or, \(C = A \text{diag}(V) B\) given a compatible vector \(V\).
This function calls MatrixBase::mmult() to do the actual work.
Definition at line 749 of file petsc_parallel_sparse_matrix.cc.
void SparseMatrix< number >::Tmmult | ( | SparseMatrix & | C, |
const SparseMatrix & | B, | ||
const MPI::Vector & | V = MPI::Vector() |
||
) | const |
Perform the matrix-matrix multiplication with the transpose of this
, i.e., \(C = A^T B\), or, \(C = A^T \text{diag}(V) B\) given a compatible vector \(V\).
This function calls MatrixBase::Tmmult() to do the actual work.
Definition at line 760 of file petsc_parallel_sparse_matrix.cc.
|
private |
Do the actual work for the respective reinit() function and the matching constructor, i.e. create a matrix. Getting rid of the previous matrix is left to the caller.
Definition at line 245 of file petsc_parallel_sparse_matrix.cc.
|
private |
Same as previous function.
Definition at line 281 of file petsc_parallel_sparse_matrix.cc.
|
private |
Same as previous functions.
Definition at line 495 of file petsc_parallel_sparse_matrix.cc.
|
private |
Same as previous functions.
Definition at line 352 of file petsc_parallel_sparse_matrix.cc.
PreconditionBlock< MatrixType, inverse_type >::AdditionalData::AdditionalData | ( | const size_type | block_size, |
const double | relaxation = 1. , |
||
const bool | invert_diagonal = true , |
||
const bool | same_diagonal = false |
||
) |
Constructor. Block size must be given since there is no reasonable default parameter.
|
static |
For non-overlapping block preconditioners, the block size must divide the matrix size. If not, this exception gets thrown.
|
static |
Exception
PreconditionBlockJacobi< MatrixType, inverse_type >::const_iterator::Accessor::Accessor | ( | const PreconditionBlockJacobi< MatrixType, inverse_type > * | matrix, |
const size_type | row | ||
) |
Constructor. Since we use accessors only for read access, a const matrix pointer is sufficient.
size_type PreconditionBlockJacobi< MatrixType, inverse_type >::const_iterator::Accessor::row | ( | ) | const |
Row number of the element represented by this object.
size_type PreconditionBlockJacobi< MatrixType, inverse_type >::const_iterator::Accessor::column | ( | ) | const |
Column number of the element represented by this object.
inverse_type PreconditionBlockJacobi< MatrixType, inverse_type >::const_iterator::Accessor::value | ( | ) | const |
Value of this matrix entry.
PreconditionBlockJacobi< MatrixType, inverse_type >::const_iterator::const_iterator | ( | const PreconditionBlockJacobi< MatrixType, inverse_type > * | matrix, |
const size_type | row | ||
) |
Constructor.
const_iterator& PreconditionBlockJacobi< MatrixType, inverse_type >::const_iterator::operator++ | ( | ) |
Prefix increment.
const Accessor& PreconditionBlockJacobi< MatrixType, inverse_type >::const_iterator::operator* | ( | ) | const |
Dereferencing operator.
const Accessor* PreconditionBlockJacobi< MatrixType, inverse_type >::const_iterator::operator-> | ( | ) | const |
Dereferencing operator.
bool PreconditionBlockJacobi< MatrixType, inverse_type >::const_iterator::operator== | ( | const const_iterator & | ) | const |
Comparison. True, if both iterators point to the same matrix position.
bool PreconditionBlockJacobi< MatrixType, inverse_type >::const_iterator::operator!= | ( | const const_iterator & | ) | const |
Inverse of ==
.
bool PreconditionBlockJacobi< MatrixType, inverse_type >::const_iterator::operator< | ( | const const_iterator & | ) | const |
Comparison operator. Result is true if either the first row number is smaller or if the row numbers are equal and the first index is smaller.
template void PreconditionBlockJacobi< MatrixType, inverse_type >::vmult< double > | ( | Vector< number2 > & | , |
const Vector< number2 > & | |||
) | const |
Execute block Jacobi preconditioning.
This function will automatically use the inverse matrices if they exist, if not then BlockJacobi will need much time inverting the diagonal block matrices in each preconditioning step.
template void PreconditionBlockJacobi< MatrixType, inverse_type >::Tvmult< double > | ( | Vector< number2 > & | , |
const Vector< number2 > & | |||
) | const |
Same as vmult
, since Jacobi is symmetric.
template void PreconditionBlockJacobi< MatrixType, inverse_type >::vmult_add< double > | ( | Vector< number2 > & | , |
const Vector< number2 > & | |||
) | const |
Execute block Jacobi preconditioning, adding to dst
.
This function will automatically use the inverse matrices if they exist, if not then BlockJacobi will need much time inverting the diagonal block matrices in each preconditioning step.
template void PreconditionBlockJacobi< MatrixType, inverse_type >::Tvmult_add< double > | ( | Vector< number2 > & | , |
const Vector< number2 > & | |||
) | const |
Same as vmult_add
, since Jacobi is symmetric.
void PreconditionBlockJacobi< MatrixType, inverse_type >::step | ( | Vector< number2 > & | dst, |
const Vector< number2 > & | rhs | ||
) | const |
Perform one step of the Jacobi iteration.
void PreconditionBlockJacobi< MatrixType, inverse_type >::Tstep | ( | Vector< number2 > & | dst, |
const Vector< number2 > & | rhs | ||
) | const |
Perform one step of the Jacobi iteration.
const_iterator PreconditionBlockJacobi< MatrixType, inverse_type >::begin | ( | ) | const |
Iterator starting at the first entry.
const_iterator PreconditionBlockJacobi< MatrixType, inverse_type >::end | ( | ) | const |
Final iterator.
const_iterator PreconditionBlockJacobi< MatrixType, inverse_type >::begin | ( | const size_type | r | ) | const |
Iterator starting at the first entry of row r
.
const_iterator PreconditionBlockJacobi< MatrixType, inverse_type >::end | ( | const size_type | r | ) | const |
Final iterator of row r
.
|
private |
Actual implementation of the preconditioner.
Depending on adding
, the result of preconditioning is added to the destination vector.
PreconditionBlockSOR< MatrixType, inverse_type >::PreconditionBlockSOR | ( | ) |
Default constructor.
template void PreconditionBlockSOR< MatrixType, inverse_type >::vmult< double > | ( | Vector< number2 > & | , |
const Vector< number2 > & | |||
) | const |
Execute block SOR preconditioning.
This function will automatically use the inverse matrices if they exist, if not then BlockSOR will waste much time inverting the diagonal block matrices in each preconditioning step.
For matrices which are empty above the diagonal blocks BlockSOR is a direct solver.
template void PreconditionBlockSOR< MatrixType, inverse_type >::vmult_add< double > | ( | Vector< number2 > & | , |
const Vector< number2 > & | |||
) | const |
Execute block SOR preconditioning.
Warning: this function performs normal vmult
without adding. The reason for its existence is that BlockMatrixArray requires the adding version by default. On the other hand, adding requires an additional auxiliary vector, which is not desirable.
template void PreconditionBlockSOR< MatrixType, inverse_type >::Tvmult< double > | ( | Vector< number2 > & | , |
const Vector< number2 > & | |||
) | const |
Backward application of vmult().
In the current implementation, this is not the transpose of vmult(). It is a transposed Gauss-Seidel algorithm applied to the whole matrix, but the diagonal blocks being inverted are not transposed. Therefore, it is the transposed, if the diagonal blocks are symmetric.
template void PreconditionBlockSOR< MatrixType, inverse_type >::Tvmult_add< double > | ( | Vector< number2 > & | , |
const Vector< number2 > & | |||
) | const |
Execute backward block SOR preconditioning.
Warning: this function performs normal vmult
without adding. The reason for its existence is that BlockMatrixArray requires the adding version by default. On the other hand, adding requires an additional auxiliary vector, which is not desirable.
void PreconditionBlockSOR< MatrixType, inverse_type >::step | ( | Vector< number2 > & | dst, |
const Vector< number2 > & | rhs | ||
) | const |
Perform one step of the SOR iteration.
void PreconditionBlockSOR< MatrixType, inverse_type >::Tstep | ( | Vector< number2 > & | dst, |
const Vector< number2 > & | rhs | ||
) | const |
Perform one step of the transposed SOR iteration.
|
protected |
Constructor to be used by PreconditionBlockSSOR.
|
protected |
Implementation of the forward substitution loop called by vmult() and vmult_add().
If a permutation is set by set_permutation(), it will automatically be honored by this function.
The parameter adding
does not have any function, yet.
|
protected |
Implementation of the backward substitution loop called by Tvmult() and Tvmult_add().
If a permutation is set by set_permutation(), it will automatically be honored by this function.
The parameter adding
does not have any function, yet.
PreconditionBlockSSOR< MatrixType, inverse_type >::PreconditionBlockSSOR | ( | ) |
Constructor.
template void PreconditionBlockSSOR< MatrixType, inverse_type >::vmult< double > | ( | Vector< number2 > & | , |
const Vector< number2 > & | |||
) | const |
Execute block SSOR preconditioning.
This function will automatically use the inverse matrices if they exist, if not then BlockSOR will waste much time inverting the diagonal block matrices in each preconditioning step.
template void PreconditionBlockSSOR< MatrixType, inverse_type >::Tvmult< double > | ( | Vector< number2 > & | , |
const Vector< number2 > & | |||
) | const |
Same as vmult()
void PreconditionBlockSSOR< MatrixType, inverse_type >::step | ( | Vector< number2 > & | dst, |
const Vector< number2 > & | rhs | ||
) | const |
Perform one step of the SOR iteration.
void PreconditionBlockSSOR< MatrixType, inverse_type >::Tstep | ( | Vector< number2 > & | dst, |
const Vector< number2 > & | rhs | ||
) | const |
Perform one step of the transposed SOR iteration.
|
static |
You are trying to access a diagonal block (not its inverse), but you decided not to store the diagonal blocks.
|
static |
You are accessing a diagonal block, assuming that it has a certain type. But, the method used for inverting the diagonal blocks does not use this type
|
static |
Exception.
|
static |
Exception. Standard exception.
|
static |
Exception. SLEPc error with error number.
|
static |
Exception. Convergence failure on the number of eigenvectors.
|
static |
This exception is thrown if a function operating on the vector of history data of a SolverControl object id called, but storage of history data was not enabled by enable_history_data().
|
static |
|
static |
Exception
|
protectedvirtual |
Implementation of the computation of the norm of the residual.
|
protectedvirtual |
Interface for derived class. This function gets the current iteration vector, the residual and the update vector in each step. It can be used for graphical output of the convergence history.
|
static |
Exception.
SparseLUDecomposition< number >::AdditionalData::AdditionalData | ( | const double | strengthen_diagonal = 0 , |
const unsigned int | extra_off_diagonals = 0 , |
||
const bool | use_previous_sparsity = false , |
||
const SparsityPattern * | use_this_sparsity = nullptr |
||
) |
Constructor. For the parameters' description, see below.
|
static |
Exception
|
protected |
Copies the passed SparseMatrix onto this object. This object's sparsity pattern remains unchanged.
|
protectedvirtual |
Performs the strengthening loop. For each row calculates the sum of absolute values of its elements, determines the strengthening factor (through get_strengthen_diagonal()) sf and multiplies the diagonal entry with sf+1
.
|
protectedvirtual |
In the decomposition phase, computes a strengthening factor for the diagonal entry in row row
with sum of absolute values of its elements rowsum
.
strengthen_diagonal
's value. This variable is set to a nonzero value in several of the derived classes.
|
protected |
Fills the prebuilt_lower_bound array.
|
static |
One of the UMFPack routines threw an error. The error code is included in the output and can be looked up in the UMFPack user manual. The name of the routine is included for reference.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
protected |
For some matrix storage formats, in particular for the PETSc distributed blockmatrices, set and add operations on individual elements can not be freely mixed. Rather, one has to synchronize operations when one wants to switch from setting elements to adding to elements. BlockMatrixBase automatically synchronizes the access by calling this helper function for each block. This function ensures that the matrix is in a state that allows adding elements; if it previously already was in this state, the function does nothing.
|
protected |
Same as prepare_add() but prepare the matrix for setting elements if the representation of elements in this class requires such an operation.
|
inline |
Standard constructor. Sets column
to invalid
.
Definition at line 920 of file sparse_matrix_ez.h.
|
inline |
Constructor. Fills column and value.
Definition at line 911 of file sparse_matrix_ez.h.
|
inline |
Constructor.
Definition at line 927 of file sparse_matrix_ez.h.
|
inline |
Constructor. Since we use accessors only for read access, a const matrix pointer is sufficient.
Definition at line 936 of file sparse_matrix_ez.h.
|
inline |
Row number of the element represented by this object.
Definition at line 948 of file sparse_matrix_ez.h.
|
inline |
Index in row of the element represented by this object.
Definition at line 964 of file sparse_matrix_ez.h.
|
inline |
Column number of the element represented by this object.
Definition at line 956 of file sparse_matrix_ez.h.
|
inline |
Value of this matrix entry.
Definition at line 973 of file sparse_matrix_ez.h.
|
inline |
Constructor.
Definition at line 980 of file sparse_matrix_ez.h.
|
inline |
Prefix increment. This always returns a valid entry or end()
.
Definition at line 1015 of file sparse_matrix_ez.h.
|
inline |
Dereferencing operator.
Definition at line 1042 of file sparse_matrix_ez.h.
|
inline |
Dereferencing operator.
Definition at line 1050 of file sparse_matrix_ez.h.
|
inline |
Comparison. True, if both iterators point to the same matrix position.
Definition at line 1059 of file sparse_matrix_ez.h.
|
inline |
Inverse of ==
.
Definition at line 1069 of file sparse_matrix_ez.h.
|
inline |
Comparison operator. Result is true if either the first row number is smaller or if the row numbers are equal and the first index is smaller.
Definition at line 1078 of file sparse_matrix_ez.h.
|
static |
Exception for missing diagonal entry.
|
static |
Exception
|
static |
|
inlineprivate |
Find an entry and return a const pointer. Return a zero-pointer if the entry does not exist.
Definition at line 1127 of file sparse_matrix_ez.h.
|
inlineprivate |
Find an entry and return a writable pointer. Return a zero-pointer if the entry does not exist.
Definition at line 1105 of file sparse_matrix_ez.h.
|
inlineprivate |
Find an entry or generate it.
Definition at line 1136 of file sparse_matrix_ez.h.
|
private |
Version of vmult
which only performs its actions on the region defined by [begin_row,end_row)
. This function is called by vmult
in the case of enabled multithreading.
|
private |
Version of matrix_norm_square
which only performs its actions on the region defined by [begin_row,end_row)
. This function is called by matrix_norm_square
in the case of enabled multithreading.
|
private |
Version of matrix_scalar_product
which only performs its actions on the region defined by [begin_row,end_row)
. This function is called by matrix_scalar_product
in the case of enabled multithreading.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
private |
Compute the row-th "inner sum".
|
staticprotected |
|
static |
The operation is only allowed after the SparsityPattern has been set up and compress() was called.
|
static |
You tried to add an element to a row, but there was no space left.
|
static |
This operation changes the structure of the SparsityPattern and is not possible after compress() has been called.
SparsityPattern::SparsityPattern | ( | ) |
Initialize the matrix empty, that is with no memory allocated. This is useful if you want such objects as member variables in other classes. You can make the structure usable by calling the reinit() function.
Definition at line 53 of file sparsity_pattern.cc.
SparsityPattern::SparsityPattern | ( | const SparsityPattern & | s | ) |
Copy constructor. This constructor is only allowed to be called if the matrix structure to be copied is empty. This is so in order to prevent involuntary copies of objects for temporaries, which can use large amounts of computing time. However, copy constructors are needed if one wants to place a SparsityPattern in a container, e.g., to write such statements like v.push_back (SparsityPattern());
, with v
a std::vector of SparsityPattern objects.
Usually, it is sufficient to use the explicit keyword to disallow unwanted temporaries, but this does not work for std::vector
s. Since copying a structure like this is not useful anyway because multiple matrices can use the same sparsity structure, copies are only allowed for empty objects, as described above.
Definition at line 62 of file sparsity_pattern.cc.
SparsityPattern::SparsityPattern | ( | const size_type | m, |
const size_type | n, | ||
const unsigned int | max_per_row | ||
) |
Initialize a rectangular pattern of size m x n
.
[in] | m | The number of rows. |
[in] | n | The number of columns. |
[in] | max_per_row | Maximum number of nonzero entries per row. |
Definition at line 78 of file sparsity_pattern.cc.
SparsityPattern::SparsityPattern | ( | const size_type | m, |
const size_type | n, | ||
const std::vector< unsigned int > & | row_lengths | ||
) |
Initialize a rectangular pattern of size m x n
.
[in] | m | The number of rows. |
[in] | n | The number of columns. |
[in] | row_lengths | Possible number of nonzero entries for each row. This vector must have one entry for each row. |
Definition at line 89 of file sparsity_pattern.cc.
Initialize a quadratic pattern of dimension m
with at most max_per_row
nonzero entries per row.
This constructor automatically enables optimized storage of diagonal elements. To avoid this, use the constructor taking row and column numbers separately.
Definition at line 100 of file sparsity_pattern.cc.
SparsityPattern::SparsityPattern | ( | const size_type | m, |
const std::vector< unsigned int > & | row_lengths | ||
) |
Initialize a quadratic pattern of size m x m
.
[in] | m | The number of rows and columns. |
[in] | row_lengths | Maximum number of nonzero entries for each row. This vector must have one entry for each row. |
Definition at line 109 of file sparsity_pattern.cc.
SparsityPattern::SparsityPattern | ( | const SparsityPattern & | original, |
const unsigned int | max_per_row, | ||
const size_type | extra_off_diagonals | ||
) |
Make a copy with extra off-diagonals.
This constructs objects intended for the application of the ILU(n)-method or other incomplete decompositions. Therefore, additional to the original entry structure, space for extra_off_diagonals
side- diagonals is provided on both sides of the main diagonal.
max_per_row
is the maximum number of nonzero elements per row which this structure is to hold. It is assumed that this number is sufficiently large to accommodate both the elements in original
as well as the new off-diagonal elements created by this constructor. You will usually want to give the same number as you gave for original
plus the number of side diagonals times two. You may however give a larger value if you wish to add further nonzero entries for the decomposition based on other criteria than their being on side- diagonals.
This function requires that original
refers to a quadratic matrix structure. It must be compressed. The matrix structure is not compressed after this function finishes.
Definition at line 118 of file sparsity_pattern.cc.
|
overridedefault |
Destructor.
SparsityPattern & SparsityPattern::operator= | ( | const SparsityPattern & | s | ) |
Copy operator. For this the same holds as for the copy constructor: it is declared, defined and fine to be called, but the latter only for empty objects.
Definition at line 198 of file sparsity_pattern.cc.
|
overridevirtual |
Reallocate memory for a matrix of size m
times n
. The number of entries for each row is taken from the ArrayView row_lengths
which has to give this number of each row \(i=0\ldots m-1\).
Implements SparsityPatternBase.
Definition at line 229 of file sparsity_pattern.cc.
void SparsityPattern::compress | ( | ) |
This function compresses the sparsity structure that this object represents. It does so by eliminating unused entries and sorting the remaining ones to allow faster access by usage of binary search algorithms. A special sorting scheme is used for the diagonal entry of quadratic matrices, which is always the first entry of each row.
The memory which is no more needed is released.
SparseMatrix objects require the SparsityPattern objects they are initialized with to be compressed, to reduce memory requirements.
Definition at line 338 of file sparsity_pattern.cc.
void SparsityPattern::copy_from | ( | const size_type | n_rows, |
const size_type | n_cols, | ||
const ForwardIterator | begin, | ||
const ForwardIterator | end | ||
) |
This function can be used as a replacement for reinit(), subsequent calls to add() and a final call to close() if you know exactly in advance the entries that will form the matrix sparsity pattern.
The first two parameters determine the size of the matrix. For the two last ones, note that a sparse matrix can be described by a sequence of rows, each of which is represented by a sequence of pairs of column indices and values. In the present context, the begin() and end() parameters designate iterators (of forward iterator type) into a container, one representing one row. The distance between begin() and end() should therefore be equal to n_rows(). These iterators may be iterators of std::vector
, std::list
, pointers into a C-style array, or any other iterator satisfying the requirements of a forward iterator. The objects pointed to by these iterators (i.e. what we get after applying operator*
or operator->
to one of these iterators) must be a container itself that provides functions begin
and end
designating a range of iterators that describe the contents of one line. Dereferencing these inner iterators must either yield a pair of an unsigned integer as column index and a value of arbitrary type (such a type would be used if we wanted to describe a sparse matrix with one such object), or simply an unsigned integer (of we only wanted to describe a sparsity pattern). The function is able to determine itself whether an unsigned integer or a pair is what we get after dereferencing the inner iterators, through some template magic.
While the order of the outer iterators denotes the different rows of the matrix, the order of the inner iterator denoting the columns does not matter, as they are sorted internal to this function anyway.
Since that all sounds very complicated, consider the following example code, which may be used to fill a sparsity pattern:
Note that this example works since the iterators dereferenced yield containers with functions begin
and end
(namely std::vector
s), and the inner iterators dereferenced yield unsigned integers as column indices. Note that we could have replaced each of the two std::vector
occurrences by std::list
, and the inner one by std::set
as well.
Another example would be as follows, where we initialize a whole matrix, not only a sparsity pattern:
This example works because dereferencing iterators of the inner type yields a pair of unsigned integers and a value, the first of which we take as column index. As previously, the outer std::vector
could be replaced by std::list
, and the inner std::map<unsigned int,double>
could be replaced by std::vector<std::pair<unsigned int,double> >
, or a list or set of such pairs, as they all return iterators that point to such pairs.
void SparsityPattern::copy_from | ( | const DynamicSparsityPattern & | dsp | ) |
Copy data from a DynamicSparsityPattern. Previous content of this object is lost, and the sparsity pattern is in compressed mode afterwards.
Definition at line 490 of file sparsity_pattern.cc.
void SparsityPattern::copy_from | ( | const SparsityPattern & | sp | ) |
Copy data from a SparsityPattern. Previous content of this object is lost, and the sparsity pattern is in compressed mode afterwards.
Definition at line 442 of file sparsity_pattern.cc.
void SparsityPattern::copy_from | ( | const FullMatrix< number > & | matrix | ) |
Take a full matrix and use its nonzero entries to generate a sparse matrix entry pattern for this object.
Previous content of this object is lost, and the sparsity pattern is in compressed mode afterwards.
Definition at line 551 of file sparsity_pattern.cc.
void SparsityPattern::add_entries | ( | const size_type | row, |
ForwardIterator | begin, | ||
ForwardIterator | end, | ||
const bool | indices_are_sorted = false |
||
) |
Add several nonzero entries to the specified matrix row. This function may only be called for non-compressed sparsity patterns.
If some of the entries already exist, nothing bad happens.
Definition at line 733 of file sparsity_pattern.cc.
bool SparsityPattern::operator== | ( | const SparsityPattern & | ) | const |
Test for equality of two SparsityPatterns.
bool SparsityPattern::stores_only_added_elements | ( | ) | const |
Return whether this object stores only those entries that have been added explicitly, or if the sparsity pattern contains elements that have been added through other means (implicitly) while building it. For the current class, the result is false if and only if it is square because it then unconditionally stores the diagonal entries whether they have been added explicitly or not.
This function mainly serves the purpose of describing the current class in cases where several kinds of sparsity patterns can be passed as template arguments.
std::size_t SparsityPattern::memory_consumption | ( | ) | const |
Determine an estimate for the memory consumption (in bytes) of this object. See MemoryConsumption.
Definition at line 1039 of file sparsity_pattern.cc.
SparsityPattern::size_type SparsityPattern::operator() | ( | const size_type | i, |
const size_type | j | ||
) | const |
Return the index of the matrix element with row number i
and column number j
. If the matrix element is not a nonzero one, return SparsityPattern::invalid_entry.
This function is usually called by the SparseMatrix::operator()(). It may only be called for compressed sparsity patterns, since in this case searching whether the entry exists can be done quite fast with a binary sort algorithm because the column numbers are sorted.
If m
is the number of entries in row
, then the complexity of this function is log(m) if the sparsity pattern is compressed.
i
to find whether index j
exists. Thus, it is more expensive than necessary in cases where you want to loop over all of the nonzero elements of this sparsity pattern (or of a sparse matrix associated with it) or of a single row. In such cases, it is more efficient to use iterators over the elements of the sparsity pattern or of the sparse matrix. Definition at line 666 of file sparsity_pattern.cc.
void SparsityPattern::block_write | ( | std::ostream & | out | ) | const |
Write the data of this object en bloc to a file. This is done in a binary mode, so the output is neither readable by humans nor (probably) by other computers using a different operating system or number format.
The purpose of this function is that you can swap out matrices and sparsity pattern if you are short of memory, want to communicate between different programs, or allow objects to be persistent across different runs of the program.
Definition at line 968 of file sparsity_pattern.cc.
void SparsityPattern::block_read | ( | std::istream & | in | ) |
Read data that has previously been written by block_write() from a file. This is done using the inverse operations to the above function, so it is reasonably fast because the bitstream is not interpreted except for a few numbers up front.
The object is resized on this operation, and all previous contents are lost.
A primitive form of error checking is performed which will recognize the bluntest attempts to interpret some data as a vector stored bitwise to a file, but not more.
Definition at line 992 of file sparsity_pattern.cc.
void SparsityPattern::save | ( | Archive & | ar, |
const unsigned int | version | ||
) | const |
Write the data of this object to a stream for the purpose of serialization
void SparsityPattern::load | ( | Archive & | ar, |
const unsigned int | version | ||
) |
Read the data of this object from a stream for the purpose of serialization
void SparsityPattern::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) |
Write and read the data of this object from a stream for the purpose of serialization.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
The vectors have different partitioning, i.e. their IndexSet objects don't represent the same indices.
|
static |
Attempt to perform an operation between two incompatible vector types.
|
static |
Exception thrown by an error in Trilinos.
|
static |
Exception
|
static |
Exception
|
static |
Exception.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
The vectors have different partitioning, i.e. their IndexSet objects don't represent the same indices.
|
static |
Attempt to perform an operation between two incompatible vector types.
|
static |
Exception thrown by an error in Trilinos.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Vector was not allocated from this memory pool.
|
default |
Default constructor. This constructor corresponds to a nullptr
object that does not own a vector. It can, however, later be assigned another Pointer object via move assignment in which case it will steal the vector owned by the other object (as std::unique_ptr
does).
|
defaultnoexcept |
Move constructor: this creates a new Pointer by stealing the internal data owned by p
.
|
defaultnoexcept |
Move operator: this releases the vector owned by the current Pointer and then steals the internal data owned by p
.
VectorMemory< VectorType >::Pointer::Pointer | ( | VectorMemory< VectorType > & | mem | ) |
Constructor. This constructor automatically allocates a vector from the given vector memory object mem
.
|
default |
Destructor, automatically releasing the vector from the memory pool.
|
overridevirtual |
Return a pointer to a new vector. The number of elements or their subdivision into blocks (if applicable) is unspecified and users of this function should reset vectors to their proper size. The same holds for the contents of vectors: they are unspecified. In other words, the place that calls this function will need to resize or reinitialize it appropriately.
For the present class, calling this function will allocate a new vector on the heap and returning a pointer to it. Later calling free() then returns the memory to the global heap managed by the operating system.
new
and delete
explicitly in code invites bugs where memory is leaked (either because the corresponding delete
is forgotten altogether, or because of exception safety issues), using the alloc() and free() functions explicitly invites writing code that accidentally leaks memory. You should consider using the VectorMemory::Pointer class instead, which provides the same kind of service that std::unique
provides for arbitrary memory allocated on the heap. Implements VectorMemory< ::Vector< double > >.
|
overridevirtual |
Return a vector and indicate that it is not going to be used any further by the instance that called alloc() to get a pointer to it.
For the present class, this means that the vector is returned to the global heap.
new
and delete
explicitly in code invites bugs where memory is leaked (either because the corresponding delete
is forgotten altogether, or because of exception safety issues), using the alloc() and free() functions explicitly invites writing code that accidentally leaks memory. You should consider using the VectorMemory::Pointer class instead, which provides the same kind of service that std::unique
provides for arbitrary memory allocated on the heap. GrowingVectorMemory< VectorType >::GrowingVectorMemory | ( | const size_type | initial_size = 0 , |
const bool | log_statistics = false |
||
) |
Constructor. The argument allows to preallocate a certain number of vectors. The default is not to do this.
|
overridevirtual |
Destructor. The destructor also checks that all vectors that have been allocated through the current object have all been released again. However, as discussed in the class documentation, this does not imply that their memory is returned to the operating system.
|
overridevirtual |
Return a pointer to a new vector. The number of elements or their subdivision into blocks (if applicable) is unspecified and users of this function should reset vectors to their proper size. The same holds for the contents of vectors: they are unspecified. In other words, the place that calls this function will need to resize or reinitialize it appropriately.
new
and delete
explicitly in code invites bugs where memory is leaked (either because the corresponding delete
is forgotten altogether, or because of exception safety issues), using the alloc() and free() functions explicitly invites writing code that accidentally leaks memory. You should consider using the VectorMemory::Pointer class instead, which provides the same kind of service that std::unique
provides for arbitrary memory allocated on the heap. Implements VectorMemory< ::Vector< double > >.
|
overridevirtual |
Return a vector and indicate that it is not going to be used any further by the instance that called alloc() to get a pointer to it.
For the present class, this means retaining the vector for later reuse by the alloc() method.
new
and delete
explicitly in code invites bugs where memory is leaked (either because the corresponding delete
is forgotten altogether, or because of exception safety issues), using the alloc() and free() functions explicitly invites writing code that accidentally leaks memory. You should consider using the VectorMemory::Pointer class instead, which provides the same kind of service that std::unique
provides for arbitrary memory allocated on the heap.
|
static |
Release all vectors that are not currently in use.
|
virtual |
Memory consumed by this class and all currently allocated vectors.
GrowingVectorMemory< VectorType >::Pool::Pool | ( | ) |
Standard constructor creating an empty pool
GrowingVectorMemory< VectorType >::Pool::~Pool | ( | ) |
Destructor.
void GrowingVectorMemory< VectorType >::Pool::initialize | ( | const size_type | size | ) |
Create data vector; does nothing after first initialization
|
staticprivate |
Return an array of allocated vectors.
void internal::GrowingVectorMemoryImplementation::release_all_unused_memory | ( | ) |
Definition at line 44 of file vector_memory.cc.
|
static |
|
static |
This error is thrown if one of the virtual functions cell(), boundary(), or face() is called without being overloaded in a derived class. Consider setting use_cell, use_boundary, and use_face to false, respectively.
|
static |
Finite element does not provide prolongation matrices.
|
static |
You have to call build() before using this object.
|
staticprotected |
Call build() function first.
|
staticprotected |
Call build() function first.
|
static |
Finite element does not provide prolongation matrices.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
|
static |
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception.
|
static |
Exception.
|
static |
Exception.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception thrown when the point specified as argument does not lie between tolerance
from the given TopoDS_Shape.
|
static |
Exception thrown when the point specified as argument cannot be projected to the manifold.
|
static |
Thrown when internal OpenCASCADE utilities fail to return the OK status.
|
static |
Trying to make curve operations on a degenerate edge.
|
static |
Trying to make operations on the wrong type of shapes.
|
static |
Input matrix has incorrect number of rows.
|
static |
Input matrix has incorrect number of rows.
|
static |
Input matrix has incorrect number of columns.
|
static |
Input matrix has incorrect number of columns.
|
static |
Handle KINSOL exceptions.
|
staticprivate |
Throw an exception when a function with the given name is not implemented.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Exception
|
static |
Exception
|
static |
A cell was entered which has negative measure. In most cases, this is due to a wrong order of the vertices of the cell.
|
static |
A cell is created with a vertex number exceeding the vertex array.
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
|
static |
Exception
Patterns::Tuple::Tuple | ( | const PatternTypes &... | ps | ) |
Definition at line 1450 of file patterns.h.
internal::TableEntry::TableEntry | ( | const T & | t | ) |
Constructor. Initialize this table element with the value t
.
Definition at line 806 of file table_handler.h.
T internal::TableEntry::get |
Return the value stored by this object. The template type T must be one of int,unsigned int,std::uint64_t,double,std::string
and it must match the data type of the object originally stored in this TableEntry object.
Definition at line 813 of file table_handler.h.
void internal::TableEntry::save | ( | Archive & | ar, |
const unsigned int | version | ||
) | const |
Write the data of this object to a stream for the purpose of serialization.
Definition at line 838 of file table_handler.h.
void internal::TableEntry::load | ( | Archive & | ar, |
const unsigned int | version | ||
) |
Read the data of this object from a stream for the purpose of serialization.
Definition at line 876 of file table_handler.h.
void BlockSparseMatrix< number >::print_formatted | ( | std::ostream & | out, |
const unsigned int | precision = 3 , |
||
const bool | scientific = true , |
||
const unsigned int | width = 0 , |
||
const char * | zero_string = " " , |
||
const double | denominator = 1. |
||
) | const |
Print the matrix in the usual format, i.e. as a matrix and not as a list of nonzero elements. For better readability, elements not in the matrix are displayed as empty space, while matrix elements which are explicitly set to zero are displayed as such.
The parameters allow for a flexible setting of the output format: precision
and scientific
are used to determine the number format, where scientific = false
means fixed point notation. A zero entry for width
makes the function compute a width, but it may be changed to a positive value, if output is crude.
Additionally, a character for an empty value may be specified.
Finally, the whole matrix can be multiplied with a common denominator to produce more readable output, even integers.
void ChunkSparseMatrix< number >::print | ( | std::ostream & | out | ) | const |
Print the matrix to the given stream, using the format (line,col) value
, i.e. one nonzero entry of the matrix per line.
void ChunkSparseMatrix< number >::print_formatted | ( | std::ostream & | out, |
const unsigned int | precision = 3 , |
||
const bool | scientific = true , |
||
const unsigned int | width = 0 , |
||
const char * | zero_string = " " , |
||
const double | denominator = 1. |
||
) | const |
Print the matrix in the usual format, i.e. as a matrix and not as a list of nonzero elements. For better readability, elements not in the matrix are displayed as empty space, while matrix elements which are explicitly set to zero are displayed as such.
The parameters allow for a flexible setting of the output format: precision
and scientific
are used to determine the number format, where scientific = false
means fixed point notation. A zero entry for width
makes the function compute a width, but it may be changed to a positive value, if output is crude.
Additionally, a character for an empty value may be specified.
Finally, the whole matrix can be multiplied with a common denominator to produce more readable output, even integers.
void ChunkSparseMatrix< number >::print_pattern | ( | std::ostream & | out, |
const double | threshold = 0. |
||
) | const |
Print the actual pattern of the matrix. For each entry with an absolute value larger than threshold, a '*' is printed, a ':' for every value smaller and a '.' for every entry not allocated.
void ChunkSparseMatrix< number >::block_write | ( | std::ostream & | out | ) | const |
Write the data of this object en bloc to a file. This is done in a binary mode, so the output is neither readable by humans nor (probably) by other computers using a different operating system or number format.
The purpose of this function is that you can swap out matrices and sparsity pattern if you are short of memory, want to communicate between different programs, or allow objects to be persistent across different runs of the program.
void ChunkSparseMatrix< number >::block_read | ( | std::istream & | in | ) |
Read data that has previously been written by block_write() from a file. This is done using the inverse operations to the above function, so it is reasonably fast because the bitstream is not interpreted except for a few numbers up front.
The object is resized on this operation, and all previous contents are lost. Note, however, that no checks are performed whether new data and the underlying ChunkSparsityPattern object fit together. It is your responsibility to make sure that the sparsity pattern and the data to be read match.
A primitive form of error checking is performed which will recognize the bluntest attempts to interpret some data as a matrix stored bitwise to a file that wasn't actually created that way, but not more.
void SparseMatrix< number >::print | ( | StreamType & | out, |
const bool | across = false , |
||
const bool | diagonal_first = true |
||
) | const |
Print the matrix to the given stream, using the format (row,column) value
, i.e. one nonzero entry of the matrix per line. If across
is true, print all entries on a single line, using the format row,column:value.
If the argument diagonal_first
is true, diagonal elements of quadratic matrices are printed first in their row, corresponding to the internal storage scheme. If it is false, the elements in a row are written in ascending column order.
void SparseMatrix< number >::print_formatted | ( | std::ostream & | out, |
const unsigned int | precision = 3 , |
||
const bool | scientific = true , |
||
const unsigned int | width = 0 , |
||
const char * | zero_string = " " , |
||
const double | denominator = 1. |
||
) | const |
Print the matrix in the usual format, i.e. as a matrix and not as a list of nonzero elements. For better readability, elements not in the matrix are displayed as empty space, while matrix elements which are explicitly set to zero are displayed as such.
The parameters allow for a flexible setting of the output format: precision
and scientific
are used to determine the number format, where scientific = false
means fixed point notation. A zero entry for width
makes the function compute a width, but it may be changed to a positive value, if output is crude.
Additionally, a character for an empty value may be specified.
Finally, the whole matrix can be multiplied with a common denominator to produce more readable output, even integers.
void SparseMatrix< number >::print_pattern | ( | std::ostream & | out, |
const double | threshold = 0. |
||
) | const |
Print the actual pattern of the matrix. For each entry with an absolute value larger than threshold, a '*' is printed, a ':' for every value smaller and a '.' for every entry not allocated.
void SparseMatrix< number >::print_as_numpy_arrays | ( | std::ostream & | out, |
const unsigned int | precision = 9 |
||
) | const |
Print the matrix to the output stream out
in a format that can be read by numpy::readtxt(). To load the matrix in python just do [data, row, column] = numpy.loadtxt('my_matrix.txt') sparse_matrix = scipy.sparse.csr_matrix((data, (row, column)))
void SparseMatrix< number >::block_write | ( | std::ostream & | out | ) | const |
Write the data of this object en bloc to a file. This is done in a binary mode, so the output is neither readable by humans nor (probably) by other computers using a different operating system of number format.
The purpose of this function is that you can swap out matrices and sparsity pattern if you are short of memory, want to communicate between different programs, or allow objects to be persistent across different runs of the program.
void SparseMatrix< number >::block_read | ( | std::istream & | in | ) |
Read data that has previously been written by block_write() from a file. This is done using the inverse operations to the above function, so it is reasonably fast because the bitstream is not interpreted except for a few numbers up front.
The object is resized on this operation, and all previous contents are lost. Note, however, that no checks are performed whether new data and the underlying SparsityPattern object fit together. It is your responsibility to make sure that the sparsity pattern and the data to be read match.
A primitive form of error checking is performed which will recognize the bluntest attempts to interpret some data as a matrix stored bitwise to a file that wasn't actually created that way, but not more.
void SparseMatrixEZ< number >::print | ( | std::ostream & | out | ) | const |
Print the matrix to the given stream, using the format (line,col) value
, i.e. one nonzero entry of the matrix per line.
void SparseMatrixEZ< number >::print_formatted | ( | std::ostream & | out, |
const unsigned int | precision = 3 , |
||
const bool | scientific = true , |
||
const unsigned int | width = 0 , |
||
const char * | zero_string = " " , |
||
const double | denominator = 1. |
||
) | const |
Print the matrix in the usual format, i.e. as a matrix and not as a list of nonzero elements. For better readability, elements not in the matrix are displayed as empty space, while matrix elements which are explicitly set to zero are displayed as such.
The parameters allow for a flexible setting of the output format: precision
and scientific
are used to determine the number format, where scientific
= false
means fixed point notation. A zero entry for width
makes the function compute a width, but it may be changed to a positive value, if output is crude.
Additionally, a character for an empty value may be specified.
Finally, the whole matrix can be multiplied with a common denominator to produce more readable output, even integers.
This function may produce large amounts of output if applied to a large matrix!
void SparseMatrixEZ< number >::block_write | ( | std::ostream & | out | ) | const |
Write the data of this object in binary mode to a file.
Note that this binary format is platform dependent.
void SparseMatrixEZ< number >::block_read | ( | std::istream & | in | ) |
Read data that has previously been written by block_write
.
The object is resized on this operation, and all previous contents are lost.
A primitive form of error checking is performed which will recognize the bluntest attempts to interpret some data as a vector stored bitwise to a file, but not more.
void SparsityPattern::write_ascii | ( | ) |
Abstract Trilinos object that helps view in ASCII other Trilinos objects. Currently this function is not implemented. TODO: Not implemented.
Definition at line 960 of file trilinos_sparsity_pattern.cc.
void SparsityPattern::print | ( | std::ostream & | out, |
const bool | write_extended_trilinos_info = false |
||
) | const |
Print (the locally owned part of) the sparsity pattern to the given stream, using the format (line,col)
. The optional flag outputs the sparsity pattern in Trilinos style, where even the according processor number is printed to the stream, as well as a summary before actually writing the entries.
Definition at line 971 of file trilinos_sparsity_pattern.cc.
void SparsityPattern::print_gnuplot | ( | std::ostream & | out | ) | const |
Print the sparsity of the matrix in a format that gnuplot
understands and which can be used to plot the sparsity pattern in a graphical way. The format consists of pairs i j
of nonzero elements, each representing one entry of this matrix, one per line of the output file. Indices are counted from zero on, as usual. Since sparsity patterns are printed in the same way as matrices are displayed, we print the negative of the column index, which means that the (0,0)
element is in the top left rather than in the bottom left corner.
Print the sparsity pattern in gnuplot by setting the data style to dots or points and use the plot
command.
Definition at line 998 of file trilinos_sparsity_pattern.cc.
void SparsityPatternBase::print | ( | std::ostream & | out | ) | const |
Print the sparsity of the matrix. The output consists of one line per row of the format [i,j1,j2,j3,...]
. i is the row number and jn are the allocated columns in this row.
Definition at line 875 of file sparsity_pattern.cc.
void SparsityPatternBase::print_gnuplot | ( | std::ostream & | out | ) | const |
Print the sparsity of the matrix in a format that gnuplot
understands and which can be used to plot the sparsity pattern in a graphical way. The format consists of pairs i j
of nonzero elements, each representing one entry of this matrix, one per line of the output file. Indices are counted from zero on, as usual. Since sparsity patterns are printed in the same way as matrices are displayed, we print the negative of the column index, which means that the (0,0)
element is in the top left rather than in the bottom left corner.
Print the sparsity pattern in gnuplot by setting the data style to dots or points and use the plot
command.
Definition at line 896 of file sparsity_pattern.cc.
void SparsityPatternBase::print_svg | ( | std::ostream & | out | ) | const |
Prints the sparsity of the matrix in a .svg file which can be opened in a web browser. The .svg file contains squares which correspond to the entries in the matrix. An entry in the matrix which contains a non-zero value corresponds with a red square while a zero-valued entry in the matrix correspond with a white square.
Definition at line 914 of file sparsity_pattern.cc.
void SparsityPatternBase::save | ( | Archive & | ar, |
const unsigned int | version | ||
) | const |
Write the data of this object to a stream for the purpose of serialization
void SparsityPatternBase::load | ( | Archive & | ar, |
const unsigned int | version | ||
) |
Read the data of this object from a stream for the purpose of serialization
void SparsityPatternBase::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) |
Write and read the data of this object from a stream for the purpose of serialization.
|
static |
Make the spacedim
template parameter available.
Definition at line 253 of file data_out_base.h.
Point<spacedim> DataOutBase::Patch< dim, spacedim >::vertices[GeometryInfo< dim >::vertices_per_cell] |
Corner points of a patch. Interior points are computed by a multilinear transformation of the unit cell to the cell specified by these corner points, if points_are_available==false
.
On the other hand, if points_are_available==true
, then the coordinates of the points at which output is to be generated is attached in additional rows to the data
table.
The order of points is the same as for cells in the triangulation.
Definition at line 267 of file data_out_base.h.
std::array<unsigned int, GeometryInfo<dim>::faces_per_cell> DataOutBase::Patch< dim, spacedim >::neighbors |
Patch indices of neighbors of the current patch. This is made available for the OpenDX format that requires neighbor information for advanced output.
Definition at line 274 of file data_out_base.h.
unsigned int DataOutBase::Patch< dim, spacedim >::patch_index |
Number of this patch. Since we are not sure patches are always handled in the same order, we better store this.
Definition at line 280 of file data_out_base.h.
unsigned int DataOutBase::Patch< dim, spacedim >::n_subdivisions |
Number of subdivisions with which this patch is to be written. 1
means no subdivision, 2
means bisection, 3
trisection, etc.
Definition at line 287 of file data_out_base.h.
Table<2, float> DataOutBase::Patch< dim, spacedim >::data |
Data vectors. The format is as follows: data(i,.)
denotes the data belonging to the i
th data vector. data.n_cols()
therefore equals the number of output points; this number is (subdivisions+1)^{dim}
. data.n_rows()
equals the number of data vectors. For the current purpose, a data vector equals one scalar, even if multiple scalars may later be interpreted as vectors.
Within each column, data(.,j)
are the data values at the output point j
, where j
denotes the usual lexicographic ordering in deal.II. This is also the order of points as provided by the QIterated
class when used with the QTrapez
class as subquadrature.
Since the number of data vectors is usually the same for all patches to be printed, data.size()
should yield the same value for all patches provided. The exception are patches for which points_are_available are set, where the actual coordinates of the point are appended to the 'data' field, see the documentation of the points_are_available flag.
Definition at line 310 of file data_out_base.h.
bool DataOutBase::Patch< dim, spacedim >::points_are_available |
A flag indicating whether the coordinates of the interior patch points (assuming that the patch is supposed to be subdivided further) are appended to the data
table (true
) or not (false
). The latter is the default and in this case the locations of the points interior to this patch are computed by (bi-, tri-)linear interpolation from the vertices of the patch.
This option exists since patch points may be evaluated using a Mapping (rather than by a linear interpolation) and therefore have to be stored in the Patch structure.
Definition at line 324 of file data_out_base.h.
|
static |
Value to be used if this patch has no neighbor on one side.
Definition at line 357 of file data_out_base.h.
|
static |
Make the spacedim
template parameter available.
Definition at line 402 of file data_out_base.h.
Point<spacedim> DataOutBase::Patch< 0, spacedim >::vertices[1] |
Corner points of a patch. For the current class of zero-dimensional patches, there is of course only a single vertex.
If points_are_available==true
, then the coordinates of the point at which output is to be generated is attached as an additional row to the data
table.
Definition at line 412 of file data_out_base.h.
|
static |
An unused, static
variable that exists only to allow access from general code in a generic fashion.
Definition at line 418 of file data_out_base.h.
unsigned int DataOutBase::Patch< 0, spacedim >::patch_index |
Number of this patch. Since we are not sure patches are always handled in the same order, we better store this.
Definition at line 424 of file data_out_base.h.
|
static |
Number of subdivisions with which this patch is to be written. 1
means no subdivision, 2
means bisection, 3
trisection, etc.
Since subdivision makes no sense for zero-dimensional patches, this variable is not used but exists only to allow access from general code in a generic fashion.
Definition at line 435 of file data_out_base.h.
Table<2, float> DataOutBase::Patch< 0, spacedim >::data |
Data vectors. The format is as follows: data(i,.)
denotes the data belonging to the i
th data vector. data.n_cols()
therefore equals the number of output points; this number is of course one for the current class, given that we produce output on points. data.n_rows()
equals the number of data vectors. For the current purpose, a data vector equals one scalar, even if multiple scalars may later be interpreted as vectors.
Within each column, data(.,j)
are the data values at the output point j
; for the current class, j
can only be zero.
Since the number of data vectors is usually the same for all patches to be printed, data.size()
should yield the same value for all patches provided. The exception are patches for which points_are_available are set, where the actual coordinates of the point are appended to the 'data' field, see the documentation of the points_are_available flag.
Definition at line 457 of file data_out_base.h.
bool DataOutBase::Patch< 0, spacedim >::points_are_available |
A flag indicating whether the coordinates of the interior patch points (assuming that the patch is supposed to be subdivided further) are appended to the data
table (true
) or not (false
). The latter is the default and in this case the locations of the points interior to this patch are computed by (bi-, tri-)linear interpolation from the vertices of the patch.
This option exists since patch points may be evaluated using a Mapping (rather than by a linear interpolation) and therefore have to be stored in the Patch structure.
Definition at line 471 of file data_out_base.h.
|
static |
Value to be used if this patch has no neighbor on one side.
Definition at line 503 of file data_out_base.h.
bool DataOutBase::DXFlags::write_neighbors |
Write neighbor information. This information is necessary for instance, if OpenDX is supposed to compute integral curves (streamlines). If it is not present, streamlines end at cell boundaries.
Definition at line 601 of file data_out_base.h.
bool DataOutBase::DXFlags::int_binary |
Write integer values of the Triangulation in binary format.
Definition at line 605 of file data_out_base.h.
bool DataOutBase::DXFlags::coordinates_binary |
Write coordinate vectors in binary format.
Definition at line 609 of file data_out_base.h.
bool DataOutBase::DXFlags::data_binary |
Write data vectors in binary format.
Definition at line 614 of file data_out_base.h.
bool DataOutBase::DXFlags::data_double |
Write binary coordinate vectors as double (64 bit) numbers instead of float (32 bit).
Definition at line 620 of file data_out_base.h.
bool DataOutBase::UcdFlags::write_preamble |
Write a comment at the beginning of the file stating the date of creation and some other data. While this is supported by the UCD format and AVS, some other programs get confused by this, so the default is to not write a preamble. However, a preamble can be written using this flag.
Default: false
.
Definition at line 663 of file data_out_base.h.
std::vector<std::string> DataOutBase::GnuplotFlags::space_dimension_labels |
Labels to use in each spatial dimension. These default to "x"
, "y"
, and "z"
. Labels are printed to the Gnuplot file surrounded by angle brackets: For example, if the space dimension is 2 and the labels are "x"
and "t"
, then the relevant line will start with
* # <x> <t> *
Any extra labels will be ignored.
If you specify these labels yourself then there should be at least spacedim
labels, where spacedim
is the spatial dimension of the output data.
Definition at line 720 of file data_out_base.h.
bool DataOutBase::PovrayFlags::smooth |
Normal vector interpolation, if set to true
default = false
Definition at line 751 of file data_out_base.h.
bool DataOutBase::PovrayFlags::bicubic_patch |
Use bicubic patches (b-splines) instead of triangles.
default = false
Definition at line 758 of file data_out_base.h.
bool DataOutBase::PovrayFlags::external_data |
include external "data.inc" with camera, light and texture definition for the scene.
default = false
Definition at line 766 of file data_out_base.h.
unsigned int DataOutBase::EpsFlags::height_vector |
This denotes the number of the data vector which shall be used for generating the height information. By default, the first data vector is taken, i.e. height_vector==0
, if there is any data vector. If there is no data vector, no height information is generated.
Definition at line 807 of file data_out_base.h.
unsigned int DataOutBase::EpsFlags::color_vector |
Number of the vector which is to be taken to colorize cells. The same applies as for height_vector.
Definition at line 813 of file data_out_base.h.
SizeType DataOutBase::EpsFlags::size_type |
See above. Default is width
.
Definition at line 831 of file data_out_base.h.
unsigned int DataOutBase::EpsFlags::size |
Width or height of the output as given in postscript units This usually is given by the strange unit 1/72 inch. Whether this is height or width is specified by the flag size_type
.
Default is 300, which represents a size of roughly 10 cm.
Definition at line 840 of file data_out_base.h.
double DataOutBase::EpsFlags::line_width |
Width of a line in postscript units. Default is 0.5.
Definition at line 845 of file data_out_base.h.
double DataOutBase::EpsFlags::azimut_angle |
Angle of the line origin-viewer against the z-axis in degrees.
Default is the Gnuplot-default of 60.
Definition at line 852 of file data_out_base.h.
double DataOutBase::EpsFlags::turn_angle |
Angle by which the viewers position projected onto the x-y-plane is rotated around the z-axis, in positive sense when viewed from above. The unit are degrees, and zero equals a position above or below the negative y-axis.
Default is the Gnuplot-default of 30. An example of a Gnuplot-default of 0 is the following:
* * 3________7 * / /| * / / | * 2/______6/ | * | | | | * O--> | 0___|___4 * | / | / * | / | / * 1|/______5/ * *
Definition at line 877 of file data_out_base.h.
double DataOutBase::EpsFlags::z_scaling |
Factor by which the z-axis is to be stretched as compared to the x- and y-axes. This is to compensate for the different sizes that coordinate and solution values may have and to prevent that the plot looks to much out-of-place (no elevation at all if solution values are much smaller than coordinate values, or the common "extremely mountainous area" in the opposite case.
Default is 1.0
.
Definition at line 889 of file data_out_base.h.
bool DataOutBase::EpsFlags::draw_mesh |
Flag the determines whether the lines bounding the cells (or the parts of each patch) are to be plotted.
Default: true
.
Definition at line 897 of file data_out_base.h.
bool DataOutBase::EpsFlags::draw_cells |
Flag whether to fill the regions between the lines bounding the cells or not. If not, no hidden line removal is performed, which in this crude implementation is done through writing the cells in a back-to- front order, thereby hiding the cells in the background by cells in the foreground.
If this flag is false
and draw_mesh is false
as well, nothing will be printed.
If this flag is true
, then the cells will be drawn either colored by one of the data sets (if shade_cells is true
), or pure white (if shade_cells is false or if there are no data sets).
Default is true
.
Definition at line 915 of file data_out_base.h.
bool DataOutBase::EpsFlags::shade_cells |
Flag to determine whether the cells shall be colorized by the data set denoted by color_vector, or simply be painted in white. This flag only makes sense if draw_cells==true
. Colorization is done through color_function.
Default is true
.
Definition at line 925 of file data_out_base.h.
float DataOutBase::EpsFlags::RgbValues::red |
Definition at line 932 of file data_out_base.h.
float DataOutBase::EpsFlags::RgbValues::green |
Definition at line 933 of file data_out_base.h.
float DataOutBase::EpsFlags::RgbValues::blue |
Definition at line 934 of file data_out_base.h.
ColorFunction DataOutBase::EpsFlags::color_function |
This is a pointer to the function which is used to colorize the cells. By default, it points to the static function default_color_function() which is a member of this class.
Definition at line 960 of file data_out_base.h.
const char* DataOutBase::TecplotFlags::tecplot_binary_file_name |
This variable is needed to hold the output file name when using the Tecplot API to write binary files. If the user doesn't set the file name with this variable only ASCII Tecplot output will be produced.
Definition at line 1056 of file data_out_base.h.
const char* DataOutBase::TecplotFlags::zone_name |
Tecplot allows to assign names to zones. This variable stores this name.
Definition at line 1062 of file data_out_base.h.
double DataOutBase::TecplotFlags::solution_time |
Solution time for each zone in a strand. This value must be non- negative, otherwise it will not be written to file. Do not assign any value for this in case of a static zone.
Definition at line 1069 of file data_out_base.h.
double DataOutBase::VtkFlags::time |
The time of the time step if this file is part of a time dependent simulation.
The value of this variable is written into the output file according to the instructions provided in http://www.visitusers.org/index.php?title=Time_and_Cycle_in_VTK_files unless it is at its default value of
std::numeric_limits<unsigned int>::min()
.
Definition at line 1107 of file data_out_base.h.
unsigned int DataOutBase::VtkFlags::cycle |
The number of the time step if this file is part of a time dependent simulation, or the cycle within a nonlinear or other iteration.
The value of this variable is written into the output file according to the instructions provided in http://www.visitusers.org/index.php?title=Time_and_Cycle_in_VTK_files unless it is at its default value of
std::numeric_limits<unsigned int>::min()
.
Definition at line 1119 of file data_out_base.h.
bool DataOutBase::VtkFlags::print_date_and_time |
Flag to determine whether the current date and time shall be printed as a comment in the file's second line.
Default is true
.
Definition at line 1127 of file data_out_base.h.
ZlibCompressionLevel DataOutBase::VtkFlags::compression_level |
Flag determining the compression level at which zlib, if available, is run. The default is best_compression
.
Definition at line 1159 of file data_out_base.h.
bool DataOutBase::VtkFlags::write_higher_order_cells |
Flag determining whether to write patches as linear cells or as a high-order Lagrange cell.
Default is false
.
true
. Experience with these programs shows that these error messages are likely going to be rather less descriptive and more obscure. Definition at line 1178 of file data_out_base.h.
unsigned int DataOutBase::SvgFlags::height |
Height of the image in SVG units. Default value is 4000.
Definition at line 1202 of file data_out_base.h.
unsigned int DataOutBase::SvgFlags::width |
Width of the image in SVG units. If left zero, the width is computed from the height.
Definition at line 1208 of file data_out_base.h.
unsigned int DataOutBase::SvgFlags::height_vector |
This denotes the number of the data vector which shall be used for generating the height information. By default, the first data vector is taken, i.e. height_vector==0
, if there is any data vector. If there is no data vector, no height information is generated.
Definition at line 1216 of file data_out_base.h.
int DataOutBase::SvgFlags::azimuth_angle |
Angles for the perspective view
Definition at line 1221 of file data_out_base.h.
int DataOutBase::SvgFlags::polar_angle |
Definition at line 1221 of file data_out_base.h.
unsigned int DataOutBase::SvgFlags::line_thickness |
Definition at line 1223 of file data_out_base.h.
bool DataOutBase::SvgFlags::margin |
Draw a margin of 5% around the plotted area
Definition at line 1228 of file data_out_base.h.
bool DataOutBase::SvgFlags::draw_colorbar |
Draw a colorbar encoding the cell coloring
Definition at line 1233 of file data_out_base.h.
|
static |
An indicator of the current file format version used to write intermediate format. We do not attempt to be backward compatible, so this number is used only to verify that the format we are writing is what the current readers and writers understand.
Definition at line 1262 of file data_out_base.h.
bool DataOutBase::DataOutFilterFlags::filter_duplicate_vertices |
Filter duplicate vertices and associated values. This will drastically reduce the output data size but will result in an output file that does not faithfully represent the actual data if the data corresponds to discontinuous fields. In particular, along subdomain boundaries the data will still be discontinuous, while it will look like a continuous field inside of the subdomain.
Definition at line 1280 of file data_out_base.h.
bool DataOutBase::DataOutFilterFlags::xdmf_hdf5_output |
Whether the XDMF output refers to HDF5 files. This affects how output is structured.
Definition at line 1286 of file data_out_base.h.
|
private |
Flags used to specify filtering behavior.
Definition at line 1487 of file data_out_base.h.
|
private |
The number of space dimensions in which the vertices represented by the current object live. This corresponds to the usual dim
argument, but since this class is not templated on the dimension, we need to store it here.
Definition at line 1495 of file data_out_base.h.
|
private |
The number of vertices per cell. Equal to GeometryInfo<node_dim>::vertices_per_cell. We need to store it as a run-time variable here because the dimension node_dim is also a run-time variable.
Definition at line 1503 of file data_out_base.h.
|
private |
Map of points to an internal index.
Definition at line 1508 of file data_out_base.h.
Map of actual point index to internal point index.
Definition at line 1513 of file data_out_base.h.
Map of cells to the filtered points.
Definition at line 1518 of file data_out_base.h.
|
private |
Data set names.
Definition at line 1523 of file data_out_base.h.
|
private |
Data set dimensions.
Definition at line 1528 of file data_out_base.h.
|
private |
Data set data.
Definition at line 1533 of file data_out_base.h.
|
protected |
The default number of subdivisions for patches. This is filled by parse_parameters() and should be obeyed by build_patches() in derived classes.
Definition at line 3068 of file data_out_base.h.
|
private |
Standard output format. Use this format, if output format default_format is requested. It can be changed by the set_format
function or in a parameter file.
Definition at line 3076 of file data_out_base.h.
|
private |
Flags to be used upon output of OpenDX data. Can be changed by using the set_flags
function.
Definition at line 3082 of file data_out_base.h.
|
private |
Flags to be used upon output of UCD data. Can be changed by using the set_flags
function.
Definition at line 3088 of file data_out_base.h.
|
private |
Flags to be used upon output of GNUPLOT data. Can be changed by using the set_flags
function.
Definition at line 3094 of file data_out_base.h.
|
private |
Flags to be used upon output of POVRAY data. Can be changed by using the set_flags
function.
Definition at line 3100 of file data_out_base.h.
|
private |
Flags to be used upon output of EPS data in one space dimension. Can be changed by using the set_flags
function.
Definition at line 3106 of file data_out_base.h.
|
private |
Flags to be used upon output of gmv data in one space dimension. Can be changed by using the set_flags
function.
Definition at line 3112 of file data_out_base.h.
|
private |
Flags to be used upon output of Tecplot data in one space dimension. Can be changed by using the set_flags
function.
Definition at line 3118 of file data_out_base.h.
|
private |
Flags to be used upon output of vtk data in one space dimension. Can be changed by using the set_flags
function.
Definition at line 3124 of file data_out_base.h.
|
private |
Flags to be used upon output of svg data in one space dimension. Can be changed by using the set_flags
function.
Definition at line 3130 of file data_out_base.h.
|
private |
Flags to be used upon output of deal.II intermediate data in one space dimension. Can be changed by using the set_flags
function.
Definition at line 3136 of file data_out_base.h.
|
private |
Arrays holding the set of patches as well as the names of output variables, all of which we read from an input stream.
Definition at line 3299 of file data_out_base.h.
|
private |
Definition at line 3300 of file data_out_base.h.
|
private |
Information about whether certain components of the output field are to be considered vectors.
Definition at line 3311 of file data_out_base.h.
|
private |
Whether this entry is valid and contains data to be written.
Definition at line 3392 of file data_out_base.h.
|
private |
The name of the HDF5 heavy data solution file this entry references.
Definition at line 3397 of file data_out_base.h.
|
private |
The name of the HDF5 mesh file this entry references.
Definition at line 3402 of file data_out_base.h.
|
private |
The simulation time associated with this entry.
Definition at line 3407 of file data_out_base.h.
|
private |
The number of data nodes.
Definition at line 3412 of file data_out_base.h.
|
private |
The number of data cells.
Definition at line 3417 of file data_out_base.h.
|
private |
The dimension associated with the data.
Definition at line 3422 of file data_out_base.h.
|
private |
The dimension of the space the data lives in. Note that dimension <= space_dimension.
Definition at line 3428 of file data_out_base.h.
|
private |
The attributes associated with this entry and their dimension.
Definition at line 3433 of file data_out_base.h.
|
mutableprivate |
Place for the variables for each thread
Definition at line 398 of file function_parser.h.
|
mutableprivate |
The muParser objects for each thread (and one for each component). We are storing a unique_ptr so that we don't need to include the definition of mu::Parser in this header.
Definition at line 406 of file function_parser.h.
|
private |
An array to keep track of all the constants, required to initialize fp in each thread.
Definition at line 412 of file function_parser.h.
|
private |
An array for the variable names, required to initialize fp in each thread.
Definition at line 418 of file function_parser.h.
|
private |
An array of function expressions (one per component), required to initialize fp in each thread.
Definition at line 434 of file function_parser.h.
|
private |
State of usability. This variable is checked every time the function is called for evaluation. It's set to true in the initialize() methods.
Definition at line 440 of file function_parser.h.
|
private |
Number of variables. If this is also a function of time, then the number of variables is dim+1, otherwise it is dim. In the case that this is a time dependent function, the time is supposed to be the last variable. If n_vars is not identical to the number of the variables parsed by the initialize() method, then an exception is thrown.
Definition at line 449 of file function_parser.h.
|
staticprivate |
The separator used when accessing elements of a path into the parameter tree.
Definition at line 1738 of file parameter_handler.h.
|
private |
Path of presently selected subsections; empty list means top level
Definition at line 1743 of file parameter_handler.h.
|
private |
The complete tree of sections and entries. See the general documentation of this class for a description how data is stored in this variable.
The variable is a pointer so that we can use an incomplete type, rather than having to include all of the property_tree stuff from boost. This works around a problem with gcc 4.5.
Definition at line 1753 of file parameter_handler.h.
A map that stores a pair of boolean variables for each entry added to the parameter handler. The first bool describes whether the parameter has to be set according to the last argument of the functions declare_entry() or add_parameter(), and the second bool contains the information whether the parameter has been set by any of the functions parsing input parameters or by a set function of this class.
Definition at line 1763 of file parameter_handler.h.
|
private |
A list of patterns that are used to describe the parameters of this object. Every nodes in the property tree corresponding to a parameter stores an index into this array.
Definition at line 1770 of file parameter_handler.h.
|
private |
A list of actions that are associated with parameters. These are added by the add_action() function. Nodes in the property tree corresponding to individual parameters store indices into this array in order to reference specific actions.
Definition at line 1778 of file parameter_handler.h.
std::vector<std::string> MultipleParameterLoop::Entry::subsection_path |
Path to variant entry.
Definition at line 2222 of file parameter_handler.h.
std::string MultipleParameterLoop::Entry::entry_name |
Name of entry.
Definition at line 2227 of file parameter_handler.h.
std::string MultipleParameterLoop::Entry::entry_value |
Original variant value.
Definition at line 2232 of file parameter_handler.h.
std::vector<std::string> MultipleParameterLoop::Entry::different_values |
List of entry values constructed out of what was given in the input file.
Definition at line 2238 of file parameter_handler.h.
MultipleEntryType MultipleParameterLoop::Entry::type |
Store whether this entry is a variant entry or an array.
Definition at line 2243 of file parameter_handler.h.
|
private |
List of variant entry values.
Definition at line 2256 of file parameter_handler.h.
|
private |
Number of branches constructed from the different combinations of the variants. This obviously equals the number of runs to be performed.
Definition at line 2262 of file parameter_handler.h.
|
private |
Copy of the pattern that each element of the list has to satisfy.
Definition at line 547 of file patterns.h.
|
private |
Minimum number of elements the list must have.
Definition at line 552 of file patterns.h.
|
private |
Maximum number of elements the list must have.
Definition at line 557 of file patterns.h.
|
private |
Separator between elements of the list.
Definition at line 562 of file patterns.h.
|
staticprivate |
Initial part of description
Definition at line 567 of file patterns.h.
|
static |
Maximal integer value. If the numeric_limits class is available use this information to obtain the extremal values, otherwise set it so that this class understands that all values are allowed.
Definition at line 593 of file patterns.h.
|
private |
Copy of the patterns that each key and each value of the map has to satisfy.
Definition at line 695 of file patterns.h.
|
private |
Definition at line 696 of file patterns.h.
|
private |
Minimum number of elements the list must have.
Definition at line 701 of file patterns.h.
|
private |
Maximum number of elements the list must have.
Definition at line 706 of file patterns.h.
|
private |
Separator between elements of the list.
Definition at line 711 of file patterns.h.
|
private |
Separator between keys and values.
Definition at line 717 of file patterns.h.
|
staticprivate |
Initial part of description
Definition at line 722 of file patterns.h.
|
private |
Copy of the patterns stored in the Tuple.
Definition at line 883 of file patterns.h.
|
private |
Separator between elements of the list.
Definition at line 888 of file patterns.h.
|
staticprivate |
Initial part of description.
Definition at line 893 of file patterns.h.
|
private |
List of valid strings as passed to the constructor. We don't make this string constant, as we process it somewhat in the constructor.
Definition at line 972 of file patterns.h.
|
staticprivate |
Initial part of description
Definition at line 977 of file patterns.h.
|
staticprivate |
Initial part of description
Definition at line 1019 of file patterns.h.
|
staticprivate |
Initial part of description
Definition at line 1068 of file patterns.h.
FileType Patterns::FileName::file_type |
file type flag
Definition at line 1136 of file patterns.h.
|
staticprivate |
Initial part of description
Definition at line 1150 of file patterns.h.
|
staticprivate |
Initial part of description
Definition at line 1208 of file patterns.h.
|
staticconstexpr |
Definition at line 1490 of file patterns.h.
|
staticconstexpr |
Definition at line 1491 of file patterns.h.
|
constexpr |
Definition at line 1593 of file patterns.h.
|
constexpr |
Definition at line 1595 of file patterns.h.
|
staticconstexpr |
Definition at line 1655 of file patterns.h.
|
staticconstexpr |
Definition at line 1662 of file patterns.h.
|
staticconstexpr |
Definition at line 1706 of file patterns.h.
|
staticconstexpr |
Definition at line 1708 of file patterns.h.
|
staticconstexpr |
Definition at line 1718 of file patterns.h.
|
staticconstexpr |
Definition at line 1720 of file patterns.h.
|
staticconstexpr |
Definition at line 1728 of file patterns.h.
|
staticconstexpr |
Definition at line 1729 of file patterns.h.
|
staticconstexpr |
Definition at line 1740 of file patterns.h.
|
staticconstexpr |
Definition at line 1741 of file patterns.h.
|
staticconstexpr |
Definition at line 1748 of file patterns.h.
|
staticconstexpr |
Definition at line 1749 of file patterns.h.
|
staticconstexpr |
Definition at line 1756 of file patterns.h.
|
staticconstexpr |
Definition at line 1757 of file patterns.h.
|
staticconstexpr |
Definition at line 1764 of file patterns.h.
|
staticconstexpr |
Definition at line 1766 of file patterns.h.
|
staticconstexpr |
Definition at line 1775 of file patterns.h.
|
staticconstexpr |
Definition at line 1776 of file patterns.h.
|
mutableprivate |
Store the number of objects which subscribed to this object. Initially, this number is zero, and upon destruction it shall be zero again (i.e. all objects which subscribed should have unsubscribed again).
The creator (and owner) of an object is counted in the map below if HE manages to supply identification.
We use the mutable
keyword in order to allow subscription to constant objects also.
This counter may be read from and written to concurrently in multithreaded code: hence we use the std::atomic
class template.
Definition at line 211 of file subscriptor.h.
|
mutableprivate |
In this map, we count subscriptions for each different identification string supplied to subscribe().
Definition at line 217 of file subscriptor.h.
|
mutableprivate |
In this vector, we store pointers to the validity bool in the SmartPointer objects that subscribe to this class.
Definition at line 233 of file subscriptor.h.
|
mutableprivate |
Pointer to the typeinfo object of this object, from which we can later deduce the class name. Since this information on the derived class is neither available in the destructor, nor in the constructor, we obtain it in between and store it here.
Definition at line 241 of file subscriptor.h.
|
staticprivate |
A mutex used to ensure data consistency when printing out the list of subscribers.
Definition at line 263 of file subscriptor.h.
std::vector<internal::TableEntry> TableHandler::Column::entries |
List of entries within this column. Values are always immediately converted to strings to provide a uniform method of lookup.
Definition at line 687 of file table_handler.h.
std::string TableHandler::Column::tex_caption |
The caption of the column in tex output. By default, this is the key string that is given to the TableHandler
by TableHandler::add_value(...)
. This may be changed by calling TableHandler::set_tex_caption(...)
.
Definition at line 695 of file table_handler.h.
std::string TableHandler::Column::tex_format |
The column format in tex output. By default, this is "c"
, meaning ‘centered’. This may be changed by calling TableHandler::set_tex_format(...)
with "c", "r", "l"
for centered, right or left.
Definition at line 704 of file table_handler.h.
unsigned int TableHandler::Column::precision |
Double or float entries are written with this precision (set by the user). The default is 4.
Definition at line 710 of file table_handler.h.
bool TableHandler::Column::scientific |
scientific
=false means fixed point notation.
Definition at line 715 of file table_handler.h.
unsigned int TableHandler::Column::flag |
Flag that may be used by derived classes for arbitrary purposes.
In particular, the ConvergenceTable class uses the flag to denote columns for which convergence information has already been computed, or should not be computed at all.
Definition at line 724 of file table_handler.h.
unsigned int TableHandler::Column::max_length |
This entry caches the maximum length in characters for all entries in this table.
Definition at line 730 of file table_handler.h.
|
protected |
A variable storing the column and supercolumn keys in the order desired by the user. By default this is the order of adding the columns. This order may be changed by set_column_order().
Definition at line 757 of file table_handler.h.
|
mutableprotected |
A map from the column keys to the columns (not supercolumns).
The field is declared mutable so that the write_text() and write_tex() functions can be const, even though they may pad columns below if 'auto_fill_mode' is on.
Definition at line 766 of file table_handler.h.
|
protected |
A map from each supercolumn key to the keys of its subcolumns in the right order. It is allowed that a supercolumn has got the same key as a column.
Note that we do not use a multimap
here since the order of column keys for each supercolumn key is relevant.
Definition at line 776 of file table_handler.h.
|
protected |
A map from the supercolumn keys to the captions of the supercolumns that are used in tex output.
By default these are just the supercolumn keys but they may be changed by set_tex_supercaptions(...)
.
Definition at line 785 of file table_handler.h.
|
protected |
The caption of the table itself.
Definition at line 790 of file table_handler.h.
|
protected |
The label of the table.
Definition at line 794 of file table_handler.h.
|
protected |
Flag indicating whether auto-fill mode should be used.
Definition at line 799 of file table_handler.h.
|
mutableprivate |
Place for the variables for each thread
Definition at line 279 of file tensor_function_parser.h.
|
mutableprivate |
The muParser objects for each thread (and one for each component). We are storing a unique_ptr so that we don't need to include the definition of mu::Parser in this header.
Definition at line 287 of file tensor_function_parser.h.
|
private |
An array to keep track of all the constants, required to initialize tfp in each thread.
Definition at line 293 of file tensor_function_parser.h.
|
private |
An array for the variable names, required to initialize tfp in each thread.
Definition at line 299 of file tensor_function_parser.h.
|
private |
An array of function expressions (one per component), required to initialize tfp in each thread.
Definition at line 315 of file tensor_function_parser.h.
|
private |
State of usability. This variable is checked every time the function is called for evaluation. It's set to true in the initialize() methods.
Definition at line 321 of file tensor_function_parser.h.
|
private |
Number of variables. If this is also a function of time, then the number of variables is dim+1, otherwise it is dim. In the case that this is a time dependent function, the time is supposed to be the last variable. If n_vars is not identical to the number of the variables parsed by the initialize() method, then an exception is thrown.
Definition at line 330 of file tensor_function_parser.h.
|
private |
Number of components is equal dimrank.
Definition at line 335 of file tensor_function_parser.h.
|
private |
Shared pointer to the object representing the task. This makes sure that the object lives as long as there is at least one subscriber to it.
Definition at line 1632 of file thread_management.h.
|
private |
List of task objects.
Definition at line 1843 of file thread_management.h.
|
private |
The value or expression that this instance of this class is to represent.
Definition at line 870 of file symengine_number_types.h.
|
private |
The optimization methods that is to be employed.
Definition at line 1929 of file symengine_optimizer.h.
|
private |
The optimization flags that indicate which expression manipulation mechanisms are to be employed.
Definition at line 1935 of file symengine_optimizer.h.
|
private |
A map that represents the symbols that form the set of independent variables upon which optimized symbolic expressions are to be based.
Definition at line 1946 of file symengine_optimizer.h.
|
private |
A set of symbolic expressions to be optimized. It is required that the symbols on which these dependent functions are based are registered in the independent_variables_symbols
map.
Definition at line 1953 of file symengine_optimizer.h.
|
mutableprivate |
The output of substituting symbolic values with floating point values through the use of the optimizer
.
It
is necessary to use this intermediate storage mechanism to store the result of a substitution sweep as some optimizers work on all symbolic expressions in a single batch. In this way they can employ methods such as common subexpression elimination to minimize the number of terms evaluated across all symbolic functions.
This variable is marked as mutable. This facilitates the substitution functionality being used in logically constant get_*
functions.
Definition at line 1985 of file symengine_optimizer.h.
|
mutableprivate |
A map indicating which dependent variable is associated with which entry in the output vector.
Definition at line 2004 of file symengine_optimizer.h.
|
mutableprivate |
A pointer to an instance of an optimizer that will be used to reformulate the substitution of symbolic expressions in a manner that is more efficient than plain dictionary-based approach.
Definition at line 2012 of file symengine_optimizer.h.
|
mutableprivate |
A flag to record whether or not substitution has taken place and values can now be extracted.
get_*
functions. Definition at line 2022 of file symengine_optimizer.h.
|
mutableprivate |
A flag to record whether or not this class instance has been serialized in the past.
Definition at line 2028 of file symengine_optimizer.h.
|
protected |
Index arrays for rows and columns.
Definition at line 849 of file block_matrix_base.h.
|
protected |
Definition at line 850 of file block_matrix_base.h.
|
protected |
Array of sub-matrices.
Definition at line 855 of file block_matrix_base.h.
std::vector<size_type> BlockMatrixBase< MatrixType >::TemporaryData::counter_within_block |
Temporary vector for counting the elements written into the individual blocks when doing a collective add or set.
Definition at line 1025 of file block_matrix_base.h.
std::vector<std::vector<size_type> > BlockMatrixBase< MatrixType >::TemporaryData::column_indices |
Temporary vector for column indices on each block when writing local to global data on each sparse matrix.
Definition at line 1031 of file block_matrix_base.h.
std::vector<std::vector<value_type> > BlockMatrixBase< MatrixType >::TemporaryData::column_values |
Temporary vector for storing the local values (they need to be reordered when writing local to global).
Definition at line 1037 of file block_matrix_base.h.
std::mutex BlockMatrixBase< MatrixType >::TemporaryData::mutex |
A mutex variable used to guard access to the member variables of this structure;
Definition at line 1043 of file block_matrix_base.h.
|
private |
A set of scratch arrays that can be used by the add() and set() functions that take pointers to data to pre-sort indices before use. Access from multiple threads is synchronized via the mutex variable that is part of the structure.
Definition at line 1067 of file block_matrix_base.h.
|
private |
Pointer to the block sparsity pattern used for this matrix. In order to guarantee that it is not deleted while still in use, we subscribe to it using the SmartPointer class.
Definition at line 368 of file block_sparse_matrix.h.
|
protected |
Number of block rows.
Definition at line 342 of file block_sparsity_pattern.h.
|
protected |
Number of block columns.
Definition at line 347 of file block_sparsity_pattern.h.
|
protected |
Array of sparsity patterns.
Definition at line 355 of file block_sparsity_pattern.h.
|
protected |
Object storing and managing the transformation of row indices to indices of the sub-objects.
Definition at line 361 of file block_sparsity_pattern.h.
|
protected |
Object storing and managing the transformation of column indices to indices of the sub-objects.
Definition at line 367 of file block_sparsity_pattern.h.
|
private |
Temporary vector for counting the elements written into the individual blocks when doing a collective add or set.
Definition at line 374 of file block_sparsity_pattern.h.
|
private |
Temporary vector for column indices on each block when writing local to global data on each sparse matrix.
Definition at line 380 of file block_sparsity_pattern.h.
|
private |
Pointer to the block vector object to which this iterator points. Depending on the value of the Constness
template argument of this class, this is a const
or non-const
pointer.
Definition at line 368 of file block_vector_base.h.
|
private |
Global index of the element to which we presently point.
Definition at line 373 of file block_vector_base.h.
|
private |
Current block and index within this block of the element presently pointed to.
Definition at line 379 of file block_vector_base.h.
|
private |
Definition at line 380 of file block_vector_base.h.
|
private |
Indices of the global element address at which we have to move on to another block when moving forward and backward. These indices are kept as a cache since this is much more efficient than always asking the parent object.
Definition at line 388 of file block_vector_base.h.
|
private |
Definition at line 389 of file block_vector_base.h.
|
protected |
Pointer to the array of components.
Definition at line 956 of file block_vector_base.h.
|
protected |
Object managing the transformation between global indices and indices within the different blocks.
Definition at line 962 of file block_vector_base.h.
|
static |
It is safe to elide additions of zeros to individual elements of this matrix.
Definition at line 474 of file chunk_sparse_matrix.h.
|
private |
Pointer to the sparsity pattern used for this matrix. In order to guarantee that it is not deleted while still in use, we subscribe to it using the SmartPointer class.
Definition at line 1382 of file chunk_sparse_matrix.h.
|
private |
Array of values for all the nonzero entries. The position of an entry within the matrix, i.e., the row and column number for a given value in this array can only be deduced using the sparsity pattern. The same holds for the more common operation of finding an entry by its coordinates.
Definition at line 1391 of file chunk_sparse_matrix.h.
|
private |
Allocated size of val. This can be larger than the actually used part if the size of the matrix was reduced sometime in the past by associating a sparsity pattern with a smaller size to this object, using the reinit() function.
Definition at line 1399 of file chunk_sparse_matrix.h.
|
private |
Number of rows that this sparsity structure shall represent.
Definition at line 837 of file chunk_sparsity_pattern.h.
|
private |
Number of columns that this sparsity structure shall represent.
Definition at line 842 of file chunk_sparsity_pattern.h.
|
private |
The size of chunks.
Definition at line 847 of file chunk_sparsity_pattern.h.
|
private |
The reduced sparsity pattern. We store only which chunks exist, with each chunk a block in the matrix of size chunk_size by chunk_size.
Definition at line 853 of file chunk_sparsity_pattern.h.
|
static |
It is not safe to elide additions of zeros to individual elements of this matrix. The reason is that additions to the matrix may trigger collective operations synchronizing buffers on multiple processes. If an addition is elided on one process, this may lead to other processes hanging in an infinite waiting loop.
Definition at line 391 of file petsc_sparse_matrix.h.
|
private |
Copy of the communicator object to be used for this parallel vector.
Definition at line 701 of file petsc_sparse_matrix.h.
double PreconditionBlock< MatrixType, inverse_type >::AdditionalData::relaxation |
Relaxation parameter.
Definition at line 122 of file precondition_block.h.
size_type PreconditionBlock< MatrixType, inverse_type >::AdditionalData::block_size |
Block size.
Definition at line 127 of file precondition_block.h.
bool PreconditionBlock< MatrixType, inverse_type >::AdditionalData::invert_diagonal |
Invert diagonal during initialization.
Definition at line 132 of file precondition_block.h.
bool PreconditionBlock< MatrixType, inverse_type >::AdditionalData::same_diagonal |
Assume all diagonal blocks are equal to save memory.
Definition at line 137 of file precondition_block.h.
PreconditionBlockBase<inverse_type>::Inversion PreconditionBlock< MatrixType, inverse_type >::AdditionalData::inversion |
Choose the inversion method for the blocks.
Definition at line 141 of file precondition_block.h.
double PreconditionBlock< MatrixType, inverse_type >::AdditionalData::threshold |
The if inversion is SVD, the threshold below which a singular value will be considered zero and thus not inverted. This parameter is used in the call to LAPACKFullMatrix::compute_inverse_svd().
Definition at line 148 of file precondition_block.h.
|
protected |
Size of the blocks. Each diagonal block is assumed to be of the same size.
Definition at line 340 of file precondition_block.h.
|
protected |
Pointer to the matrix. Make sure that the matrix exists as long as this class needs it, i.e. until calling invert_diagblocks
, or (if the inverse matrices should not be stored) until the last call of the preconditoining vmult
function of the derived classes.
Definition at line 348 of file precondition_block.h.
|
protected |
Relaxation parameter to be used by derived classes.
Definition at line 352 of file precondition_block.h.
|
protected |
The permutation vector
Definition at line 357 of file precondition_block.h.
|
protected |
The inverse permutation vector
Definition at line 362 of file precondition_block.h.
|
protected |
The matrix accessed.
Definition at line 439 of file precondition_block.h.
|
protected |
Save block size here for further reference.
Definition at line 444 of file precondition_block.h.
|
protected |
Current block number.
Definition at line 449 of file precondition_block.h.
|
protected |
Iterator inside block.
Definition at line 454 of file precondition_block.h.
|
protected |
End of current block.
Definition at line 459 of file precondition_block.h.
|
private |
Store an object of the accessor class.
Definition at line 511 of file precondition_block.h.
|
protected |
Stores the name of the preconditioning.
Definition at line 187 of file precondition_selector.h.
|
private |
Matrix that is used for the matrix-builtin preconditioning function. cf. also PreconditionUseMatrix
.
Definition at line 195 of file precondition_selector.h.
|
private |
Stores the damping parameter of the preconditioner.
Definition at line 200 of file precondition_selector.h.
|
protected |
Within the iteration loop, the square of the residual vector is stored in this variable. The function criterion
uses this variable to compute the convergence value, which in this class is the norm of the residual vector and thus the square root of the res2
value.
Definition at line 146 of file solver_minres.h.
double SparseLUDecomposition< number >::AdditionalData::strengthen_diagonal |
strengthen_diag
times the sum of absolute row entries is added to the diagonal entries.
Per default, this value is zero, i.e. the diagonal is not strengthened.
Definition at line 161 of file sparse_decomposition.h.
unsigned int SparseLUDecomposition< number >::AdditionalData::extra_off_diagonals |
By default, the initialize(matrix, data)
function creates its own sparsity. This sparsity has the same SparsityPattern as matrix
with some extra off diagonals the number of which is specified by extra_off_diagonals
.
The user can give a SparsityPattern to use_this_sparsity
. Then this sparsity is used and the extra_off_diagonals
argument is ignored.
Definition at line 173 of file sparse_decomposition.h.
bool SparseLUDecomposition< number >::AdditionalData::use_previous_sparsity |
If this flag is true the initialize() function uses the same sparsity that was used during the previous initialize() call.
This might be useful when several linear problems on the same sparsity need to solved, as for example several Newton iteration steps on the same triangulation.
Definition at line 183 of file sparse_decomposition.h.
const SparsityPattern* SparseLUDecomposition< number >::AdditionalData::use_this_sparsity |
When a SparsityPattern is given to this argument, the initialize() function calls reinit(*use_this_sparsity)
causing this sparsity to be used.
Note that the sparsity structures of *use_this_sparsity
and the matrix passed to the initialize function need not be equal. Fill-in is allowed, as well as filtering out some elements in the matrix.
Definition at line 195 of file sparse_decomposition.h.
|
protected |
The default strengthening value, returned by get_strengthen_diagonal().
Definition at line 316 of file sparse_decomposition.h.
|
protected |
For every row in the underlying SparsityPattern, this array contains a pointer to the row's first afterdiagonal entry. Becomes available after invocation of prebuild_lower_bound().
Definition at line 323 of file sparse_decomposition.h.
|
private |
In general this pointer is zero except for the case that no SparsityPattern is given to this class. Then, a SparsityPattern is created and is passed down to the SparseMatrix base class.
Nevertheless, the SparseLUDecomposition needs to keep ownership of this sparsity. It keeps this pointer to it enabling it to delete this sparsity at destruction time.
Definition at line 341 of file sparse_decomposition.h.
|
static |
It is safe to elide additions of zeros to individual elements of this matrix.
Definition at line 548 of file sparse_matrix.h.
|
private |
Pointer to the sparsity pattern used for this matrix. In order to guarantee that it is not deleted while still in use, we subscribe to it using the SmartPointer class.
Definition at line 1708 of file sparse_matrix.h.
|
private |
Array of values for all the nonzero entries. The position of an entry within the matrix, i.e., the row and column number for a given value in this array can only be deduced using the sparsity pattern. The same holds for the more common operation of finding an entry by its coordinates.
Definition at line 1717 of file sparse_matrix.h.
|
private |
Allocated size of val. This can be larger than the actually used part if the size of the matrix was reduced sometime in the past by associating a sparsity pattern with a smaller size to this object, using the reinit() function.
Definition at line 1725 of file sparse_matrix.h.
size_type SparseMatrixEZ< number >::Entry::column |
The column number.
Definition at line 134 of file sparse_matrix_ez.h.
number SparseMatrixEZ< number >::Entry::value |
The value there.
Definition at line 139 of file sparse_matrix_ez.h.
|
static |
Non-existent column number.
Definition at line 144 of file sparse_matrix_ez.h.
size_type SparseMatrixEZ< number >::RowInfo::start |
Index of first entry of the row in the data field.
Definition at line 161 of file sparse_matrix_ez.h.
unsigned short SparseMatrixEZ< number >::RowInfo::length |
Number of entries in this row.
Definition at line 165 of file sparse_matrix_ez.h.
unsigned short SparseMatrixEZ< number >::RowInfo::diagonal |
Position of the diagonal element relative tor the start index.
Definition at line 169 of file sparse_matrix_ez.h.
|
static |
Value for non-existing diagonal.
Definition at line 173 of file sparse_matrix_ez.h.
|
protected |
The matrix accessed.
Definition at line 226 of file sparse_matrix_ez.h.
|
protected |
Current row number.
Definition at line 231 of file sparse_matrix_ez.h.
|
protected |
Current index in row.
Definition at line 236 of file sparse_matrix_ez.h.
|
private |
Store an object of the accessor class.
Definition at line 288 of file sparse_matrix_ez.h.
|
private |
Number of columns. This is used to check vector dimensions only.
Definition at line 882 of file sparse_matrix_ez.h.
|
private |
Info structure for each row.
Definition at line 887 of file sparse_matrix_ez.h.
|
private |
Data storage.
Definition at line 892 of file sparse_matrix_ez.h.
|
private |
Increment when a row grows.
Definition at line 897 of file sparse_matrix_ez.h.
|
private |
Remember the user provided default row length.
Definition at line 902 of file sparse_matrix_ez.h.
|
private |
Values of the computed diagonal.
Definition at line 163 of file sparse_mic.h.
|
private |
Inverses of the diagonal: precomputed for faster vmult.
Definition at line 168 of file sparse_mic.h.
|
private |
Values of the computed "inner sums", i.e. per-row sums of the elements laying on the right side of the diagonal.
Definition at line 174 of file sparse_mic.h.
|
protected |
Maximum number of rows that can be stored in the rowstart array. Since reallocation of that array only happens if the present one is too small, but never when the size of this matrix structure shrinks, max_dim might be larger than rows and in this case rowstart has more elements than are used.
Definition at line 744 of file sparsity_pattern.h.
|
protected |
Number of rows that this sparsity structure shall represent.
Definition at line 749 of file sparsity_pattern.h.
|
protected |
Number of columns that this sparsity structure shall represent.
Definition at line 754 of file sparsity_pattern.h.
|
protected |
Size of the actually allocated array colnums. Here, the same applies as for the rowstart array, i.e. it may be larger than the actually used part of the array.
Definition at line 761 of file sparsity_pattern.h.
|
protected |
Maximum number of elements per row. This is set to the value given to the reinit() function (or to the constructor), or to the maximum row length computed from the vectors in case the more flexible constructors or reinit versions are called. Its value is more or less meaningless after compress() has been called.
Definition at line 770 of file sparsity_pattern.h.
|
protected |
Array which hold for each row which is the first element in colnums belonging to that row. Note that the size of the array is one larger than the number of rows, because the last element is used for row
=rows, i.e. the row past the last used one. The value of rowstart[rows]} equals the index of the element past the end in colnums; this way, we are able to write loops like for (i=rowstart[k]; i<rowstart[k+1]; ++i)
also for the last row.
Note that the actual size of the allocated memory may be larger than the region that is used. The actual number of elements that was allocated is stored in max_dim.
Definition at line 785 of file sparsity_pattern.h.
|
protected |
Array of column numbers. In this array, we store for each non-zero element its column number. The column numbers for the elements in row r are stored within the index range rowstart[r]...rowstart[r+1]. Therefore to find out whether a given element (r,c) exists, we have to check whether the column number c exists in the above-mentioned range within this array. If it exists, say at position p within this array, the value of the respective element in the sparse matrix will also be at position p of the values array of that class.
At the beginning, all elements of this array are set to -1
indicating invalid (unused) column numbers (diagonal elements are preset if optimized storage is requested, though). Now, if nonzero elements are added, one column number in the row's respective range after the other is set to the column number of the added element. When compress is called, unused elements (indicated by column numbers -1
) are eliminated by copying the column number of subsequent rows and the column numbers within each row (with possible exception of the diagonal element) are sorted, such that finding whether an element exists and determining its position can be done by a binary search.
Definition at line 809 of file sparsity_pattern.h.
|
protected |
Store whether the compress() function was called for this object.
Definition at line 814 of file sparsity_pattern.h.
|
private |
Is special treatment of diagonals enabled?
Definition at line 1312 of file sparsity_pattern.h.
|
private |
Pointer to the user-supplied Epetra Trilinos mapping of the matrix columns that assigns parts of the matrix to the individual processes.
Definition at line 995 of file trilinos_sparsity_pattern.h.
|
private |
A sparsity pattern object in Trilinos to be used for finite element based problems which allows for adding non-local elements to the pattern.
Definition at line 1002 of file trilinos_sparsity_pattern.h.
|
private |
A sparsity pattern object for the non-local part of the sparsity pattern that is going to be sent to the owning processor. Only used when the particular constructor or reinit method with writable_rows argument is set
Definition at line 1010 of file trilinos_sparsity_pattern.h.
std::vector<entry_type>* GrowingVectorMemory< VectorType >::Pool::data |
Pointer to the storage object
Definition at line 435 of file vector_memory.h.
|
private |
Overall number of allocations. Only used for bookkeeping and to generate output at the end of an object's lifetime.
Definition at line 448 of file vector_memory.h.
|
private |
Number of vectors currently allocated in this object; used for detecting memory leaks.
Definition at line 454 of file vector_memory.h.
|
private |
A flag controlling the logging of statistics by the destructor.
Definition at line 459 of file vector_memory.h.
|
staticprivate |
Mutex to synchronize access to internal data of this object from multiple threads.
Definition at line 465 of file vector_memory.h.
|
friend |
Definition at line 1849 of file parameter_handler.h.
|
friend |
Definition at line 1072 of file block_matrix_base.h.
Definition at line 1075 of file block_matrix_base.h.
|
friend |
Typedef describing sparse matrices that consist of multiple blocks.
Typedef for the type used to describe sparse matrices that consist of multiple blocks.
Definition at line 385 of file block_sparsity_pattern.h.
|
friend |
Definition at line 405 of file block_vector_base.h.
|
friend |
Definition at line 966 of file block_vector_base.h.
Definition at line 969 of file block_vector_base.h.
Definition at line 1409 of file chunk_sparse_matrix.h.
|
friend |
Definition at line 1413 of file chunk_sparse_matrix.h.
|
friend |
Definition at line 1415 of file chunk_sparse_matrix.h.
|
friend |
Definition at line 857 of file chunk_sparsity_pattern.h.
|
friend |
Definition at line 860 of file chunk_sparsity_pattern.h.
|
friend |
Definition at line 759 of file petsc_sparse_matrix.h.
|
friend |
Definition at line 462 of file precondition_block.h.
|
friend |
Definition at line 616 of file precondition_block.h.
|
friend |
Definition at line 617 of file precondition_block.h.
Typedef for sparse matrix type used
Typedef for the sparse matrix type used.
Definition at line 1729 of file sparse_matrix.h.
Definition at line 1731 of file sparse_matrix.h.
Definition at line 1733 of file sparse_matrix.h.
Definition at line 1737 of file sparse_matrix.h.
|
friend |
Definition at line 1741 of file sparse_matrix.h.
|
friend |
Definition at line 1743 of file sparse_matrix.h.
|
friend |
Definition at line 239 of file sparse_matrix_ez.h.
|
friend |
Typedef for sparse matrix type used
Typedef for the sparse matrix type used.
Definition at line 818 of file sparsity_pattern.h.
|
friend |
Definition at line 820 of file sparsity_pattern.h.
|
friend |
Definition at line 822 of file sparsity_pattern.h.
|
friend |
Definition at line 824 of file sparsity_pattern.h.
|
friend |
Definition at line 826 of file sparsity_pattern.h.
|
friend |
Definition at line 827 of file sparsity_pattern.h.
|
friend |
Definition at line 830 of file sparsity_pattern.h.
|
friend |
Definition at line 831 of file sparsity_pattern.h.
|
friend |
Definition at line 832 of file sparsity_pattern.h.
|
friend |
Typedef for sparse matrix type used
Typedef for the sparse matrix type used.
Definition at line 1316 of file sparsity_pattern.h.
|
friend |
Definition at line 1318 of file sparsity_pattern.h.
|
friend |
Definition at line 1320 of file sparsity_pattern.h.
|
friend |
Definition at line 1322 of file sparsity_pattern.h.
|
friend |
Definition at line 1324 of file sparsity_pattern.h.
|
friend |
Definition at line 1325 of file sparsity_pattern.h.
|
friend |
Definition at line 1328 of file sparsity_pattern.h.
|
friend |
Definition at line 1329 of file sparsity_pattern.h.
|
friend |
Definition at line 1330 of file sparsity_pattern.h.
|
friend |
Definition at line 1012 of file trilinos_sparsity_pattern.h.
|
friend |
Definition at line 1013 of file trilinos_sparsity_pattern.h.
|
friend |
Definition at line 1014 of file trilinos_sparsity_pattern.h.
|
friend |