QuOc

 

Namespaces | Classes | Typedefs | Enumerations | Functions | Variables

aol Namespace Reference

Abstract Operator Library. See Module Documentation Code in the Abstract Operator Library. More...

Namespaces

namespace  color
 

table of ansi color codes


Classes

class  Obj
struct  ZTrait
struct  ZOTrait
struct  NumberTrait
struct  RealTrait
struct  RealTrait< double >
struct  RealTrait< long double >
struct  BitMaskFunctorTrue
struct  BitMaskFunctorFalse
struct  BitMaskFunctorIdentity
struct  BitMaskFunctorNegate
class  Format
class  SimpleFormat
class  MixedFormat
class  StopWatch
class  auto_container
struct  AssertAtCompileTime< true >
class  ArmijoLineSearchUsingOp
 The interface of searching based on Armijo rule. More...
class  GenBandMatrix
class  BandMatrix
class  TriBandMatrix
class  LQuadBandMatrix
class  RQuadBandMatrix
class  BaseFunctionSetInterface
class  BaseFunctionSetMultiLin
class  BaseFunctionSetMultiLin< RealType, qc::QC_1D, QuadRuleType >
 The basefunctionset for bilinear elements in 1d. More...
class  BaseFunctionSetMultiLin< RealType, qc::QC_2D, QuadRuleType >
 The basefunctionset for bilinear elements in 2d. More...
class  BaseFunctionSetMultiLin< RealType, qc::QC_3D, QuadRuleType >
 The basefunctionset for bilinear elements in 3d. More...
class  BaseFunctionSetMultiQuad
class  BaseFunctionSetMultiQuad< RealType, qc::QC_2D, QuadRuleType >
class  BaseFunctionSetMultiLinBubble
class  BaseFunctionSetMultiLinBubble< RealType, qc::QC_2D, QuadRuleType >
 The basefunctionset for bilinear elements in 2d. More...
class  GaussQuadrature
class  GaussQuadrature< _RealType, qc::QC_1D, 1 >
class  GaussQuadrature< _RealType, qc::QC_1D, 3 >
class  GaussQuadrature< _RealType, qc::QC_1D, 5 >
class  GaussQuadrature< _RealType, qc::QC_1D, 7 >
class  GaussQuadrature< _RealType, qc::QC_1D, 9 >
class  GaussQuadrature< _RealType, qc::QC_1D, 11 >
class  GaussQuadrature< _RealType, qc::QC_1D, 13 >
class  GaussQuadrature< _RealType, qc::QC_1D, 15 >
class  GaussQuadrature< _RealType, qc::QC_1D, 17 >
class  GaussQuadrature< _RealType, qc::QC_1D, 19 >
class  GaussQuadrature< _RealType, qc::QC_1D, 21 >
class  GaussQuadrature< _RealType, qc::QC_1D, 23 >
class  GaussQuadrature1D
class  GaussQuadrature< _RealType, qc::QC_2D, _Order >
class  GaussQuadrature< _RealType, qc::QC_3D, _Order >
class  TriangleIntegration
class  TriangleIntegration< RealType, qc::QC_2D, 1 >
 integration over a triangle: area * value at the center of gravity More...
class  TriangleIntegration< RealType, qc::QC_2D, 2 >
 integration over a triangle: area * (sum of weighted values at side middle points) More...
class  TriangleIntegration< RealType, qc::QC_3D, 0 >
 integration over a tetrahedron: test More...
class  TriangleIntegration< RealType, qc::QC_3D, 1 >
 center of mass integration over the six tetrahedra which are decomposition of a unit cube More...
class  BaseFunctionSetLinear
class  BaseFunctionSetLinear< RealType, qc::QC_2D, QuadRuleType >
 provides linear base functions for a regular triangulation (cross type: bisection of the rectangle from left bottom to right top) More...
class  BaseFunctionSetLinear< RealType, qc::QC_3D, QuadRuleType >
 The basefunctionset for linear elements in 3d. More...
class  BitVector
class  Bzipifstream
 Can be used like an ifstream, but supports on the fly bzip2 decompression using libbz2. More...
class  Bzipofstream
 Can be used like an ofstream, but supports on the fly bzip2 compression using libbz2. More...
class  HeavisideFunctionMassOp
class  HeavisideFunctionLumpedMassOp
class  HeavisideLevelsetLengthEnergy
class  VariationOfHeavisideLevelsetLengthEnergy
class  FirstPartOfFullVariationOfHeavisideLevelsetLengthEnergy
class  SecondPartOfFullVariationOfHeavisideLevelsetLengthEnergy
class  FullVariationOfHeavisideLevelsetLengthEnergy
class  HeavisideFENonlinIntegrationVectorInterface
class  OneMinusHeavisideFENonlinIntegrationVectorInterface
class  HeavisideAndOneMinusHFENonlinIntegrationVectorInterface
class  OneMinusHeavisideFENonlinOpInterface
class  HeavySideOneMinusHFENonlinOpInterface
class  HeavisideAndOneMinusHFENonlinDiffOpInterface
class  OneMinusHeavisideFENonlinVectorDiffOpInterface
class  OneMinusHeavisideIntegrateFEFunction
class  FullVariationOfOneMinusHeavisideIntegrateFEFunction
class  SquareFunction
class  IdentityFunction
 Heaviside function replacement to convert the Chan Vese model to the one of Chan Esedoglu Nikolova with exact penalty. More...
class  ArcTanHeavisideFunction
class  OneMinusArcTanHeavisideFunction
class  PolynomialHeavisideFunction
class  ClampedIdentityFunction
 Heaviside function replacement to convert the Chan Vese model to the one of Chan Esedoglu Nikolova. More...
class  ZeroOneIntervalPenaltyFunction
class  QuadraticZeroOneIntervalPenaltyFunction
class  CubicZeroOneIntervalPenaltyFunction
class  PointwiseConstraintPenaltyEnergy
class  VariationOfPointwiseConstraintPenaltyEnergy
class  SecondVariationOfPointwiseConstraintPenaltyEnergy
class  SecondVariationOfEsedogluSegmentationModelWithPenalty
class  PointwiseConstraintPenaltyEnergyMulti
class  VariationOfPointwiseConstraintPenaltyEnergyMulti
class  SecondVariationOfEsedogluSegmentationModelWithPenaltyMulti
class  PowerSetIterator
 Iterates over all possible vectors of length NumberOfComponents with component values of zero or one. More...
class  HeavisideFunctionProduct
 A helper class for Chan Vese with multiple levelset functions. More...
class  HeavisideProductFENonlinIntegrationVectorInterface
 Given n levelset functions and 2^n ops, this class calculates the sum over these ops, where the integrands of the ops are multiplied with the proper combination of heaviside functions of the levelset functions as needed in the Chan Vese model for more than two segments. The ops have to be derived from FENonlinIntegrationVectorInterface. More...
class  ChanVeseEnergyInterface
class  ChanVeseEnergyParameterDerivativeInterface
class  ChanVeseEnergyLevelsetDerivativeInterface
class  QuadraticCEMEnergySecondLevelsetDerivativeInterface
class  QuadraticCEMEnergyMixedSecondLevelsetDerivativeInterface
class  ChanVeseEnergyLevelsetPart
class  ClassicalChanVeseEnergyMulti
class  ClassicalChanVeseEnergyMultiPhiVariation
class  ClassicalChanVeseVectorEnergyMulti
class  ClassicalChanVeseVectorEnergyMultiPhiVariation
class  MultiLevelsetVolumes
class  MultiLevelsetWeightedVolumes
class  ClassicalChanVeseMeanValueUpdater
class  CholeskyBlockInverseOp
class  CholeskyBiBlockInverseOp
class  ConvergenceEstimator
 Administrates the storage of previous iterations' residuals and computation of convergence coefficents and order estimates. More...
class  CSR_Matrix
class  FunctorFromOp
class  CDQEnergyDerivativeOp
class  DQEnergyDerivativeOp
class  CDQEnergyGradientOp
class  SimpleDescent
class  ProjectingMetricDescent
class  RateIndependentDescent
class  DiscreteValueInterpolator
class  DiscreteFunctionInterface
class  DiscreteFunctionDefault
class  ComposedDiscreteFunctionInterface
class  DiscreteVectorFunction
class  DiscreteVectorFunctionDefault
class  OrderOp
 base class for ordering operators More...
class  HeapsortOp
 Ordering operator using heapsort. More...
class  EigenvectorOp
 Parent class of all eigenvector and -value computing operators. More...
class  DeflationEigenvectorOp
 Computes the leading eigenvalues and eigenvectors of a matrix. More...
class  JacobiEigenvectorOp
 Computes all eigenvalues, and all eigenvectors, of a symmetrix matrix. The template matrix class has to support set to every possible entry, thus full matrix classes are prefereable. More...
class  QLTridiagEigenvectorOp
 QL algorith with implicit shift. Determines eigenvalues (and eigenvectors, if desired) of a real symmetric tridiagonal matrix. More...
class  QREigenvectorOp
 Composition of QRGivensTridiag and QLTridiagEigenvectorOp. Computes eigenvalues by first producing tridiagonal form and then finding eigenvalues of this tridiagonal matrix. More...
class  MeanOp
 For a number of samples (e.g. vectors or matrices), this operator computes the arithmetic mean and (if desired) the input samples with the mean subtracted. More...
class  CovarianceMatrixOp
 For a number of samples (e.g. vectors or matrices) with zero mean, this operator computes the covariance matrix. If the mean is nonzero, then the method "applyForNonZeroMean" has to be used, which first subtracts the mean from all input samples. The dot product of the space has to be ptovided. More...
class  PCAOp
 Class for performing a principal component analysis on data of the type "aol::Vector" or "aol::MultiVector" (or any type providing the same class methods and fitting into a "aol::RandomAccessContainer"). The dot product used for the covariance matrix can be freely chosen. More...
class  EpsWriter
class  FEOpInterface
class  FELinOpInterface
 General Interface for efficient Finite Element operators for all types of meshes and basis functions. More...
class  FELinVectorOpInterface
 General Interface for efficient Finite Element operators for all types of meshes and vector-valued basis functions. More...
class  LumpedFELinOpInterface
class  provideVirtualGetCoeffClass
class  provideVirtualGetCoeffMatrixClass
class  FELinScalarWeightedMixedDiffInterface
 Provides a Finite-Element operators of the form $ \int_\Omega \partial_s \phi_i \partial_t \phi_j dx $. This class works in 2D and 3D and can be endowed with arbitrary quadrature rules. More...
class  FEOpMixedDerivative
class  FELinMatrixWeightedStiffInterface
class  FELinAsymMatrixWeightedStiffInterface
class  FELinScalarWeightedStiffInterface
class  FELinScalarWeightedMassInterface
class  FELinMatrixWeightedVectorMassInterface
class  LumpedMassOpInterface
 provides an easy interface to lumped mass matrices. Attention: works only for nodal basis Finite Elements! More...
class  FENonlinOpInterface
class  FENonlinEvaluationOpInterface
 Operator for evaluating a function on each element. More...
class  FENonlinVectorOpInterface
class  FENonlinDiffOpInterface
 General Interface. More...
class  FENonlinVectorDiffOpInterface
 General Interface for nonlinear first order FE-operators depending on x, which are locally assembled. only getNonlinearity has to be provided. not for operators depending on derivatives of the function, use FENonlinDiffOpInterface instead. The discrete operator is of the form

\[ [F(\Phi)]_i = \int_\Omega tr\left( f( x, \nabla \phi )^T \cdot \nabla \psi_i \right) dx \]

where $ \psi_i $ corresponds to the i-th basis function, $f:R^d\times R^{d,d} \to R^{d,d} $, which has to be implemented in getNonlinearity. More...

class  NonlinearCombinedDiffVectorOpInterface
 General Interface for nonlinear first order FE-operators depending on x, which are locally assembled. only getNonlinearity has to be provided. not for operators depending on derivatives of the function, use FENonlinDiffOpInterface instead. The discrete operator is of the form

\[ [F(\Phi)]_i = \int_\Omega tr\left( f( x, \nabla \phi )^T \cdot \nabla \psi_i \right) dx \]

where $ \psi_i $ corresponds to the i-th basis function, $ :R^d\times R^{d,d} \to R^{d,d} $, which has to be implemented in getNonlinearity. More...

class  FENonlinOpInterfaceWithMovedTestFunctions
class  StiffOp
class  WeightedStiffOp
class  MassOp
class  WeightedMassOp
class  SquaredWeightMassOp
class  SquaredDiffWeightMassOp
class  SquaredWeightStiffOp
class  LumpedMassOp
class  FENonlinIntegrationVectorInterface
class  FENonlinIntegrationVectorGeneralInterface
class  VectorFENonlinIntegrationVectorInterface
class  FENonlinIntegrationScalarInterface
 Interface to compute $\int_\Omega f(\phi,x) dx$,. More...
class  IntegrateFEFunction
class  FELinVectorWeightedSemiDiffInterface
class  ImageNormalSemiDiffOp
class  ImageGradientSemiDiffOp
class  FELinScalarWeightedSemiDiffInterface
class  WeightedSemiDiffOp
class  TensorStiffOp
 Operator for stiffness matrices of the form

\[ \int_\Omega w_1 \times w_2 \nabla u \cdot \nabla w dx \]

. More...

class  FE_L2Projection
class  GaussSeidelSweeper
class  GaussSeidelSelectiveSweeper
class  BlockGaussSeidelSweeper
class  BlockGaussSeidelSelectiveSweeper
class  Intersector
class  LineSegment
class  LineSegment< RealType, qc::QC_2D >
class  LineSegment< RealType, qc::QC_3D >
class  Plane
class  AlignedCube
class  AlignedQuad
class  Intersector< Plane< RealType >, Triangle< RealType > >
class  Intersector< LineSegment< RealType, qc::QC_2D >, LineSegment< RealType, qc::QC_2D > >
class  Intersector< LineSegment< RealType, qc::QC_3D >, LineSegment< RealType, qc::QC_3D > >
class  Intersector< AlignedCube< RealType >, Triangle< RealType > >
class  Intersector< AlignedQuad< RealType >, LineSegment< RealType, qc::QC_2D > >
class  Intersector< AlignedCube< RealType >, LineSegment< RealType, qc::QC_3D > >
class  PlotDataFileHandler
class  Plotter
class  EnergyDescentPlotter
class  GradientDescentBase
 The class of implementing the gradient descent searching. More...
class  QuocGradientDescent
class  GradientDescent
class  GradientDescent< ConfiguratorType, aol::MultiVector< typename ConfiguratorType::RealType > >
class  GradientDescent< ConfiguratorType, aol::Vector< typename ConfiguratorType::RealType > >
class  H1GradientDescent
class  GradientDescentWithAutomaticFilterWidth
class  GradientDescentWithAutomaticFilterWidth< ConfiguratorType, aol::MultiVector< typename ConfiguratorType::RealType >, GradientDescentType >
class  GradientDescentWithAutomaticFilterWidth< ConfiguratorType, aol::Vector< typename ConfiguratorType::RealType >, GradientDescentType >
class  GradientDescentComponentWiseTimestepControlled
class  L2GradientDescentDirichletBCs
class  GridlessGradientDescent
class  SemiImplicitGradientDescentHelper
class  SemiImplicitGradientDescentBase
class  SemiImplicitGradientDescent
class  SemiImplicitGradientDescent< ConfiguratorType, aol::MultiVector< typename ConfiguratorType::RealType >, MatrixType >
class  RecordedGradientDescent
class  SimpleGradientDescent
class  SimpleGradientDescent< ConfiguratorType, aol::MultiVector< typename ConfiguratorType::RealType > >
class  SimpleGradientDescent< ConfiguratorType, aol::Vector< typename ConfiguratorType::RealType > >
class  DifferentialQuotientTestBase
class  DifferentialQuotientTest
class  DifferentialQuotientTest< RealType, aol::MultiVector< RealType > >
class  DifferentialQuotientTest< RealType, aol::Vector< RealType > >
class  DescentDirValidator
class  ComposeWithNormSqrOp
class  ComposeWithNormSqrDerivOp
class  FirstDerivativeTester
class  SecondDerivativeTester
class  DerivativeValidatorBase
class  FirstDerivativeValidator
class  SecondDerivativeValidator
class  HashSet< qc::Element >
class  HashSet< qc::simplex::Element< qc::Element > >
class  TransparentIndexTranslationMatrix
 Wrapper for Matrices that are intended to work only on a small set of vector components. Small matrix is visible through the wrapper. More...
class  IndexTranslationMatrix
 Wrapper for Matrices that are intended to work only on a small set of vector components. In contrast to the behaviour of TransparentIndexTranslationMatrix, the underlying small matrix ist not visible. More...
class  InterruptableIterativeInfo
 Decorator for any IterativeInfo subclass that enables catching Ctrl-C pressures. More...
class  IterativeInfo
 Base class for SolverInfo and NewtonInfo. More...
class  MaskedOp
class  DofMask
class  MaskedVector
class  CastOp
class  GenSparseOp
class  MatrixAbstractBase
class  Matrix
 Abstract Matrix class. More...
class  PermutationMatrix
class  FullMatrix
class  SymmetricMatrix
 A class for symmetric matrices. More...
class  DiagonalMatrix
 A diagonal matrix class. More...
class  SparseBlockMatrix
class  BlockMatrix
class  LUInverse
class  QRInverse
class  QRInversePivot
class  GivensRotation
 one single Givens rotation More...
class  GivensRotations
class  QRGivensTridiag
 QR tridiagonalization of a matrix via Givens rotations Constructed with a symmetric full matrix A, it computes an orthogonal matrix Q such that Q^T A Q is tridiagonal. More...
class  MeshWithData
class  MultiStreambuf
 Output stream buffer that sends its content to multiple other stream buffers. More...
class  AdditionalOutputToFile
 Print cout and cerr not only to console (or whereever you have redirected it), but also to a file. More...
class  MultiVector
class  MultiDerivedVector
class  NewtonIterationBase
class  NewtonMinimizationBase
class  NewtonIteration
class  NewtonIteration< ConfiguratorType, aol::Vector< typename ConfiguratorType::RealType >, SecondDerivativeType >
class  NewtonIterationSparseBlockMatrix
class  QuasiNewtonIteration
class  QuasiNewtonIterationComponentWiseTimestepControlled
class  QuasiNewtonBFGS
class  NewtonInfo
 Collects all administrative infos about a Newton method. More...
class  Op
class  DiagonalBlockOp
class  BiOpBase
class  BiOpBase< Vector< RealType > >
class  BiOpBase< MultiVector< RealType > >
class  BiOp
class  LinCombOp
class  BlockOpBase
class  BlockOp
class  ABlockOp
class  CompositeOp
class  IdentityOp
class  NullOp
class  ConstOp
class  ScalarVecToScalarMVecOp
class  VecToMVecOp
class  DerivativeWrapper
class  NoiseOperator
class  DependOp
class  Composite_differentDim_Op
class  GenEnergyOp
class  MultiRestrOp
class  RestrOp
class  TensorOp
class  QuadraticFormOp
class  Variable
class  VariableField
class  ParameterParser
 A class for reading parameters from configuration files. More...
class  ipfstream
class  opfstream
class  DeleteFlagPointer
 This class lets you choose whether it is responsible for destroying the held object or not. More...
class  SphericalVec
 3d-vector in spherical coordinates More...
class  Polynom
class  DiagonalPreconditioner< aol::Vector< RealType > >
 A class for diagonally preconditioning matrices (and matrices only). More...
class  DiagonalPreconditioner< aol::MultiVector< RealType > >
 A class for diagonally preconditioning BlockMatrices. More...
class  GeometricScalingPreconditioner< aol::Vector< RealType > >
 A class for preconditioning matrices using geometric scaling (division by l2 norm of rows, cf. Gordon & Gordon, arXiv:0812.2769v2 [cs.MS]). More...
class  GeometricScalingPreconditioner< aol::MultiVector< RealType > >
 A class for preconditioning block matrices using geometric scaling (division by l2 norm of unblocked rows). More...
class  SSORPreconditioner< aol::Vector< RealType >, MatrixType >
 A class for preconditioning sparse matrices by SSOR. Represents for a given matrix $A$ and its decomposition $A=L+D+U$ into the lower triangular, diagonal, and upper triangular part the operator $\left(\frac{D}\omega+L\right)\frac\omega{2-\omega}D^{-1}\left(\frac{D}\omega+U\right)$, which is equivalent to computing one single SSOR iterate starting with the initial vector 0. Note, the SOR-iteration to solve the system $Ax=b$ is given by $\left(\frac{D}\omega+L\right)x^{m+1}=\frac{2-\omega}\omega Dx^m-\left(\frac{D}\omega+U\right)x^m+b$, the backward SOR-iteration by $\left(\frac{D}\omega+U\right)x^{m+1}=\frac{2-\omega}\omega Dx^m-\left(\frac{D}\omega+L\right)x^m+b$, and the SSOR-iteration by alternatingly applying the SOR-iteration first and then the backward SOR-iteration. More...
class  SSORPreconditioner< aol::MultiVector< RealType >, MatrixType >
 SSOR preconditioner for block matrices. Represents for a given matrix $A$ and its decomposition $A=L+D+U$ into the lower triangular, diagonal, and upper triangular part the operator $\left(\frac{D}\omega+L\right)\frac\omega{2-\omega}D^{-1}\left(\frac{D}\omega+U\right)$, which is equivalent to computing one single SSOR iterate starting with the initial vector 0. Note, the SOR-iteration to solve the system $Ax=b$ is given by $\left(\frac{D}\omega+L\right)x^{m+1}=\frac{2-\omega}\omega Dx^m-\left(\frac{D}\omega+U\right)x^m+b$, the backward SOR-iteration by $\left(\frac{D}\omega+U\right)x^{m+1}=\frac{2-\omega}\omega Dx^m-\left(\frac{D}\omega+L\right)x^m+b$, and the SSOR-iteration by alternatingly applying the SOR-iteration first and then the backward SOR-iteration. More...
class  GaussSeidelPreconditioner
class  ILU0Preconditioner
class  ILU0BlockPreconditioner
class  BlockDiagonalPreconditioner
 A class for block-diagonally preconditioning BlockMatrices with diagonal blocks all the same size and all set. More...
class  BlockGaussSeidelPreconditioner
class  BlockSSORPreconditioner
class  BusyBar
class  ProgressBar
class  Exception
class  IOException
class  PipeException
class  FileException
class  FileFormatException
class  FileDoesNotExistException
class  DicomImportException
class  TypeException
class  InconsistentDataException
class  ParameterException
class  DimensionMismatchException
class  ParameterRangeException
class  OutOfBoundsException
class  OutOfMemoryException
class  UnimplementedCodeException
class  OperationNotPermittedException
class  LogicException
class  ConcatJacobiMatrices
class  QRDecomposeGivensBase
class  QRDecomposeHouseholderMatrix
class  QRDecomposeModifiedGramSchmidt
class  RandomGenerator
class  RGBColorMap
class  RingBuffer
 Container that can overwrite its oldest item when inserting a new one. More...
class  RingBufferFrontInsertCapped
 Ring buffer that inserts in front, start with size zero and grows up to its initially given maximal size. More...
class  Row
class  SparseRow
class  DiagonalRow
class  IsoEnergyOp
 Computes $ \int | \nabla u |_{2,\delta} $, where arg=u. More...
class  VariationOfIsoEnergyOp
class  IsotropicMatrixStiffOp
class  IsotropicEnergy
 Computes the whole energy-functional. More...
class  VariationOfIsotropicROF
class  SecondVariationOfIsotropicROF
class  SimultaneouslyAssembledLinCombOp
class  Mat
class  Matrix22
class  Matrix33
class  Matrix44
class  Matrix33Symm
struct  MatDimTrait
struct  MatDimTrait< RealType, 2 >
struct  MatDimTrait< RealType, 3 >
class  Vec
class  Vec2
class  Vec3
class  BarCoord
class  BarCoord< 2, RealType >
class  BarCoord< 3, RealType >
struct  VecDimTrait
struct  VecDimTrait< DataType, 2 >
struct  VecDimTrait< DataType, 3 >
class  InverseOp
class  IterativeInverseOp
class  CGInverse
class  PCGInverse
 Preconditioned Conjugate Gradient solver. More...
class  BiCGInverse
 BiCG for nonsymmetric matrices. More...
class  PBiCGInverse
 Preconditioned BiCG. More...
class  PBiCGStabInverse
 BiCG-stab solver with preconditioning. More...
class  GMRESInverse
 computes the inverse by GMRES(m) algorithm. works on non-symmetric matrices, but is slower. More...
class  JacobiInverse
class  GaussSeidelInverse
class  SemiimplicitFixpointInverse
 Fixpoint iteration, untested. More...
class  SolutionStepSaver
class  ProjectEqConstrSolver
class  CGInverseProjectEqConstr
class  PCGInverseProjectEqConstr
class  SolverInfo
 Collects all administrative infos about an iterative linear solver. More...
class  GenSparseMatrix
class  SparseMatrix
class  RowEntryOp
class  Tensor
 Tensor of order n+1 if VecType is of order n. More...
class  Tensor222
class  Tensor2222
struct  ElasticTensor
 Elastic tensor. More...
class  TimestepSaver
class  StepSaverBase
class  Triangle
class  TriangMesh
class  MultiVectorWithConcatData
class  ConcatDataTrait
class  ConcatDataTrait< aol::Vector< DataType >, DataType >
class  ConcatDataTrait< aol::MultiVector< DataType >, DataType >
class  TrustRegionMethod
 Newton trust region method. More...
struct  OverflowTrait
class  Scalar
 this class is needed when you use operators with DestType = a scalar value More...
class  Vector
 A vector class. More...
class  RandomAccessContainer
class  VectorContainer
class  AMultiVector
class  ElementMask
class  ElementMask< GridType, ConfiguratorType, qc::QC_2D >
class  ElementMask< GridType, ConfiguratorType, qc::QC_3D >
class  AffineTransformation

Typedefs

typedef int avoid_namespace_collision

Enumerations

enum  RealTypeAlias { FLOAT, DOUBLE, LONG_DOUBLE }
 

defines aliasses for certain types, which can be used in algebraic computations

More...
enum  OverflowHandlingType { SCALE, CLIP, REFLECT, CLIP_THEN_SCALE }
enum  ExitStatus { SUCCESS, FAILURE }
enum  OperatorType { ONTHEFLY, ASSEMBLED }
enum  CopyFlag { FLAT_COPY, DEEP_COPY, STRUCT_COPY }
 

CopyFlag is for use with aol::Vector, qc::Array etc. and other structures in future ...

More...
enum  IncludeWriteMode {
  INCLUDE_INT_WRITE_INT, INCLUDE_BD_WRITE_INT, INCLUDE_ALL_WRITE_INT, INCLUDE_INT_WRITE_ALL,
  INCLUDE_ALL_WRITE_ALL, INCLUDE_WRITE_DEFAULT = INCLUDE_ALL_WRITE_ALL
}
 

IncludeWriteMode is for setting the correct masked matrix apply mode, when using Dirichlet bc.

More...
enum  Verbosity { AOL_QUIET, AOL_VERBOSE }
enum  GridGlobalIndexMode { QUOC_GRID_INDEX_MODE, DT_GRID_INDEX_MODE, QUOC_ADAPTIVEGRID_INDEX_MODE }
enum  LUMPED_MASS_OP_MODE { DO_NOT_INVERT, INVERT }
enum  GaussSeidelSweepingMode {
  GAUSS_SEIDEL_FORWARD, GAUSS_SEIDEL_SYMMETRIC, GAUSS_SEIDEL_RED_BLACK, GAUSS_SEIDEL_BACKWARD,
  GAUSS_SEIDEL_EVEN_ONLY, GAUSS_SEIDEL_ODD_ONLY, GAUSS_SEIDEL_ZEBRA2, GAUSS_SEIDEL_ZEBRA2_SYMMETRIC,
  GAUSS_SEIDEL_ZEBRA2_FORWARD, GAUSS_SEIDEL_ZEBRA2_BACKWARD
}
 

Modes for Gauss-Seidel row iterations: symmetric alternates between forward and backward, red-black is even-only and odd-only, zebra2 is first quarter, third quarter, second quarter, fourth quarter (for parallelization).

More...
enum  PROJ_TYPE { PT_INSIDE, P1, P2 }
enum  PlotOutFileType {
  GNUPLOT_PS, GNUPLOT_EPS, GNUPLOT_PNG, GNUPLOT_GIF,
  GNUPLOT_LATEX
}
enum  PlotStyle { GNUPLOT_LINE, GNUPLOT_VECTOR }
enum  DataSupp { VERTEX_DATA, FACE_DATA }
 

data can either belong to vertices or to faces

More...
enum  VectorSpec { VECTORS, NORMALS, TCOORDS }
enum  colorTrans {
  BLACK_TO_WHITE, WHITE_TO_BLACK, BLUE_TO_RED, HSV_BLUE_TO_RED,
  HSV_RED_TO_BLUE, TOPOGRAPHIC, UNDEFINED
}
enum  ASSEMBLE_GETCOEFF_OP_TYPE { SCALED_MASS_INT, SCALED_STIFF_INT }
enum  ASSEMBLE_GETCOEFFMATRIX_OP_TYPE { MATRIX_STIFF_INT }
enum  StoppingMode { STOPPING_UNSET, STOPPING_ABSOLUTE, STOPPING_RELATIVE_TO_INITIAL_RESIDUUM, STOPPING_RELATIVE_TO_RIGHT_HAND_SIDE }
enum  PLY_FORMAT { UD_PLY, STANFORD_PLY }

Functions

void assertAlert (string assertion, string file, int line, string message)
const chargetFileName (const char *FileNameWithPath)
string getBaseFileName (const string &FileNameWithPath)
bool fileNameEndsWith (const char *FileName, const char *Ending)
string getOutFileName (const string &inFile, bool fromEnd)
string strprintf (const char *format,...)
void checkNextLineOrString (istream &In, const char *ExpectedString, const bool Line)
unsigned int crc32 (const void *const ptr, const unsigned int size)
 Compute 32 bit checksum for size bytes of any kind of data.
void printSelfTestSuccessMessage (const string &message)
 for consistent output of successful selfTests (message should be 80 characters wide)
void printSelfTestFailureMessage (const string &message)
 for consistent output of failed selfTests (message should be 80 characters wide)
template<typename ProductType , typename FactorType >
bool productWillFit (const FactorType a, const FactorType b)
template<class T >
Min (T a, T b)
template<class T >
Min (T a, T b, T c)
template<class T >
Max (T a, T b)
template<class T >
Max (T a, T b, T c)
template<class T >
Clamp (T Value, T Min, T Max)
template<class T >
Sqr (T a)
template<class T >
Cub (T a)
template<class T >
Abs (T a)
template<>
unsigned int Abs (unsigned int a)
template<>
uint64_t Abs (uint64_t a)
template<typename T >
int Rint (const T A)
template<class T >
bool isNaN (T a)
template<class T >
bool isInf (T a)
template<class T >
bool isFinite (T a)
template<class T >
signum1at0 (T x)
 Signum function template, attention: signum1at0 ( 0 ) = 1.
template<class T >
signum (T x)
 Signum function template, signum ( 0 ) = 0.
template<class T >
DegreesToRadians (T a)
template<class T >
RadiansToDegrees (T a)
template<class RealType >
RealType Erf (const RealType x)
int Pow (int Base, int Exponent)
 Calculates (Base)^(Exponent), where Base is an integer and Exponent a non negative integer.
template<class DataType >
void readbinary (istream &is, DataType &data)
 Binary input from stream, nothing is done about byte order.
template<class DataType >
void writebinary (ostream &os, const DataType &data)
 Binary output to stream, nothing is done about byte order.
template<typename InDataType , typename OutDataType >
void readBinaryData (istream &In, OutDataType *Dest, const int Length)
template<typename InDataType , typename OutDataType >
OutDataType readBinaryData (istream &In)
template<class DataType >
ostream & operator<< (ostream &os, const std::vector< DataType > vec)
 STL vector output.
template<class DataType >
bool appeq (DataType a, DataType b)
 Approximate equality for floating point numbers.
template<class DataType >
bool appgeq (DataType a, DataType b)
 Approximate greater-equal (even e tiny bit smaller is OK) for floating point numbers.
template<class DataType >
bool appleq (DataType a, DataType b)
 Approximate lesser-equal (even e tiny bit larger is OK) for floating point numbers.
template<class T >
void to_string (string &result, const T &t)
template<class T >
string to_string (const T &t)
template<class out_type , class in_value >
out_type convert (const in_value &t)
template<typename anything >
void doNothingWithArgumentToPreventUnusedParameterWarning (const anything &)
template<typename RealType , typename HeavisideFunctionType >
void consistencyCheckOfHeavisideFuntion (HeavisideFunctionType &H)
template<typename RealType >
void checkMultiChanVeseStructure (const aol::MultiVector< RealType > &LevelsetfunctionsAndParameters, const int NumberOfLevelsetFunctions, const int NumberOfAdditionalVectors=0)
const std::complex< doubleI (0, 1)
 Mathematical constant i.
template<class TypeA , class TypeB >
std::complex< TypeB > operator* (TypeA a, std::complex< TypeB > b)
 Allows int * complex<double>
template<class TypeA , class TypeB >
std::complex< TypeA > operator* (std::complex< TypeA > a, TypeB b)
 Allows complex<double> * int.
template<class TypeA , class TypeB >
std::complex< TypeB > operator+ (TypeA a, std::complex< TypeB > b)
 Allows int + complex<double>
template<class TypeA , class TypeB >
std::complex< TypeA > operator+ (std::complex< TypeA > a, TypeB b)
 Allows complex<double> + int.
template<class TypeA , class TypeB >
std::complex< TypeB > operator- (TypeA a, std::complex< TypeB > b)
 Allows int - complex<double>
template<class TypeA , class TypeB >
std::complex< TypeA > operator- (std::complex< TypeA > a, TypeB b)
 Allows complex<double> - int.
template<class TypeA , class TypeB >
std::complex< TypeB > operator/ (TypeA a, std::complex< TypeB > b)
 Allows int / complex<double>
template<class TypeA , class TypeB >
std::complex< TypeA > operator/ (std::complex< TypeA > a, TypeB b)
 Allows complex<double> / int.
void ctrlCHandler (int sig)
bool getCtrlCState ()
void resetCtrlCState ()
bool askForAction (string action, string color=aol::color::error)
 Prints "[action (y/n, Ctrl-C to terminate)? " in the given color.
template<typename RealType , typename FunctorType >
RealType findOptimumByBisection (const FunctorType &scalarOp, RealType posMin, RealType posMax, RealType TOL=1E-4)
template<typename RealType , typename FunctorType >
RealType findRootByBisection (const FunctorType &scalarOp, RealType posMin, RealType posMax, RealType TOL=1E-4)
template<typename MatrixType , typename RealType >
RealType computeConditionNumberByVectorIteration (const MatrixType &mat, const RealType symmetryThreshold=aol::NumberTrait< RealType >::zero, const bool randomize=false)
template<typename RealType , int Dim>
void CartesianToHomogeneousCoordinates (const aol::Vec< Dim, RealType > &arg, aol::Vec< Dim+1, RealType > &dest)
 Conversion from Cartesian to homogeneous coordinates (copy entries and write 1 to last component).
template<typename RealType , int Dim>
void HomogeneousToCartesianCoordinates (const aol::Vec< Dim+1, RealType > &arg, aol::Vec< Dim, RealType > &dest)
 Conversion from homogeneous to Cartesian coordinates (division by last component).
template<typename RealType , int Dim>
void TransformCartesianCoordinatesByHomogeneousMapping (const aol::Vec< Dim, RealType > &arg, const aol::Mat< Dim+1, Dim+1, RealType > &transMat, aol::Vec< Dim, RealType > &dest)
 perform a transformation given for homoegeneous coordinates to vectors in Cartesian coordinates
void runGnuplot (const char *GnuplotCommandFileName)
template<typename VecType , typename RealType >
void testFirstDerivative (const VecType &Position, const aol::Op< VecType, aol::Scalar< RealType > > &E, const aol::Op< VecType > &DE, const VecType &Direction, const char *BasePlotFileName, const RealType StepSize=0.0001)
template<typename ConfiguratorType >
void testFirstDerivativeVector (const typename ConfiguratorType::InitType &Grid, const aol::Vector< typename ConfiguratorType::RealType > &Position, const aol::Op< aol::Vector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &E, const aol::Op< aol::Vector< typename ConfiguratorType::RealType > > &DE, const aol::Vector< typename ConfiguratorType::RealType > &Direction, const char *BasePlotFileName, typename ConfiguratorType::RealType StepSize=0.0001)
template<typename ConfiguratorType >
void testFirstDerivativeVector (const typename ConfiguratorType::InitType &Grid, const aol::Vector< typename ConfiguratorType::RealType > &Position, const aol::Op< aol::Vector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &E, const aol::Vector< typename ConfiguratorType::RealType > &DE, const char *BasePlotFileName, typename ConfiguratorType::RealType StepSize=0.0001)
template<typename ConfiguratorType >
void testFirstDerivativeVector (const typename ConfiguratorType::InitType &Grid, const aol::Vector< typename ConfiguratorType::RealType > &Position, const aol::Op< aol::Vector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &E, const aol::Op< aol::Vector< typename ConfiguratorType::RealType > > &DE, const char *BasePlotFileName, typename ConfiguratorType::RealType StepSize=0.0001)
template<typename ConfiguratorType >
void testFirstDerivativeVectorAllDirections (const typename ConfiguratorType::InitType &Grid, const aol::Vector< typename ConfiguratorType::RealType > &Position, const aol::Op< aol::Vector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &E, const aol::Op< aol::Vector< typename ConfiguratorType::RealType > > &DE, const char *BasePlotFileName, typename ConfiguratorType::RealType StepSize=0.0001)
template<typename ConfiguratorType >
void testFirstDerivativeMultiVector (const typename ConfiguratorType::InitType &Grid, const aol::MultiVector< typename ConfiguratorType::RealType > &Position, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &E, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &DE, const aol::MultiVector< typename ConfiguratorType::RealType > &Direction, const char *BasePlotFileName, typename ConfiguratorType::RealType StepSize=0.0001)
template<typename ConfiguratorType >
void testFirstDerivativeMultiVector (const typename ConfiguratorType::InitType &Grid, const aol::MultiVector< typename ConfiguratorType::RealType > &Position, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &E, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &DE, const char *BasePlotFileName, typename ConfiguratorType::RealType StepSize=0.0001)
template<typename ConfiguratorType >
void testFirstDerivativeMultiVectorAllDirections (const typename ConfiguratorType::InitType &Grid, const aol::MultiVector< typename ConfiguratorType::RealType > &Position, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &E, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &DE, const char *BasePlotFileName, typename ConfiguratorType::RealType StepSize=0.0001)
template<typename ConfiguratorType >
void testFirstDerivativeMultiVectorSingleComponentAllDirections (const typename ConfiguratorType::InitType &Grid, const aol::MultiVector< typename ConfiguratorType::RealType > &Position, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &E, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &DE, const int Component, const char *BasePlotFileName, typename ConfiguratorType::RealType StepSize=0.0001)
template<typename ConfiguratorType , typename SecondDerivativeType >
void testSecondDerivativeVector (const typename ConfiguratorType::InitType &Grid, const aol::Vector< typename ConfiguratorType::RealType > &Position, const aol::Vector< typename ConfiguratorType::RealType > &Direction, const aol::Op< aol::Vector< typename ConfiguratorType::RealType > > &F, const aol::Op< aol::Vector< typename ConfiguratorType::RealType >, SecondDerivativeType > &DF, const char *BasePlotFileName)
template<typename ConfiguratorType , typename SecondDerivativeType >
void testSecondDerivativeMultiVector (const typename ConfiguratorType::InitType &Grid, const aol::MultiVector< typename ConfiguratorType::RealType > &Position, const aol::MultiVector< typename ConfiguratorType::RealType > &Direction, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &F, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, SecondDerivativeType > &DF, const char *BasePlotFileName, SecondDerivativeType *PMatDF=new SecondDerivativeType(ConfiguratorType::Dim, ConfiguratorType::Dim), typename ConfiguratorType::RealType StepSize=0.0001, const bool DeleteMatrixPointer=true)
template<typename ConfiguratorType , typename SecondDerivativeType >
void testSecondDerivativeMultiVectorAllDirections (const typename ConfiguratorType::InitType &Grid, const aol::MultiVector< typename ConfiguratorType::RealType > &Position, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &F, const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, SecondDerivativeType > &DF, const char *BasePlotFileName, SecondDerivativeType *PMatDF=new SecondDerivativeType(ConfiguratorType::Dim, ConfiguratorType::Dim), typename ConfiguratorType::RealType StepSize=0.0001, const bool DeleteMatrixPointer=true)
template<typename MatrixType , typename DataType >
void transposeAToB (const MatrixType &A, MatrixType &B)
template<typename MatrixType , typename DataType >
int maxNumNonZeroesPerRow (const MatrixType &A)
template<typename MatrixType , typename DataType >
ostream & printSparseOctave (const MatrixType &A, ostream &os)
template<typename MatrixType , typename DataType >
void computeConditionNumberViaOctave (const MatrixType &Mat, const bool CalcTime=false)
template<typename MatrixType , typename DataType >
bool checkForNANsAndINFs (const MatrixType &A)
template<typename MatrixType >
bool checkForNANsAndINFsInFullMatrix (const MatrixType &A)
template<typename OpType1 , typename OpType2 , typename RealType >
RealType rowwiseOpLinfDifference (const OpType1 &Op1, const OpType2 &Op2, const int NumRows)
template<typename MatrixType , typename DataType >
bool isMatrixSymmetric (const MatrixType &A, const DataType thres=aol::NumberTrait< DataType >::zero)
template<class _DataType >
ostream & operator<< (ostream &os, const Matrix< _DataType > &m)
 Should be replaced by template from surfmesh/generalstuff.h.
template<class _DataType >
istream & operator>> (istream &is, Matrix< _DataType > &m)
template<class DataType >
void computeReflection (Vector< DataType > &normal, DataType &alpha)
template<class MatrixType >
void readReflection (MatrixType &decomp, const Vector< typename MatrixType::DataType > &lengths, int i, Vector< typename MatrixType::DataType > &normal, typename MatrixType::DataType &alpha, int offset=0)
template<class MatrixType >
void writeReflection (MatrixType &decomp, Vector< typename MatrixType::DataType > &lengths, int i, const Vector< typename MatrixType::DataType > &normal, typename MatrixType::DataType alpha)
 Stores reflection in matrix.
template<class DataType >
void doReflection (Vector< DataType > &arg, const Vector< DataType > &normal, DataType alpha)
 Reflect one vector according to paramters.
template<class DataType >
void doReflectionVector (Vector< DataType > &arg, const Vector< DataType > &normal, DataType alpha)
 Reflect the end part of one vector according to paramters.
template<class MatrixType >
void doReflectionColumn (MatrixType &arg, int c, const Vector< typename MatrixType::DataType > &normal, typename MatrixType::DataType alpha)
 Reflect the end part of one matrix column according to paramters.
template<class MatrixType >
void doReflectionRow (MatrixType &arg, int r, const Vector< typename MatrixType::DataType > &normal, typename MatrixType::DataType alpha)
template<class DataType >
void computeRotationSubdiagonal (GivensRotations< DataType > &rotations, Vector< DataType > diags[], int col)
 Rotate subdiagonal.
template<class DataType >
void doRotationSubdiagonal (GivensRotations< DataType > &rotations, Vector< DataType > diags[], int col, int offset)
 Rotate subdiagonal.
template<class MatrixType >
void writeReflection (MatrixType &decomp, Vector< typename MatrixType::DataType > &lengths, int i, Vector< typename MatrixType::DataType > &normal, typename MatrixType::DataType &alpha)
template<class DataType >
void computeRotationSubdiagonal (GivensRotations< DataType > &, int, DataType dval, DataType sdval, DataType &s, DataType &c)
template<class DataType >
void doRotationSubdiagonal (GivensRotations< DataType > &rotations, Vector< DataType > diags[], int col)
template<typename DataType >
istream & operator>> (istream &is, MultiVector< DataType > &MVec)
 Read MultiVector from istream.
template<typename DataType >
ostream & operator<< (ostream &os, const MultiVector< DataType > &MVec)
 Write MultiVector to ostream.
template<class RealType >
bool compareOps (const aol::Op< aol::Vector< RealType > > &Op1, const aol::Op< aol::Vector< RealType > > &Op2, int ArgSize, int DestSize, RealType tolerance=0.0)
 Compares two operators and checks whether they produce the same result up to a given tolerance.
template<class RealType >
RealType distanceOfOps (const aol::Op< aol::Vector< RealType > > &Op1, const aol::Op< aol::Vector< RealType > > &Op2, int ArgSize, int DestSize)
 1-Operatornorm of difference
template<class T >
ostream & operator<< (ostream &out, const RestrOp< T > &op)
void convertFilenameToUnixStyle (char *CurrentDirectoryName)
void makeDirectory (const char *DirectoryName)
void generateTemporaryFile (char *TempFileName, ofstream &TempFileStream)
void getCurrentDirectoryUnixStyle (char *CurrentDirectoryName, const int MaxNameLength=128)
 Returns the current working directory with slashes as seperators between subdirectories.
void setCurrentDirectory (string dir)
bool isDirEntDirectory (dirent *Entry)
void createDirectoryListing (const char *Dir, std::vector< std::string > &DirList, const bool IncludeDirectories)
bool fileExists (string filename)
void callSystemPauseIfNecessaryOnPlatform ()
 Calls system( "PAUSE" ), if called on a platform where the output window is automatically closed on exit (MinGW for example).
void getWallClockTime (time_t &Seconds, unsigned short &Miliseconds)
 Writes the current wall clock time in seconds to Seconds and the miliseconds part to Miliseconds.
double getRuntimeSoFar ()
 Returns the current runtime in seconds as double.
long int memusage ()
 Returns number of bytes used by program.
int vscprintf (const char *format, va_list ap)
bool isErfTestOK ()
void * aligned_memory_allocation (const size_t MemorySize, const size_t Alignment)
void aligned_memory_deallocation (void *Pointer)
void generateTemporaryFile (char *TempFileName, std::ofstream &TempFileStream)
void setCurrentDirectory (std::string dir)
bool fileExists (std::string filename)
 Test for file existence.
template<int _screenWidth, int _fullLength, char _leftBrace, char _rightBrace, char _empty, char _full>
std::ostream & operator<< (std::ostream &out, const BusyBar< _screenWidth, _fullLength, _leftBrace, _rightBrace, _empty, _full > &bb)
template<bool _showPercentage, bool _showBar, typename TYPE , int _screenWidth, char _leftBrace, char _rightBrace, char _empty, char _full>
std::ostream & operator<< (std::ostream &out, const ProgressBar< _showPercentage, _showBar, TYPE, _screenWidth, _leftBrace, _rightBrace, _empty, _full > &pb)
void catchGlobal ()
template<int N, typename _DataType >
void inplaceTranspose (aol::Mat< N, N, _DataType > &mat)
 transpose symmetrix Mat<N,N, _DataType> to itself (in place)
template<int numRows, int numCols, class T >
ostream & operator<< (ostream &os, const Mat< numRows, numCols, T > &m)
template<int numRows, int numCols, class T >
istream & operator>> (istream &is, Mat< numRows, numCols, T > &m)
template<class T >
ostream & operator<< (ostream &os, const Matrix33Symm< T > &m)
template<int dimension, typename _DataType >
Vec< dimension, _DataType > operator* (const _DataType alpha, const Vec< dimension, _DataType > &vec)
 left-multiplication scalar * Vec
template<int dimension, typename _DataType >
_DataType euclidianDist (const Vec< dimension, _DataType > &vec1, const Vec< dimension, _DataType > &vec2)
 Euclidian distance of two points, i. e. norm of the difference of two Vecs.
template<typename _DataType >
Vec2< _DataType > operator* (const _DataType alpha, const Vec2< _DataType > &vec)
 left-multiplication scalar * Vec2
template<typename _DataType >
Vec3< _DataType > operator* (const _DataType alpha, const Vec3< _DataType > &vec)
 left-multiplication scalar * Vec3
template<int dim, class T >
ostream & operator<< (ostream &os, const Vec< dim, T > &v)
template<class T >
ostream & operator<< (ostream &os, const Vec2< T > &v)
template<int dim, class T >
istream & operator>> (istream &is, Vec< dim, T > &v)
template<class T >
istream & operator>> (istream &is, Vec2< T > &v)
template<class T >
ostream & operator<< (ostream &os, const Vec3< T > &v)
template<class T >
istream & operator>> (istream &is, Vec3< T > &v)
template<int dimension, typename DataType >
aol::Vec< dimension, DataTypeCompWiseMin (const aol::Vec< dimension, DataType > &vecA, const aol::Vec< dimension, DataType > &vecB)
 return component-wise minimum of two aol::Vec<dimension,DataType>
template<int dimension, typename DataType >
aol::Vec< dimension, DataTypeCompWiseMax (const aol::Vec< dimension, DataType > &vecA, const aol::Vec< dimension, DataType > &vecB)
 return component-wise maximum of two aol::Vec<dimension,DataType>
template<typename RealType >
void solveRTransposedR (FullMatrix< RealType > &R, const aol::Vector< RealType > &RHS, aol::Vector< RealType > &X)
template<class DataType >
ostream & operator<< (ostream &os, const Tensor222< DataType > &t)
template<class DataType >
ostream & operator<< (ostream &os, const Tensor2222< DataType > &t)
template<class DataType >
istream & operator>> (istream &is, ElasticTensor< DataType > &green)
template<typename T >
bool operator== (const vector< T > &arg1, const Vector< T > &arg2)
 operator: vector == Vector
template<typename T >
bool operator== (const Vector< T > &arg1, const vector< T > &arg2)
 operator: Vector == vector
template<typename T >
bool operator!= (const vector< T > &arg1, const Vector< T > &arg2)
 operator: vector != Vector
template<typename T >
bool operator!= (const Vector< T > &arg1, const vector< T > &arg2)
 operator: Vector != vector
template<typename DataType >
istream & operator>> (istream &is, Vector< DataType > &vec)
 Read Vector from istream.
template<typename DataType >
ostream & operator<< (ostream &os, const Vector< DataType > &vec)
 Write Vector to ostream.

Variables

aol::SimpleFormat scientificFormat (17, 10, ios::scientific|ios::left|ios::showpos)
aol::SimpleFormat longScientificFormat (25, 17, ios::scientific|ios::left|ios::showpos)
aol::SimpleFormat shortFormat (6, 2, ios::fixed|ios::left|ios::showpos)
aol::SimpleFormat intFormat (4, 0, ios::fixed|ios::right)
aol::SimpleFormat longIntFormat (8, 0, ios::fixed|ios::right)
aol::SimpleFormat fillFormat (6, 0, ios::fixed|ios::right, '0')
aol::MixedFormat mixedFormat (3, 6)
aol::MixedFormat detailedFormat (8, 12)
static bool ctrlC_pressed = false

Detailed Description

Abstract Operator Library. See Module Documentation Code in the Abstract Operator Library.


Typedef Documentation

Definition at line 725 of file aol.h.


Enumeration Type Documentation

This operator stores a linear combination of different operators. The difference to to the LinCombOp is that the mesh is traversed only once. For each element of the mesh all operators are evaluated. Hence the SimultaneouslyAssembledLinCombOp shows up with a lot of different possibilities for the evaluation of FE-basis-functions (mass, stiffness, matrix-stiffness etc.). This operator is useful if a traverse of the mesh is expensive (like in the RLE- datastructure by Michael Nielsen).

Author:
Nemitz
Enumerator:
SCALED_MASS_INT 
SCALED_STIFF_INT 

Definition at line 36 of file simultaneouslyAssembled.h.

                               {
  SCALED_MASS_INT,
  SCALED_STIFF_INT
};

Enumerator:
MATRIX_STIFF_INT 

Definition at line 41 of file simultaneouslyAssembled.h.

Routines associated with color mapping

  • Mapping from scalar values in range [Min, Max] to three-channel color with predefined color maps
  • rgb to hsv
  • hsv to rgb
  • rgb color string
Author:
Schwen
Enumerator:
BLACK_TO_WHITE 
WHITE_TO_BLACK 
BLUE_TO_RED 
HSV_BLUE_TO_RED 
HSV_RED_TO_BLUE 
TOPOGRAPHIC 
UNDEFINED 

Definition at line 29 of file rgbColorMap.h.

                { BLACK_TO_WHITE,
      WHITE_TO_BLACK,
      BLUE_TO_RED,
      HSV_BLUE_TO_RED,
      HSV_RED_TO_BLUE,
      TOPOGRAPHIC,
      UNDEFINED };

CopyFlag is for use with aol::Vector, qc::Array etc. and other structures in future ...

Enumerator:
FLAT_COPY 
DEEP_COPY 
STRUCT_COPY 

Definition at line 156 of file aol.h.

              { 
  FLAT_COPY,      // flat or shallow copy: same data pointer
  DEEP_COPY,      // deep copy: copy data
  STRUCT_COPY     // copy structure of (Multi)Vector or other block structures
};

data can either belong to vertices or to faces

Enumerator:
VERTEX_DATA 
FACE_DATA 

Definition at line 20 of file meshWithData.h.

{ VERTEX_DATA, FACE_DATA };

Enumerator:
SUCCESS 
FAILURE 

Definition at line 145 of file aol.h.

                {
  SUCCESS,
  FAILURE
};

Modes for Gauss-Seidel row iterations: symmetric alternates between forward and backward, red-black is even-only and odd-only, zebra2 is first quarter, third quarter, second quarter, fourth quarter (for parallelization).

Enumerator:
GAUSS_SEIDEL_FORWARD 
GAUSS_SEIDEL_SYMMETRIC 
GAUSS_SEIDEL_RED_BLACK 
GAUSS_SEIDEL_BACKWARD 
GAUSS_SEIDEL_EVEN_ONLY 
GAUSS_SEIDEL_ODD_ONLY 
GAUSS_SEIDEL_ZEBRA2 
GAUSS_SEIDEL_ZEBRA2_SYMMETRIC 
GAUSS_SEIDEL_ZEBRA2_FORWARD 
GAUSS_SEIDEL_ZEBRA2_BACKWARD 

Definition at line 23 of file GaussSeidel.h.

                             { GAUSS_SEIDEL_FORWARD,
                               GAUSS_SEIDEL_SYMMETRIC,
                               GAUSS_SEIDEL_RED_BLACK,
                               GAUSS_SEIDEL_BACKWARD,
                               GAUSS_SEIDEL_EVEN_ONLY, 
                               GAUSS_SEIDEL_ODD_ONLY,
                               GAUSS_SEIDEL_ZEBRA2,
                               GAUSS_SEIDEL_ZEBRA2_SYMMETRIC,
                               GAUSS_SEIDEL_ZEBRA2_FORWARD, 
                               GAUSS_SEIDEL_ZEBRA2_BACKWARD };

Enumerator:
QUOC_GRID_INDEX_MODE 
DT_GRID_INDEX_MODE 
QUOC_ADAPTIVEGRID_INDEX_MODE 

Definition at line 177 of file aol.h.

                         {
  QUOC_GRID_INDEX_MODE,
  DT_GRID_INDEX_MODE,
  QUOC_ADAPTIVEGRID_INDEX_MODE
};

IncludeWriteMode is for setting the correct masked matrix apply mode, when using Dirichlet bc.

Enumerator:
INCLUDE_INT_WRITE_INT 
INCLUDE_BD_WRITE_INT 
INCLUDE_ALL_WRITE_INT 
INCLUDE_INT_WRITE_ALL 
INCLUDE_ALL_WRITE_ALL 
INCLUDE_WRITE_DEFAULT 

Definition at line 163 of file aol.h.

                      { 
  INCLUDE_INT_WRITE_INT,    // include only interior nodes and write only to rows of inner nodes
  INCLUDE_BD_WRITE_INT,     // include only boundary nodes and write only to rows of inner nodes
  INCLUDE_ALL_WRITE_INT,    // include all nodes and write only to rows of inner nodes
  INCLUDE_INT_WRITE_ALL,    // include only interior nodes and write to all rows
  INCLUDE_ALL_WRITE_ALL,    // include all nodes and write to all rows (default case, see below)
  INCLUDE_WRITE_DEFAULT = INCLUDE_ALL_WRITE_ALL
};

Enumerator:
DO_NOT_INVERT 
INVERT 

Definition at line 771 of file FEOpInterface.h.

                         {
  DO_NOT_INVERT,
  INVERT
};

Enumerator:
ONTHEFLY 
ASSEMBLED 

Definition at line 150 of file aol.h.

                  {
  ONTHEFLY, 
  ASSEMBLED
};

Possible handling types for overflows.

See also:
ScalarArray<QC_2D>::save()
Enumerator:
SCALE 
CLIP 
REFLECT 
CLIP_THEN_SCALE 

Definition at line 138 of file aol.h.

                          {
  SCALE,
  CLIP,
  REFLECT,
  CLIP_THEN_SCALE
};

Enumerator:
GNUPLOT_PS 
GNUPLOT_EPS 
GNUPLOT_PNG 
GNUPLOT_GIF 
GNUPLOT_LATEX 

Definition at line 19 of file gnuplotter.h.

                     {
  GNUPLOT_PS,
  GNUPLOT_EPS,
  GNUPLOT_PNG,
  GNUPLOT_GIF,
  GNUPLOT_LATEX
};

Enumerator:
GNUPLOT_LINE 
GNUPLOT_VECTOR 

Definition at line 27 of file gnuplotter.h.

               {
  GNUPLOT_LINE,
  GNUPLOT_VECTOR
};

Enumerator:
UD_PLY 
STANFORD_PLY 

Definition at line 24 of file triangMesh.h.

{ UD_PLY, STANFORD_PLY };

Enumerator:
PT_INSIDE 
P1 
P2 

Definition at line 21 of file geom.h.

               {
  PT_INSIDE, P1, P2
};

defines aliasses for certain types, which can be used in algebraic computations

Enumerator:
FLOAT 
DOUBLE 
LONG_DOUBLE 

Definition at line 99 of file aol.h.

                   {
  FLOAT,
  DOUBLE,
  LONG_DOUBLE
};

Type of stopping criterion used in IterativeInverseOps, residual is usually measured in (l_2-norm)^2

Enumerator:
STOPPING_UNSET 

Behaves as STOPPING_ABSOLUTE but gives a warning.

STOPPING_ABSOLUTE 

Stop if $ |r_n|^2 < TOL $.

STOPPING_RELATIVE_TO_INITIAL_RESIDUUM 

Stop if $ |r_n|^2 / |r_0|^2 < TOL $.

STOPPING_RELATIVE_TO_RIGHT_HAND_SIDE 

Stop if $ |r_n|^2 / |b|^2 < TOL $.

Definition at line 21 of file solverInfo.h.

                  {
  STOPPING_UNSET,                         //!< Behaves as STOPPING_ABSOLUTE but gives a warning
  STOPPING_ABSOLUTE,                      //!< Stop if \f$ |r_n|^2 < TOL \f$
  STOPPING_RELATIVE_TO_INITIAL_RESIDUUM,  //!< Stop if \f$ |r_n|^2 / |r_0|^2 < TOL \f$
  STOPPING_RELATIVE_TO_RIGHT_HAND_SIDE    //!< Stop if \f$ |r_n|^2 / |b|^2 < TOL \f$
};

vector-valued data can be saved (in VTK legacy format) as 3-vectors, normals or texture coordinates (the file format also supports color scalars and lookup tables, which we will not use). PLY saving does not respect this property.

Enumerator:
VECTORS 
NORMALS 
TCOORDS 

Definition at line 25 of file meshWithData.h.

{ VECTORS, NORMALS, TCOORDS };

Enumerator:
AOL_QUIET 
AOL_VERBOSE 

Definition at line 172 of file aol.h.

               {
  AOL_QUIET,
  AOL_VERBOSE    // else conflict with -DVERBOSE
};


Function Documentation

template<class T >
T aol::Abs ( a  )  [inline]

Returns absolute value of a

Definition at line 207 of file aol.h.

Referenced by aol::TrustRegionMethod< _RealType, _VectorType, _SecondDerivativeType, _PrecondType, SubMatrixType >::apply(), aol::SSORPreconditioner< aol::Vector< RealType >, MatrixType >::apply(), aol::SimpleGradientDescent< ConfiguratorType, aol::Vector< typename ConfiguratorType::RealType > >::apply(), aol::SimpleGradientDescent< ConfiguratorType, aol::MultiVector< typename ConfiguratorType::RealType > >::apply(), qc::DistanceSweeper3d< DataType, LocalBitArrayType, LocalDistanceArrayType, _GridType >::calcCoords_yzw(), qc::DistanceSweeper3d< DataType, LocalBitArrayType, LocalDistanceArrayType, _GridType >::choose_yzw(), qc::DistanceSweeper2d< DataType >::computeDistances(), aol::TrustRegionMethod< _RealType, _VectorType, _SecondDerivativeType, _PrecondType, SubMatrixType >::computeGershgorinEstimates(), eik::Eikonal< RealType >::createElementLowLeft(), eik::Eikonal< RealType >::createElementLowRight(), eik::Eikonal< RealType >::createElementUpLeft(), eik::Eikonal< RealType >::createElementUpRight(), eik::EikonalNAInt< RealType, EikonalImp, qc::QC_3D >::downwindFirstOrder(), aol::CubicZeroOneIntervalPenaltyFunction< RealType >::evaluate(), aol::QuadraticZeroOneIntervalPenaltyFunction< RealType >::evaluate(), aol::ZeroOneIntervalPenaltyFunction< RealType >::evaluate(), aol::CubicZeroOneIntervalPenaltyFunction< RealType >::evaluateDerivative(), aol::QuadraticZeroOneIntervalPenaltyFunction< RealType >::evaluateDerivative(), aol::ZeroOneIntervalPenaltyFunction< RealType >::evaluateDerivative(), aol::CubicZeroOneIntervalPenaltyFunction< RealType >::evaluateSecondDerivative(), qc::LpAnisotropy3d< RealType >::explicitPart(), qc::LpAnisotropy< RealType >::explicitPart(), qc::LevelSet2dInt< RealType, Dilate2d >::firstDerivativeXENO(), qc::ENODerivative< RealType, qc::QC_2D >::firstDerivativeXENO(), qc::LevelSet2dInt< RealType, Dilate2d >::firstDerivativeYENO(), qc::ENODerivative< RealType, qc::QC_2D >::firstDerivativeYENO(), qc::RotatedLpAnisotropy3d< RealType >::gamma(), qc::LpAnisotropy3d< RealType >::gamma(), qc::RotatedLpAnisotropy3d< RealType >::gammaFirstDerivative(), qc::LpAnisotropy3d< RealType >::gammaFirstDerivative(), qc::LpAnisotropy< RealType >::gammaFirstDerivative(), qc::RotatedLpAnisotropy3d< RealType >::gammaNorm(), qc::LpAnisotropy3d< RealType >::gammaNorm(), qc::LpAnisotropy< RealType >::gammaNorm(), qc::ShapeLevelsetGenerator< DataType >::generate3DPlaterodsLevelset(), qc::generateCompactSupportKernel1D(), qc::generateCompactSupportKernel1DGrad(), qc::DataGenerator< ConfiguratorType >::generateCylindricalLevelset(), qc::DataGenerator< ConfiguratorType >::generateL1SphereLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateLaminateLevelset(), qc::ShapeLevelsetGenerator< DataType >::generatePlateRodsLevelset(), qc::DataGenerator< ConfiguratorType >::generateRectangularPhaseField(), qc::DataGenerator< ConfiguratorType >::generateRegularizedL1SphereLevelset(), qc::DataGenerator< ConfiguratorType >::generateScaledLInfinitySphereLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateSlotLevelset(), qc::SquaredInvDeformedWeightMassOp< ConfiguratorType, IndexMode >::getCoeff(), qc::InvDeformedWeightMassOp< ConfiguratorType, IndexMode >::getCoeff(), qc::AnisotropicDiffusion2DStiffOp< ConfiguratorType >::getCoeffMatrix(), qc::HopfLax< RealType >::getLocalHopfLaxUpdate(), qc::HopfLax< RealType >::getLocalHopfLaxUpdateAndExtend(), aol::Vector< typename ConfiguratorType::ConfiguratorType::RealType >::getMaxAbsIndexAndValue(), aol::Vector< typename ConfiguratorType::ConfiguratorType::RealType >::getMaxAbsValue(), aol::Vector< typename ConfiguratorType::ConfiguratorType::RealType >::getMaxAbsValueMasked(), aol::Vector< typename ConfiguratorType::ConfiguratorType::RealType >::getMinAbsValue(), aol::QuasiNewtonIteration< RealType, MultiVector< RealType >, MultiVector< RealType > >::getTauAndUpdateDescentDirWolfe(), aol::Intersector< AlignedCube< RealType >, LineSegment< RealType, qc::QC_3D > >::has_intersection(), qc::DistanceSweeper3d< DataType, LocalBitArrayType, LocalDistanceArrayType, _GridType >::HLUpdatePossible(), qc::LpAnisotropy3d< RealType >::implicitPart(), qc::LpAnisotropy< RealType >::implicitPart(), aol::Vec< Dim+1, RealType >::infinityNorm(), aol::Matrix33Symm< _DataType >::infinityNorm(), aol::Mat< Dim, Dim+1, RealType >::infinityNorm(), qc::SignedDistanceBase3D< RealType, eik::EikonalNA3D< RealType > >::initializeBoundary(), aol::GenSparseMatrix< RealType >::isSymmetric(), aol::Vector< _DataType >::lpNormPowP(), aol::FullMatrix< _DataType >::makeLU(), eik::EikonalNAInt< RealType, EikonalImp, qc::QC_3D >::makeTrialNodeActive(), aol::Vec< Dim+1, RealType >::norm(), productWillFit(), aol::Vector< _DataType >::saveRaw(), aol::Vector< typename ConfiguratorType::ConfiguratorType::RealType >::setEntriesToAbs(), eik::EikonalNAInt< RealType, EikonalImp, qc::QC_3D >::setSeedPoint(), aol::TrustRegionMethod< _RealType, _VectorType, _SecondDerivativeType, _PrecondType, SubMatrixType >::solveSubProblem(), aol::TrustRegionMethod< _RealType, _VectorType, _SecondDerivativeType, _PrecondType, SubMatrixType >::solveSubProblemLanczos(), eik::EikonalNAInt< RealType, EikonalImp, qc::QC_3D >::TrialNode::testop(), qc::DistanceSweeper3d< DataType, LocalBitArrayType, LocalDistanceArrayType, _GridType >::treatPoint(), qc::DistanceSweeper3d< DataType, LocalBitArrayType, LocalDistanceArrayType, _GridType >::updateFunction(), qc::DistanceSweeper3d< DataType, LocalBitArrayType, LocalDistanceArrayType, _GridType >::updateOnSide(), and aol::QuasiNewtonIteration< RealType, MultiVector< RealType >, MultiVector< RealType > >::zoomWolfe().

{ return ( ( a < aol::ZTrait<T>::zero ) ? -a : a ); }

template<>
unsigned int aol::Abs ( unsigned int  a  )  [inline]

Definition at line 210 of file aol.h.

{ return a; }

template<>
uint64_t aol::Abs ( uint64_t  a  )  [inline]

Definition at line 211 of file aol.h.

{ return a ; }

void* aol::aligned_memory_allocation ( const size_t  MemorySize,
const size_t  Alignment 
)

Function for platform indepedent aligned memory allocation

Author:
Berkels

Referenced by aol::Vector< _DataType >::allocate(), and aol::OverflowTrait< T >::max().

void aol::aligned_memory_deallocation ( void *  Pointer  ) 

Function to deallocate the memory allocated by aligned_memory_allocation

Author:
Berkels

Referenced by aol::Vector< _DataType >::deleteUnlocked(), and aol::OverflowTrait< T >::max().

template<class DataType >
bool aol::appeq ( DataType  a,
DataType  b 
) [inline]
template<class DataType >
bool aol::appgeq ( DataType  a,
DataType  b 
) [inline]

Approximate greater-equal (even e tiny bit smaller is OK) for floating point numbers.

Definition at line 472 of file aol.h.

                                              {
  return a * ( 1 + APPEQFACTOR * std::numeric_limits<DataType>::epsilon () ) > b;
}

template<class DataType >
bool aol::appleq ( DataType  a,
DataType  b 
) [inline]

Approximate lesser-equal (even e tiny bit larger is OK) for floating point numbers.

Definition at line 478 of file aol.h.

                                              {
  return a * ( 1 - APPEQFACTOR * std::numeric_limits<DataType>::epsilon () ) < b;
}

bool aol::askForAction ( string  action,
string  color 
)

Prints "[action (y/n, Ctrl-C to terminate)? " in the given color.

void aol::assertAlert ( string  assertion,
string  file,
int  line,
string  message 
)
void aol::callSystemPauseIfNecessaryOnPlatform (  ) 

Calls system( "PAUSE" ), if called on a platform where the output window is automatically closed on exit (MinGW for example).

Referenced by aol::DifferentialQuotientTestBase< RealType, aol::MultiVector< RealType > >::test().

template<typename RealType , int Dim>
void aol::CartesianToHomogeneousCoordinates ( const aol::Vec< Dim, RealType > &  arg,
aol::Vec< Dim+1, RealType > &  dest 
) [inline]

Conversion from Cartesian to homogeneous coordinates (copy entries and write 1 to last component).

Definition at line 829 of file geom.h.

Referenced by TransformCartesianCoordinatesByHomogeneousMapping().

                                                                                                                {
  for ( int d = 0; d < Dim; ++d ) {
    dest[d] = arg[d];
  }
  dest[Dim] = aol::NumberTrait<RealType>::one;
}

void aol::catchGlobal (  ) 

When throwing exceptions in openmp threads and not catching them in the same thread, the terminate handler is called. When using openmp, this is redirected to catchGlobal, which can on most platforms re-throw and then catch the exception, or at least print a general error message. std::set_terminate ( abort ) restores the standard behavior.

Custom terminate handler intended to catch unhandled exceptions. In particular useful to get hold of exceptions thrown inside OpenMP blocks.

Author:
Berkels
template<typename MatrixType , typename DataType >
bool aol::checkForNANsAndINFs ( const MatrixType A  ) 

Checks whether any of the entries are finite or not. Returns true if any non finite entries (i.e. inf or nan) are found.

Author:
Berkels

Definition at line 113 of file matrix.h.

References isFinite().

                                                 {
  vector<typename Row<DataType>::RowEntry > vec;
  for ( int i = 0; i < A.getNumRows(); ++i ) {
    A.makeRowEntries ( vec, i );
    for ( typename vector<typename Row<DataType>::RowEntry >::iterator it = vec.begin(); it != vec.end(); ++it ) {
      if ( !isFinite ( it->value ) )
        return true;
    }
  }
  return false;
}

template<typename MatrixType >
bool aol::checkForNANsAndINFsInFullMatrix ( const MatrixType A  ) 

Checks whether any of the entries are finite or not. Returns true if any non finite entries (i.e. inf or nan) are found.

Note:
: Calls get on every matrix entry. So only use this for non-sparse matrices.
Author:
Berkels

Definition at line 136 of file matrix.h.

References isFinite().

                                                             {
  for ( int i = 0; i < A.getNumRows(); ++i ) {
    for ( int j = 0; j < A.getNumCols(); ++j ) {
      if ( !aol::isFinite ( A.get ( i, j ) ) )
        return true;
    }
  }
  return false;
}

template<typename RealType >
void aol::checkMultiChanVeseStructure ( const aol::MultiVector< RealType > &  LevelsetfunctionsAndParameters,
const int  NumberOfLevelsetFunctions,
const int  NumberOfAdditionalVectors = 0 
)

Checks if the MultiVector is of the correct structure to be an argument of one of the multi levelset Chan Vese operators. Throws an expection if the check fails.

Author:
Berkels

Definition at line 1305 of file ChanVese.h.

References aol::MultiVector< _DataType >::numComponents().

                                                                                                                                                                                {
  if ( LevelsetfunctionsAndParameters.numComponents() != NumberOfLevelsetFunctions + (1<<NumberOfLevelsetFunctions) + NumberOfAdditionalVectors )
    throw aol::Exception( "LevelsetfunctionsAndParameters.numComponents() != NumberOfLevelsetFunctions + 1<<numberOfLevelsetFunctions", __FILE__, __LINE__ );
}

void aol::checkNextLineOrString ( istream &  In,
const char ExpectedString,
const bool  Line = true 
)

Reads the next line or string (controlled by the Argument "Line") from the istream In and compares it with ExpectedString. If the comparison fails, an expection is thrown.

Author:
Berkels
template<class T >
T aol::Clamp ( Value,
Min,
Max 
) [inline]
template<class RealType >
bool aol::compareOps ( const aol::Op< aol::Vector< RealType > > &  Op1,
const aol::Op< aol::Vector< RealType > > &  Op2,
int  ArgSize,
int  DestSize,
RealType  tolerance = 0.0 
)

Compares two operators and checks whether they produce the same result up to a given tolerance.

Definition at line 762 of file op.h.

References aol::Vector< _DataType >::apply(), aol::ProgressBar< _showPercentage, _showBar, TYPE, _screenWidth, _leftBrace, _rightBrace, _empty, _full >::finish(), aol::Vector< _DataType >::lpNorm(), aol::Vector< _DataType >::norm(), aol::color::red, aol::color::reset, aol::Vector< _DataType >::setZero(), and aol::ProgressBar< _showPercentage, _showBar, TYPE, _screenWidth, _leftBrace, _rightBrace, _empty, _full >::start().

                                                                                                                                                       {
  aol::Vector<RealType> Arg ( ArgSize );
  aol::Vector<RealType> Dest1 ( DestSize );
  aol::Vector<RealType> Dest2 ( DestSize );
  aol::Vector<RealType> Diff  ( DestSize );

  RealType col1Norm = 0.;     // 1-Norm of the column-vectors
  RealType max1Norm = 0.;     // 1-operator-Norm of the Difference of the Matrices

  bool success = true;

  Arg.setZero();

#ifdef VERBOSE
  ProgressBar<> pb ( "Comparing Ops" );
  pb.start ( ArgSize );
#endif

  for ( int j = 0; j < ArgSize; ++j ) {
#ifdef VERBOSE
    pb++;
#endif
    Arg[ j ] = 1.;
    if ( j > 0 ) Arg[ j - 1 ] = 0.;

    Op1.apply ( Arg, Dest1 );
    Op2.apply ( Arg, Dest2 );
    
    Diff = Dest1;
    Diff -= Dest2;
    
    if ( Diff.norm() > tolerance ) {
      col1Norm = Diff.lpNorm(1);
      if ( col1Norm > max1Norm ) max1Norm = col1Norm;
      success = false;
      cerr << "inconsistency in column " << j << " found, column-l1-norm: " << col1Norm << "\n";
    }
  }
#ifdef VERBOSE
  pb.finish();
#endif

  if ( !success ) cerr << endl << color::red << "1-Operator-Norm of Difference: " << max1Norm << endl << color::reset;

  return success;
}

template<typename MatrixType , typename RealType >
RealType aol::computeConditionNumberByVectorIteration ( const MatrixType mat,
const RealType  symmetryThreshold = aol::NumberTrait<RealType>::zero,
const bool  randomize = false 
)

Calculates the condition number of a matrix as largest/smallest eigenvalue by vector iteration and inverse vector iteration. Matrix should be spd, else solver will probably fail.

Author:
Schwen

Definition at line 927 of file eigenvectors.h.

References aol::PCGInverse< VectorType, OpType, iOpType >::apply(), aol::Vector< _DataType >::norm(), aol::IterativeInverseOp< VectorType, OpType >::setQuietMode(), aol::IterativeInverseOp< VectorType, OpType >::setStopping(), and STOPPING_RELATIVE_TO_INITIAL_RESIDUUM.

                                                                                                                                                                          {

  if ( ! ( aol::isMatrixSymmetric< MatrixType, RealType > ( mat, symmetryThreshold ) ) ) {
    throw aol::Exception ( "Cannot compute condition number of non-symmetric matrix by vector iteration and inverse vector iteration", __FILE__, __LINE__ );
  }

  // vector iteration and inverse vector iteration
  RealType lambdaMax = 0, lambdaMin = 0;

  aol::Vector<RealType> vOld ( mat.getNumRows() ), vNew ( mat.getNumRows() );
  aol::NoiseOperator<RealType> nO ( aol::NoiseOperator<RealType>::EQUALLY_DISTRIBUTED );

  if ( randomize ) {
    nO.randomize();
  }

  {
    nO.applySingle ( vNew );

    RealType lambdaNew = vNew.norm(), lambdaOld = 0;
    while ( fabs ( lambdaNew - lambdaOld ) / lambdaNew > 1.e-12 ) {
      lambdaOld = lambdaNew;
      vOld = vNew;
      vOld /= lambdaOld;

      mat.apply ( vOld, vNew );
      lambdaNew = vNew.norm();
    }

    lambdaMax = lambdaNew;
#ifdef VERBOSE
    cerr << "Largest Eigenvalue = " << lambdaMax << endl;
#endif
  }

  {
    aol::DiagonalPreconditioner< aol::Vector<RealType> > prec ( mat );
    aol::PCGInverse< aol::Vector<RealType> > matInv ( mat, prec, 1.0e-16, 10000 );
    matInv.setStopping ( aol::STOPPING_RELATIVE_TO_INITIAL_RESIDUUM );
    matInv.setQuietMode ( true );

    nO.applySingle ( vOld );
    mat.apply ( vOld, vNew );

    RealType lambdaNew = vNew.norm(), lambdaOld = 0;
    while ( fabs ( lambdaNew - lambdaOld ) / lambdaNew > 1.e-12 ) {
      lambdaOld = lambdaNew;
      vOld = vNew;
      vOld /= lambdaOld;

      vNew.setZero();
      matInv.apply ( vOld, vNew );
      lambdaNew = vNew.norm();
      // cerr << lambdaNew << endl;
    }

    lambdaMin = 1. / lambdaNew;
#ifdef VERBOSE
    cerr << "Smallest Eigenvalue = " << lambdaMin << endl;
#endif
  }

  return ( lambdaMax / lambdaMin );
}

template<typename MatrixType , typename DataType >
void aol::computeConditionNumberViaOctave ( const MatrixType Mat,
const bool  CalcTime = false 
)

Calculates the condition number of a matrix using Octave.

Author:
Berkels, Schwen

Definition at line 88 of file matrix.h.

References generateTemporaryFile().

                                                                                            {
  char octaveDatTempFileName[1024];
  sprintf ( octaveDatTempFileName, "octave.datXXXXXX" );
  ofstream octavedat;
  generateTemporaryFile ( octaveDatTempFileName, octavedat );

  printSparseOctave<MatrixType, DataType> ( Mat, octavedat );

  octavedat << "cond ( A ) " << endl;
  octavedat.close();

  char systemCommand[1024];
  sprintf ( systemCommand, "%soctave -q %s", ( CalcTime ? "time " : "" ), octaveDatTempFileName );
  system ( systemCommand );

  remove ( octaveDatTempFileName );
}

template<class DataType >
void aol::computeReflection ( Vector< DataType > &  normal,
DataType alpha 
) [inline]

Computes reflection paramters

Parameters:
normal initially holds the vector to be reflected onto a multiple of the first standard basis vector, upon return it holds the direction normal to the reflection hyperplane

Definition at line 479 of file matrixInverse.h.

References aol::Vector< _DataType >::norm(), and signum1at0().

Referenced by aol::QRGivensTridiag< MatrixType >::QRGivensTridiag(), aol::QRInverse< DataType >::QRInverse(), and aol::QRInversePivot< DataType >::QRInversePivot().

                                                                            {
  alpha = normal.norm () * signum1at0 ( normal [0] );
  normal [0] -= alpha;
}

template<class DataType >
void aol::computeRotationSubdiagonal ( GivensRotations< DataType > &  rotations,
Vector< DataType diags[],
int  col 
)

Rotate subdiagonal.

Referenced by doRotationSubdiagonal().

template<class DataType >
void aol::computeRotationSubdiagonal ( GivensRotations< DataType > &  ,
int  ,
DataType  dval,
DataType  sdval,
DataType s,
DataType c 
) [inline]

Definition at line 568 of file matrixInverse.h.

                                                                      {
  double t = dval / sdval;
  s = 1 / sqrt ( 1 + t * t );
  c = s * t;
}

template<int dimension, typename DataType >
aol::Vec<dimension, DataType> aol::CompWiseMax ( const aol::Vec< dimension, DataType > &  vecA,
const aol::Vec< dimension, DataType > &  vecB 
)

return component-wise maximum of two aol::Vec<dimension,DataType>

Definition at line 921 of file smallVec.h.

References Max().

                                                                                                                             {
  aol::Vec<dimension, DataType> ret;
  for ( unsigned int d = 0; d < dimension; ++d ) {
    ret[d] = aol::Max ( vecA[d], vecB[d] );
  }
  return ( ret );
}

template<int dimension, typename DataType >
aol::Vec<dimension, DataType> aol::CompWiseMin ( const aol::Vec< dimension, DataType > &  vecA,
const aol::Vec< dimension, DataType > &  vecB 
)

return component-wise minimum of two aol::Vec<dimension,DataType>

Definition at line 910 of file smallVec.h.

References Min().

                                                                                                                             {
  aol::Vec<dimension, DataType> ret;
  for ( unsigned int d = 0; d < dimension; ++d ) {
    ret[d] = aol::Min ( vecA[d], vecB[d] );
  }
  return ( ret );
}

template<typename RealType , typename HeavisideFunctionType >
void aol::consistencyCheckOfHeavisideFuntion ( HeavisideFunctionType &  H  ) 

Prints central differential quotioent and implemented derivative of the Heaviside Funtion. If they don't match, it's likely that there is a bug in the Heaviside Funtion. Also calculates the integral over the derivative of the Heaviside Function. This should be one, since the derivatives approximates the delta distribution.

Definition at line 668 of file ChanVese.h.

                                                                   {
  const RealType epsilon = 0.0001;
  aol::MixedFormat format ( 4, 12 );
  for( int i = -100; i < 100; i++ ){
    const RealType x = static_cast<RealType>(i)/1000.;
    const RealType differentialQuotient = (H.evaluate( x + epsilon ) - H.evaluate( x - epsilon ))/ (2.*epsilon);
    const RealType derivative = H.evaluateDerivative( x );
    cerr << format(differentialQuotient) << " " << format(derivative) << " " << format(differentialQuotient-derivative) << endl;
  }
  const RealType width = 1000.;
  const int N = 1000000;
  RealType integral = 0.;
  const RealType h = 2.*width/static_cast<RealType>(N-1);
  for( int i = 0; i < N; i++ ){
    const RealType x = -width + static_cast<RealType>(i)*h;
    integral += h * H.evaluateDerivative( x );
  }
  cerr << "Integral of derivative = " << integral << endl;
}

template<class out_type , class in_value >
out_type aol::convert ( const in_value &  t  ) 

Use like this: double d; string salary; string s="12.56"; d=convert <double> (s); //d equals 12.56 salary=convert <string> (9000.0);//salary equals ?9000?

Definition at line 617 of file aol.h.

                                        {
  stringstream stream;
  stream << t;      // insert value to stream
  out_type result;  // store conversion result here
  stream >> result; // write value to result
  return result;
}

void aol::convertFilenameToUnixStyle ( char CurrentDirectoryName  ) 

Definition at line 123 of file platformDependent.cpp.

Referenced by generateTemporaryFile().

                                                               {
  int i = 0;
  while( CurrentDirectoryName[i] != '\0' ){
    if( CurrentDirectoryName[i] == '\\' )
      CurrentDirectoryName[i] = '/';
    i++;
  }
}

unsigned int aol::crc32 ( const void *const   ptr,
const unsigned int  size 
)

Compute 32 bit checksum for size bytes of any kind of data.

Referenced by aol::BitVector::crc32(), and aol::Vector< _DataType >::crc32OfData().

void aol::createDirectoryListing ( const char Dir,
std::vector< std::string > &  DirList,
const bool  IncludeDirectories = false 
)

Creates a vector with the names of all files (and possibly subdirectories) of the directory

  • Dir.
    Author:
    Berkels
void aol::ctrlCHandler ( int  sig  ) 
template<class T >
T aol::Cub ( a  )  [inline]

Returns cube of a.

Definition at line 205 of file aol.h.

Referenced by aol::FE_L2Projection< ConfigDomainType, ConfigRangeType >::applyAdd(), qc::simplex::BaseFunctionSetTFE< RealType, Dim, QuadRuleType >::BaseFunctionSetTFE(), tpcfe::CFEJCEMassOp< _ConfiguratorType >::buildDefaultTetraMatrix(), tpcfe::CFETester::CFEStandardConvergenceTester(), tpcfe::CFETPOSBandMatrix< CFEGrid< DataType, CFE_TPOS > >::CFETPOSBandMatrix(), mg::coarsenQuocMatrix3D(), qc::simplex::ConfiguratorTraitLinear< _RealType, QC_3D, _QuadType, _InitType >::ConfiguratorTraitLinear(), tpcfe::CFEMassOpWI< _ConfiguratorType >::createDefaultTetraMatrices(), tpcfe::CFEMassOp< _ConfiguratorType >::createDefaultTetraMatrices(), qc::AntiCompressionHyperelasticEnergyDensity< ConfiguratorType, HyperelasticEnergyDensityType >::evaluate(), aol::CubicZeroOneIntervalPenaltyFunction< RealType >::evaluate(), qc::AntiCompressionHyperelasticEnergyDensity< ConfiguratorType, HyperelasticEnergyDensityType >::evaluateAtQuadPoint(), qc::AntiCompressionHyperelasticEnergyDensity< ConfiguratorType, HyperelasticEnergyDensityType >::evaluateDerivative(), qc::HyperelasticEnergyDensityStVenantKirchhoff< ConfiguratorType >::evaluateDerivative(), qc::AntiCompressionHyperelasticEnergyDensity< ConfiguratorType, HyperelasticEnergyDensityType >::evaluateDerivativeAtQuadPoint(), qc::HyperelasticEnergyDensityStVenantKirchhoff< ConfiguratorType >::evaluateDerivativeAtQuadPoint(), qc::HyperelasticEnergyDensity2DLinear< ConfiguratorType >::evaluateSecondDerivative(), qc::HyperelasticEnergyDensity2DLinear< ConfiguratorType >::evaluateSecondDerivativeAtQuadPoint(), qc::ShapeLevelsetGenerator< DataType >::generate3DPlaterodsLevelset(), qc::ShapeLevelsetGenerator< DataType >::generate3DRodsLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateAnisoSelected3DRodsLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateAustrianCheeseLevelset(), qc::ShapeLevelsetGenerator< DataType >::generatePeriodicAnisoRandom3DRodsLevelset(), qc::ShapeLevelsetGenerator< DataType >::generatePlateRodsLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateRandomRadiiSwissCheeseLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateSwissCheeseLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateXRotated3DRodsLevelset(), aol::IsotropicMatrixStiffOp< ConfiguratorType >::getCoeffMatrix(), qc::simplex::BaseFuncSetTFEConstructor< RealType, QuadRuleType, QC_3D >::getNewBFS(), qc::GridDefinition::getNumberOfElements(), tpcfe::CFEGridBase< _RealType, _CT, NodalCoeffType >::getTotalPartialVolume(), qc::RectangularGrid< qc::QC_2D >::getVolumeFractionOf01Cube(), tpcfe::CFEMassOpWI< _ConfiguratorType >::preprocessLocalTetraMatrix(), tpcfe::CFEMassOp< _ConfiguratorType >::preprocessLocalTetraMatrix(), qc::LevelSet2dInt< RealType, Dilate2d >::setData(), and nb::QuocConfiguratorTraitTFE< _RealType, qc::QC_3D, _QuadType, _InitType >::vol().

{ return a*a*a; }

template<class T >
T aol::DegreesToRadians ( a  )  [inline]

Conversion from degrees to radians

Definition at line 243 of file aol.h.

Referenced by qc::ShapeLevelsetGenerator< DataType >::generateLaminateLevelset().

{ return a / 180. * aol::NumberTrait<T>::pi; }

template<class RealType >
RealType aol::distanceOfOps ( const aol::Op< aol::Vector< RealType > > &  Op1,
const aol::Op< aol::Vector< RealType > > &  Op2,
int  ArgSize,
int  DestSize 
)

1-Operatornorm of difference

Definition at line 811 of file op.h.

References aol::Vector< _DataType >::apply(), aol::Vector< _DataType >::lpNorm(), and aol::Vector< _DataType >::setZero().

                                                                                                                                     {
  aol::Vector<RealType> Arg ( ArgSize );
  aol::Vector<RealType> Dest1 ( DestSize );
  aol::Vector<RealType> Dest2 ( DestSize );

  RealType result = 0;

  Arg.setZero();
  for ( int j = 0; j < ArgSize; ++j ) {
    Arg[ j ] = 1.;
    if ( j > 0 ) Arg[ j - 1 ] = 0.;

    Op1.apply ( Arg, Dest1 );
    Op2.apply ( Arg, Dest2 );

    Dest1 -= Dest2;
    result = aol::Max<RealType> ( result, Dest1.lpNorm ( 1 ) );
  }

  return result;
}

template<typename anything >
void aol::doNothingWithArgumentToPreventUnusedParameterWarning ( const anything &   ) 
template<class DataType >
void aol::doReflection ( Vector< DataType > &  arg,
const Vector< DataType > &  normal,
DataType  alpha 
) [inline]

Reflect one vector according to paramters.

Definition at line 511 of file matrixInverse.h.

Referenced by doReflectionColumn(), doReflectionRow(), and doReflectionVector().

                                            {
  Vector<DataType> t ( normal );
  DataType denom = alpha * normal [0];
  if ( !denom ) return; // Nothing to be done

  t *= normal * arg / denom;
  arg += t;
}

template<class MatrixType >
void aol::doReflectionColumn ( MatrixType arg,
int  c,
const Vector< typename MatrixType::DataType > &  normal,
typename MatrixType::DataType  alpha 
)

Reflect the end part of one matrix column according to paramters.

Definition at line 538 of file matrixInverse.h.

References doReflection(), aol::Vector< _DataType >::resize(), and aol::Vector< _DataType >::size().

Referenced by aol::QRGivensTridiag< MatrixType >::getQ(), aol::QRInverse< DataType >::getQ(), aol::QRGivensTridiag< MatrixType >::QRGivensTridiag(), aol::QRInverse< DataType >::QRInverse(), and aol::QRInversePivot< DataType >::QRInversePivot().

                                                              {
  int r = arg.getNumRows (),
          l = normal.size (),
              p = r - l;
  Vector<typename MatrixType::DataType> x ( r );
  x.resize ( l ); // Optimize for vector manager
  arg.getSubColumn ( p, c, x );
  doReflection ( x, normal, alpha );
  arg.setSubColumn ( p, c, x );
}

template<class MatrixType >
void aol::doReflectionRow ( MatrixType arg,
int  r,
const Vector< typename MatrixType::DataType > &  normal,
typename MatrixType::DataType  alpha 
)

Reflect the end part of one matrix row according to paramters, mutiplying from the right with the reflection matrix

Definition at line 554 of file matrixInverse.h.

References doReflection(), and aol::Vector< _DataType >::size().

Referenced by aol::QRGivensTridiag< MatrixType >::QRGivensTridiag().

                                                           {
  int l = normal.size (),
          p = arg.getNumCols () - l;
  Vector<typename MatrixType::DataType> x ( l );
  arg.getSubRow ( r, p, x );
  doReflection ( x, normal, alpha );
  arg.setSubRow ( r, p, x );
}

template<class DataType >
void aol::doReflectionVector ( Vector< DataType > &  arg,
const Vector< DataType > &  normal,
DataType  alpha 
) [inline]

Reflect the end part of one vector according to paramters.

Definition at line 525 of file matrixInverse.h.

References doReflection(), aol::Vector< _DataType >::getBlock(), aol::Vector< _DataType >::setBlock(), and aol::Vector< _DataType >::size().

Referenced by aol::QRInverse< DataType >::apply(), and aol::QRInversePivot< DataType >::applyWithoutPostIteration().

                                                  {
  int l = normal.size (), p = arg.size () - l;
  Vector<DataType> x ( l );
  arg.getBlock ( p, x );
  doReflection ( x, normal, alpha );
  arg.setBlock ( p, x );
}

template<class DataType >
void aol::doRotationSubdiagonal ( GivensRotations< DataType > &  rotations,
Vector< DataType diags[],
int  col,
int  offset 
)

Rotate subdiagonal.

template<class DataType >
void aol::doRotationSubdiagonal ( GivensRotations< DataType > &  rotations,
Vector< DataType diags[],
int  col 
) [inline]

Definition at line 580 of file matrixInverse.h.

References computeRotationSubdiagonal().

                                                                         {
  DataType s, c;
  computeRotationSubdiagonal ( rotations, col, diags [1][col], diags [0][col], s, c );

  // Eliminate subdiagonal
  diags [1][col] = c * diags [1][col] + s * diags [0][col];
  diags [0][col] = 0;

  if ( col + 1 == diags [0].size () ) return;

  // Apply to next column
  diags [2][col+1] = c * diags [2][col+1] + s * diags [1][col+1];
  diags [1][col+1] = c * diags [1][col+1] - s * diags [2][col+1];

  if ( col + 2 == diags [0].size () ) return;

  // Apply to second next column
  // diags [3][col+2] is zero before rotation
  diags [3][col+2] = s * diags [2][col+2];
  diags [2][col+2] = c * diags [2][col+2];

}

template<class RealType >
RealType aol::Erf ( const RealType  x  ) 

Returns approximation of the Gauss error function (which is not provided as erf prior to C99). (Implementation of Abramowitz and Stegun: Handbook of Mathematical Functions, formula 7.1.26; absolute error is below 1.5e-7)

Definition at line 252 of file aol.h.

References signum(), and Sqr().

                                  {
  const RealType 
    a[5] = { 0.254829592, -0.284496736, 1.421413741, -1.453152027, 1.061405429 },
    p = 0.3275911,
    xa = fabs(x),
    t = 1.0 / ( 1.0 + p*xa ),
    y = 1.0 - ( ( ( ( ( a[4] * t + a[3]) * t ) + a[2]) * t + a[1] ) * t + a[0] ) * t * exp( - aol::Sqr ( xa ) );
    
  return ( aol::signum ( x ) * y );
}

template<int dimension, typename _DataType >
_DataType aol::euclidianDist ( const Vec< dimension, _DataType > &  vec1,
const Vec< dimension, _DataType > &  vec2 
)

Euclidian distance of two points, i. e. norm of the difference of two Vecs.

Definition at line 381 of file smallVec.h.

References Sqr().

Referenced by aol::Triangle< DataType >::calcDist(), qc::ExtendFromLevelSet< RealType, DiscFuncType >::extend(), and aol::Intersector< AlignedCube< RealType >, Triangle< RealType > >::segments_intersect().

                                                                 {
  _DataType distSqr = 0.;
  for ( int i = 0; i < dimension; ++i ) distSqr += Sqr ( vec1[i] - vec2[i] );
  return sqrt ( distSqr );
}

bool aol::fileExists ( string  filename  ) 

Definition at line 275 of file platformDependent.cpp.

                                    {
#ifdef GNU
  struct stat buf;
  return !stat ( filename.c_str (), &buf ) && S_ISREG ( buf.st_mode );
#else
#if (defined(_MSC_VER))
  struct _stat buf;
  return !_stat( filename.c_str (), &buf ) && (buf.st_mode & _S_IFREG);
#else
  throw UnimplementedCodeException("fileExists", __FILE__, __LINE__);
#endif
#endif
}

bool aol::fileExists ( std::string  filename  ) 

Test for file existence.

bool aol::fileNameEndsWith ( const char FileName,
const char Ending 
)
template<typename RealType , typename FunctorType >
RealType aol::findOptimumByBisection ( const FunctorType &  scalarOp,
RealType  posMin,
RealType  posMax,
RealType  TOL = 1E-4 
)

Definition at line 42 of file derivativeFreeOptimization.h.

                                                        {

  RealType en_upper, en_lower;

  RealType delta = posMax - posMin;
  RealType g = (3. - sqrt(5.)) / 2.;
  RealType pos_upper = posMax;
  RealType pos_lower = posMin;

  en_upper = scalarOp ( pos_upper );
  en_lower = scalarOp ( pos_lower );

  string tab = "\t";

  clog << "lower bd" << tab << "evaluation" << tab << tab << "upper bd" << tab << "evaluation" << endl
       << pos_lower << tab << en_lower << tab << tab << pos_upper << tab << en_upper << endl;

  clog.precision ( 5 );

  while ( delta > TOL ) {
    RealType pos_middle = pos_lower + g * delta;

    if ( en_lower < en_upper ) {
      pos_upper = pos_middle;
      en_upper = scalarOp ( pos_upper );
    }
    else {
      pos_lower = pos_middle;
      en_lower = scalarOp ( pos_lower );
    }
    clog << pos_lower << tab << en_lower << tab << tab << pos_upper << tab << en_upper << endl;
    delta = pos_upper - pos_lower;
  }
  RealType pos_middle = pos_lower + g * delta;
  clog << endl << "Bracketed pos in an interval of length " << delta << "." << endl
       << "Will return " << pos_middle << " as optimal position." << endl;

  return pos_middle;
}

template<typename RealType , typename FunctorType >
RealType aol::findRootByBisection ( const FunctorType &  scalarOp,
RealType  posMin,
RealType  posMax,
RealType  TOL = 1E-4 
)

Definition at line 88 of file derivativeFreeOptimization.h.

                                                     {

  aol::Scalar<RealType> en_upper, en_middle, en_lower;

  RealType delta = posMax - posMin;
  RealType g = (3. - sqrt(5.)) / 2.;
  RealType pos_upper = posMax;
  RealType pos_lower = posMin;

  en_upper = scalarOp ( pos_upper );
  en_lower = scalarOp ( pos_lower );

  if ( en_upper * en_lower > 0. ) {
    cerr << "Error: evaluation of given operator has equal sign" << endl
         << "at position " << posMin << " and " << posMax << ". Will return 1." << endl;
    return 1.;
  }

  if ( en_lower > 0. ) {
    swap ( pos_lower, pos_upper );
    swap ( en_lower, en_upper );
  }

  string tab = "\t";

  clog << "neg bd" << tab << "evaluation" << tab << tab << "pos bd" << tab << "evaluation" << endl
       << pos_lower << tab << en_lower << tab << tab << pos_upper << tab << en_upper << endl;

  clog.precision ( 5 );

  RealType pos_middle = pos_lower + g * delta;
  en_middle = scalarOp ( pos_middle );

  while ( delta > TOL ) {
    if ( en_middle > 0. ) {
      pos_upper = pos_middle;
      en_upper = en_middle;
    }
    else {
      pos_lower = pos_middle;
      en_lower = en_middle;
    }
    clog << pos_lower << tab << en_lower << tab << tab << pos_upper << tab << en_upper << endl;

    delta = pos_upper - pos_lower;
    pos_middle = pos_lower + g * delta;
    en_middle = scalarOp ( pos_middle );
  }
  clog << endl << "Bracketed pos in an interval of length " << delta << "." << endl
       << "Will return " << pos_middle << " as optimal position." << endl;

  return pos_middle;
}

void aol::generateTemporaryFile ( char TempFileName,
ofstream &  TempFileStream 
)

Definition at line 159 of file platformDependent.cpp.

References convertFilenameToUnixStyle().

Referenced by computeConditionNumberViaOctave(), aol::Plotter< RealType >::gen(), aol::PlotDataFileHandler< RealType >::generateColoredVectorfieldData(), aol::PlotDataFileHandler< RealType >::generateFunctionPlot(), aol::PlotDataFileHandler< RealType >::generateIsolineData(), and aol::DescentDirValidator< RealType, VecType, DerivativeType >::validateAndPlotToPNG().

                                                                            {
#if defined(_MSC_VER)
  // based on http://msdn2.microsoft.com/en-us/library/aa363875.aspx
  DWORD dwRetVal;
  DWORD dwBufSize=1024;
  UINT uRetVal;
  WCHAR szTempName[1024];  
  WCHAR lpPathBuffer[1024];

  // Get the temp path.
  dwRetVal = GetTempPath(dwBufSize,     // length of the buffer
                         lpPathBuffer); // buffer for path 
  if (dwRetVal > dwBufSize || (dwRetVal == 0))
  {
      printf ("GetTempPath failed with error %d.\n", GetLastError());
      throw Exception ( "Could not generate a temporary file.", __FILE__, __LINE__ );
  }

  // Create a temporary file. 
  uRetVal = GetTempFileName( lpPathBuffer,                          // directory for tmp files
                             wstringFromCharPointer("NEW").c_str(), // temp file name prefix 
                             0,                                     // create unique name 
                             szTempName);                           // buffer for name 

  if (uRetVal == 0)
  {
    printf ("GetTempFileName failed with error %d.\n", GetLastError());
    throw Exception ( "Could not generate a temporary file.", __FILE__, __LINE__ );
  }
  convertWCharToChar( szTempName, TempFileName );
  convertFilenameToUnixStyle( TempFileName );
  TempFileStream.open ( TempFileName );
#else
  if ( TempFileName[0] == 0 )
    throw Exception ( "Can't generate a temporary file with empty file name mask.", __FILE__, __LINE__ );
  int fileDescriptor = 0;
#if defined(__MINGW32_VERSION)
  if ( mktemp ( TempFileName ) ) {
    do
      fileDescriptor = open ( TempFileName, O_CREAT | O_EXCL, S_IREAD | S_IWRITE );
    while ( ! ( fileDescriptor == -1 && errno == EEXIST ) && mktemp ( TempFileName ) );
  } else
    fileDescriptor = -1;
#else
  fileDescriptor = mkstemp ( TempFileName );
#endif
  if ( fileDescriptor == -1 )
    throw Exception ( "Could not generate a temporary file.", __FILE__, __LINE__ );

  TempFileStream.open ( TempFileName );
  close ( fileDescriptor );
#endif
}

void aol::generateTemporaryFile ( char TempFileName,
std::ofstream &  TempFileStream 
)

Creates and opens a temporary file. TempFileName has to contain a template filename ending with `XXXXXX'. (This does not apply to VC++, here the original contents of TempFileName are ignored. The temporary filename is written into TempFileName. The file has to be deleted manually, after TempFileStream is closed.

string aol::getBaseFileName ( const string &  FileNameWithPath  ) 
bool aol::getCtrlCState (  ) 
void aol::getCurrentDirectoryUnixStyle ( char CurrentDirectoryName,
const int  MaxNameLength 
)

Returns the current working directory with slashes as seperators between subdirectories.

const char * aol::getFileName ( const char FileNameWithPath  ) 
string aol::getOutFileName ( const string &  inFileName,
bool  fromEnd = true 
)

Generate next of a sequence of output filenames, adding numbers between the last (or if !fromEnd first) two dots Sequence is like file.ext, file.0000.ext, file.0001.ext, ...

double aol::getRuntimeSoFar (  ) 

Returns the current runtime in seconds as double.

Referenced by aol::StopWatch::cont(), aol::StopWatch::stop(), and aol::StopWatch::total_runtime().

void aol::getWallClockTime ( time_t &  Seconds,
unsigned short Miliseconds 
)

Writes the current wall clock time in seconds to Seconds and the miliseconds part to Miliseconds.

Referenced by aol::RandomGenerator::randomize(), aol::StopWatch::start(), and aol::StopWatch::stop().

template<typename RealType , int Dim>
void aol::HomogeneousToCartesianCoordinates ( const aol::Vec< Dim+1, RealType > &  arg,
aol::Vec< Dim, RealType > &  dest 
) [inline]

Conversion from homogeneous to Cartesian coordinates (division by last component).

Definition at line 838 of file geom.h.

Referenced by TransformCartesianCoordinatesByHomogeneousMapping().

                                                                                                                {
  for ( int d = 0; d < Dim; ++d ) {
    dest[d] = arg[d] / arg[Dim];
  }
}

const std::complex<double> aol::I ( ,
 
)

Mathematical constant i.

Referenced by tpcfe::CFEHybridMatrixBase< CFEGrid< DataType, CFE_CD, NodalCoeffType > >::get(), tpcfe::AffineFE3D15Row< CFEGrid< DataType, CFE_TPOS > >::get(), qc::UniformGridSparseRow< DataType >::get(), qc::MultiArray< RealType, qc::QC_3D >::get(), qc::FastUniformGridMatrix< _DataType, qc::QC_3D, BaseClass >::get(), qc::FastUniformGridMatrix< _DataType, qc::QC_2D, BaseClass >::get(), qc::FastAssembleUniformGridMatrix< _DataType, apply_mode >::get(), aol::Vector< typename ConfiguratorType::ConfiguratorType::RealType >::get(), aol::GenSparseMatrix< RealType >::get(), aol::Vec< Dim+1, RealType >::get(), aol::Mat< Dim, Dim+1, RealType >::get(), aol::DiagonalRow< DataType >::get(), aol::DiagonalMatrix< typename ConfiguratorType::ConfiguratorType::RealType >::get(), aol::PermutationMatrix< DataType >::get(), aol::GenBandMatrix< DataType >::get(), tpcfe::CFEHybridMatrixBase< CFEGrid< DataType, CFE_CD, NodalCoeffType > >::set(), tpcfe::AffineFE3D15Row< CFEGrid< DataType, CFE_TPOS > >::set(), qc::UniformGridSparseRow< DataType >::set(), qc::FastUniformGridMatrix< _DataType, qc::QC_3D, BaseClass >::set(), qc::FastUniformGridMatrix< _DataType, qc::QC_2D, BaseClass >::set(), qc::FastAssembleUniformGridMatrix< _DataType, apply_mode >::set(), aol::Vector< typename ConfiguratorType::ConfiguratorType::RealType >::set(), aol::GenSparseMatrix< RealType >::set(), aol::Mat< Dim, Dim+1, RealType >::set(), aol::DiagonalRow< DataType >::set(), aol::DiagonalMatrix< typename ConfiguratorType::ConfiguratorType::RealType >::set(), aol::CSR_Matrix::set(), aol::GenBandMatrix< DataType >::set(), and qc::AArray< DataType, qc::QC_2D >::setAll().

template<int N, typename _DataType >
void aol::inplaceTranspose ( aol::Mat< N, N, _DataType > &  mat  ) 

transpose symmetrix Mat<N,N, _DataType> to itself (in place)

Definition at line 748 of file smallMat.h.

Referenced by aol::Matrix33< RealType >::transpose(), and aol::Mat< Dim, Dim+1, RealType >::transpose().

                                                       {
  for ( int i = 0; i < N; ++i ) {
    for ( int j = i + 1; j < N; ++j ) {
      const _DataType t = mat[i][j];
      mat[i][j] = mat[j][i];
      mat[j][i] = t;
    }
  }
}

bool aol::isDirEntDirectory ( dirent *  Entry  ) 

Helper function for aol::createDirectoryListing.

Author:
Berkels

Definition at line 244 of file platformDependent.cpp.

                                         {
#if defined (  _MSC_VER )
  if ( Entry->d_type & DT_DIR )
#else
  if ( Entry->d_type == 4 )
#endif
    return true;

  return false;
}

bool aol::isErfTestOK (  ) 
template<class T >
bool aol::isFinite ( a  )  [inline]
template<class T >
bool aol::isInf ( a  )  [inline]

Check for infinite values. Returns true if +Inf or -Inf

Definition at line 220 of file aol.h.

Referenced by aol::TrustRegionMethod< _RealType, _VectorType, _SecondDerivativeType, _PrecondType, SubMatrixType >::apply(), and isFinite().

{ return ( a != 0 && a == 2*a ); }

template<typename MatrixType , typename DataType >
bool aol::isMatrixSymmetric ( const MatrixType A,
const DataType  thres = aol::NumberTrait<DataType>::zero 
)

check whether a matrix is symmetric up to a threshold

Author:
Schwen

Definition at line 178 of file matrix.h.

                                                                                                    {
  vector<typename Row<DataType>::RowEntry > vec;
  for ( int rowN = 0; rowN < A.getNumRows(); ++rowN ) {
    A.makeRowEntries ( vec, rowN );
    for ( typename vector<typename Row<DataType>::RowEntry >::iterator it = vec.begin(); it != vec.end(); ++it ) {
      if ( fabs ( it->value - A.get ( it->col, rowN ) ) > thres ) {
        return ( false );
      }
    }
  }

  return ( true );
}

template<class T >
bool aol::isNaN ( a  )  [inline]
void aol::makeDirectory ( const char DirectoryName  ) 
template<class T >
T aol::Max ( a,
b,
c 
) [inline]

Returns maximum of three values

Definition at line 197 of file aol.h.

References Max().

{ return ( aol::Max ( aol::Max ( a, b ), c ) ); }

template<class T >
T aol::Max ( a,
b 
) [inline]

Returns maximum of two values.

Definition at line 195 of file aol.h.

Referenced by aol::Vector< _DataType >::allocate(), qc::UGBMatrix< columns, localDimension, blocksize, _DataType, InitType >::applyAdd(), qc::FastAssembleUniformGridMatrix< _DataType, apply_mode >::applyAdd(), aol::BandMatrix< DataType >::BandMatrix(), qc::GridDefinition::NodeNeighborHoodIterator2D::begin(), Clamp(), qc::JointHistogram< RealType >::computeJointHistogramWithParzenWindowing(), CompWiseMax(), qc::ConcatImage< DataType, RealType >::ConcatImage(), qc::ConcatImage< DataType, RealType >::createOverflowHandeledData(), qc::deformImageWithCoarseDeformation(), tpcfe::CFEVirtualNode< RealType, CFE_TPOSELAST, NodalCoeffType >::determineConstraints(), qc::BitArray< qc::QC_3D >::dilateByOne(), qc::BitArray< qc::QC_2D >::dilateByOne(), eik::Eikonal3d::erase(), qc::HyperelasticEnergyDensityDefault< ConfiguratorType >::evaluateDerivative(), qc::HyperelasticEnergyDensityDefault< ConfiguratorType >::evaluateDerivativeAtQuadPoint(), qc::HopfLax< RealType >::findNeighborSegments(), qc::ShapeLevelsetGenerator< DataType >::generateBallLevelset(), qc::DataGenerator< ConfiguratorType >::generateCylindricalLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateEllipsoidLevelset(), qc::generateGaussKernel(), qc::generateGaussKernelGrad(), qc::DataGenerator< ConfiguratorType >::generateRectangularPhaseField(), qc::DataGenerator< ConfiguratorType >::generateScaledLInfinitySphereLevelset(), aol::Triangle< DataType >::getBoundingBox(), aol::LineSegment< RealType, qc::QC_2D >::getBoundingBox(), aol::MultiVector< DataType >::getMaxAbsValue(), qc::MultiArray< RealType, qc::QC_3D >::getMaxOfPointWiseNorm(), aol::RingBuffer< T >::getMaxValue(), aol::MultiVector< DataType >::getMaxValue(), qc::ScalarArray< _DataType, qc::QC_3D >::getMedianFilterValue(), qc::ScalarArray< _DataType, qc::QC_2D >::getMedianFilterValue(), om::TriMesh< _RealType >::getMeshBoundingBox(), aol::QuasiNewtonIteration< RealType, MultiVector< RealType >, MultiVector< RealType > >::getTauAndUpdateDescentDirArmijo(), aol::ArmijoLineSearchUsingOp< RealType, MultiVector< RealType >, MultiVector< RealType >, MultiVector< RealType > >::getTimestepWidthWithArmijoLineSearch(), aol::ArmijoLineSearchUsingOp< RealType, MultiVector< RealType >, MultiVector< RealType >, MultiVector< RealType > >::getTimestepWidthWithPowellWolfeLineSearch(), qc::GridDefinition::H(), qc::TransformFunction< RealType, qc::QC_2D >::interpolateQuad(), qc::TransformFunction< RealType, qc::QC_3D >::interpolateTetrahedron(), qc::TransformFunction< RealType, qc::QC_2D >::interpolateTriangle(), Max(), aol::Matrix< typename ConfiguratorType::ConfiguratorType::RealType >::maxNumNonZeroesPerRow(), maxNumNonZeroesPerRow(), aol::SparseBlockMatrix< aol::SparseMatrix< RealType > >::maxNumXPerRow(), aol::MixedFormat::operator()(), qc::ScalarArray< _DataType, qc::QC_3D >::padFrom(), qc::ScalarArray< _DataType, qc::QC_2D >::padFrom(), qc::AArray< DataType, qc::QC_3D >::padFrom(), qc::resampleArrayToQuadraticArrayKeepingAspectRatio(), qc::RectangularContainer< DataType, ArrayType, qc::QC_3D >::resize(), eik::EikonalNAInt< RealType, EikonalImp, qc::QC_2D, GridType >::solveQuadratic(), eik::Eikonal< RealType >::solveQuadratic(), aol::TrustRegionMethod< _RealType, _VectorType, _SecondDerivativeType, _PrecondType, SubMatrixType >::solveSubProblem(), qc::LevelSet2dInt< RealType, Dilate2d >::timeStepENO(), qc::TransformFunction< RealType, qc::QC_3D >::transform(), qc::TransformFunction< RealType, qc::QC_2D >::transform(), om::TriangleBase< RealType, TriMesh< RealType > >::vol(), qc::writeColorField(), qc::WriteDeformedGrid(), qc::WriteVectorField(), and qc::WriteVectorFieldAsGnuplotFile().

{ return ( ( a < b ) ? b : a ); }

template<typename MatrixType , typename DataType >
int aol::maxNumNonZeroesPerRow ( const MatrixType A  ) 
Author:
Berkels

Definition at line 49 of file matrix.h.

References Max().

                                                  {
  int maxNum = 0;
  for ( int i = 0; i < A.getNumRows(); ++i )
    maxNum = aol::Max ( maxNum, A.numNonZeroes ( i ) );
  return maxNum;
}

long int aol::memusage (  ) 

Returns number of bytes used by program.

template<class T >
T aol::Min ( a,
b 
) [inline]

Returns minimum of two values.

Definition at line 190 of file aol.h.

Referenced by eik::Eikonal3d::accept(), qc::UGBMatrix< columns, localDimension, blocksize, _DataType, InitType >::applyAdd(), qc::FastAssembleUniformGridMatrix< _DataType, apply_mode >::applyAdd(), aol::BandMatrix< DataType >::BandMatrix(), qc::GridDefinition::NodeNeighborHoodIterator2D::begin(), Clamp(), CompWiseMin(), qc::ConcatImage< DataType, RealType >::createOverflowHandeledData(), qc::deformImageWithCoarseDeformation(), qc::BitArray< qc::QC_3D >::dilateByOne(), qc::BitArray< qc::QC_2D >::dilateByOne(), qc::LineSegment< RealType >::dist(), aol::LineSegment< RealType, qc::QC_3D >::dist(), aol::LineSegment< RealType, qc::QC_2D >::dist(), qc::HopfLax< RealType >::findNeighborSegments(), qc::DataGenerator< ConfiguratorType >::generateBlendingKernel(), qc::ShapeLevelsetGenerator< DataType >::generateDrunkenZebraLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateFourPlaneRippleLevelset(), qc::DataGenerator< ConfiguratorType >::generateTwoCirclesPhaseField(), qc::ShapeLevelsetGenerator< DataType >::generateTwoPlaneRippleLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateZ3Levelset(), qc::ShapeLevelsetGenerator< DataType >::generateZLevelset(), aol::Triangle< DataType >::getBoundingBox(), aol::LineSegment< RealType, qc::QC_2D >::getBoundingBox(), qc::HopfLax< RealType >::getLocalHopfLaxUpdate(), qc::ScalarArray< _DataType, qc::QC_3D >::getMedianFilterValue(), qc::ScalarArray< _DataType, qc::QC_2D >::getMedianFilterValue(), om::TriMesh< _RealType >::getMeshBoundingBox(), aol::MultiVector< DataType >::getMinValue(), aol::NewtonIterationBase< ConfiguratorType::RealType, aol::Vector< ConfiguratorType::RealType >, aol::Vector< ConfiguratorType::RealType >, SecondDerivativeType >::getNewtonOptimalTimestepWidth(), aol::NewtonIterationBase< ConfiguratorType::RealType, aol::Vector< ConfiguratorType::RealType >, aol::Vector< ConfiguratorType::RealType >, SecondDerivativeType >::getNewtonTimestep_NLEQ_ERR(), aol::NewtonIterationBase< ConfiguratorType::RealType, aol::Vector< ConfiguratorType::RealType >, aol::Vector< ConfiguratorType::RealType >, SecondDerivativeType >::getNewtonTimestep_NLEQ_RES(), aol::QuasiNewtonIteration< RealType, MultiVector< RealType >, MultiVector< RealType > >::getTauAndUpdateDescentDirArmijo(), aol::QuasiNewtonIteration< RealType, MultiVector< RealType >, MultiVector< RealType > >::getTauAndUpdateDescentDirWolfe(), aol::ArmijoLineSearchUsingOp< RealType, MultiVector< RealType >, MultiVector< RealType >, MultiVector< RealType > >::getTimestepWidthWithArmijoLineSearch(), aol::ArmijoLineSearchUsingOp< RealType, MultiVector< RealType >, MultiVector< RealType >, MultiVector< RealType > >::getTimestepWidthWithPowellWolfeLineSearch(), qc::SignedDistanceBase< ConfiguratorType, eik::EikonalNA< ConfiguratorType::RealType, ConfiguratorType::InitType > >::initAmbiguousCase(), qc::TransformFunction< RealType, qc::QC_2D >::interpolateQuad(), qc::TransformFunction< RealType, qc::QC_3D >::interpolateTetrahedron(), qc::TransformFunction< RealType, qc::QC_2D >::interpolateTriangle(), eik::Eikonal< RealType >::makeTrialNodeActive(), Min(), aol::PCAOp< RealType, SampleType >::modesAndVariances(), qc::ScalarArray< _DataType, qc::QC_3D >::padFrom(), qc::ScalarArray< _DataType, qc::QC_2D >::padFrom(), qc::AArray< DataType, qc::QC_3D >::padFrom(), qc::ScalarArray< _DataType, qc::QC_3D >::resize(), qc::BitArray< qc::QC_3D >::resize(), qc::BitArray< qc::QC_2D >::resize(), qc::RectangularContainer< DataType, ArrayType, qc::QC_3D >::resize(), aol::BitVector::resize(), qc::FullColorWheel< RealType >::saveColoredWheel(), eik::EikonalNAInt< RealType, EikonalImp, qc::QC_3D >::setSeedPoint(), eik::EikonalNAInt< RealType, EikonalImp, qc::QC_2D, GridType >::setSeedPoint(), eik::EikonalNAInt< RealType, EikonalImp, qc::QC_3D >::solveQuadratic(), aol::TrustRegionMethod< _RealType, _VectorType, _SecondDerivativeType, _PrecondType, SubMatrixType >::solveSubProblem(), qc::LevelSet2dInt< RealType, Dilate2d >::timeStepENO(), qc::TransformFunction< RealType, qc::QC_3D >::transform(), qc::TransformFunction< RealType, qc::QC_2D >::transform(), qc::DistanceSweeper3d< DataType, LocalBitArrayType, LocalDistanceArrayType, _GridType >::treatPoint(), qc::PNGLoadInterface::writeDataToMultiArray(), and aol::QuasiNewtonIteration< RealType, MultiVector< RealType >, MultiVector< RealType > >::zoomWolfe().

{ return ( ( a < b ) ? a : b ); }

template<class T >
T aol::Min ( a,
b,
c 
) [inline]

Returns minimum of three values -- for more than that you may want to keep them in a Vector and use its minimum method

Definition at line 192 of file aol.h.

References Min().

{ return ( aol::Min ( aol::Min ( a, b ), c ) ); }

template<typename T >
bool aol::operator!= ( const vector< T > &  arg1,
const Vector< T > &  arg2 
)

operator: vector != Vector

Definition at line 981 of file vec.h.

                                                                 {
  return ( ! ( arg1 == arg2 ) );
}

template<typename T >
bool aol::operator!= ( const Vector< T > &  arg1,
const vector< T > &  arg2 
)

operator: Vector != vector

Definition at line 988 of file vec.h.

                                                                 {
  return ( ! ( arg1 == arg2 ) );
}

template<int dimension, typename _DataType >
Vec<dimension, _DataType> aol::operator* ( const _DataType  alpha,
const Vec< dimension, _DataType > &  vec 
)

left-multiplication scalar * Vec

Definition at line 369 of file smallVec.h.

                                                                                                    {
  Vec<dimension, _DataType> res;
  for ( int i = 0; i < dimension; ++i )
    res[i] = alpha * vec[i];

  return ( res );
}

template<typename _DataType >
Vec2<_DataType> aol::operator* ( const _DataType  alpha,
const Vec2< _DataType > &  vec 
)

left-multiplication scalar * Vec2

Definition at line 570 of file smallVec.h.

                                                                                {
  return ( Vec2<_DataType> ( alpha * vec[0], alpha * vec[1] ) );
}

template<typename _DataType >
Vec3<_DataType> aol::operator* ( const _DataType  alpha,
const Vec3< _DataType > &  vec 
)

left-multiplication scalar * Vec3

Definition at line 868 of file smallVec.h.

                                                                                {
  return ( Vec3<_DataType> ( alpha * vec[0], alpha * vec[1], alpha * vec[2] ) );
}

template<class TypeA , class TypeB >
std::complex<TypeB> aol::operator* ( TypeA  a,
std::complex< TypeB >  b 
)

Allows int * complex<double>

Definition at line 23 of file complexUtils.h.

                                                              {
  return std::complex<TypeB> ( static_cast<TypeB> ( a ) ) * b;
}

template<class TypeA , class TypeB >
std::complex<TypeA> aol::operator* ( std::complex< TypeA >  a,
TypeB  b 
)

Allows complex<double> * int.

Definition at line 29 of file complexUtils.h.

                                                              {
  return a * std::complex<TypeA> ( static_cast<TypeA> ( b ) );
}

template<class TypeA , class TypeB >
std::complex<TypeB> aol::operator+ ( TypeA  a,
std::complex< TypeB >  b 
)

Allows int + complex<double>

Definition at line 35 of file complexUtils.h.

                                                              {
  return std::complex<TypeB> ( static_cast<TypeB> ( a ) ) + b;
}

template<class TypeA , class TypeB >
std::complex<TypeA> aol::operator+ ( std::complex< TypeA >  a,
TypeB  b 
)

Allows complex<double> + int.

Definition at line 41 of file complexUtils.h.

                                                              {
  return a + std::complex<TypeA> ( static_cast<TypeA> ( b ) );
}

template<class TypeA , class TypeB >
std::complex<TypeB> aol::operator- ( TypeA  a,
std::complex< TypeB >  b 
)

Allows int - complex<double>

Definition at line 47 of file complexUtils.h.

                                                              {
  return std::complex<TypeB> ( static_cast<TypeB> ( a ) ) - b;
}

template<class TypeA , class TypeB >
std::complex<TypeA> aol::operator- ( std::complex< TypeA >  a,
TypeB  b 
)

Allows complex<double> - int.

Definition at line 53 of file complexUtils.h.

                                                              {
  return a - std::complex<TypeA> ( static_cast<TypeA> ( b ) );
}

template<class TypeA , class TypeB >
std::complex<TypeA> aol::operator/ ( std::complex< TypeA >  a,
TypeB  b 
)

Allows complex<double> / int.

Definition at line 65 of file complexUtils.h.

                                                              {
  return a / std::complex<TypeA> ( static_cast<TypeA> ( b ) );
}

template<class TypeA , class TypeB >
std::complex<TypeB> aol::operator/ ( TypeA  a,
std::complex< TypeB >  b 
)

Allows int / complex<double>

Definition at line 59 of file complexUtils.h.

                                                              {
  return std::complex<TypeB> ( static_cast<TypeB> ( a ) ) / b;
}

template<int numRows, int numCols, class T >
ostream& aol::operator<< ( ostream &  os,
const Mat< numRows, numCols, T > &  m 
) [inline]

Definition at line 1244 of file smallMat.h.

                                                                              {
  return m.print ( os );
}

template<class T >
ostream& aol::operator<< ( ostream &  os,
const Matrix33Symm< T > &  m 
) [inline]

Definition at line 1524 of file smallMat.h.

                                                                     {
  return m.print ( os );
}

template<class T >
ostream& aol::operator<< ( ostream &  os,
const Vec3< T > &  v 
) [inline]

Definition at line 899 of file smallVec.h.

                                                             {
  return v.print ( os );
}

template<class T >
ostream& aol::operator<< ( ostream &  os,
const Vec2< T > &  v 
) [inline]

Definition at line 884 of file smallVec.h.

                                                             {
  return v.print ( os );
}

template<class DataType >
ostream& aol::operator<< ( ostream &  os,
const Tensor222< DataType > &  t 
)

Definition at line 105 of file tensor.h.

                                                                   {
  return t.print ( os );
}

template<class DataType >
ostream& aol::operator<< ( ostream &  os,
const Tensor2222< DataType > &  t 
)

Definition at line 159 of file tensor.h.

                                                                    {
  return t.print ( os );
}

template<class DataType >
ostream& aol::operator<< ( ostream &  os,
const std::vector< DataType vec 
)

STL vector output.

Definition at line 453 of file aol.h.

                                                                    {
  for ( int i = 0; i < static_cast<int> ( vec.size () ); ++i )
    os << ( i ? "; " : "" ) << vec [i];
  return os << endl;
}

template<typename DataType >
ostream& aol::operator<< ( ostream &  os,
const Vector< DataType > &  vec 
)

Write Vector to ostream.

Definition at line 1002 of file vec.h.

                                                                 {
  return vec.print ( os );
}

template<class _DataType >
ostream& aol::operator<< ( ostream &  os,
const Matrix< _DataType > &  m 
)

Should be replaced by template from surfmesh/generalstuff.h.

Definition at line 490 of file matrix.h.

                                                                                           {
  return m.print ( os );
}

template<typename DataType >
ostream& aol::operator<< ( ostream &  os,
const MultiVector< DataType > &  MVec 
)

Write MultiVector to ostream.

Definition at line 595 of file multiVector.h.

References aol::MultiVector< _DataType >::print().

                                                                       {
  return MVec.print ( os );
}

template<class T >
ostream& aol::operator<< ( ostream &  out,
const RestrOp< T > &  op 
)

Definition at line 1041 of file op.h.

                                                           {
  return op.print ( out );
}

template<bool _showPercentage, bool _showBar, typename TYPE , int _screenWidth, char _leftBrace, char _rightBrace, char _empty, char _full>
std::ostream& aol::operator<< ( std::ostream &  out,
const ProgressBar< _showPercentage, _showBar, TYPE, _screenWidth, _leftBrace, _rightBrace, _empty, _full > &  pb 
) [inline]

Output the progress bar

Definition at line 273 of file progressBar.h.

                                                                                 {
  pb.display ( out );
  return out;
}

template<int dim, class T >
ostream& aol::operator<< ( ostream &  os,
const Vec< dim, T > &  v 
) [inline]

Definition at line 878 of file smallVec.h.

                                                                 {
  return v.print ( os );
}

template<int _screenWidth, int _fullLength, char _leftBrace, char _rightBrace, char _empty, char _full>
std::ostream& aol::operator<< ( std::ostream &  out,
const BusyBar< _screenWidth, _fullLength, _leftBrace, _rightBrace, _empty, _full > &  bb 
) [inline]

Output the busy bar

Definition at line 262 of file progressBar.h.

                                                        {
  bb.display ( out );
  return out;
}

template<typename T >
bool aol::operator== ( const vector< T > &  arg1,
const Vector< T > &  arg2 
)

operator: vector == Vector

Definition at line 958 of file vec.h.

References aol::Vector< _DataType >::size().

Referenced by qc::AArray< DataType, qc::QC_3D >::operator!=(), and qc::AArray< DataType, qc::QC_2D >::operator!=().

                                                                 {
  if ( static_cast<int> ( arg1.size() ) != arg2.size() ) {
    return false;
  }
  bool equal = true;
  for ( unsigned int i = 0; i < arg1.size(); ++i ) {
    if ( arg1[i] != arg2[i] ) {
      equal = false;
    }
  }
  return equal;
}

template<typename T >
bool aol::operator== ( const Vector< T > &  arg1,
const vector< T > &  arg2 
)

operator: Vector == vector

Definition at line 974 of file vec.h.

                                                                 {
  return ( arg2 == arg1 );
}

template<int numRows, int numCols, class T >
istream& aol::operator>> ( istream &  is,
Mat< numRows, numCols, T > &  m 
) [inline]

Definition at line 1249 of file smallMat.h.

References aol::Mat< numRows, numCols, _DataType >::read().

                                                                        {
  return m.read ( is );
}

template<int dim, class T >
istream& aol::operator>> ( istream &  is,
Vec< dim, T > &  v 
) [inline]

Definition at line 889 of file smallVec.h.

References aol::Vec< dimension, _DataType >::read().

                                                           {
  return v.read ( is );
}

template<class T >
istream& aol::operator>> ( istream &  is,
Vec3< T > &  v 
) [inline]

Definition at line 904 of file smallVec.h.

References aol::Vec3< _DataType >::read().

                                                       {
  return v.read ( is );
}

template<typename DataType >
istream& aol::operator>> ( istream &  is,
Vector< DataType > &  vec 
)

Read Vector from istream.

Definition at line 995 of file vec.h.

References aol::Vector< _DataType >::read().

                                                           {
  return vec.read ( is );
}

template<class DataType >
istream& aol::operator>> ( istream &  is,
ElasticTensor< DataType > &  green 
) [inline]

Definition at line 232 of file tensor.h.

References aol::ElasticTensor< DataType >::read().

                                                                            {
  return green.read ( is );
}

template<class T >
istream& aol::operator>> ( istream &  is,
Vec2< T > &  v 
) [inline]

Definition at line 894 of file smallVec.h.

References aol::Vec2< _DataType >::read().

                                                       {
  return v.read ( is );
}

template<class _DataType >
istream& aol::operator>> ( istream &  is,
Matrix< _DataType > &  m 
)

Definition at line 493 of file matrix.h.

References aol::Matrix< _DataType >::read().

                                                                                     {
  return m.read ( is );
}

template<typename DataType >
istream& aol::operator>> ( istream &  is,
MultiVector< DataType > &  MVec 
)

Read MultiVector from istream.

Definition at line 589 of file multiVector.h.

                                                                 {
  return MVec.read ( is );
}

int aol::Pow ( int  Base,
int  Exponent 
) [inline]

Calculates (Base)^(Exponent), where Base is an integer and Exponent a non negative integer.

In contrast to the standard pow function, this one takes integers as arguments and returns an integer. This way you can calculate i^j without any casts or warnings.

Author:
Berkels

Definition at line 285 of file aol.h.

Referenced by qc::ScalarArray< _DataType, qc::QC_2D >::loadFromTruncatedImage(), and qc::ScalarArray< _DataType, qc::QC_2D >::truncateAndWriteTo().

                                        {
  int power = 1;
  for ( int i = 0; i < Exponent; ++i )
    power *= Base;
  return power;
}

void aol::printSelfTestFailureMessage ( const string &  message  ) 

for consistent output of failed selfTests (message should be 80 characters wide)

void aol::printSelfTestSuccessMessage ( const string &  message  ) 

for consistent output of successful selfTests (message should be 80 characters wide)

template<typename MatrixType , typename DataType >
ostream& aol::printSparseOctave ( const MatrixType A,
ostream &  os 
)

Writes a matrix into an ostream in the Octave sparse format.

Author:
Berkels, Schwen

Definition at line 62 of file matrix.h.

References isFinite(), and longScientificFormat.

                                                                {
  os << "A = sparse(" << A.getNumRows() << "," <<  A.getNumCols() << ");" << endl;
  vector<typename Row<DataType>::RowEntry > vec;
  for ( int i = 0; i < A.getNumRows(); ++i ) {
    A.makeRowEntries ( vec, i );
    for ( typename vector<typename Row<DataType>::RowEntry >::iterator it = vec.begin(); it != vec.end(); ++it ) {
      if ( it->value != ZOTrait<DataType>::zero ) {
        if ( isFinite ( it->value ) ) {
          // note that octave's indexing starts from 1
          os << "A (" << i + 1 << ", " << it->col + 1 << ") = " << longScientificFormat ( it->value ) << ";" << endl;
        } else
          cerr << it->value << " found at position (" << i << "," << it->col << ")!\n" << endl;
      }
    }
    os << endl;
  }
  return os;
}

template<typename ProductType , typename FactorType >
bool aol::productWillFit ( const FactorType  a,
const FactorType  b 
)

Function that returns true when a * b can be represented by ProductType

Author:
von Deylen

Definition at line 127 of file aol.h.

References Abs().

                                                               {
  if ( ( ( ( a < 0 ) && ( b > 0 ) ) || ( ( a > 0 ) && ( b < 0 ) ) )
       && a * b == std::numeric_limits<ProductType>::min() )
    return true;
  if (b == 0)
    return true;
  return Abs ( a ) <= std::numeric_limits<ProductType>::max() / Abs ( b );
}

template<class T >
T aol::RadiansToDegrees ( a  )  [inline]

Conversion from radians to degrees

Definition at line 246 of file aol.h.

{ return a * 180. / aol::NumberTrait<T>::pi; }

template<class DataType >
void aol::readbinary ( istream &  is,
DataType data 
)

Binary input from stream, nothing is done about byte order.

Definition at line 416 of file aol.h.

                                                {
  is.read ( reinterpret_cast<char*> ( &data ), sizeof ( data ) );
}

template<typename InDataType , typename OutDataType >
OutDataType aol::readBinaryData ( istream &  In  ) 
Author:
Berkels

Definition at line 445 of file aol.h.

                                           {
  OutDataType temp;
  readBinaryData<InDataType, OutDataType> ( In, &temp, 1 );
  return temp;
}

template<typename InDataType , typename OutDataType >
void aol::readBinaryData ( istream &  In,
OutDataType *  Dest,
const int  Length 
)
Author:
Berkels

Definition at line 430 of file aol.h.

                                                                         {
  if ( sizeof ( InDataType ) == sizeof ( OutDataType ) ) {
    In.read ( reinterpret_cast< char* > ( Dest ), Length * sizeof ( InDataType ) );
  } else {
    InDataType *dummy = new InDataType[ Length];
    In.read ( reinterpret_cast< char* > ( dummy ),  Length * sizeof ( InDataType ) );
    for ( int i = 0; i < Length; ++i ) Dest[i] = static_cast< OutDataType > ( dummy[i] );
    delete[] dummy;
  }
}

template<class MatrixType >
void aol::readReflection ( MatrixType decomp,
const Vector< typename MatrixType::DataType > &  lengths,
int  i,
Vector< typename MatrixType::DataType > &  normal,
typename MatrixType::DataType &  alpha,
int  offset = 0 
)

Reads reflection from matrix

Parameters:
offset number of entries below diagonal where stored normal starts

Definition at line 487 of file matrixInverse.h.

References aol::Vector< _DataType >::resize().

Referenced by aol::QRInverse< DataType >::apply(), aol::QRInversePivot< DataType >::applyWithoutPostIteration(), aol::QRGivensTridiag< MatrixType >::getQ(), and aol::QRInverse< DataType >::getQ().

                                                                       {
  normal.resize ( decomp.getNumRows () - i - offset );
  decomp.getSubColumn ( i + offset, i, normal );
  alpha = lengths [i];
}

void aol::resetCtrlCState (  ) 
template<typename T >
int aol::Rint ( const T  A  ) 

symmetrical round to nearest int

Definition at line 214 of file aol.h.

Referenced by qc::RegistrationMultilevelDescentInterface< ConfiguratorType >::averageSeries().

{ return ( A >= 0 ) ? static_cast<int> ( A + 0.5 ) : static_cast<int> ( A - 0.5 ); }

template<typename OpType1 , typename OpType2 , typename RealType >
RealType aol::rowwiseOpLinfDifference ( const OpType1 &  Op1,
const OpType2 &  Op2,
const int  NumRows 
)

determine Linf difference of two Ops via makeRowEntries

Author:
Schwen

Definition at line 150 of file matrix.h.

                                                                                               {
  RealType ret = - aol::NumberTrait<RealType>::Inf;

  for ( int i = 0; i < NumRows; ++i ) {
    std::map< int, RealType > rowEntryDifference;
    vector< typename aol::Row<RealType>::RowEntry > rowEntries1, rowEntries2;

    Op1.makeRowEntries ( rowEntries1, i );
    Op2.makeRowEntries ( rowEntries2, i );

    for ( typename vector< typename aol::Row<RealType>::RowEntry >::const_iterator it = rowEntries1.begin(); it != rowEntries1.end(); ++it )
      rowEntryDifference[ it->col ] += it->value;

    for ( typename vector< typename aol::Row<RealType>::RowEntry >::const_iterator it = rowEntries2.begin(); it != rowEntries2.end(); ++it )
      rowEntryDifference[ it->col ] -= it->value;

    for ( typename std::map< int, RealType >::const_iterator it = rowEntryDifference.begin(); it != rowEntryDifference.end(); ++it )
      if ( fabs ( it->second ) > ret )
        ret = fabs ( it->second );
  }

  return ( ret );
}

void aol::runGnuplot ( const char GnuplotCommandFileName  ) 
void aol::setCurrentDirectory ( string  dir  ) 

Definition at line 225 of file platformDependent.cpp.

                                        {
#ifdef GNU
  chdir ( dir.c_str() );
#else
  #if (defined(_MSC_VER))
    _chdir ( dir.c_str() );
    #else
      throw UnimplementedCodeException("setCurrentDirectory", __FILE__, __LINE__);
  #endif
#endif
}

void aol::setCurrentDirectory ( std::string  dir  ) 
template<class T >
T aol::signum ( x  )  [inline]
template<class T >
T aol::signum1at0 ( x  )  [inline]
template<typename RealType >
void aol::solveRTransposedR ( FullMatrix< RealType > &  R,
const aol::Vector< RealType > &  RHS,
aol::Vector< RealType > &  X 
)

Solves (R^tR)X=RHS, if R is an upper triangular matrix.

Todo:
Find a more suitable place for this function.
Author:
Berkels

Definition at line 998 of file solver.h.

References aol::FullMatrix< _DataType >::get(), aol::GenSparseOp< RealType >::getNumCols(), aol::GenSparseOp< RealType >::getNumRows(), and aol::Vector< _DataType >::size().

                                                                                                           {
#ifdef BOUNDS_CHECK
  if ( X.size() != R.getNumRows() )
    throw Exception ( "Length of X not compatible to R!.", __FILE__, __LINE__ );
  if ( RHS.size() != R.getNumRows() )
    throw Exception ( "Length of RightHandSide not compatible to R!.", __FILE__, __LINE__ );
  if ( R.getNumRows() != R.getNumCols() )
    throw Exception ( "Matrix R is not quadratic!.", __FILE__, __LINE__ );
#endif
  aol::Vector<RealType> Y ( R.getNumRows() );
  int i, j; // May not be unsigned due to >=0 comparison below
  RealType val;

  // first step: solve R^t*y = RHS
  for ( i = 0; i < R.getNumRows(); ++i ) {
    val = RHS[ i ];
    for ( j = 0; j < i; ++j ) {
      val -= Y[j] * R.get ( j, i );
    }
    Y[i] = val  / R.get ( i, i );
  }

  // second step: solve R*x = y
  for ( i = R.getNumRows() - 1; i >= 0; --i ) {
    val = Y[i];
    for ( j = i + 1; j < R.getNumRows() ; ++j ) {
      val -= X[j] * R.get ( i, j );
    }
    X[i] = val / R.get ( i, i );
  }
}

template<class T >
T aol::Sqr ( a  )  [inline]

Returns square of a.

Definition at line 203 of file aol.h.

Referenced by aol::BaseFunctionSetMultiLinBubble< RealType, qc::QC_2D, QuadRuleType >::_dx_b5(), aol::BaseFunctionSetMultiLinBubble< RealType, qc::QC_2D, QuadRuleType >::_dy_b5(), qc::MIRegistrationEnergyWithRegardToPhi< ConfiguratorType, ConfiguratorTypeFeatureDomain >::apply(), aol::JacobiInverse< VectorType, OpType >::apply(), qc::FENonlinLevelsetIntegrationVectorInterface< ConfiguratorType, qc::QC_2D, NumCompArg, Imp >::applyAdd(), qc::FENonlinLevelsetVectorDiffOpInterface< ConfiguratorType, qc::QC_2D, NumCompArg, NumCompDest, Imp >::applyAdd(), qc::FENonlinLevelsetVectorOpInterface< ConfiguratorType, qc::QC_2D, NumCompArg, NumCompDest, Imp >::applyAdd(), qc::BoundaryDiffIntegrationInterface< ConfiguratorType, VecType, qc::QC_3D, QuadType, Imp >::applyAdd(), qc::BoundaryIntegrationInterface< ConfiguratorType, VecType, qc::QC_3D, QuadType, Imp >::applyAdd(), nb::BoundaryIntegrationInterface< ConfigType, GridType, VecType, qc::QC_3D, QuadType, Imp >::applyAdd(), aol::FE_L2Projection< ConfigDomainType, ConfigRangeType >::applyAdd(), aol::Triangle< DataType >::barycenter(), qc::simplex::BaseFunctionSetTFE< RealType, Dim, QuadRuleType >::BaseFunctionSetTFE(), aol::DerivativeValidatorBase< VecType::DataType, VecType >::buildPositionsVector(), qc::DistanceSweeper3d< DataType, LocalBitArrayType, LocalDistanceArrayType, _GridType >::calcCoords_yzw(), tpcfe::CFETester::CFEStandardConvergenceTester(), tpcfe::SlopeInterface< CFEGrid< RealType, CFE_TPOS > >::coarsenSlopeInterface(), qc::DistanceSweeper3d< DataType, LocalBitArrayType, LocalDistanceArrayType, _GridType >::computeDistances(), qc::JointHistogram< RealType >::computeJointHistogramWithParzenWindowing(), tpcfe::CFELookup< RealType >::computeNormals(), aol::NewtonInfo< RealType >::computeSolverTOL(), tpcfe::CFEInterfaceTriangulationWithVonMisesStressGeneratorBase< GridType >::computeTetraData(), qc::simplex::ConfiguratorTraitLinear< _RealType, QC_2D, _QuadType, _InitType >::ConfiguratorTraitLinear(), tpcfe::CFEInterfaceTriangulationGenerator< GridType, Float_Type >::determineClippedBoundaryTriangulation(), tpcfe::CFEInterfaceTriangulationGenerator< GridType, Float_Type >::determineSliceTriangulation(), qc::SignedDistanceBase3D< RealType, eik::EikonalNA3D< RealType > >::dist(), qc::HyperelasticSubHessian< ConfiguratorType, HyperelasticEnergyDensityType >::elasticityTensor(), aol::QRDecomposeGivensBase< RealType >::eliminate(), Erf(), euclidianDist(), qc::HyperelasticEnergyDensityStVenantKirchhoff< ConfiguratorType >::evaluate(), qc::HyperelasticEnergyDensityDefault< ConfiguratorType >::evaluate(), qc::PeronaMalikWeightingFunction< RealType >::evaluate(), aol::QuadraticZeroOneIntervalPenaltyFunction< RealType >::evaluate(), aol::ZeroOneIntervalPenaltyFunction< RealType >::evaluate(), aol::PolynomialHeavisideFunction< RealType >::evaluate(), aol::SquareFunction< RealType >::evaluate(), qc::HyperelasticEnergyDensityStVenantKirchhoff< ConfiguratorType >::evaluateAtQuadPoint(), qc::HyperelasticEnergyDensityDefault< ConfiguratorType >::evaluateAtQuadPoint(), qc::AntiCompressionHyperelasticEnergyDensity< ConfiguratorType, HyperelasticEnergyDensityType >::evaluateDerivative(), aol::CubicZeroOneIntervalPenaltyFunction< RealType >::evaluateDerivative(), aol::OneMinusArcTanHeavisideFunction< RealType >::evaluateDerivative(), aol::ArcTanHeavisideFunction< RealType >::evaluateDerivative(), qc::AntiCompressionHyperelasticEnergyDensity< ConfiguratorType, HyperelasticEnergyDensityType >::evaluateDerivativeAtQuadPoint(), qc::IntegrateFunctionSqrOverLevelSet< RealType, qc::QC_3D >::evaluateFunction(), aol::ClassicalChanVeseVectorEnergyMultiPhiVariation< ConfiguratorType, HeavisideFunctionType, NumberOfLevelsetFunctions, ImageDimension >::evaluateIndicator(), aol::ClassicalChanVeseVectorEnergyMulti< ConfiguratorType, HeavisideFunctionType, NumberOfLevelsetFunctions, ImageDimension >::evaluateIndicator(), aol::ClassicalChanVeseEnergyMultiPhiVariation< ConfiguratorType, HeavisideFunctionType, NumberOfLevelsetFunctions >::evaluateIndicator(), aol::ClassicalChanVeseEnergyMulti< ConfiguratorType, HeavisideFunctionType, NumberOfLevelsetFunctions >::evaluateIndicator(), qc::SSDEnergy< ConfiguratorType >::evaluateIntegrand(), qc::ConsistencyEnergyOp< ConfiguratorType >::evaluateIntegrand(), qc::ATEnergyOp< ConfiguratorType >::evaluateIntegrand(), qc::AntiCompressionHyperelasticEnergyDensity< ConfiguratorType, HyperelasticEnergyDensityType >::evaluateSecondDerivative(), qc::HyperelasticEnergyDensityDefault< ConfiguratorType >::evaluateSecondDerivative(), aol::ArcTanHeavisideFunction< RealType >::evaluateSecondDerivative(), qc::AntiCompressionHyperelasticEnergyDensity< ConfiguratorType, HyperelasticEnergyDensityType >::evaluateSecondDerivativeAtQuadPoint(), qc::HyperelasticEnergyDensityDefault< ConfiguratorType >::evaluateSecondDerivativeAtQuadPoint(), qc::EllipseAnisotropy< RealType >::explicitPart(), qc::Isotropy3d< RealType >::explicitPart(), qc::Isotropy< RealType >::explicitPart(), qc::LevelSet2dInt< RealType, Dilate2d >::firstDerivativeXENO(), qc::ENODerivative< RealType, qc::QC_2D >::firstDerivativeXENO(), qc::LevelSet2dInt< RealType, Dilate2d >::firstDerivativeYENO(), qc::ENODerivative< RealType, qc::QC_2D >::firstDerivativeYENO(), qc::VolumeEnergy< ConfiguratorType, Dim >::gamma(), qc::RotatedEllipsoidAnisotropy< RealType >::gamma(), qc::EllipsoidAnisotropy< RealType >::gamma(), qc::RotatedEllipsoidAnisotropy< RealType >::gammaFirstDerivative(), qc::EllipsoidAnisotropy< RealType >::gammaFirstDerivative(), qc::EllipseAnisotropy< RealType >::gammaFirstDerivative(), qc::RegMaxAnisotropy< RealType >::gammaFirstDerivative(), qc::Pedestal2d< RealType >::gammaFirstDerivative(), qc::Pedestal3d< RealType >::gammaFirstDerivativeFromFranckDiagram(), qc::Pedestal3d< RealType >::gammaFirstDerivativeFromWulffShape(), qc::RotatedEllipsoidAnisotropy< RealType >::gammaNorm(), qc::EllipsoidAnisotropy< RealType >::gammaNorm(), qc::EllipseAnisotropy< RealType >::gammaNorm(), qc::Isotropy3d< RealType >::gammaNorm(), qc::Isotropy< RealType >::gammaNorm(), qc::RegMaxAnisotropy< RealType >::gammaNorm(), qc::SinePolygonRotated3d< RealType >::gammaNorm(), qc::Pentagon3d< RealType >::gammaNorm(), qc::Pentagon2d< RealType >::gammaNorm(), qc::RotatedHexagon3d< RealType >::gammaNorm(), qc::DoubleCone3d< RealType >::gammaNorm(), qc::LInfNorm3d< RealType >::gammaNorm(), qc::LInfNorm2d< RealType >::gammaNorm(), qc::Parallelogram2d< RealType >::gammaNorm(), qc::Pedestal2d< RealType >::gammaNormFromDistFct(), qc::Pedestal3d< RealType >::gammaNormFromFranckDiagram(), qc::Pedestal3d< RealType >::gammaNormFromWulffShape(), qc::Pedestal2d< RealType >::gammaNormFromWulffShape(), qc::ShapeLevelsetGenerator< DataType >::generateAnisoSelected3DRodsLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateBallLevelset(), qc::DataGenerator< ConfiguratorType >::generateCircle(), qc::generateCompactSupportKernel1DGrad(), qc::ShapeLevelsetGenerator< DataType >::generateConeLevelset(), qc::DataGenerator< ConfiguratorType >::generateCylindricalLevelset(), qc::DataGenerator< ConfiguratorType >::generateDiagonalLevelsetPlusCirclesInTheCorners(), qc::DataGenerator< ConfiguratorType >::generateEllipseLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateEllipsoidLevelset(), qc::DataGenerator< ConfiguratorType >::generateEllipsoidLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateEllipticColumnLevelset(), qc::generateGaussKernel(), qc::generateGaussKernel1D(), qc::generateGaussKernel1DGrad(), qc::generateGaussKernelGrad(), qc::PiecewiseConstantTwoPhaseMSSegmentor< ConfiguratorType, ImageDimension, BaseClass >::generateIndicatorFunction(), qc::generateMotionBlurKernel(), qc::DataGenerator< ConfiguratorType >::generatePiecewiseAffineFlowField(), qc::DataGenerator< ConfiguratorType >::generateRegularizedL1SphereLevelset(), qc::DataGenerator< ConfiguratorType >::generateThreeDiagonalsPiecewiseConstant(), qc::DataGenerator< ConfiguratorType >::generateTwoCirclesPhaseField(), qc::ShapeLevelsetGenerator< DataType >::generateXRotated3DRodsLevelset(), qc::ShapeLevelsetGenerator< DataType >::generateZ3Levelset(), qc::ShapeLevelsetGenerator< DataType >::generateZLevelset(), aol::GeometricScalingPreconditioner< aol::MultiVector< RealType > >::GeometricScalingPreconditioner(), aol::GeometricScalingPreconditioner< aol::Vector< RealType > >::GeometricScalingPreconditioner(), qc::WillmoreStiffWOp< ConfiguratorType >::getCoeff(), qc::MCMWeightedMassOp< ConfiguratorType, IndexMode >::getCoeff(), qc::MCMWeightedStiffOp< ConfiguratorType, IndexMode >::getCoeff(), qc::LocalRotatedAnisotropyStiffOp< ConfiguratorType, AnisoType, IndexMode >::getCoeff(), qc::SquaredWeightDeformMassOp< ConfiguratorType >::getCoeff(), qc::SquaredInvDeformedWeightMassOp< ConfiguratorType, IndexMode >::getCoeff(), qc::SquaredDeformedWeightMassOp< ConfiguratorType, IndexMode >::getCoeff(), qc::TVStiffOp< ConfiguratorType >::getCoeff(), qc::PeronaMalikLevelSetStiffOp< ConfiguratorType >::getCoeff(), qc::PeronaMalikStiffOp< ConfiguratorType >::getCoeff(), qc::ATStiffV2Op< ConfiguratorType >::getCoeff(), qc::ATMassV2Op< ConfiguratorType >::getCoeff(), qc::ATWeightedStiffV2DeformOp< ConfiguratorType >::getCoeff(), qc::ATStiffV2DeformOp< ConfiguratorType >::getCoeff(), aol::SquaredWeightStiffOp< ConfiguratorType, IndexMode >::getCoeff(), aol::SquaredWeightMassOp< ConfiguratorType, IndexMode >::getCoeff(), qc::WillmoreProjectionStiffOp< ConfiguratorType >::getCoeffMatrix(), qc::AnisoTangentialProjectionStiffOp< ConfiguratorType, IndexMode >::getCoeffMatrix(), qc::AnisotropicDiffusion3DLevelSetStiffOp< ConfiguratorType, LinearSmootherType >::getCoeffMatrix(), qc::AnisotropicDiffusion2DStiffOp< ConfiguratorType >::getCoeffMatrix(), aol::IsotropicMatrixStiffOp< ConfiguratorType >::getCoeffMatrix(), qc::ScalarArray< _DataType, qc::QC_2D >::getFilterGradientMag(), aol::TrustRegionMethod< _RealType, _VectorType, _SecondDerivativeType, _PrecondType, SubMatrixType >::getFrobeniusNormSqr(), aol::FullMatrix< _DataType >::getFrobeniusNormSqr(), aol::Matrix< _DataType >::getFrobeniusNormSqr(), qc::HopfLax< RealType >::getLocalHopfLaxUpdate(), qc::HopfLax< RealType >::getLocalHopfLaxUpdateAndExtend(), qc::GridDefinition::getNumberOfElements(), qc::QuocConfiguratorTraitMultiQuad< _RealType, qc::QC_2D, _QuadType, _MatrixType >::getNumGlobalDofs(), aol::Vector< typename ConfiguratorType::ConfiguratorType::RealType >::getStdDev(), qc::CachedBicubicInterpolator< RealType >::getValue(), qc::RectangularGrid< qc::QC_2D >::getVolumeFractionOf01Cube(), aol::Polynom< T >::getZeroes(), qc::DistanceSweeper3d< DataType, LocalBitArrayType, LocalDistanceArrayType, _GridType >::HLUpdatePossible(), qc::EllipseAnisotropy< RealType >::implicitPart(), qc::Isotropy3d< RealType >::implicitPart(), qc::Isotropy< RealType >::implicitPart(), qc::GridDefinition::indexToCoordGlobal(), qc::PeriodicFastILexMapper< QC_3D >::init(), tpcfe::interpolateDataAtPositionWC(), qc::LineSegment< RealType >::length(), aol::LineSegment< RealType, qc::QC_3D >::length(), aol::LineSegment< RealType, qc::QC_2D >::length(), aol::Vector< _DataType >::lpNormPowP(), qc::GaussDiffKernel3d< T_RealType >::makeKernel(), qc::GaussDiffKernel2d< RealType >::makeKernel(), aol::Mat< Dim, Dim+1, RealType >::makeProjectionMatrix(), qc::meanZeroShiftAndRotationProjector< ConfiguratorType >::momentMatrixNonlinear(), aol::TrustRegionMethod< _RealType, _VectorType, _SecondDerivativeType, _PrecondType, SubMatrixType >::partialFactorizationEigenvalueBound(), qc::FELinLevelsetScalarWeightedMassInterface< ConfiguratorType, QC_2D, Imp >::prepareLocalMatrix(), aol::Triangle< DataType >::projectToSegment(), tpcfe::CFEMultigridProjectAvgConstr< CFEOpType, CFEMassOpType, CMode >::setCoarsePreconditioner(), qc::LevelSet2dInt< RealType, Dilate2d >::setData(), qc::CGBasedInverseH1Metric< ConfiguratorType >::setSigma(), qc::GeneralLinearSmoothOp< ConfiguratorType >::setSigma(), qc::LinearSmoothOp< RealType >::setSigma(), aol::TrustRegionMethod< _RealType, _VectorType, _SecondDerivativeType, _PrecondType, SubMatrixType >::solveSubProblem(), aol::TrustRegionMethod< _RealType, _VectorType, _SecondDerivativeType, _PrecondType, SubMatrixType >::solveSubProblemLanczos(), aol::Vector< _DataType >::sum(), aol::SecondDerivativeValidator< VecType, SecondDerivativeType >::testAllDirections(), qc::LevelSet2dInt< RealType, Dilate2d >::timeStepENO(), qc::LevelSet2dInt< RealType, Dilate2d >::timeStepEO(), qc::LevelSet3dInt< RealType, Dilate3d >::timeStepEO(), qc::GrowWulffshapeEO3D< RealType, AnisoType >::velocity(), and qc::WriteVectorField().

{ return a*a; }

string aol::strprintf ( const char format,
  ... 
)

Give back formatted string, analogously to sprintf, but save the long way 'round with char arrays.

Referenced by aol::GenSparseMatrix< RealType >::apply(), aol::NewtonIterationBase< ConfiguratorType::RealType, aol::Vector< ConfiguratorType::RealType >, aol::Vector< ConfiguratorType::RealType >, SecondDerivativeType >::apply(), aol::GenSparseMatrix< RealType >::applyAdd(), qc::RegistrationMultilevelDescentInterface< ConfiguratorType >::averageSeries(), qc::simplex::BaseFunctionCollection< RealType, QuadType, QC_3D >::BaseFunctionCollection(), qc::RegistrationMultilevelDescentInterface< ConfiguratorType >::createTemplateFileNameList(), qc::DefaultArraySaver< RealType, ConfiguratorType::Dim >::doSaveStep(), aol::ParameterParser::findFirstVariableField(), qc::StandardRegistration< ConfiguratorType, RegistrationConfiguratorType, RegularizationConfiguratorType, GradientDescentType >::findTransformation(), qc::TwoPhaseMSSegmentor< ConfiguratorType >::generateIndicatorFunction(), qc::GridSize< _Dim >::GridSize(), aol::QLTridiagEigenvectorOp< BandMatrixType, OrthogonalMatrixType >::isTridiagAndSymm(), aol::Mat< Dim, Dim+1, RealType >::Mat(), qc::RegistrationMultilevelDescentInterface< ConfiguratorType >::matchSeries(), aol::MixedFormat::operator()(), aol::ParameterParser::parse(), aol::ParameterParser::readField(), aol::TriangMesh< DataType >::resizeTriangDataDescription(), aol::TriangMesh< DataType >::resizeVertexDataDescription(), qc::ScalarArray< _DataType, qc::QC_3D >::saveMetaImageFile(), aol::TimestepSaver< MatrixType::DataType >::savePNG(), aol::Vec< Dim+1, RealType >::Vec(), qc::RegistrationMultilevelDescentInterface< ConfiguratorType >::writeCurrentRegistration(), qc::MIRegistrationConfigurator< ConfiguratorType >::writeCurrentRegistration(), and qc::MIRegistrationConfigurator< ConfiguratorType >::writeInitialRegistration().

template<typename VecType , typename RealType >
void aol::testFirstDerivative ( const VecType &  Position,
const aol::Op< VecType, aol::Scalar< RealType > > &  E,
const aol::Op< VecType > &  DE,
const VecType &  Direction,
const char BasePlotFileName,
const RealType  StepSize = 0.0001 
)

Definition at line 360 of file gradientflow.h.

References aol::Op< _DomainType, _RangeType >::apply(), and aol::DescentDirValidator< RealType, VecType, DerivativeType >::validateAndPlotToPNG().

                                                              {
  VecType derivative ( Direction );
  DE.apply ( Position, derivative );

  aol::IdentityOp<VecType> identity;

  aol::DescentDirValidator<RealType, VecType> validator ( StepSize, 120, identity, E );
  validator.validateAndPlotToPNG ( Position, Direction, derivative, BasePlotFileName );
}

template<typename ConfiguratorType >
void aol::testFirstDerivativeMultiVector ( const typename ConfiguratorType::InitType &  Grid,
const aol::MultiVector< typename ConfiguratorType::RealType > &  Position,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &  E,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &  DE,
const aol::MultiVector< typename ConfiguratorType::RealType > &  Direction,
const char BasePlotFileName,
typename ConfiguratorType::RealType  StepSize = 0.0001 
)

Definition at line 460 of file gradientflow.h.

References aol::Op< _DomainType, _RangeType >::apply(), and STRUCT_COPY.

                                                                                            {
  typedef typename ConfiguratorType::RealType RealType;

  aol::MultiVector<RealType> derivative ( Direction, aol::STRUCT_COPY );
  DE.apply ( Position, derivative );

  aol::LumpedMassOp<ConfiguratorType> lumpedMass ( Grid, false );
  aol::DiagonalBlockOp<RealType> blockLumpedMass ( lumpedMass );
  aol::LumpedMassOp<ConfiguratorType> lumpedMassInv ( Grid, true );
  aol::DiagonalBlockOp<RealType> blockLumpedMassInv ( lumpedMassInv );

  aol::MultiVector<RealType> gradient ( Position, aol::STRUCT_COPY );
  blockLumpedMassInv.apply ( derivative, gradient );

  aol::DescentDirValidator<RealType, aol::MultiVector<RealType> > validator ( StepSize * Grid.H() * Grid.H(), 120, blockLumpedMass, E );
  validator.validateAndPlotToPNG ( Position, Direction, gradient, BasePlotFileName );
}

template<typename ConfiguratorType >
void aol::testFirstDerivativeMultiVector ( const typename ConfiguratorType::InitType &  Grid,
const aol::MultiVector< typename ConfiguratorType::RealType > &  Position,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &  E,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &  DE,
const char BasePlotFileName,
typename ConfiguratorType::RealType  StepSize = 0.0001 
)

Definition at line 485 of file gradientflow.h.

References aol::Op< _DomainType, _RangeType >::apply(), and STRUCT_COPY.

                                                                                            {
  typedef typename ConfiguratorType::RealType RealType;

  aol::MultiVector<RealType> dd ( Position, aol::STRUCT_COPY );   // test direction
  aol::MultiVector<RealType> gr ( Position, aol::STRUCT_COPY );

  aol::LumpedMassOp<ConfiguratorType> lumpedMass ( Grid, false );
  aol::DiagonalBlockOp<RealType> blockLumpedMass ( lumpedMass );
  aol::LumpedMassOp<ConfiguratorType> lumpedMassInv ( Grid, true );
  aol::DiagonalBlockOp<RealType> blockLumpedMassInv ( lumpedMassInv );

  DE.apply ( Position, dd );
  blockLumpedMassInv.apply ( dd, gr );
  dd = gr;
  dd *= -1.;
  aol::DescentDirValidator<RealType, aol::MultiVector<RealType> > validator ( StepSize * Grid.H() * Grid.H(), 120, blockLumpedMass, E );
  validator.validateAndPlotToPNG ( Position, dd, gr, BasePlotFileName );
}

template<typename ConfiguratorType >
void aol::testFirstDerivativeMultiVectorAllDirections ( const typename ConfiguratorType::InitType &  Grid,
const aol::MultiVector< typename ConfiguratorType::RealType > &  Position,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &  E,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &  DE,
const char BasePlotFileName,
typename ConfiguratorType::RealType  StepSize = 0.0001 
)

Definition at line 510 of file gradientflow.h.

References aol::MultiVector< _DataType >::numComponents(), aol::MultiVector< _DataType >::setAll(), and STRUCT_COPY.

                                                                                                         {
  typedef typename ConfiguratorType::RealType RealType;

  aol::MultiVector<RealType> dd ( Position, aol::STRUCT_COPY );   // test direction
  aol::MultiVector<RealType> gr ( Position, aol::STRUCT_COPY );

  aol::LumpedMassOp<ConfiguratorType> lumpedMass ( Grid, false );
  aol::DiagonalBlockOp<RealType> blockLumpedMass ( lumpedMass );

  DE.apply ( Position, gr );
  aol::DescentDirValidator<RealType, aol::MultiVector<RealType> > validator ( StepSize * Grid.H() * Grid.H(), 120, blockLumpedMass, E, false );
  char filename[1024];
  for ( int i = 0; i < Position.numComponents(); i++ ) {
    for ( int j = 0; j < Position[i].size(); j++ ) {
      sprintf ( filename, "%s_%d_%03d", BasePlotFileName, i, j );
      dd.setAll ( 0. );
      dd[i][j] = 1.;
      validator.validateAndPlotToPNG ( Position, dd, gr, filename );
    }
  }
}

template<typename ConfiguratorType >
void aol::testFirstDerivativeMultiVectorSingleComponentAllDirections ( const typename ConfiguratorType::InitType &  Grid,
const aol::MultiVector< typename ConfiguratorType::RealType > &  Position,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &  E,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &  DE,
const int  Component,
const char BasePlotFileName,
typename ConfiguratorType::RealType  StepSize = 0.0001 
)

Definition at line 540 of file gradientflow.h.

References aol::MultiVector< _DataType >::setAll(), and STRUCT_COPY.

{
  typedef typename ConfiguratorType::RealType RealType;

  aol::MultiVector<RealType> dd ( Position, aol::STRUCT_COPY );   // test direction
  aol::MultiVector<RealType> gr ( Position, aol::STRUCT_COPY );

  aol::LumpedMassOp<ConfiguratorType> lumpedMass ( Grid, false );
  aol::DiagonalBlockOp<RealType> blockLumpedMass ( lumpedMass );

  DE.apply ( Position, gr );
  aol::DescentDirValidator<RealType, aol::MultiVector<RealType> > validator ( StepSize * Grid.H() * Grid.H(), 120, blockLumpedMass, E, false );
  char filename[1024];
  for ( int j = 0; j < Position[Component].size(); j++ ) {
    sprintf ( filename, "%s_%03d", BasePlotFileName, j );
    dd.setAll ( 0. );
    dd[Component][j] = 1.;
    validator.validateAndPlotToPNG ( Position, dd, gr, filename );
  }
}

template<typename ConfiguratorType >
void aol::testFirstDerivativeVector ( const typename ConfiguratorType::InitType &  Grid,
const aol::Vector< typename ConfiguratorType::RealType > &  Position,
const aol::Op< aol::Vector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &  E,
const aol::Op< aol::Vector< typename ConfiguratorType::RealType > > &  DE,
const aol::Vector< typename ConfiguratorType::RealType > &  Direction,
const char BasePlotFileName,
typename ConfiguratorType::RealType  StepSize = 0.0001 
)

Definition at line 376 of file gradientflow.h.

References aol::Op< aol::Vector< ConfiguratorType::RealType >, aol::Vector< ConfiguratorType::RealType > >::apply().

                                                                                       {
  typedef typename ConfiguratorType::RealType RealType;
  aol::Vector<RealType> gr ( Grid.getNumberOfNodes() );        // gradient
  aol::Vector<RealType> derivative ( Grid.getNumberOfNodes() );
  DE.apply ( Position, derivative );

  aol::LumpedMassOp<ConfiguratorType> lumpedMass ( Grid, false );
  aol::LumpedMassOp<ConfiguratorType> lumpedMassInv ( Grid, true );

  lumpedMassInv.apply ( derivative, gr );

  aol::DescentDirValidator<RealType, aol::Vector<RealType> > validator ( StepSize * Grid.H() * Grid.H(), 120, lumpedMass, E );
  validator.validateAndPlotToPNG ( Position, Direction, gr, BasePlotFileName );
}

template<typename ConfiguratorType >
void aol::testFirstDerivativeVector ( const typename ConfiguratorType::InitType &  Grid,
const aol::Vector< typename ConfiguratorType::RealType > &  Position,
const aol::Op< aol::Vector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &  E,
const aol::Vector< typename ConfiguratorType::RealType > &  DE,
const char BasePlotFileName,
typename ConfiguratorType::RealType  StepSize = 0.0001 
)

Definition at line 398 of file gradientflow.h.

References aol::Op< aol::Vector< ConfiguratorType::RealType >, aol::Vector< ConfiguratorType::RealType > >::apply().

                                                                                       {
  typedef typename ConfiguratorType::RealType RealType;
  aol::Vector<RealType> gr ( Grid.getNumberOfNodes() );      // gradient 
  aol::Vector<RealType> dd ( DE );                  // descent direction

  aol::LumpedMassOp<ConfiguratorType> lumpedMass ( Grid, false );
  aol::LumpedMassOp<ConfiguratorType> lumpedMassInv ( Grid, true );

  lumpedMassInv.apply ( dd, gr );                   // descent direction is the negative gradient
  dd = gr;
  dd *= -1.;

  aol::DescentDirValidator<RealType, aol::Vector<RealType> > validator ( StepSize * Grid.H() * Grid.H(), 120, lumpedMass, E );
  validator.validateAndPlotToPNG ( Position, dd, gr, BasePlotFileName );
}

template<typename ConfiguratorType >
void aol::testFirstDerivativeVector ( const typename ConfiguratorType::InitType &  Grid,
const aol::Vector< typename ConfiguratorType::RealType > &  Position,
const aol::Op< aol::Vector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &  E,
const aol::Op< aol::Vector< typename ConfiguratorType::RealType > > &  DE,
const char BasePlotFileName,
typename ConfiguratorType::RealType  StepSize = 0.0001 
)

Definition at line 420 of file gradientflow.h.

References STRUCT_COPY.

                                                                                       {
  typedef typename ConfiguratorType::RealType RealType;
  aol::Vector<RealType> dd ( Position, aol::STRUCT_COPY );
  
  DE.apply ( Position, dd );
  testFirstDerivativeVector<ConfiguratorType>( Grid, Position, E, dd, BasePlotFileName, StepSize );
}

template<typename ConfiguratorType >
void aol::testFirstDerivativeVectorAllDirections ( const typename ConfiguratorType::InitType &  Grid,
const aol::Vector< typename ConfiguratorType::RealType > &  Position,
const aol::Op< aol::Vector< typename ConfiguratorType::RealType >, aol::Scalar< typename ConfiguratorType::RealType > > &  E,
const aol::Op< aol::Vector< typename ConfiguratorType::RealType > > &  DE,
const char BasePlotFileName,
typename ConfiguratorType::RealType  StepSize = 0.0001 
)

Definition at line 434 of file gradientflow.h.

References aol::Vector< _DataType >::setAll(), aol::Vector< _DataType >::size(), and STRUCT_COPY.

                                                                                                    {
  typedef typename ConfiguratorType::RealType RealType;

  aol::Vector<RealType> dd ( Position, aol::STRUCT_COPY );   // test direction
  aol::Vector<RealType> gr ( Position, aol::STRUCT_COPY );

  aol::LumpedMassOp<ConfiguratorType> lumpedMass ( Grid, false );

  DE.apply ( Position, gr );
  aol::DescentDirValidator<RealType, aol::Vector<RealType> > validator ( StepSize * Grid.H() * Grid.H(), 120, lumpedMass, E, false );
  char filename[1024];
  for ( int i = 0; i < Position.size(); i++ ) {
    sprintf ( filename, "%s_%03d", BasePlotFileName, i );
    dd.setAll ( 0. );
    dd[i] = 1.;
    validator.validateAndPlotToPNG ( Position, dd, gr, filename );
  }
}

template<typename ConfiguratorType , typename SecondDerivativeType >
void aol::testSecondDerivativeMultiVector ( const typename ConfiguratorType::InitType &  Grid,
const aol::MultiVector< typename ConfiguratorType::RealType > &  Position,
const aol::MultiVector< typename ConfiguratorType::RealType > &  Direction,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &  F,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, SecondDerivativeType > &  DF,
const char BasePlotFileName,
SecondDerivativeType *  PMatDF = new SecondDerivativeType ( ConfiguratorType::Dim, ConfiguratorType::Dim ),
typename ConfiguratorType::RealType  StepSize = 0.0001,
const bool  DeleteMatrixPointer = true 
)

Definition at line 595 of file gradientflow.h.

References aol::Op< _DomainType, _RangeType >::apply(), aol::SecondDerivativeTester< VecType, SecondDerivativeType >::apply(), and STRUCT_COPY.

                                                                               {
  typedef typename ConfiguratorType::RealType RealType;
  aol::FirstDerivativeTester<aol::MultiVector<RealType> > b ( F, Direction );
  aol::SecondDerivativeTester<aol::MultiVector<RealType>, SecondDerivativeType > c ( PMatDF, DF, Direction );
  aol::MultiVector<RealType> dd ( Position, aol::STRUCT_COPY );
  aol::MultiVector<RealType> gr ( Position, aol::STRUCT_COPY );

  aol::LumpedMassOp<ConfiguratorType> lumpedMass ( Grid, false );
  aol::DiagonalBlockOp<RealType> blockLumpedMass ( lumpedMass );
  aol::LumpedMassOp<ConfiguratorType> lumpedMassInv ( Grid, true );
  aol::DiagonalBlockOp<RealType> blockLumpedMassInv ( lumpedMassInv );

  c.apply ( Position, dd );

  blockLumpedMassInv.apply ( dd, gr );
  dd = gr;
  dd *= -1.;

  aol::DescentDirValidator<RealType, aol::MultiVector<RealType> > validator ( StepSize * Grid.H() * Grid.H(), 120, blockLumpedMass, b );
  validator.validateAndPlotToPNG ( Position, dd, gr, BasePlotFileName );

  if ( DeleteMatrixPointer )
    delete PMatDF;
}

template<typename ConfiguratorType , typename SecondDerivativeType >
void aol::testSecondDerivativeMultiVectorAllDirections ( const typename ConfiguratorType::InitType &  Grid,
const aol::MultiVector< typename ConfiguratorType::RealType > &  Position,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType > > &  F,
const aol::Op< aol::MultiVector< typename ConfiguratorType::RealType >, SecondDerivativeType > &  DF,
const char BasePlotFileName,
SecondDerivativeType *  PMatDF = new SecondDerivativeType ( ConfiguratorType::Dim, ConfiguratorType::Dim ),
typename ConfiguratorType::RealType  StepSize = 0.0001,
const bool  DeleteMatrixPointer = true 
)

Definition at line 629 of file gradientflow.h.

References aol::MultiVector< _DataType >::numComponents(), aol::MultiVector< _DataType >::setZero(), and STRUCT_COPY.

                                                                                            {
  typedef typename ConfiguratorType::RealType RealType;
  aol::MultiVector<RealType> mdirection( Position, aol::STRUCT_COPY );

  for( int i = 0; i < Position.numComponents(); i++){
    mdirection.setZero();
    for( int j = 0; j < Grid.getNumberOfNodes(); j++){
      mdirection[i].setZero();
      mdirection[i][j] = 1.;
      char fn[1024];
      sprintf( fn, "%s_%d_%03d", BasePlotFileName, i, j );
      aol::testSecondDerivativeMultiVector<ConfiguratorType, SecondDerivativeType>
        ( Grid, Position, mdirection, F, DF, fn, PMatDF, StepSize, false );
    }
  }
  if ( DeleteMatrixPointer )
    delete PMatDF;
}

template<typename ConfiguratorType , typename SecondDerivativeType >
void aol::testSecondDerivativeVector ( const typename ConfiguratorType::InitType &  Grid,
const aol::Vector< typename ConfiguratorType::RealType > &  Position,
const aol::Vector< typename ConfiguratorType::RealType > &  Direction,
const aol::Op< aol::Vector< typename ConfiguratorType::RealType > > &  F,
const aol::Op< aol::Vector< typename ConfiguratorType::RealType >, SecondDerivativeType > &  DF,
const char BasePlotFileName 
)

Definition at line 569 of file gradientflow.h.

References aol::Op< aol::Vector< ConfiguratorType::RealType >, aol::Vector< ConfiguratorType::RealType > >::apply(), and aol::SecondDerivativeTester< VecType, SecondDerivativeType >::apply().

                                                                 {
  typedef typename ConfiguratorType::RealType RealType;
  aol::FirstDerivativeTester<aol::Vector<RealType> > b ( F, Direction );
  aol::SecondDerivativeTester<aol::Vector<RealType>, SecondDerivativeType > c ( new SecondDerivativeType ( Grid ), DF, Direction );
  aol::Vector<RealType> dd ( Grid.getNumberOfNodes() );
  aol::Vector<RealType> gr ( Grid.getNumberOfNodes() );

  aol::LumpedMassOp<ConfiguratorType> lumpedMass ( Grid, false );
  aol::LumpedMassOp<ConfiguratorType> lumpedMassInv ( Grid, true );

  c.apply ( Position, dd );

  lumpedMassInv.apply ( dd, gr );
  dd = gr;
  dd *= -1.;

  aol::DescentDirValidator<RealType, aol::Vector<RealType> > validator ( 0.0001 * Grid.H() * Grid.H(), 120, lumpedMass, b );
  validator.validateAndPlotToPNG ( Position, dd, gr, BasePlotFileName );
}

template<class T >
string aol::to_string ( const T &  t  ) 

Definition at line 602 of file aol.h.

                                 {
  string result;
  ostringstream oss; // create a stream
  oss << t;          // insert value to stream
  result = oss.str();  // extract value and write it to result
  return result;
}

template<class T >
void aol::to_string ( string &  result,
const T &  t 
)

to_string(s1, 10.5); // double to string to_string(s2, 123); // int to string to_string(s3, true); // bool to string

Definition at line 595 of file aol.h.

                                                {
  ostringstream oss; // create a stream
  oss << t;          // insert value to stream
  result = oss.str();  // extract value and write it to result
}

template<typename RealType , int Dim>
void aol::TransformCartesianCoordinatesByHomogeneousMapping ( const aol::Vec< Dim, RealType > &  arg,
const aol::Mat< Dim+1, Dim+1, RealType > &  transMat,
aol::Vec< Dim, RealType > &  dest 
)

perform a transformation given for homoegeneous coordinates to vectors in Cartesian coordinates

Definition at line 846 of file geom.h.

References CartesianToHomogeneousCoordinates(), HomogeneousToCartesianCoordinates(), and aol::Mat< numRows, numCols, _DataType >::mult().

Referenced by aol::TriangMesh< DataType >::transformHomogeneous().

                                                                                                                                                                         {
  aol::Vec<Dim+1,RealType> argH, destH;
  aol::CartesianToHomogeneousCoordinates ( arg, argH );
  transMat.mult ( argH, destH );
  aol::HomogeneousToCartesianCoordinates ( destH, dest );
}

template<typename MatrixType , typename DataType >
void aol::transposeAToB ( const MatrixType A,
MatrixType B 
)

Tranposes matrix A using makeRowEntries and stores A^T into B.

Author:
Berkels

Definition at line 34 of file matrix.h.

                                                          {
  B.setZero();
  vector<typename Row<DataType>::RowEntry > vec;
  for ( int i = 0; i < A.getNumRows(); ++i ) {
    A.makeRowEntries ( vec, i );
    for ( typename vector<typename Row<DataType>::RowEntry >::iterator it = vec.begin(); it != vec.end(); ++it ) {
      B.set ( it->col, i, it->value );
    }
  }
}

int aol::vscprintf ( const char format,
va_list  ap 
)

Returns the number of characters (not including the trailing '') which would have been written to the final string by vsprintf.

Author:
Berkels
template<class DataType >
void aol::writebinary ( ostream &  os,
const DataType data 
)

Binary output to stream, nothing is done about byte order.

Definition at line 422 of file aol.h.

                                                       {
  os.write ( reinterpret_cast<const char*> ( &data ), sizeof ( data ) );
}

template<class MatrixType >
void aol::writeReflection ( MatrixType decomp,
Vector< typename MatrixType::DataType > &  lengths,
int  i,
const Vector< typename MatrixType::DataType > &  normal,
typename MatrixType::DataType  alpha 
)
template<class MatrixType >
void aol::writeReflection ( MatrixType decomp,
Vector< typename MatrixType::DataType > &  lengths,
int  i,
Vector< typename MatrixType::DataType > &  normal,
typename MatrixType::DataType &  alpha 
)

Definition at line 499 of file matrixInverse.h.

References aol::Vector< _DataType >::size().

                                                            {
  int p = decomp.getNumRows () - normal.size ();
  decomp.setSubColumn ( p, i, normal );
  lengths [i] = alpha;
}


Variable Documentation

bool aol::ctrlC_pressed = false [static]

Definition at line 16 of file ctrlCCatcher.cpp.

Definition at line 409 of file aol.h.

Definition at line 408 of file aol.h.

Definition at line 405 of file aol.h.

Referenced by printSparseOctave(), and aol::Matrix< _DataType >::printSparseOctave().


Generated on Fri Sep 9 2011 21:08:48 for QuocMesh by doxygen 1.7.1