libMesh Namespace Reference

Namespaces

 boostcopy
 
 DenseMatrices
 
 FiniteElements
 
 libMeshPrivateData
 
 MacroFunctions
 
 MeshTools
 
 Nemesis
 
 Parallel
 
 Predicates
 
 Quality
 Utility functions for computing element quality indicators.
 
 RBDataDeserialization
 
 RBDataSerialization
 
 ReferenceElem
 Namespace providing access to reference geoemtric element types.
 
 SparsityPattern
 Defines the sparsity pattern of a sparse matrix.
 
 TensorTools
 
 Threads
 
 Trees
 
 TriangleWrapper
 Namespace that wraps the Triangle mesh generator's API.
 
 Utility
 

Classes

class  AbaqusIO
 
class  AdaptiveTimeSolver
 
class  AdjointDofConstraintValues
 
class  AdjointRefinementEstimator
 
class  AdjointResidualErrorEstimator
 
class  AnalyticFunction
 
class  AutoPtr
 A simple smart pointer providing strict ownership semantics. More...
 
struct  AutoPtrRef
 
class  AztecLinearSolver
 
class  BasicOStreamProxy
 
class  BoundaryInfo
 Used by the Mesh to keep track of boundary nodes and elements. More...
 
class  BoundaryMesh
 Specialized mesh used for keeping track of boundary elements. More...
 
class  BoundaryProjectSolution
 
class  BoundaryVolumeSolutionTransfer
 
class  BoundingBox
 
class  BuildProjectionList
 
class  Cell
 The base class for all 3D geometric element types. More...
 
class  CentroidPartitioner
 
class  CheckpointIO
 
struct  CompareTypes
 
struct  CompareTypes< std::complex< T >, T >
 
struct  CompareTypes< T, std::complex< T > >
 
struct  CompareTypes< T, T >
 
class  CompositeFEMFunction
 FEMFunction which is a function of another function. More...
 
class  CompositeFunction
 Function which is a function of another function. More...
 
class  CondensedEigenSystem
 Extends EigenSystem to allow certain DOFs to be condensed out. More...
 
class  ConstCouplingAccessor
 
class  ConstCouplingRow
 
class  ConstCouplingRowConstIterator
 
class  ConstFEMFunction
 FEMFunction that returns a single. More...
 
class  ConstFunction
 Function that returns a single value that never changes. More...
 
class  ConstParameterProxy
 
class  ConstTypeTensorColumn
 
class  ContinuationSystem
 
class  ConvergenceFailure
 
class  CouplingAccessor
 
class  CouplingMatrix
 Defines the coupling between variables of a System. More...
 
class  DefaultCoupling
 
class  DenseMatrix
 A matrix object used for finite element assembly and numerics. More...
 
class  DenseMatrixBase
 
class  DenseSubMatrix
 
class  DenseSubVector
 
class  DenseVector
 
class  DenseVectorBase
 
class  DGFEMContext
 Extends FEMContext to work for DG problems. More...
 
class  DiffContext
 
class  DifferentiablePhysics
 
class  DifferentiableQoI
 
class  DifferentiableSystem
 
class  DiffSolver
 
class  DirectSolutionTransfer
 Implements solution transfers for matched variable/mesh case. More...
 
class  DirichletBoundaries
 
class  DirichletBoundary
 Class for specifying Dirichlet boundary conditions as constraints. More...
 
class  DiscontinuityMeasure
 
class  DistributedMesh
 Mesh data structure which is distributed across all processors. More...
 
class  DistributedVector
 
class  DofConstraints
 
class  DofConstraintValueMap
 
class  DofMap
 Manages the degrees of freedom (DOFs) in a simulation. More...
 
class  DofObject
 
class  DTKAdapter
 
class  DTKEvaluator
 
class  DTKSolutionTransfer
 
class  DynamicCastFailure
 
class  Edge
 The base class for all 1D geometric element types. More...
 
class  Edge2
 A 1D geometric element with 2 nodes. More...
 
class  Edge3
 A 1D geometric element with 3 nodes. More...
 
class  Edge4
 A 1D geometric element with 4 nodes. More...
 
class  EigenPreconditioner
 
class  EigenSolver
 Base class which defines the interface for solving eigenproblems. More...
 
class  EigenSparseLinearSolver
 
class  EigenSparseMatrix
 
class  EigenSparseVector
 
class  EigenSystem
 Base class for defining systems of equations for eigenproblems. More...
 
class  EigenTimeSolver
 
class  Elem
 The base class for all geometric element types. More...
 
class  ElemAssembly
 
class  ElemCutter
 Subdivides a single element using a mesh generator. More...
 
struct  ElemHashUtils
 A struct providing convenience functions for hashing elements. More...
 
class  EnsightIO
 
class  EpetraMatrix
 
class  EpetraVector
 
class  EquationSystems
 Manages multiples systems of equations. More...
 
class  ErrorEstimator
 
class  ErrorVector
 
class  Euler2Solver
 
class  EulerSolver
 
class  ExactErrorEstimator
 
class  ExactSolution
 
class  ExodusII_IO
 Handles reading and writing of Exodus binary files. More...
 
class  ExodusII_IO_Helper
 
class  ExplicitSystem
 Used for solving explicit systems of equations. More...
 
class  Face
 The base class for all 2D geometric element types. More...
 
class  Factory
 Handles name-based creation of objects. More...
 
class  FactoryImp
 
class  FastPoolAllocator
 Boost-derived allocator that can be used with std::containers. More...
 
class  FE
 Template class which generates the different FE families and orders. More...
 
class  FEAbstract
 
class  FEClough
 
class  FEComputeData
 Helper class used with FEInterface::compute_data(). More...
 
class  FEGenericBase
 
class  FEHermite
 
class  FEHierarchic
 
class  FEInterface
 Interface class which provides access to FE functions. More...
 
class  FEL2Hierarchic
 
class  FEL2Lagrange
 
class  FELagrange
 
class  FELagrangeVec
 
class  FEMap
 Computes finite element mapping function values, gradients, etc. More...
 
class  FEMContext
 
class  FEMFunctionBase
 
class  FEMFunctionWrapper
 
class  FEMonomial
 
class  FEMPhysics
 
class  FEMSystem
 
class  FENedelecOne
 
struct  FEOutputType
 
struct  FEOutputType< LAGRANGE_VEC >
 
struct  FEOutputType< NEDELEC_ONE >
 
class  FEScalar
 
class  FESubdivision
 
class  FETransformationBase
 
class  FEType
 Manages the family, order, etc. parameters for a given FE. More...
 
class  FEXYZ
 
class  FEXYZMap
 An implementation of FEMap for "XYZ" elements. More...
 
class  FileError
 
class  FirstOrderUnsteadySolver
 
class  FloatingPointException
 
class  FrequencySystem
 
class  FroIO
 
class  FunctionBase
 
class  GenericProjector
 
class  GhostingFunctor
 
class  GhostPointNeighbors
 
class  GmshIO
 
class  GMVIO
 
class  GnuPlotIO
 
class  H1FETransformation
 
class  HCurlFETransformation
 
class  Hex
 The base class for all hexahedral element types. More...
 
class  Hex20
 A 3D hexahedral element with 20 nodes. More...
 
class  Hex27
 A 3D hexahedral element with 27 nodes. More...
 
class  Hex8
 A 3D hexahedral element with 8 nodes. More...
 
class  HilbertSFCPartitioner
 Partitioner based on Hilbert's space filling curve algorithm. More...
 
class  HPCoarsenTest
 
class  HPSelector
 
class  HPSingularity
 
class  ImplicitSystem
 Used for solving implicit systems of equations. More...
 
class  InfCell
 The base class for all 3D infinite geometric element types. More...
 
class  InfEdge2
 A 1D infinite element with 2 nodes. More...
 
class  InfElemBuilder
 
class  InfFE
 Base class for all the infinite geometric element types. More...
 
class  InfHex
 The base class for all 3D infinite hexahedral element types. More...
 
class  InfHex16
 A 3D infinite hexahedral element with 16 nodes. More...
 
class  InfHex18
 A 3D infinite hexahedral element with 18 nodes. More...
 
class  InfHex8
 A 3D infinite hexahedral element with 8 nodes. More...
 
class  InfPrism
 The base class for all 3D infinite prismatic element types. More...
 
class  InfPrism12
 A 3D infinite prismatic element with 12 nodes. More...
 
class  InfPrism6
 A 3D infinite prismatic element with 6 nodes. More...
 
class  InfQuad
 The base class for all 2D infinite quadrilateral element types. More...
 
class  InfQuad4
 A 2D infinite quadrilateral element with 4 nodes. More...
 
class  InfQuad6
 A 2D infinite quadrilateral element with 6 nodes. More...
 
class  InverseDistanceInterpolation
 
class  JumpErrorEstimator
 
class  KellyErrorEstimator
 
class  LaplaceMeshSmoother
 
class  LaplacianErrorEstimator
 
class  LaspackLinearSolver
 
class  LaspackMatrix
 
class  LaspackVector
 
class  LibMeshInit
 
class  LinearImplicitSystem
 
class  LinearPartitioner
 Partitions the elements based solely on their ids. More...
 
class  LinearSolutionMonitor
 
class  LinearSolver
 
class  LocationMap
 std::map-like data structure using hashed Points for keys. More...
 
class  LogicError
 
class  MappedSubdomainPartitioner
 Partitions elements based on user-defined mapping from subdomain ids -> processor ids. More...
 
class  mapvector
 
class  MatlabIO
 
class  MEDITIO
 
class  MemorySolutionHistory
 Stores past solutions in memory. More...
 
class  Mesh
 Manages a collection of Nodes and Elems. More...
 
struct  mesh_inserter_iterator
 An output iterator for use with packed_range functions. More...
 
class  MeshBase
 Base class for Mesh. More...
 
class  MeshCommunication
 
class  MeshfreeInterpolation
 Base class which defines the mesh-free interpolation interface. More...
 
class  MeshfreeSolutionTransfer
 A SolutionTransfer object that does "mesh free" interpolation. More...
 
class  MeshFunction
 
class  MeshFunctionSolutionTransfer
 SolutionTransfer object which uses a MeshFunction. More...
 
class  MeshInput
 
class  MeshOutput
 
class  MeshRefinement
 Responsible for mesh refinement algorithms and data. More...
 
class  MeshSerializer
 Temporarily serializes a DistributedMesh for output. More...
 
class  MeshSmoother
 
class  METIS_CSR_Graph
 Compressed graph data structure used by MetisPartitioner. More...
 
class  MetisPartitioner
 Partitioner which interfaces with the METIS library. More...
 
class  MortonSFCPartitioner
 Partitioner based on Morton's space filling curve algorithm. More...
 
struct  myhash
 
class  NameBasedIO
 
class  Nemesis_IO
 
class  Nemesis_IO_Helper
 
class  NewmarkSolver
 
class  NewmarkSystem
 Implements the Newmark time integration scheme. More...
 
class  NewtonSolver
 
class  NloptOptimizationSolver
 
class  Node
 A geometric point in (x,y,z) space associated with a DOF. More...
 
class  NodeConstraints
 
class  NodeElem
 A zero-dimensional geometric entity implementing the Elem interface. More...
 
class  NonlinearImplicitSystem
 Used for solving nonlinear implicit systems of equations. More...
 
class  NonlinearSolver
 
class  NoSolutionHistory
 For storing and retrieiving timestep data. More...
 
class  NotImplemented
 
class  NoxNonlinearSolver
 
struct  null_output_iterator
 A do-nothing output iterator implementation. More...
 
class  NumericVector
 
class  OFFIO
 Reads OOF OOGL triangulated surface files. More...
 
class  OldSolutionValue
 
class  OptimizationSolver
 
class  OptimizationSystem
 
class  OrderWrapper
 
class  ParallelMesh
 
class  ParallelObject
 
class  ParameterAccessor
 Base class for reading/writing sensitivty parameters. More...
 
class  ParameterMultiAccessor
 Stores a user-provided pointer to a parameter. More...
 
class  ParameterMultiPointer
 Stores multiple user-provided pointers. More...
 
class  ParameterPointer
 Stores/modifies a user-provided pointer to a parameter. More...
 
class  ParameterProxy
 
class  Parameters
 
class  ParameterVector
 Specifies parameters for parameter sensitivity calculations. More...
 
class  ParmetisHelper
 Pointer-to-implementation class used by ParmetisPartitioner. More...
 
class  ParmetisPartitioner
 Partitioner which provides an interface to ParMETIS. More...
 
class  ParsedFEMFunction
 Support for using parsed functions in FEMSystem. More...
 
class  ParsedFEMFunctionParameter
 Stores a pointer to a ParsedFEMFunction and a string for the parameter. More...
 
class  ParsedFunction
 A Function generated (via FParser) by parsing a mathematical expression. More...
 
class  ParsedFunctionParameter
 Stores a pointer to a parsed function and a string for the parameter. More...
 
class  Partitioner
 Base class for all concrete Partitioner instantiations. More...
 
class  Patch
 
class  PatchRecoveryErrorEstimator
 
class  PerfData
 Data object managed by PerfLog. More...
 
struct  PerfItem
 
class  PerfLog
 Responsible for timing and summarizing events. More...
 
class  PerfMon
 A class for interfacing with hardware timers. More...
 
class  PeriodicBoundaries
 Maps between boundary ids and PeriodicBoundaryBase objects. More...
 
class  PeriodicBoundary
 Used for implementing periodic BCs via constraints. More...
 
class  PeriodicBoundaryBase
 Base class for all PeriodicBoundary implementations. More...
 
class  PetscDiffSolver
 
class  PetscLinearSolver
 
class  PetscMatrix
 SparseMatrix interface to PETSc Mat. More...
 
class  PetscNonlinearSolver
 
class  PetscPreconditioner
 
class  PetscSolverException
 
class  PetscVector
 NumericVector interface to PETSc Vec. More...
 
class  Plane
 A geometric object representing a planar surface. More...
 
class  PltLoader
 
class  Point
 A geometric point in (x,y,z) space. More...
 
class  PointLocatorBase
 
class  PointLocatorTree
 
class  PointNeighborCoupling
 
class  PoolAllocator
 Boost-derived allocator that can be used with std::containers. More...
 
class  PostscriptIO
 
class  Preconditioner
 
class  Prism
 The base class for all prismatic element types. More...
 
class  Prism15
 A 3D prismatic element with 15 nodes. More...
 
class  Prism18
 A 3D prismatic element with 18 nodes. More...
 
class  Prism6
 A 3D prismatic element with 6 nodes. More...
 
class  Problem_Interface
 
class  Pyramid
 The base class for all pyramid element types. More...
 
class  Pyramid13
 A 3D pyramid element with 13 nodes. More...
 
class  Pyramid14
 A 3D pyramid element with 14 nodes. More...
 
class  Pyramid5
 A 3D pyramid element with 5 nodes. More...
 
class  QBase
 Base class for all quadrature families and orders. More...
 
class  QClough
 Implements quadrature rules for Clough-Tocher macroelements. More...
 
class  QComposite
 A quadrature rule for subdivided elements. More...
 
class  QConical
 Conical product quadrature rules for Tri and Tet elements. More...
 
class  QGauss
 Implements 1, 2, and 3D "Gaussian" quadrature rules. More...
 
class  QGaussLobatto
 Implements 1D and 2/3D tensor product Gauss-Lobatto quadrature rules. More...
 
class  QGrid
 Implements grid-based quadrature rules suitable for non-smooth functions. More...
 
class  QGrundmann_Moller
 Implements the quadrature rules of Grundmann and Moller in 2D and 3D. More...
 
class  QJacobi
 Implements 1D Gauss-Jacobi quadrature rules of various orders. More...
 
class  QMonomial
 Implements quadrature rules for non-tensor polynomials. More...
 
class  QoISet
 Used to specify quantities of interest in a simulation. More...
 
class  QSimpson
 Implements Simpson's rule, i.e. nodal quadrature for quadratic elements. More...
 
class  QTrap
 Implements trapezoidal rule, i.e. nodal quadrature for linear elements. More...
 
class  Quad
 The base class for all quadrilateral element types. More...
 
class  Quad4
 A 2D quadrilateral element with 4 nodes. More...
 
class  Quad8
 A 2D quadrilateral element with 8 nodes. More...
 
class  Quad9
 A 2D quadrilateral element with 9 nodes. More...
 
class  QuadShell4
 A 2D quadrilateral shell element with 4 nodes. More...
 
class  RadialBasisInterpolation
 Does radial basis function interpolation using Nanoflann. More...
 
class  RawAccessor
 
class  RawAccessor< TypeNTensor< N, ScalarType > >
 
struct  RawFieldType
 
struct  RawFieldType< Gradient >
 
struct  RawFieldType< Number >
 
struct  RawFieldType< Real >
 
struct  RawFieldType< RealGradient >
 
struct  RawFieldType< RealTensor >
 
struct  RawFieldType< Tensor >
 
struct  RawFieldType< TypeNTensor< 3, Number > >
 
struct  RawFieldType< TypeNTensor< 3, Real > >
 
class  RBAssemblyExpansion
 
class  RBConstruction
 
class  RBConstructionBase
 
class  RBEIMAssembly
 
class  RBEIMConstruction
 
class  RBEIMEvaluation
 
class  RBEIMTheta
 
class  RBEvaluation
 
class  RBParameters
 
class  RBParametrized
 
class  RBParametrizedFunction
 Provides a reduced basis parameterized function. More...
 
class  RBSCMConstruction
 
class  RBSCMEvaluation
 
class  RBTemporalDiscretization
 Encapsulates the details of the generalized Euler discretization. More...
 
class  RBTheta
 
class  RBThetaExpansion
 
class  ReferenceCountedObject
 
class  ReferenceCounter
 Common base for all objects whose creations/destructions are counted. More...
 
class  RefinementSelector
 
class  RemoteElem
 Used by ParallelMesh to represent an Elem owned by another processor. More...
 
class  ReplicatedMesh
 Mesh data structure replicated on all processors. More...
 
class  safe_bool
 
class  safe_bool_base
 
struct  ScalarTraits
 
struct  ScalarTraits< std::complex< T > >
 
class  SecondOrderUnsteadySolver
 
class  SensitivityData
 Holds completed parameter sensitivity calculations. More...
 
class  SerialMesh
 
class  SFCPartitioner
 Partitioner based on different types of space filling curves. More...
 
class  ShellMatrix
 
class  SiblingCoupling
 
class  Side
 Proxy class for efficiently representing an Elem's side. More...
 
class  SideEdge
 
class  Singleton
 Base class for all library singleton objects. More...
 
class  SlepcEigenSolver
 EigenSolver implementation based on SLEPc. More...
 
class  SolutionHistory
 For storing and retrieiving timestep data. More...
 
class  SolutionTransfer
 Base class for all SolutionTransfer implementations. More...
 
class  SolverConfiguration
 
class  SolverException
 
class  SparseMatrix
 
class  SparseShellMatrix
 
class  Sphere
 A geometric object representing a sphere. More...
 
class  StatisticsVector
 A std::vector derived class for implementing simple statistical algorithms. More...
 
class  SteadySolver
 
class  StoredRange
 Utility class for defining generic ranges for threading. More...
 
class  SubdomainPartitioner
 Independently partitions chunks of subdomains and combines the results. More...
 
class  SumShellMatrix
 
class  Surface
 Base class for Plane and Sphere classes. More...
 
struct  SyncNodalPositions
 
class  System
 
class  SystemNorm
 
class  SystemSubset
 
class  SystemSubsetBySubdomain
 
class  TaoOptimizationSolver
 
class  TecplotIO
 
class  TensorShellMatrix
 
class  TensorValue
 
class  TestClass
 
class  Tet
 The base class for all tetrahedral element types. More...
 
class  Tet10
 A 3D tetrahedral element with 10 nodes. More...
 
class  Tet4
 A 3D tetrahedral element with 4 nodes. More...
 
class  TetGenIO
 
class  TetGenMeshInterface
 
class  TetGenWrapper
 
class  TimeSolver
 
class  TopologyMap
 Enables topology-based lookups of nodes. More...
 
class  TransientRBAssemblyExpansion
 
class  TransientRBConstruction
 
class  TransientRBEvaluation
 
class  TransientRBThetaExpansion
 
class  TransientSystem
 Used for solving transient systems of equations. More...
 
class  Tree
 Tree class templated on the number of leaves on each node. More...
 
class  TreeBase
 
class  TreeNode
 Base class for different Tree types. More...
 
class  Tri
 The base class for all triangular element types. More...
 
class  Tri3
 A 2D triangular element with 3 nodes. More...
 
class  Tri3Subdivision
 A surface shell element used in mechanics calculations. More...
 
class  Tri6
 A 2D triangular element with 6 nodes. More...
 
class  TriangleInterface
 
class  TrilinosPreconditioner
 
class  TriShell3
 
class  TwostepTimeSolver
 
class  TypeNTensor
 
struct  TypesEqual
 
struct  TypesEqual< T, T >
 
class  TypeTensor
 
class  TypeTensorColumn
 
class  TypeVector
 
class  UCDIO
 
class  UniformRefinementEstimator
 
class  UnsteadySolver
 
class  UnstructuredMesh
 Base class for Replicated and Distributed meshes. More...
 
class  UNVIO
 
class  Variable
 A variable which is solved for in a System of equations. More...
 
class  VariableGroup
 
class  VariationalMeshSmoother
 
class  vectormap
 
class  VectorSetAction
 
class  VectorValue
 
class  VTKIO
 
class  WeightedPatchRecoveryErrorEstimator
 
class  WendlandRBF
 Interface for evaluating Wendland's radial basis functions. More...
 
class  WrappedFunction
 
class  WrappedFunctor
 
class  Xdr
 C++ interface for the XDR (eXternal Data Representation) format. More...
 
class  XdrIO
 
class  ZeroFunction
 ConstFunction that simply returns 0. More...
 

Typedefs

template<typename T >
using UniquePtr = std::unique_ptr< T >
 
typedef std::map< dof_id_type, Real, std::less< dof_id_type >, Threads::scalable_allocator< std::pair< const dof_id_type, Real > > > DofConstraintRow
 
typedef std::map< const Node *, Real, std::less< const Node * >, Threads::scalable_allocator< std::pair< const Node *const, Real > > > NodeConstraintRow
 
typedef int32_t eigen_idx_type
 
typedef Eigen::SparseMatrix< Number, Eigen::RowMajor, eigen_idx_typeEigenSM
 
typedef Eigen::Matrix< Number, Eigen::Dynamic, 1 > EigenSV
 
typedef LIBMESH_BEST_UNORDERED_MULTISET< Elem *, ElemHashUtils, ElemHashUtilsunordered_multiset_elem
 
typedef StoredRange< MeshBase::element_iterator, Elem * > ElemRange
 
typedef StoredRange< MeshBase::const_element_iterator, const Elem * > ConstElemRange
 
typedef FEGenericBase< RealFEBase
 
typedef TensorValue< NumberNumberTensorValue
 
typedef NumberTensorValue Tensor
 
typedef VectorValue< NumberNumberVectorValue
 
typedef NumberVectorValue Gradient
 
typedef FEGenericBase< RealGradientFEVectorBase
 
typedef VectorValue< RealRealVectorValue
 
typedef TensorValue< RealRealTensorValue
 
typedef RealVectorValue RealGradient
 
typedef RealTensorValue RealTensor
 
typedef TestClass subdomain_id_type
 
typedef int8_t boundary_id_type
 
typedef uint8_t dof_id_type
 
typedef uint8_t unique_id_type
 
typedef dof_id_type numeric_index_type
 
typedef uint8_t processor_id_type
 
typedef uint64_t largest_id_type
 
typedef std::complex< RealComplex
 
typedef std::complex< RealCOMPLEX
 
typedef Real Number
 
typedef DistributedMesh DefaultMesh
 
typedef Real REAL
 
typedef StoredRange< MeshBase::node_iterator, Node * > NodeRange
 
typedef StoredRange< MeshBase::const_node_iterator, const Node * > ConstNodeRange
 
typedef BasicOStreamProxy OStreamProxy
 
typedef LinearImplicitSystem SteadyLinearSystem
 
typedef TransientSystem< LinearImplicitSystemTransientImplicitSystem
 
typedef TransientSystem< LinearImplicitSystemTransientLinearImplicitSystem
 
typedef TransientSystem< NonlinearImplicitSystemTransientNonlinearImplicitSystem
 
typedef TransientSystem< ExplicitSystemTransientExplicitSystem
 
typedef TransientSystem< SystemTransientBaseSystem
 
typedef TransientSystem< EigenSystemTransientEigenSystem
 

Enumerations

enum  VariableIndexing { SYSTEM_VARIABLE_ORDER = 0, LOCAL_VARIABLE_ORDER }
 
enum  LinearConvergenceReason {
  CONVERGED_RTOL_NORMAL = 1, CONVERGED_ATOL_NORMAL = 9, CONVERGED_RTOL = 2, CONVERGED_ATOL = 3,
  CONVERGED_ITS = 4, CONVERGED_CG_NEG_CURVE = 5, CONVERGED_CG_CONSTRAINED = 6, CONVERGED_STEP_LENGTH = 7,
  CONVERGED_HAPPY_BREAKDOWN = 8, DIVERGED_NULL = -2, DIVERGED_ITS = -3, DIVERGED_DTOL = -4,
  DIVERGED_BREAKDOWN = -5, DIVERGED_BREAKDOWN_BICG = -6, DIVERGED_NONSYMMETRIC = -7, DIVERGED_INDEFINITE_PC = -8,
  DIVERGED_NAN = -9, DIVERGED_INDEFINITE_MAT = -10, DIVERGED_PCSETUP_FAILED = -11, CONVERGED_ITERATING = 0,
  UNKNOWN_FLAG = -128
}
 
enum  EigenSolverType {
  POWER =0, LAPACK, SUBSPACE, ARNOLDI,
  LANCZOS, KRYLOVSCHUR, INVALID_EIGENSOLVER
}
 
enum  EigenProblemType {
  NHEP =0, HEP, GNHEP, GHEP,
  GHIEP, INVALID_EIGENPROBLEMTYPE
}
 
enum  PositionOfSpectrum {
  LARGEST_MAGNITUDE =0, SMALLEST_MAGNITUDE, TARGET_MAGNITUDE, LARGEST_REAL,
  SMALLEST_REAL, TARGET_REAL, LARGEST_IMAGINARY, SMALLEST_IMAGINARY,
  TARGET_IMAGINARY, INVALID_Postion_of_Spectrum
}
 
enum  ElemQuality {
  ASPECT_RATIO =0, SKEW, SHEAR, SHAPE,
  MAX_ANGLE, MIN_ANGLE, CONDITION, DISTORTION,
  TAPER, WARP, STRETCH, DIAGONAL,
  ASPECT_RATIO_BETA, ASPECT_RATIO_GAMMA, SIZE, JACOBIAN
}
 
enum  ElemType {
  EDGE2 =0, EDGE3, EDGE4, TRI3,
  TRI6, QUAD4, QUAD8, QUAD9,
  TET4, TET10, HEX8, HEX20,
  HEX27, PRISM6, PRISM15, PRISM18,
  PYRAMID5, PYRAMID13, PYRAMID14, INFEDGE2,
  INFQUAD4, INFQUAD6, INFHEX8, INFHEX16,
  INFHEX18, INFPRISM6, INFPRISM12, NODEELEM,
  REMOTEELEM, TRI3SUBDIVISION, TRISHELL3, QUADSHELL4,
  INVALID_ELEM
}
 
enum  ErrorEstimatorType {
  INVALID = -1, ADJOINT_REFINEMENT = 0, ADJOINT_RESIDUAL = 1, DISCONTINUITY_MEASURE = 2,
  EXACT = 3, KELLY = 4, LAPLACIAN = 5, PATCH_RECOVERY = 6,
  WEIGHTED_PATCH_RECOVERY = 7, UNIFORM_REFINEMENT = 8
}
 
enum  FEFamily {
  LAGRANGE = 0, HIERARCHIC = 1, MONOMIAL = 2, L2_HIERARCHIC = 6,
  L2_LAGRANGE = 7, BERNSTEIN = 3, SZABAB = 4, XYZ = 5,
  INFINITE_MAP = 11, JACOBI_20_00 = 12, JACOBI_30_00 = 13, LEGENDRE = 14,
  CLOUGH = 21, HERMITE = 22, SUBDIVISION = 23, SCALAR = 31,
  LAGRANGE_VEC = 41, NEDELEC_ONE = 42, INVALID_FE = 99
}
 
enum  FEContinuity { DISCONTINUOUS, C_ZERO, C_ONE, H_CURL }
 
enum  FEFieldType { TYPE_SCALAR = 0, TYPE_VECTOR }
 
enum  InfMapType { CARTESIAN =0, SPHERICAL, ELLIPSOIDAL, INVALID_INF_MAP }
 
enum  IOPackage {
  TECPLOT, GMV, GMSH, VTK,
  DIVA, TETGEN, UCD, LIBMESH,
  INVALID_IO_PACKAGE
}
 
enum  FEMNormType {
  L2 = 0, H1 = 1, H2 = 2, HCURL = 3,
  HDIV = 4, L1 = 5, L_INF = 6, H1_SEMINORM = 10,
  H2_SEMINORM = 11, HCURL_SEMINORM = 12, HDIV_SEMINORM = 13, W1_INF_SEMINORM = 15,
  W2_INF_SEMINORM = 16, DISCRETE_L1 = 20, DISCRETE_L2 = 21, DISCRETE_L_INF = 22,
  H1_X_SEMINORM = 31, H1_Y_SEMINORM = 32, H1_Z_SEMINORM = 33, INVALID_NORM = 42
}
 
enum  Order {
  CONSTANT = 0, FIRST = 1, SECOND = 2, THIRD = 3,
  FOURTH = 4, FIFTH = 5, SIXTH = 6, SEVENTH = 7,
  EIGHTH = 8, NINTH = 9, TENTH = 10, ELEVENTH = 11,
  TWELFTH = 12, THIRTEENTH = 13, FOURTEENTH = 14, FIFTEENTH = 15,
  SIXTEENTH = 16, SEVENTEENTH = 17, EIGHTTEENTH = 18, NINTEENTH = 19,
  NINETEENTH = 19, TWENTIETH = 20, TWENTYFIRST = 21, TWENTYSECOND = 22,
  TWENTYTHIRD = 23, TWENTYFOURTH = 24, TWENTYFIFTH = 25, TWENTYSIXTH = 26,
  TWENTYSEVENTH = 27, TWENTYEIGHTH = 28, TWENTYNINTH = 29, THIRTIETH = 30,
  THIRTYFIRST = 31, THIRTYSECOND = 32, THIRTYTHIRD = 33, THIRTYFOURTH = 34,
  THIRTYFIFTH = 35, THIRTYSIXTH = 36, THIRTYSEVENTH = 37, THIRTYEIGHTH = 38,
  THIRTYNINTH = 39, FORTIETH = 40, FORTYFIRST = 41, FORTYSECOND = 42,
  FORTYTHIRD = 43, INVALID_ORDER
}
 
enum  ParallelType {
  AUTOMATIC =0, SERIAL, PARALLEL, GHOSTED,
  INVALID_PARALLELIZATION
}
 
enum  PointLocatorType { TREE = 0, TREE_ELEMENTS, TREE_LOCAL_ELEMENTS, INVALID_LOCATOR }
 
enum  PreconditionerType {
  IDENTITY_PRECOND =0, JACOBI_PRECOND, BLOCK_JACOBI_PRECOND, SOR_PRECOND,
  SSOR_PRECOND, EISENSTAT_PRECOND, ASM_PRECOND, CHOLESKY_PRECOND,
  ICC_PRECOND, ILU_PRECOND, LU_PRECOND, USER_PRECOND,
  SHELL_PRECOND, AMG_PRECOND, INVALID_PRECONDITIONER
}
 
enum  QuadratureType {
  QGAUSS = 0, QJACOBI_1_0 = 1, QJACOBI_2_0 = 2, QSIMPSON = 3,
  QTRAP = 4, QGRID = 5, QGRUNDMANN_MOLLER = 6, QMONOMIAL = 7,
  QCONICAL = 8, QGAUSS_LOBATTO = 9, QCLOUGH = 21, QCOMPOSITE = 31,
  INVALID_Q_RULE = 127
}
 
enum  SolverPackage { PETSC_SOLVERS =0, SLEPC_SOLVERS, NLOPT_SOLVERS }
 
enum  SolverType {
  CG =0, CGN, CGS, CR,
  QMR, TCQMR, TFQMR, BICG,
  BICGSTAB, MINRES, GMRES, LSQR,
  JACOBI, SOR_FORWARD, SOR_BACKWARD, SSOR,
  RICHARDSON, CHEBYSHEV, SPARSELU, INVALID_SOLVER
}
 
enum  SubsetSolveMode { SUBSET_ZERO = 0, SUBSET_COPY_RHS, SUBSET_DONT_TOUCH }
 
enum  XdrMODE {
  UNKNOWN = -1, ENCODE =0, DECODE, WRITE,
  READ
}
 

Functions

bool warned_about_auto_ptr (false)
 
const Number imaginary (0., 1.)
 
bool initialized ()
 
bool closed ()
 
void libmesh_terminate_handler ()
 
void enableFPE (bool on)
 
void enableSEGV (bool on)
 
bool on_command_line (const std::string &arg)
 
template<typename T >
command_line_value (const std::string &name, T value)
 
template<typename T >
command_line_value (const std::vector< std::string > &name, T value)
 
template<typename T >
command_line_next (const std::string &name, T value)
 
template<typename T >
void command_line_vector (const std::string &name, std::vector< T > &vec)
 
SolverPackage default_solver_package ()
 
template int command_line_value< int > (const std::string &, int)
 
template float command_line_value< float > (const std::string &, float)
 
template double command_line_value< double > (const std::string &, double)
 
template long double command_line_value< long double > (const std::string &, long double)
 
template std::string command_line_value< std::string > (const std::string &, std::string)
 
template int command_line_value< int > (const std::vector< std::string > &, int)
 
template float command_line_value< float > (const std::vector< std::string > &, float)
 
template double command_line_value< double > (const std::vector< std::string > &, double)
 
template long double command_line_value< long double > (const std::vector< std::string > &, long double)
 
template std::string command_line_value< std::string > (const std::vector< std::string > &, std::string)
 
template int command_line_next< int > (const std::string &, int)
 
template float command_line_next< float > (const std::string &, float)
 
template double command_line_next< double > (const std::string &, double)
 
template long double command_line_next< long double > (const std::string &, long double)
 
template std::string command_line_next< std::string > (const std::string &, std::string)
 
template void command_line_vector< int > (const std::string &, std::vector< int > &)
 
template void command_line_vector< float > (const std::string &, std::vector< float > &)
 
template void command_line_vector< double > (const std::string &, std::vector< double > &)
 
template void command_line_vector< long double > (const std::string &, std::vector< long double > &)
 
void print_trace (std::ostream &out_stream)
 
void write_traceout ()
 
std::string demangle (const char *name)
 
 INSTANTIATE_FE (0)
 
 INSTANTIATE_FE (1)
 
 INSTANTIATE_FE (2)
 
 INSTANTIATE_FE (3)
 
std::ostream & operator<< (std::ostream &os, const FEAbstract &fe)
 
 REINIT_ERROR (0, CLOUGH, reinit)
 
 REINIT_ERROR (0, CLOUGH, edge_reinit)
 
 SIDEMAP_ERROR (0, CLOUGH, side_map)
 
 REINIT_ERROR (0, HERMITE, reinit)
 
 REINIT_ERROR (0, HERMITE, edge_reinit)
 
 SIDEMAP_ERROR (0, HERMITE, side_map)
 
 REINIT_ERROR (0, HIERARCHIC, reinit)
 
 REINIT_ERROR (0, HIERARCHIC, edge_reinit)
 
 SIDEMAP_ERROR (0, HIERARCHIC, side_map)
 
 REINIT_ERROR (0, L2_HIERARCHIC, reinit)
 
 REINIT_ERROR (0, L2_HIERARCHIC, edge_reinit)
 
 SIDEMAP_ERROR (0, L2_HIERARCHIC, side_map)
 
 REINIT_ERROR (0, LAGRANGE, reinit)
 
 REINIT_ERROR (0, LAGRANGE, edge_reinit)
 
 SIDEMAP_ERROR (0, LAGRANGE, side_map)
 
 REINIT_ERROR (0, LAGRANGE_VEC, reinit)
 
 REINIT_ERROR (0, LAGRANGE_VEC, edge_reinit)
 
 SIDEMAP_ERROR (0, LAGRANGE_VEC, side_map)
 
 REINIT_ERROR (0, L2_LAGRANGE, reinit)
 
 REINIT_ERROR (0, L2_LAGRANGE, edge_reinit)
 
 SIDEMAP_ERROR (0, L2_LAGRANGE, side_map)
 
 REINIT_ERROR (0, MONOMIAL, reinit)
 
 REINIT_ERROR (0, MONOMIAL, edge_reinit)
 
 SIDEMAP_ERROR (0, MONOMIAL, side_map)
 
 REINIT_ERROR (0, SCALAR, reinit)
 
 REINIT_ERROR (0, SCALAR, edge_reinit)
 
 SIDEMAP_ERROR (0, SCALAR, side_map)
 
 REINIT_ERROR (0, XYZ, reinit)
 
 REINIT_ERROR (0, XYZ, edge_reinit)
 
 SIDEMAP_ERROR (0, XYZ, side_map)
 
 REINIT_ERROR (0, NEDELEC_ONE, reinit)
 
 REINIT_ERROR (0, NEDELEC_ONE, edge_reinit)
 
 SIDEMAP_ERROR (0, NEDELEC_ONE, side_map)
 
 REINIT_ERROR (0, BERNSTEIN, reinit)
 
 REINIT_ERROR (0, BERNSTEIN, edge_reinit)
 
 SIDEMAP_ERROR (0, BERNSTEIN, side_map)
 
 REINIT_ERROR (0, SZABAB, reinit)
 
 REINIT_ERROR (0, SZABAB, edge_reinit)
 
 SIDEMAP_ERROR (0, SZABAB, side_map)
 
 REINIT_ERROR (1, CLOUGH, edge_reinit)
 
 REINIT_ERROR (1, HERMITE, edge_reinit)
 
 REINIT_ERROR (1, HIERARCHIC, edge_reinit)
 
 REINIT_ERROR (1, L2_HIERARCHIC, edge_reinit)
 
 REINIT_ERROR (1, LAGRANGE, edge_reinit)
 
 REINIT_ERROR (1, LAGRANGE_VEC, edge_reinit)
 
 REINIT_ERROR (1, L2_LAGRANGE, edge_reinit)
 
 REINIT_ERROR (1, XYZ, edge_reinit)
 
 REINIT_ERROR (1, MONOMIAL, edge_reinit)
 
 REINIT_ERROR (1, SCALAR, edge_reinit)
 
 REINIT_ERROR (1, NEDELEC_ONE, reinit)
 
 REINIT_ERROR (1, NEDELEC_ONE, edge_reinit)
 
 SIDEMAP_ERROR (1, NEDELEC_ONE, side_map)
 
 REINIT_ERROR (1, BERNSTEIN, edge_reinit)
 
 REINIT_ERROR (1, SZABAB, edge_reinit)
 
 INSTANTIATE_ALL_MAPS (0)
 
 INSTANTIATE_ALL_MAPS (1)
 
 INSTANTIATE_ALL_MAPS (2)
 
 INSTANTIATE_ALL_MAPS (3)
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, Elem *, Base::build_elem(const Elem *))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, Elem *, Base::build_elem(const Elem *))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, Elem *, Base::build_elem(const Elem *))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, ElemType, Base::get_elem_type(const ElemType type))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, ElemType, Base::get_elem_type(const ElemType type))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, ElemType, Base::get_elem_type(const ElemType type))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, unsigned int, Base::n_base_mapping_sf(const ElemType, const Order))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, unsigned int, Base::n_base_mapping_sf(const ElemType, const Order))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, unsigned int, Base::n_base_mapping_sf(const ElemType, const Order))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, unsigned int, Radial::n_dofs_at_node(const Order, const unsigned int))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, unsigned int, Radial::n_dofs_at_node(const Order, const unsigned int))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, unsigned int, Radial::n_dofs_at_node(const Order, const unsigned int))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, void, reinit(const Elem *, const unsigned int, const Real, const std::vector< Point > *const, const std::vector< Real > *const))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, void, reinit(const Elem *, const unsigned int, const Real, const std::vector< Point > *const, const std::vector< Real > *const))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, void, reinit(const Elem *, const unsigned int, const Real, const std::vector< Point > *const, const std::vector< Real > *const))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, void, edge_reinit(const Elem *, const unsigned int, const Real, const std::vector< Point > *const, const std::vector< Real > *const))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, void, edge_reinit(const Elem *, const unsigned int, const Real, const std::vector< Point > *const, const std::vector< Real > *const))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, void, edge_reinit(const Elem *, const unsigned int, const Real, const std::vector< Point > *const, const std::vector< Real > *const))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, void, init_face_shape_functions(const std::vector< Point > &, const Elem *))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, void, init_face_shape_functions(const std::vector< Point > &, const Elem *))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, void, init_face_shape_functions(const std::vector< Point > &, const Elem *))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, Point, map(const Elem *, const Point &))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, Point, map(const Elem *, const Point &))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, Point, map(const Elem *, const Point &))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, Point, inverse_map(const Elem *, const Point &, const Real, const bool))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, Point, inverse_map(const Elem *, const Point &, const Real, const bool))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, Point, inverse_map(const Elem *, const Point &, const Real, const bool))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, void, inverse_map(const Elem *, const std::vector< Point > &, std::vector< Point > &, const Real, const bool))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, void, inverse_map(const Elem *, const std::vector< Point > &, std::vector< Point > &, const Real, const bool))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, void, inverse_map(const Elem *, const std::vector< Point > &, std::vector< Point > &, const Real, const bool))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, unsigned int, n_dofs(const FEType &, const ElemType))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, unsigned int, n_dofs(const FEType &, const ElemType))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, unsigned int, n_dofs(const FEType &, const ElemType))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, unsigned int, n_dofs_per_elem(const FEType &, const ElemType))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, unsigned int, n_dofs_per_elem(const FEType &, const ElemType))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, unsigned int, n_dofs_per_elem(const FEType &, const ElemType))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, unsigned int, n_dofs_at_node(const FEType &, const ElemType, const unsigned int))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, unsigned int, n_dofs_at_node(const FEType &, const ElemType, const unsigned int))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, unsigned int, n_dofs_at_node(const FEType &, const ElemType, const unsigned int))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, void, compute_shape_indices(const FEType &, const ElemType, const unsigned int, unsigned int &, unsigned int &))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, void, compute_shape_indices(const FEType &, const ElemType, const unsigned int, unsigned int &, unsigned int &))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, void, compute_shape_indices(const FEType &, const ElemType, const unsigned int, unsigned int &, unsigned int &))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, void, compute_node_indices(const ElemType, const unsigned int, unsigned int &, unsigned int &))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, void, compute_node_indices(const ElemType, const unsigned int, unsigned int &, unsigned int &))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, void, compute_node_indices(const ElemType, const unsigned int, unsigned int &, unsigned int &))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, Real, shape(const FEType &, const Elem *, const unsigned int, const Point &p))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, Real, shape(const FEType &, const Elem *, const unsigned int, const Point &p))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, Real, shape(const FEType &, const Elem *, const unsigned int, const Point &p))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, Real, shape(const FEType &, const ElemType, const unsigned int, const Point &))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, Real, shape(const FEType &, const ElemType, const unsigned int, const Point &))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, Real, shape(const FEType &, const ElemType, const unsigned int, const Point &))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, void, compute_data(const FEType &, const Elem *, FEComputeData &))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, void, compute_data(const FEType &, const Elem *, FEComputeData &))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, void, compute_data(const FEType &, const Elem *, FEComputeData &))
 
 INSTANTIATE_INF_FE_MBRF (1, CARTESIAN, void, nodal_soln(const FEType &, const Elem *, const std::vector< Number > &, std::vector< Number > &))
 
 INSTANTIATE_INF_FE_MBRF (2, CARTESIAN, void, nodal_soln(const FEType &, const Elem *, const std::vector< Number > &, std::vector< Number > &))
 
 INSTANTIATE_INF_FE_MBRF (3, CARTESIAN, void, nodal_soln(const FEType &, const Elem *, const std::vector< Number > &, std::vector< Number > &))
 
bool is_between (Real min, Real check, Real max)
 
std::ostream & operator<< (std::ostream &os, const MeshBase &m)
 
template void MeshCommunication::find_global_indices< MeshBase::const_node_iterator > (const Parallel::Communicator &, const MeshTools::BoundingBox &, const MeshBase::const_node_iterator &, const MeshBase::const_node_iterator &, std::vector< dof_id_type > &) const
 
template void MeshCommunication::find_global_indices< MeshBase::const_element_iterator > (const Parallel::Communicator &, const MeshTools::BoundingBox &, const MeshBase::const_element_iterator &, const MeshBase::const_element_iterator &, std::vector< dof_id_type > &) const
 
template void MeshCommunication::find_global_indices< MeshBase::node_iterator > (const Parallel::Communicator &, const MeshTools::BoundingBox &, const MeshBase::node_iterator &, const MeshBase::node_iterator &, std::vector< dof_id_type > &) const
 
template void MeshCommunication::find_global_indices< MeshBase::element_iterator > (const Parallel::Communicator &, const MeshTools::BoundingBox &, const MeshBase::element_iterator &, const MeshBase::element_iterator &, std::vector< dof_id_type > &) const
 
 LIBMESH_VMA_INSTANTIATE (Real, int, Real)
 
 LIBMESH_VMA_INSTANTIATE (Real, float, Real)
 
 LIBMESH_VMA_INSTANTIATE (Real, double, Real)
 
 LIBMESH_VMA_INSTANTIATE (Real, int, Complex)
 
 LIBMESH_VMA_INSTANTIATE (Complex, int, Complex)
 
 LIBMESH_VMA_INSTANTIATE (Complex, int, Real)
 
 LIBMESH_VMA_INSTANTIATE (Real, float, Complex)
 
 LIBMESH_VMA_INSTANTIATE (Complex, float, Complex)
 
 LIBMESH_VMA_INSTANTIATE (Complex, float, Real)
 
 LIBMESH_VMA_INSTANTIATE (Real, std::complex< float >, Complex)
 
 LIBMESH_VMA_INSTANTIATE (Complex, std::complex< float >, Complex)
 
 LIBMESH_VMA_INSTANTIATE (Complex, std::complex< float >, Real)
 
 LIBMESH_VMA_INSTANTIATE (Real, double, Complex)
 
 LIBMESH_VMA_INSTANTIATE (Complex, double, Complex)
 
 LIBMESH_VMA_INSTANTIATE (Complex, double, Real)
 
 LIBMESH_VMA_INSTANTIATE (Real, std::complex< double >, Complex)
 
 LIBMESH_VMA_INSTANTIATE (Complex, std::complex< double >, Complex)
 
 LIBMESH_VMA_INSTANTIATE (Complex, std::complex< double >, Real)
 
std::ostream & operator<< (std::ostream &os, const QBase &q)
 
template<typename T >
SIGN (T a, T b)
 
double __libmesh_nlopt_objective (unsigned n, const double *x, double *gradient, void *data)
 
void __libmesh_nlopt_equality_constraints (unsigned m, double *result, unsigned n, const double *x, double *gradient, void *data)
 
void __libmesh_nlopt_inequality_constraints (unsigned m, double *result, unsigned n, const double *x, double *gradient, void *data)
 
void petsc_auto_fieldsplit (PC my_pc, const System &sys)
 
PetscErrorCode __libmesh_petsc_diff_solver_monitor (SNES snes, PetscInt its, PetscReal fnorm, void *ctx)
 
PetscErrorCode __libmesh_petsc_diff_solver_residual (SNES, Vec x, Vec r, void *ctx)
 
PetscErrorCode __libmesh_petsc_diff_solver_jacobian (SNES, Vec x, Mat *libmesh_dbg_var(j), Mat *pc, MatStructure *msflag, void *ctx) PetscErrorCode __libmesh_petsc_diff_solver_jacobian(SNES
 
PetscErrorCode Vec Mat libmesh_dbg_var (j)
 
 libmesh_assert (j)
 
 libmesh_assert (ctx)
 
PetscVector< NumberX_input (x, sys.comm())
 
PetscMatrix< Number > J_inputpc ()
 
PetscMatrix< NumberJ_input (pc, sys.comm())
 
X_input swap (X_system)
 
J_input swap (J_system)
 
sys get_dof_map ()
 
DiffSolver::SolveResult convert_solve_result (SNESConvergedReason r)
 
PetscErrorCode __libmesh_petsc_preconditioner_setup (void *ctx)
 
PetscErrorCode __libmesh_petsc_preconditioner_apply (void *ctx, Vec x, Vec y)
 
PetscErrorCode __libmesh_petsc_preconditioner_setup (PC pc)
 
PetscErrorCode __libmesh_petsc_preconditioner_apply (PC pc, Vec x, Vec y)
 
PetscErrorCode __libmesh_petsc_snes_monitor (SNES, PetscInt its, PetscReal fnorm, void *)
 
PetscErrorCode __libmesh_petsc_snes_residual (SNES snes, Vec x, Vec r, void *ctx)
 
PetscErrorCode __libmesh_petsc_snes_jacobian (#if PETSC_RELEASE_LESS_THAN(3, 5, 0) SNES snes, Vec x, Mat *jac, Mat *pc, MatStructure *msflag, void *ctx#else SNES snes, Vec x, Mat jac, Mat pc, void *ctx#endif)
 
PetscErrorCode __libmesh_petsc_snes_postcheck (#if PETSC_VERSION_LESS_THAN(3, 3, 0) SNES, Vec x, Vec y, Vec w, void *context, PetscBool *changed_y, PetscBool *changed_w#else SNESLineSearch, Vec x, Vec y, Vec w, PetscBool *changed_y, PetscBool *changed_w, void *context#endif)
 
PetscErrorCode __libmesh_tao_objective (Tao, Vec x, PetscReal *objective, void *ctx)
 
PetscErrorCode __libmesh_tao_gradient (Tao, Vec x, Vec g, void *ctx)
 
PetscErrorCode __libmesh_tao_hessian (Tao, Vec x, Mat h, Mat pc, void *ctx)
 
PetscErrorCode __libmesh_tao_equality_constraints (Tao, Vec x, Vec ce, void *ctx)
 
PetscErrorCode __libmesh_tao_equality_constraints_jacobian (Tao, Vec x, Mat J, Mat Jpre, void *ctx)
 
PetscErrorCode __libmesh_tao_inequality_constraints (Tao, Vec x, Vec cineq, void *ctx)
 
PetscErrorCode __libmesh_tao_inequality_constraints_jacobian (Tao, Vec x, Mat J, Mat Jpre, void *ctx)
 
std::ostream & operator<< (std::ostream &os, const EquationSystems &es)
 
template void Xdr::data< std::complex< float > > (std::complex< float > &, const char *)
 
template void Xdr::data< std::complex< double > > (std::complex< double > &, const char *)
 
template void Xdr::data< std::complex< long double > > (std::complex< long double > &, const char *)
 
template void Xdr::data< std::string > (std::string &, const char *)
 
template void Xdr::data< std::vector< int > > (std::vector< int > &, const char *)
 
template void Xdr::data< std::vector< unsigned int > > (std::vector< unsigned int > &, const char *)
 
template void Xdr::data< std::vector< short int > > (std::vector< short int > &, const char *)
 
template void Xdr::data< std::vector< unsigned short int > > (std::vector< unsigned short int > &, const char *)
 
template void Xdr::data< std::vector< long int > > (std::vector< long int > &, const char *)
 
template void Xdr::data< std::vector< unsigned long int > > (std::vector< unsigned long int > &, const char *)
 
template void Xdr::data< std::vector< unsigned long long > > (std::vector< unsigned long long > &, const char *)
 
template void Xdr::data< std::vector< char > > (std::vector< char > &, const char *)
 
template void Xdr::data< std::vector< signed char > > (std::vector< signed char > &, const char *)
 
template void Xdr::data< std::vector< unsigned char > > (std::vector< unsigned char > &, const char *)
 
template void Xdr::data< std::vector< float > > (std::vector< float > &, const char *)
 
template void Xdr::data< std::vector< double > > (std::vector< double > &, const char *)
 
template void Xdr::data< std::vector< long double > > (std::vector< long double > &, const char *)
 
template void Xdr::data< std::vector< std::complex< float > > > (std::vector< std::complex< float > > &, const char *)
 
template void Xdr::data< std::vector< std::complex< double > > > (std::vector< std::complex< double > > &, const char *)
 
template void Xdr::data< std::vector< std::complex< long double > > > (std::vector< std::complex< long double > > &, const char *)
 
template void Xdr::data< std::vector< std::string > > (std::vector< std::string > &, const char *)
 
template<typename T , typename... Args>
std::unique_ptr< T > make_unique (Args &&...args)
 
 ScalarTraits_true (char)
 
 ScalarTraits_true (short)
 
 ScalarTraits_true (int)
 
 ScalarTraits_true (long)
 
 ScalarTraits_true (unsigned char)
 
 ScalarTraits_true (float)
 
 ScalarTraits_true (double)
 
 SUPERTYPE (unsigned char, short)
 
 SUPERTYPE (unsigned char, int)
 
 SUPERTYPE (unsigned char, float)
 
 SUPERTYPE (unsigned char, double)
 
 SUPERTYPE (unsigned char, long double)
 
 SUPERTYPE (char, short)
 
 SUPERTYPE (char, int)
 
 SUPERTYPE (char, float)
 
 SUPERTYPE (char, double)
 
 SUPERTYPE (char, long double)
 
 SUPERTYPE (short, int)
 
 SUPERTYPE (short, float)
 
 SUPERTYPE (short, double)
 
 SUPERTYPE (short, long double)
 
 SUPERTYPE (int, float)
 
 SUPERTYPE (int, double)
 
 SUPERTYPE (int, long double)
 
 SUPERTYPE (float, double)
 
 SUPERTYPE (float, long double)
 
 SUPERTYPE (double, long double)
 
std::ostream & operator<< (std::ostream &os, const Elem &e)
 
bool operator== (const OrderWrapper &lhs, const OrderWrapper &rhs)
 
bool operator!= (const OrderWrapper &lhs, const OrderWrapper &rhs)
 
bool operator< (const OrderWrapper &lhs, const OrderWrapper &rhs)
 
bool operator> (const OrderWrapper &lhs, const OrderWrapper &rhs)
 
bool operator<= (const OrderWrapper &lhs, const OrderWrapper &rhs)
 
bool operator>= (const OrderWrapper &lhs, const OrderWrapper &rhs)
 
 OrderWrapperOperators (int) OrderWrapperOperators(unsigned int) OrderWrapperOperators(std
 
bool operator== (const OrderWrapper &lhs, int rhs)
 
bool operator== (Order lhs, const OrderWrapper &rhs)
 
bool operator== (const OrderWrapper &lhs, Order rhs)
 
bool operator!= (int lhs, const OrderWrapper &rhs)
 
bool operator!= (const OrderWrapper &lhs, int rhs)
 
bool operator!= (Order lhs, const OrderWrapper &rhs)
 
bool operator!= (const OrderWrapper &lhs, Order rhs)
 
bool operator< (int lhs, const OrderWrapper &rhs)
 
bool operator< (const OrderWrapper &lhs, int rhs)
 
bool operator< (Order lhs, const OrderWrapper &rhs)
 
bool operator< (const OrderWrapper &lhs, Order rhs)
 
bool operator> (int lhs, const OrderWrapper &rhs)
 
bool operator> (const OrderWrapper &lhs, int rhs)
 
bool operator> (Order lhs, const OrderWrapper &rhs)
 
bool operator> (const OrderWrapper &lhs, Order rhs)
 
bool operator<= (int lhs, const OrderWrapper &rhs)
 
bool operator<= (const OrderWrapper &lhs, int rhs)
 
bool operator<= (Order lhs, const OrderWrapper &rhs)
 
bool operator<= (const OrderWrapper &lhs, Order rhs)
 
bool operator>= (int lhs, const OrderWrapper &rhs)
 
bool operator>= (const OrderWrapper &lhs, int rhs)
 
bool operator>= (Order lhs, const OrderWrapper &rhs)
 
bool operator>= (const OrderWrapper &lhs, Order rhs)
 
std::ostream & operator<< (std::ostream &os, const OrderWrapper &order)
 
 INSTANTIATE_INF_FE (1, CARTESIAN)
 
 INSTANTIATE_INF_FE (2, CARTESIAN)
 
 INSTANTIATE_INF_FE (3, CARTESIAN)
 
processor_id_type n_processors ()
 
processor_id_type processor_id ()
 
processor_id_type global_n_processors ()
 
processor_id_type global_processor_id ()
 
unsigned int n_threads ()
 
template<typename T >
libmesh_real (T a)
 
template<typename T >
libmesh_conj (T a)
 
template<typename T >
libmesh_real (std::complex< T > a)
 
template<typename T >
std::complex< T > libmesh_conj (std::complex< T > a)
 
bool libmesh_isnan (float a)
 
bool libmesh_isnan (double a)
 
bool libmesh_isnan (long double a)
 
template<typename T >
bool libmesh_isnan (std::complex< T > a)
 
template<typename T >
bool libmesh_isinf (T x)
 
template<typename T >
bool libmesh_isinf (std::complex< T > a)
 
template<class T >
void libmesh_ignore (const T &)
 
template<typename Tnew , typename Told >
Tnew cast_ref (Told &oldvar)
 
template<typename Tnew , typename Told >
Tnew libmesh_cast_ref (Told &oldvar)
 
template<typename Tnew , typename Told >
Tnew cast_ptr (Told *oldvar)
 
template<typename Tnew , typename Told >
Tnew libmesh_cast_ptr (Told *oldvar)
 
template<typename Tnew , typename Told >
Tnew cast_int (Told oldvar)
 
template<typename Tnew , typename Told >
Tnew libmesh_cast_int (Told oldvar)
 
void libmesh_version_stdout ()
 
int get_libmesh_version ()
 
std::string get_io_compatibility_version ()
 
std::ostream & operator<< (std::ostream &os, const Node &n)
 
template<typename P >
void print_helper (std::ostream &os, const P *param)
 
template<typename P >
void print_helper (std::ostream &os, const std::vector< P > *param)
 
template<typename P >
void print_helper (std::ostream &os, const std::vector< std::vector< P > > *param)
 
std::ostream & operator<< (std::ostream &os, const Parameters &p)
 
template<>
void print_helper (std::ostream &os, const char *param)
 
template<>
void print_helper (std::ostream &os, const unsigned char *param)
 
PetscErrorCode __libmesh_petsc_snes_jacobian (SNES, Vec x, Mat *jac, Mat *pc, MatStructure *msflag, void *ctx)
 
PetscErrorCode __libmesh_petsc_snes_jacobian (SNES, Vec x, Mat jac, Mat pc, void *ctx)
 
PetscInt * numeric_petsc_cast (const numeric_index_type *p)
 
template<typename T >
bool operator== (const safe_bool< T > &lhs, bool b)
 
template<typename T >
bool operator== (bool b, const safe_bool< T > &rhs)
 
template<typename T , typename U >
bool operator== (const safe_bool< T > &lhs, const safe_bool< U > &)
 
template<typename T , typename U >
bool operator!= (const safe_bool< T > &lhs, const safe_bool< U > &)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const SparseMatrix< T > &m)
 
template<typename T , typename Scalar >
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeTensor< typename CompareTypes< T, Scalar >::supertype > >::type operator* (const Scalar factor, const TypeTensor< T > &t)
 
template<typename T , typename Scalar >
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector< typename CompareTypes< T, Scalar >::supertype > >::type operator* (const Scalar factor, const TypeVector< T > &v)
 
template<typename T >
triple_product (const TypeVector< T > &a, const TypeVector< T > &b, const TypeVector< T > &c)
 
template<typename T >
cross_norm_sq (const TypeVector< T > &b, const TypeVector< T > &c)
 
template<typename T >
cross_norm (const TypeVector< T > &b, const TypeVector< T > &c)
 

Variables

DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
 
DIE A HORRIBLE DEATH HERE typedef float ErrorVectorReal
 
MPI_Comm COMM_WORLD = MPI_COMM_NULL
 
MPI_Comm GLOBAL_COMM_WORLD = MPI_COMM_NULL
 
Parallel::FakeCommunicator CommWorld
 
OStreamProxy out (std::cout)
 
OStreamProxy err (std::cerr)
 
PerfLog perflog ("libMesh",#ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING true#else false#endif)
 
MPI_Errhandler libmesh_errhandler
 
 TRILINOS_SOLVERS
 
 EIGEN_SOLVERS
 
 LASPACK_SOLVERS
 
 INVALID_SOLVER_PACKAGE
 
std::terminate_handler old_terminate_handler
 
 INSTANTIATE_SUBDIVISION_FE
 
 INSTANTIATE_SUBDIVISION_MAPS
 
Threads::spin_mutex parent_indices_mutex
 
Threads::spin_mutex parent_bracketing_nodes_mutex
 
const RemoteElemremote_elem
 
const unsigned int MIN_ELEM_PER_PROC = 4
 
PetscErrorCode Vec x
 
PetscErrorCode Vec Mat Mat pc
 
PetscErrorCode Vec Mat Mat void * ctx
 
PetscDiffSolversolver
 
ImplicitSystemsys = solver.system()
 
if(solver.verbose) libMesh PetscVector< Number > & X_system
 
PetscMatrix< Number > & J_system
 
const unsigned char triangular_number_row []
 
const unsigned char triangular_number_column []
 
const unsigned char square_number_column []
 
const unsigned char square_number_row []
 
const unsigned char cube_number_column []
 
const unsigned char cube_number_row []
 
const unsigned char cube_number_page []
 
const Number imaginary
 
const Real pi
 
const Number zero = 0.
 
const unsigned int invalid_uint = static_cast<unsigned int>(-1)
 
static const Real TOLERANCE = 1.e-8
 
bool warned_about_auto_ptr
 

Detailed Description

Sanity check, without prior inclusion of libmesh_config.h.

This file is no typical header file. It is only to be included at the end of an implementation file, so that the proper variations of the InfFE class are instantiated.

The libMesh namespace provides an interface to certain functionality in the library. It provides a uniform init() method that initializes any other dependent libraries (e.g. MPI or PETSC), and a close() method for closing those libraries. It also provides a centralized place for performance logging and other functionality.

Typedef Documentation

typedef int16_t libMesh::boundary_id_type

Definition at line 51 of file id_types.h.

typedef std::complex<Real> libMesh::Complex

Definition at line 155 of file libmesh_common.h.

typedef std::complex<Real> libMesh::COMPLEX

Definition at line 156 of file libmesh_common.h.

Definition at line 27 of file mesh.h.

typedef uint32_t libMesh::dof_id_type

Definition at line 64 of file id_types.h.

A row of the Dof constraint matrix.

Definition at line 88 of file dof_map.h.

typedef int32_t libMesh::eigen_idx_type

Definition at line 66 of file eigen_core_support.h.

typedef Eigen::SparseMatrix<Number, Eigen::RowMajor, eigen_idx_type> libMesh::EigenSM

Definition at line 78 of file eigen_core_support.h.

typedef Eigen::Matrix<Number, Eigen::Dynamic, 1> libMesh::EigenSV

Definition at line 79 of file eigen_core_support.h.

Definition at line 37 of file exact_error_estimator.h.

Definition at line 680 of file fe_base.h.

Definition at line 52 of file exact_error_estimator.h.

typedef uint8_t libMesh::largest_id_type

Definition at line 138 of file id_types.h.

typedef std::map<const Node *, Real, std::less<const Node *>, Threads::scalable_allocator<std::pair<const Node * const, Real> > > libMesh::NodeConstraintRow

A row of the Node constraint mapping. Currently this just stores the topology of the constrained Nodes, but for forward compatibility we also include coefficients, so we could add Lagrange-positioned-node constraints later.

Definition at line 136 of file dof_map.h.

Definition at line 31 of file node_range.h.

Definition at line 191 of file libmesh_common.h.

Definition at line 92 of file id_types.h.

Definition at line 231 of file ostream_proxy.h.

typedef uint16_t libMesh::processor_id_type

Definition at line 99 of file id_types.h.

Definition at line 36 of file mesh_triangle_wrapper.h.

Definition at line 50 of file hp_coarsentest.h.

Definition at line 51 of file hp_coarsentest.h.

Useful typedefs to allow transparent switching between Real and Complex data types.

Definition at line 49 of file hp_coarsentest.h.

Useful typedefs to allow transparent switching between Real and Complex data types.

Definition at line 47 of file hp_coarsentest.h.

typedef uint16_t libMesh::subdomain_id_type

Note: subdomain_id_types are positive integers - however limitation in the exodusII API force us to use a signed integer here to represent subdomains. This gives us 2^31 possible unique blocks

Based on the 4-byte comment warning above, this probably doesn't work with exodusII at all...

Definition at line 43 of file id_types.h.

Definition at line 50 of file exact_error_estimator.h.

typedef uint64_t libMesh::unique_id_type

Definition at line 79 of file id_types.h.

template<typename T >
using libMesh::UniquePtr = typedef std::unique_ptr<T>

Definition at line 46 of file auto_ptr.h.

typedef LIBMESH_BEST_UNORDERED_MULTISET<Elem *, ElemHashUtils, ElemHashUtils> libMesh::unordered_multiset_elem

Definition at line 69 of file elem_hash.h.

Enumeration Type Documentation

Defines an enum for eigenproblem types. This can be Hermitian (HEP), generalized Hermitian (GHEP), non-Hermitian (NHEP), generalized non-Hermitian (GNHEP), or generalized indefinite Hermitian (GHIEP).

Enumerator
NHEP 
HEP 
GNHEP 
GHEP 
GHIEP 
INVALID_EIGENPROBLEMTYPE 

Definition at line 51 of file enum_eigen_solver_type.h.

Defines an enum for iterative eigenproblem solver types

Enumerator
POWER 
LAPACK 
SUBSPACE 
ARNOLDI 
LANCZOS 
KRYLOVSCHUR 
INVALID_EIGENSOLVER 

Definition at line 30 of file enum_eigen_solver_type.h.

30  {POWER=0,
31  LAPACK,
32  SUBSPACE,
33  ARNOLDI,
34  LANCZOS,
36  // SLEPc optional packages
37  // EPSARPACK,
38  // EPSLAPACK,
39  // EPSBLZPACK,
40  // EPSPLANSO,
41  // EPSTRLAN,
42 

Defines an enum for element quality metrics.

Enumerator
ASPECT_RATIO 
SKEW 
SHEAR 
SHAPE 
MAX_ANGLE 
MIN_ANGLE 
CONDITION 
DISTORTION 
TAPER 
WARP 
STRETCH 
DIAGONAL 
ASPECT_RATIO_BETA 
ASPECT_RATIO_GAMMA 
SIZE 
JACOBIAN 

Definition at line 30 of file enum_elem_quality.h.

Defines an enum for geometric element types.

Enumerator
EDGE2 
EDGE3 
EDGE4 
TRI3 
TRI6 
QUAD4 
QUAD8 
QUAD9 
TET4 
TET10 
HEX8 
HEX20 
HEX27 
PRISM6 
PRISM15 
PRISM18 
PYRAMID5 
PYRAMID13 
PYRAMID14 
INFEDGE2 
INFQUAD4 
INFQUAD6 
INFHEX8 
INFHEX16 
INFHEX18 
INFPRISM6 
INFPRISM12 
NODEELEM 
REMOTEELEM 
TRI3SUBDIVISION 
TRISHELL3 
QUADSHELL4 
INVALID_ELEM 

Definition at line 30 of file enum_elem_type.h.

30  {EDGE2=0, // 0
31  EDGE3, // 1
32  EDGE4, // 2
33 
34  TRI3, // 3
35  TRI6, // 4
36 
37  QUAD4, // 5
38  QUAD8, // 6
39  QUAD9, // 7
40 
41  TET4, // 8
42  TET10, // 9
43 
44  HEX8, // 10
45  HEX20, // 11
46  HEX27, // 12
47 
48  PRISM6, // 13
49  PRISM15, // 14
50  PRISM18, // 15
51 
52  PYRAMID5, // 16
53  PYRAMID13, // 17
54  PYRAMID14, // 18
55 
56  INFEDGE2, // 19
57 
58  INFQUAD4, // 20
59  INFQUAD6, // 21
60 
61  INFHEX8, // 22
62  INFHEX16, // 23
63  INFHEX18, // 24
64 
65  INFPRISM6, // 25
66  INFPRISM12, // 26
67 
68  NODEELEM, // 27
69 
70  REMOTEELEM, // 28
71 
72  TRI3SUBDIVISION, // 29
73  TRISHELL3, // 30
74  QUADSHELL4, // 31
75 
76  INVALID_ELEM}; // 32 - should always be last

defines an enum for finite element types to libmesh_assert a certain level (or type? Hcurl?) of continuity.

Enumerator
DISCONTINUOUS 
C_ZERO 
C_ONE 
H_CURL 

Definition at line 72 of file enum_fe_family.h.

defines an enum for finite element families.

Enumerator
LAGRANGE 
HIERARCHIC 
MONOMIAL 
L2_HIERARCHIC 
L2_LAGRANGE 
BERNSTEIN 
SZABAB 
XYZ 
INFINITE_MAP 
JACOBI_20_00 
JACOBI_30_00 
LEGENDRE 
CLOUGH 
HERMITE 
SUBDIVISION 
SCALAR 
LAGRANGE_VEC 
NEDELEC_ONE 
INVALID_FE 

Definition at line 32 of file enum_fe_family.h.

32  {LAGRANGE = 0,
33  HIERARCHIC = 1,
34 
35  // discontinuous, in local coordinates
36  MONOMIAL = 2,
37  L2_HIERARCHIC = 6,
38  L2_LAGRANGE = 7,
39 
40  // higher-order
41  BERNSTEIN = 3,
42  SZABAB = 4,
43 
44  // discontinuous, in global coordinates
45  XYZ = 5,
46 
47  // infinite element stuff
48  INFINITE_MAP = 11, // for 1/r-map
49  JACOBI_20_00 = 12, // i_max = 19
50  JACOBI_30_00 = 13, // i_max = 19
51  LEGENDRE = 14, // i_max = 19
52 
53  // C1 elements
54  CLOUGH = 21,
55  HERMITE = 22,
56  SUBDIVISION = 23,
57 
58  // A scalar variable that couples to
59  // all other DOFs in the system
60  SCALAR = 31,
61 
62  // Vector-valued elements
63  LAGRANGE_VEC = 41,
64  NEDELEC_ONE = 42,
65 
66  INVALID_FE = 99};

defines an enum for finite element field types - i.e. is it a scalar element, vector, tensor, etc.

Enumerator
TYPE_SCALAR 
TYPE_VECTOR 

Definition at line 81 of file enum_fe_family.h.

defines an enum for norms defined on vectors of finite element coefficients

Enumerator
L2 
H1 
H2 
HCURL 
HDIV 
L1 
L_INF 
H1_SEMINORM 
H2_SEMINORM 
HCURL_SEMINORM 
HDIV_SEMINORM 
W1_INF_SEMINORM 
W2_INF_SEMINORM 
DISCRETE_L1 
DISCRETE_L2 
DISCRETE_L_INF 
H1_X_SEMINORM 
H1_Y_SEMINORM 
H1_Z_SEMINORM 
INVALID_NORM 

Definition at line 32 of file enum_norm_type.h.

32  {L2 = 0,
33  H1 = 1,
34  H2 = 2,
35  HCURL = 3,
36  HDIV = 4,
37 
38  L1 = 5,
39  L_INF = 6,
40 
41  H1_SEMINORM = 10,
42 
43  H2_SEMINORM = 11,
44 
45  HCURL_SEMINORM = 12,
46 
47  HDIV_SEMINORM = 13,
48 
49  W1_INF_SEMINORM = 15,
50  W2_INF_SEMINORM = 16,
51 
52  // discrete norms on coefficient vectors
53  DISCRETE_L1 = 20,
54  DISCRETE_L2 = 21,
55  DISCRETE_L_INF = 22,
56 
57  // Seminorms based on only individual gradient
58  // directional components
59  H1_X_SEMINORM = 31,
60  H1_Y_SEMINORM = 32,
61  H1_Z_SEMINORM = 33,
62 
63  INVALID_NORM = 42};

defines an enum for the types of coordinate mappings available in infinite elements.

Enumerator
CARTESIAN 
SPHERICAL 
ELLIPSOIDAL 
INVALID_INF_MAP 

Definition at line 31 of file enum_inf_map_type.h.

libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files. These enumerations give an easy way of selecting one or the other.

Enumerator
TECPLOT 
GMV 
GMSH 
VTK 
DIVA 
TETGEN 
UCD 
LIBMESH 
INVALID_IO_PACKAGE 

Definition at line 34 of file enum_io_package.h.

Linear solver convergence flags (taken from the PETSc flags)

Enumerator
CONVERGED_RTOL_NORMAL 
CONVERGED_ATOL_NORMAL 
CONVERGED_RTOL 
CONVERGED_ATOL 
CONVERGED_ITS 
CONVERGED_CG_NEG_CURVE 
CONVERGED_CG_CONSTRAINED 
CONVERGED_STEP_LENGTH 
CONVERGED_HAPPY_BREAKDOWN 
DIVERGED_NULL 
DIVERGED_ITS 
DIVERGED_DTOL 
DIVERGED_BREAKDOWN 
DIVERGED_BREAKDOWN_BICG 
DIVERGED_NONSYMMETRIC 
DIVERGED_INDEFINITE_PC 
DIVERGED_NAN 
DIVERGED_INDEFINITE_MAT 
DIVERGED_PCSETUP_FAILED 
CONVERGED_ITERATING 
UNKNOWN_FLAG 

Definition at line 30 of file enum_convergence_flags.h.

30  {
31  /* converged */
34  CONVERGED_RTOL = 2,
35  CONVERGED_ATOL = 3,
36  CONVERGED_ITS = 4,
41  /* diverged */
42  DIVERGED_NULL = -2,
43  DIVERGED_ITS = -3,
44  DIVERGED_DTOL = -4,
45  DIVERGED_BREAKDOWN = -5,
49  DIVERGED_NAN = -9,
52 
54 
55  UNKNOWN_FLAG = -128};

defines an enum for polynomial orders. Fixing each label to a specific int, since InfFE and p refinement may cast between them

Enumerator
CONSTANT 
FIRST 
SECOND 
THIRD 
FOURTH 
FIFTH 
SIXTH 
SEVENTH 
EIGHTH 
NINTH 
TENTH 
ELEVENTH 
TWELFTH 
THIRTEENTH 
FOURTEENTH 
FIFTEENTH 
SIXTEENTH 
SEVENTEENTH 
EIGHTTEENTH 
NINTEENTH 
NINETEENTH 
TWENTIETH 
TWENTYFIRST 
TWENTYSECOND 
TWENTYTHIRD 
TWENTYFOURTH 
TWENTYFIFTH 
TWENTYSIXTH 
TWENTYSEVENTH 
TWENTYEIGHTH 
TWENTYNINTH 
THIRTIETH 
THIRTYFIRST 
THIRTYSECOND 
THIRTYTHIRD 
THIRTYFOURTH 
THIRTYFIFTH 
THIRTYSIXTH 
THIRTYSEVENTH 
THIRTYEIGHTH 
THIRTYNINTH 
FORTIETH 
FORTYFIRST 
FORTYSECOND 
FORTYTHIRD 
INVALID_ORDER 

Definition at line 32 of file enum_order.h.

32  {CONSTANT = 0,
33  FIRST = 1,
34  SECOND = 2,
35  THIRD = 3,
36  FOURTH = 4,
37  FIFTH = 5,
38  SIXTH = 6,
39  SEVENTH = 7,
40  EIGHTH = 8,
41  NINTH = 9,
42  TENTH = 10,
43 
44  ELEVENTH = 11,
45  TWELFTH = 12,
46  THIRTEENTH = 13,
47  FOURTEENTH = 14,
48  FIFTEENTH = 15,
49  SIXTEENTH = 16,
50  SEVENTEENTH = 17,
51  EIGHTTEENTH = 18,
52  NINTEENTH = 19, // deprecated
53  NINETEENTH = 19,
54  TWENTIETH = 20,
55 
56  TWENTYFIRST = 21,
57  TWENTYSECOND = 22,
58  TWENTYTHIRD = 23,
59  TWENTYFOURTH = 24,
60  TWENTYFIFTH = 25,
61  TWENTYSIXTH = 26,
62  TWENTYSEVENTH = 27,
63  TWENTYEIGHTH = 28,
64  TWENTYNINTH = 29,
65  THIRTIETH = 30,
66 
67  THIRTYFIRST = 31,
68  THIRTYSECOND = 32,
69  THIRTYTHIRD = 33,
70  THIRTYFOURTH = 34,
71  THIRTYFIFTH = 35,
72  THIRTYSIXTH = 36,
73  THIRTYSEVENTH = 37,
74  THIRTYEIGHTH = 38,
75  THIRTYNINTH = 39,
76  FORTIETH = 40,
77 
78  FORTYFIRST = 41,
79  FORTYSECOND = 42,
80  FORTYTHIRD = 43,
81 

Defines an enum for parallel data structure types

Enumerator
AUTOMATIC 
SERIAL 
PARALLEL 
GHOSTED 
INVALID_PARALLELIZATION 

Definition at line 30 of file enum_parallel_type.h.

defines an enum for the types of point locators (given a point with global coordinates, locate the corresponding element in space) available in libMesh.

Enumerator
TREE 
TREE_ELEMENTS 
TREE_LOCAL_ELEMENTS 
INVALID_LOCATOR 

Definition at line 32 of file enum_point_locator_type.h.

Defines an enum for the position of the spectrum, i.e. the eigenvalues to be computed.

Enumerator
LARGEST_MAGNITUDE 
SMALLEST_MAGNITUDE 
TARGET_MAGNITUDE 
LARGEST_REAL 
SMALLEST_REAL 
TARGET_REAL 
LARGEST_IMAGINARY 
SMALLEST_IMAGINARY 
TARGET_IMAGINARY 
INVALID_Postion_of_Spectrum 

Definition at line 65 of file enum_eigen_solver_type.h.

Defines an enum for preconditioner types

Enumerator
IDENTITY_PRECOND 
JACOBI_PRECOND 
BLOCK_JACOBI_PRECOND 
SOR_PRECOND 
SSOR_PRECOND 
EISENSTAT_PRECOND 
ASM_PRECOND 
CHOLESKY_PRECOND 
ICC_PRECOND 
ILU_PRECOND 
LU_PRECOND 
USER_PRECOND 
SHELL_PRECOND 
AMG_PRECOND 
INVALID_PRECONDITIONER 

Definition at line 30 of file enum_preconditioner_type.h.

Defines an enum for currently available quadrature rules.

Enumerator
QGAUSS 
QJACOBI_1_0 
QJACOBI_2_0 
QSIMPSON 
QTRAP 
QGRID 
QGRUNDMANN_MOLLER 
QMONOMIAL 
QCONICAL 
QGAUSS_LOBATTO 
QCLOUGH 
QCOMPOSITE 
INVALID_Q_RULE 

Definition at line 30 of file enum_quadrature_type.h.

Defines an enum for various linear solver packages. This allows for run-time switching between solver packages

Enumerator
PETSC_SOLVERS 
SLEPC_SOLVERS 
NLOPT_SOLVERS 

Definition at line 32 of file enum_solver_package.h.

Defines an enum for iterative solver types

Enumerator
CG 
CGN 
CGS 
CR 
QMR 
TCQMR 
TFQMR 
BICG 
BICGSTAB 
MINRES 
GMRES 
LSQR 
JACOBI 
SOR_FORWARD 
SOR_BACKWARD 
SSOR 
RICHARDSON 
CHEBYSHEV 
SPARSELU 
INVALID_SOLVER 

Definition at line 30 of file enum_solver_type.h.

defines an enum for the question what happens to the dofs outside the given subset when a system is solved on a subset.

Enumerator
SUBSET_ZERO 

Set dofs outside the subset to zero.

SUBSET_COPY_RHS 

Set dofs outside the subset to the value of the corresponding dofs of the right hand side.

SUBSET_DONT_TOUCH 

Leaves dofs outside the subset unchanged. This is fastest, but also most confusing because it abandons the property that the solution vector is (theoretically) independent of the initial guess.

Definition at line 32 of file enum_subset_solve_mode.h.

32  {
33  SUBSET_ZERO = 0,
36 };
Leaves dofs outside the subset unchanged. This is fastest, but also most confusing because it abandon...
Set dofs outside the subset to zero.
Set dofs outside the subset to the value of the corresponding dofs of the right hand side...

Dirichlet functions may be indexed either by "system variable order" or "local variable order", depending on how the DirichletBoundary object is constructed. For example, suppose a system has variables {a, b, c, d}, and a DirichletBoundary is set for variables {b, d} (i.e. variables_in is {1, 3}). If the boundary is constructed to use "system variable order", input function(s) will be queried for components 1 and 3; this is useful for reusing input functions as both exact solutions and Dirichlet boundaries in benchmark problems. If the boundary is constructed to use "local variable order", input function(s) will be queried for components 0 and 1; this is useful for flexibly constructing Dirichlet boundaries in multiphysics codes or from user input files.

Enumerator
SYSTEM_VARIABLE_ORDER 
LOCAL_VARIABLE_ORDER 

Definition at line 61 of file dirichlet_boundaries.h.

Defines an enum for read/write mode in Xdr format. READ, WRITE perform reading and writing in ASCII format, and DECODE, ENCODE do the same in binary format.

Enumerator
UNKNOWN 
ENCODE 
DECODE 
WRITE 
READ 

Definition at line 32 of file enum_xdr_mode.h.

Function Documentation

void libMesh::__libmesh_nlopt_equality_constraints ( unsigned  m,
double *  result,
unsigned  n,
const double *  x,
double *  gradient,
void *  data 
)

Definition at line 109 of file nlopt_optimization_solver.C.

References data, libMesh::OptimizationSystem::ComputeEqualityConstraints::equality_constraints(), libMesh::OptimizationSystem::ComputeEqualityConstraintsJacobian::equality_constraints_jacobian(), libMesh::OptimizationSolver< T >::equality_constraints_jacobian_object, libMesh::OptimizationSolver< T >::equality_constraints_object, libmesh_assert(), solver, sys, and libMesh::OptimizationSolver< T >::system().

115 {
116  LOG_SCOPE("equality_constraints()", "NloptOptimizationSolver");
117 
119 
120  // data should be a pointer to the solver (it was passed in as void *)
121  NloptOptimizationSolver<Number> * solver =
122  static_cast<NloptOptimizationSolver<Number> *> (data);
123 
124  OptimizationSystem & sys = solver->system();
125 
126  // We'll use current_local_solution below, so let's ensure that it's consistent
127  // with the vector x that was passed in.
128  if (sys.solution->size() != n)
129  libmesh_error_msg("Error: Input vector x has different length than sys.solution!");
130 
131  for(unsigned int i=sys.solution->first_local_index(); i<sys.solution->last_local_index(); i++)
132  sys.solution->set(i, x[i]);
133  sys.solution->close();
134 
135  // Impose constraints on the solution vector
136  sys.get_dof_map().enforce_constraints_exactly(sys);
137 
138  // Update sys.current_local_solution based on the solution vector
139  sys.update();
140 
141  // Call the user's equality constraints function if there is one.
142  OptimizationSystem::ComputeEqualityConstraints * eco = solver->equality_constraints_object;
143  if (eco)
144  {
145  eco->equality_constraints(*sys.current_local_solution,
146  *sys.C_eq,
147  sys);
148 
149  sys.C_eq->close();
150 
151  // Copy the values out of eq_constraints into 'result'.
152  // TODO: Even better would be if we could use 'result' directly
153  // as the storage of eq_constraints. Perhaps a serial-only
154  // NumericVector variant which supports this option?
155  for (unsigned i=0; i<m; ++i)
156  result[i] = (*sys.C_eq)(i);
157 
158  // If gradient != NULL, then the Jacobian matrix of the equality
159  // constraints has been requested. The incoming 'gradient'
160  // array is of length m*n and d(c_i)/d(x_j) = gradient[n*i+j].
161  if (gradient)
162  {
163  OptimizationSystem::ComputeEqualityConstraintsJacobian * eco_jac =
164  solver->equality_constraints_jacobian_object;
165 
166  if (eco_jac)
167  {
168  eco_jac->equality_constraints_jacobian(*sys.current_local_solution,
169  *sys.C_eq_jac,
170  sys);
171 
172  sys.C_eq_jac->close();
173 
174  // copy the Jacobian data to the gradient array
175  for(numeric_index_type i=0; i<m; i++)
176  {
177  std::set<numeric_index_type>::iterator it = sys.eq_constraint_jac_sparsity[i].begin();
178  std::set<numeric_index_type>::iterator it_end = sys.eq_constraint_jac_sparsity[i].end();
179  for( ; it != it_end; ++it)
180  {
181  numeric_index_type dof_index = *it;
182  gradient[n*i+dof_index] = (*sys.C_eq_jac)(i,dof_index);
183  }
184  }
185  }
186  else
187  libmesh_error_msg("Jacobian function not defined in __libmesh_nlopt_equality_constraints");
188  }
189 
190  }
191  else
192  libmesh_error_msg("Constraints function not defined in __libmesh_nlopt_equality_constraints");
193 }
ImplicitSystem & sys
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
dof_id_type numeric_index_type
Definition: id_types.h:92
UniquePtr< NumericVector< Number > > solution
Definition: system.h:1512
IterBase * data
void libMesh::__libmesh_nlopt_inequality_constraints ( unsigned  m,
double *  result,
unsigned  n,
const double *  x,
double *  gradient,
void *  data 
)

Definition at line 196 of file nlopt_optimization_solver.C.

References data, libMesh::OptimizationSystem::ComputeInequalityConstraints::inequality_constraints(), libMesh::OptimizationSystem::ComputeInequalityConstraintsJacobian::inequality_constraints_jacobian(), libMesh::OptimizationSolver< T >::inequality_constraints_jacobian_object, libMesh::OptimizationSolver< T >::inequality_constraints_object, libmesh_assert(), solver, sys, and libMesh::OptimizationSolver< T >::system().

202 {
203  LOG_SCOPE("inequality_constraints()", "NloptOptimizationSolver");
204 
206 
207  // data should be a pointer to the solver (it was passed in as void *)
208  NloptOptimizationSolver<Number> * solver =
209  static_cast<NloptOptimizationSolver<Number> *> (data);
210 
211  OptimizationSystem & sys = solver->system();
212 
213  // We'll use current_local_solution below, so let's ensure that it's consistent
214  // with the vector x that was passed in.
215  if (sys.solution->size() != n)
216  libmesh_error_msg("Error: Input vector x has different length than sys.solution!");
217 
218  for(unsigned int i=sys.solution->first_local_index(); i<sys.solution->last_local_index(); i++)
219  sys.solution->set(i, x[i]);
220  sys.solution->close();
221 
222  // Impose constraints on the solution vector
223  sys.get_dof_map().enforce_constraints_exactly(sys);
224 
225  // Update sys.current_local_solution based on the solution vector
226  sys.update();
227 
228  // Call the user's inequality constraints function if there is one.
229  OptimizationSystem::ComputeInequalityConstraints * ineco = solver->inequality_constraints_object;
230  if (ineco)
231  {
232  ineco->inequality_constraints(*sys.current_local_solution,
233  *sys.C_ineq,
234  sys);
235 
236  sys.C_ineq->close();
237 
238  // Copy the values out of ineq_constraints into 'result'.
239  // TODO: Even better would be if we could use 'result' directly
240  // as the storage of ineq_constraints. Perhaps a serial-only
241  // NumericVector variant which supports this option?
242  for (unsigned i=0; i<m; ++i)
243  result[i] = (*sys.C_ineq)(i);
244 
245  // If gradient != NULL, then the Jacobian matrix of the equality
246  // constraints has been requested. The incoming 'gradient'
247  // array is of length m*n and d(c_i)/d(x_j) = gradient[n*i+j].
248  if (gradient)
249  {
250  OptimizationSystem::ComputeInequalityConstraintsJacobian * ineco_jac =
251  solver->inequality_constraints_jacobian_object;
252 
253  if (ineco_jac)
254  {
255  ineco_jac->inequality_constraints_jacobian(*sys.current_local_solution,
256  *sys.C_ineq_jac,
257  sys);
258 
259  sys.C_ineq_jac->close();
260 
261  // copy the Jacobian data to the gradient array
262  for(numeric_index_type i=0; i<m; i++)
263  {
264  std::set<numeric_index_type>::iterator it = sys.ineq_constraint_jac_sparsity[i].begin();
265  std::set<numeric_index_type>::iterator it_end = sys.ineq_constraint_jac_sparsity[i].end();
266  for( ; it != it_end; ++it)
267  {
268  numeric_index_type dof_index = *it;
269  gradient[n*i+dof_index] = (*sys.C_ineq_jac)(i,dof_index);
270  }
271  }
272  }
273  else
274  libmesh_error_msg("Jacobian function not defined in __libmesh_nlopt_inequality_constraints");
275  }
276 
277  }
278  else
279  libmesh_error_msg("Constraints function not defined in __libmesh_nlopt_inequality_constraints");
280 }
ImplicitSystem & sys
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
dof_id_type numeric_index_type
Definition: id_types.h:92
UniquePtr< NumericVector< Number > > solution
Definition: system.h:1512
IterBase * data
double libMesh::__libmesh_nlopt_objective ( unsigned  n,
const double *  x,
double *  gradient,
void *  data 
)

Definition at line 36 of file nlopt_optimization_solver.C.

References data, libMesh::NloptOptimizationSolver< T >::get_iteration_count(), libMesh::OptimizationSystem::ComputeGradient::gradient(), libMesh::OptimizationSolver< T >::gradient_object, libmesh_assert(), libmesh_nullptr, libMesh::OptimizationSystem::ComputeObjective::objective(), libMesh::OptimizationSolver< T >::objective_object, out, Real, solver, sys, libMesh::OptimizationSolver< T >::system(), and libMesh::OptimizationSolver< T >::verbose.

40 {
41  LOG_SCOPE("objective()", "NloptOptimizationSolver");
42 
43  // ctx should be a pointer to the solver (it was passed in as void *)
44  NloptOptimizationSolver<Number> * solver =
45  static_cast<NloptOptimizationSolver<Number> *> (data);
46 
47  OptimizationSystem & sys = solver->system();
48 
49  // We'll use current_local_solution below, so let's ensure that it's consistent
50  // with the vector x that was passed in.
51  for (unsigned int i=sys.solution->first_local_index();
52  i<sys.solution->last_local_index(); i++)
53  sys.solution->set(i, x[i]);
54 
55  // Make sure the solution vector is parallel-consistent
56  sys.solution->close();
57 
58  // Impose constraints on X
59  sys.get_dof_map().enforce_constraints_exactly(sys);
60 
61  // Update sys.current_local_solution based on X
62  sys.update();
63 
64  Real objective;
65  if (solver->objective_object != libmesh_nullptr)
66  {
67  objective =
68  solver->objective_object->objective(
69  *(sys.current_local_solution), sys);
70  }
71  else
72  {
73  libmesh_error_msg("Objective function not defined in __libmesh_nlopt_objective");
74  }
75 
76  // If the gradient has been requested, fill it in
77  if (gradient)
78  {
79  if (solver->gradient_object != libmesh_nullptr)
80  {
81  solver->gradient_object->gradient(
82  *(sys.current_local_solution), *(sys.rhs), sys);
83 
84  // we've filled up sys.rhs with the gradient data, now copy it
85  // to the nlopt data structure
86  libmesh_assert(sys.rhs->size() == n);
87 
88  std::vector<double> grad;
89  sys.rhs->localize_to_one(grad);
90  for (unsigned i=0; i<n; ++i)
91  gradient[i] = grad[i];
92  }
93  else
94  libmesh_error_msg("Gradient function not defined in __libmesh_nlopt_objective");
95  }
96 
97  // Increment the iteration count.
98  solver->get_iteration_count()++;
99 
100  // Possibly print the current value of the objective function
101  if (solver->verbose)
102  libMesh::out << objective << std::endl;
103 
104  return objective;
105 }
ImplicitSystem & sys
const class libmesh_nullptr_t libmesh_nullptr
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
UniquePtr< NumericVector< Number > > solution
Definition: system.h:1512
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IterBase * data
OStreamProxy out(std::cout)
PetscErrorCode libMesh::__libmesh_petsc_diff_solver_jacobian ( SNES  ,
Vec  x,
Mat *  libmesh_dbg_varj,
Mat *  pc,
MatStructure *  msflag,
void *  ctx 
)
PetscErrorCode libMesh::__libmesh_petsc_diff_solver_monitor ( SNES  snes,
PetscInt  its,
PetscReal  fnorm,
void *  ctx 
)

Definition at line 43 of file petsc_diff_solver.C.

References libMesh::PetscVector< T >::close(), libMesh::ParallelObject::comm(), ctx, libMesh::Parallel::Communicator::get(), ierr, libmesh_nullptr, libMesh::DiffSolver::linear_solution_monitor, out, solver, and libMesh::DiffSolver::verbose.

Referenced by libMesh::PetscDiffSolver::init().

47  {
48  PetscDiffSolver & solver =
49  *(static_cast<PetscDiffSolver *> (ctx));
50 
51  if (solver.verbose)
52  libMesh::out << " PetscDiffSolver step " << its
53  << ", |residual|_2 = " << fnorm << std::endl;
54  if (solver.linear_solution_monitor.get()) {
55  int ierr = 0;
56 
57  Vec petsc_delta_u;
58  ierr = SNESGetSolutionUpdate(snes, &petsc_delta_u);
59  CHKERRABORT(solver.comm().get(), ierr);
60  PetscVector<Number> delta_u(petsc_delta_u, solver.comm());
61  delta_u.close();
62 
63  Vec petsc_u;
64  ierr = SNESGetSolution(snes, &petsc_u);
65  CHKERRABORT(solver.comm().get(), ierr);
66  PetscVector<Number> u(petsc_u, solver.comm());
67  u.close();
68 
69  Vec petsc_res;
70  ierr = SNESGetFunction(snes, &petsc_res, libmesh_nullptr, libmesh_nullptr);
71  CHKERRABORT(solver.comm().get(), ierr);
72  PetscVector<Number> res(petsc_res, solver.comm());
73  res.close();
74 
75  (*solver.linear_solution_monitor)(
76  delta_u, delta_u.l2_norm(),
77  u, u.l2_norm(),
78  res, res.l2_norm(), its);
79  }
80  return 0;
81  }
const class libmesh_nullptr_t libmesh_nullptr
PetscDiffSolver & solver
PetscErrorCode Vec Mat Mat void * ctx
PetscErrorCode ierr
OStreamProxy out(std::cout)
PetscErrorCode libMesh::__libmesh_petsc_diff_solver_residual ( SNES  ,
Vec  x,
Vec  r,
void *  ctx 
)

Definition at line 86 of file petsc_diff_solver.C.

References __libmesh_petsc_diff_solver_jacobian(), libMesh::ImplicitSystem::assembly(), libMesh::ParallelObject::comm(), ctx, libMesh::DofMap::enforce_constraints_exactly(), libMesh::System::get_dof_map(), libmesh_assert(), libmesh_dbg_var(), out, pc, libMesh::ExplicitSystem::rhs, libMesh::System::solution, solver, sys, libMesh::DiffSolver::system(), libMesh::System::update(), libMesh::DiffSolver::verbose, x, X_input(), and X_system.

Referenced by libMesh::PetscDiffSolver::solve().

87  {
89  libmesh_assert(r);
91 
92  PetscDiffSolver & solver =
93  *(static_cast<PetscDiffSolver*> (ctx));
94  ImplicitSystem & sys = solver.system();
95 
96  if (solver.verbose)
97  libMesh::out << "Assembling the residual" << std::endl;
98 
99  PetscVector<Number> & X_system =
100  *cast_ptr<PetscVector<Number> *>(sys.solution.get());
101  PetscVector<Number> & R_system =
102  *cast_ptr<PetscVector<Number> *>(sys.rhs);
103  PetscVector<Number> X_input(x, sys.comm()), R_input(r, sys.comm());
104 
105  // DiffSystem assembles from the solution and into the rhs, so swap
106  // those with our input vectors before assembling. They'll probably
107  // already be references to the same vectors, but PETSc might do
108  // something tricky.
109  X_input.swap(X_system);
110  R_input.swap(R_system);
111 
112  // We may need to correct a non-conforming solution
113  sys.get_dof_map().enforce_constraints_exactly(sys);
114 
115  // We may need to localize a parallel solution
116  sys.update();
117 
118  // Do DiffSystem assembly
119  sys.assembly(true, false);
120  R_system.close();
121 
122  // Swap back
123  X_input.swap(X_system);
124  R_input.swap(R_system);
125 
126  // No errors, we hope
127  return 0;
128  }
ImplicitSystem & sys
PetscDiffSolver & solver
PetscErrorCode Vec x
libmesh_assert(ctx)
PetscErrorCode Vec Mat Mat void * ctx
if(solver.verbose) libMesh PetscVector< Number > & X_system
OStreamProxy out(std::cout)
PetscVector< Number > X_input(x, sys.comm())
PetscErrorCode libMesh::__libmesh_petsc_preconditioner_apply ( void *  ctx,
Vec  x,
Vec  y 
)

This function is called by PETSc to acctually apply the preconditioner. ctx will hold the Preconditioner.

Definition at line 58 of file petsc_linear_solver.C.

References ctx.

Referenced by libMesh::PetscNonlinearSolver< T >::init(), and libMesh::PetscLinearSolver< T >::init().

59  {
60  Preconditioner<Number> * preconditioner = static_cast<Preconditioner<Number> *>(ctx);
61 
62  PetscVector<Number> x_vec(x, preconditioner->comm());
63  PetscVector<Number> y_vec(y, preconditioner->comm());
64 
65  preconditioner->apply(x_vec,y_vec);
66 
67  return 0;
68  }
PetscErrorCode Vec x
PetscErrorCode Vec Mat Mat void * ctx
PetscErrorCode libMesh::__libmesh_petsc_preconditioner_apply ( PC  pc,
Vec  x,
Vec  y 
)

Definition at line 84 of file petsc_linear_solver.C.

References CHKERRQ(), ctx, and ierr.

85  {
86  void * ctx;
87  PetscErrorCode ierr = PCShellGetContext(pc,&ctx);CHKERRQ(ierr);
88  Preconditioner<Number> * preconditioner = static_cast<Preconditioner<Number> *>(ctx);
89 
90  PetscVector<Number> x_vec(x, preconditioner->comm());
91  PetscVector<Number> y_vec(y, preconditioner->comm());
92 
93  preconditioner->apply(x_vec,y_vec);
94 
95  return 0;
96  }
PetscErrorCode Vec Mat Mat pc
PetscErrorCode Vec x
PetscErrorCode Vec Mat Mat void * ctx
PetscErrorCode ierr
CHKERRQ(ierr)
PetscErrorCode libMesh::__libmesh_petsc_preconditioner_setup ( void *  ctx)

This function is called by PETSc to initialize the preconditioner. ctx will hold the Preconditioner.

Definition at line 45 of file petsc_linear_solver.C.

References ctx.

Referenced by libMesh::PetscNonlinearSolver< T >::init(), and libMesh::PetscLinearSolver< T >::init().

46  {
47  Preconditioner<Number> * preconditioner = static_cast<Preconditioner<Number> *>(ctx);
48 
49  if (!preconditioner->initialized())
50  libmesh_error_msg("Preconditioner not initialized! Make sure you call init() before solve!");
51 
52  preconditioner->setup();
53 
54  return 0;
55  }
PetscErrorCode Vec Mat Mat void * ctx
PetscErrorCode libMesh::__libmesh_petsc_preconditioner_setup ( PC  pc)

Definition at line 70 of file petsc_linear_solver.C.

References CHKERRQ(), ctx, and ierr.

71  {
72  void * ctx;
73  PetscErrorCode ierr = PCShellGetContext(pc,&ctx);CHKERRQ(ierr);
74  Preconditioner<Number> * preconditioner = static_cast<Preconditioner<Number> *>(ctx);
75 
76  if (!preconditioner->initialized())
77  libmesh_error_msg("Preconditioner not initialized! Make sure you call init() before solve!");
78 
79  preconditioner->setup();
80 
81  return 0;
82  }
PetscErrorCode Vec Mat Mat pc
PetscErrorCode Vec Mat Mat void * ctx
PetscErrorCode ierr
CHKERRQ(ierr)
PetscErrorCode libMesh::__libmesh_petsc_snes_jacobian ( SNES  ,
Vec  x,
Mat *  jac,
Mat *  pc,
MatStructure *  msflag,
void *  ctx 
)
PetscErrorCode libMesh::__libmesh_petsc_snes_jacobian ( SNES  ,
Vec  x,
Mat  jac,
Mat  pc,
void *  ctx 
)
PetscErrorCode libMesh::__libmesh_petsc_snes_jacobian ( #if PETSC_RELEASE_LESS_THAN(3, 5, 0) SNES  snes,
Vec  x,
Mat *  jac,
Mat *  pc,
MatStructure *  msflag,
void *ctx#else SNES  snes,
Vec  x,
Mat  jac,
Mat  pc,
void *ctx endif 
)

Definition at line 154 of file petsc_nonlinear_solver.C.

References libMesh::PetscNonlinearSolver< T >::_current_nonlinear_iteration_number, libMesh::PetscNonlinearSolver< T >::_zero_out_jacobian, libMesh::ParallelObject::comm(), ctx, libMesh::Parallel::Communicator::get(), ierr, libMesh::NonlinearImplicitSystem::ComputeJacobian::jacobian(), libMesh::NonlinearSolver< T >::jacobian, libMesh::NonlinearSolver< T >::jacobian_object, libmesh_assert(), libmesh_nullptr, libMesh::NonlinearSolver< T >::matvec, libMesh::NonlinearImplicitSystem::ComputeResidualandJacobian::residual_and_jacobian(), libMesh::NonlinearSolver< T >::residual_and_jacobian_object, solver, libMesh::PetscVector< T >::swap(), sys, and libMesh::NonlinearSolver< T >::system().

161  {
162  LOG_SCOPE("jacobian()", "PetscNonlinearSolver");
163 
164  PetscErrorCode ierr=0;
165 
167 
168  // No way to safety-check this cast, since we got a void *...
169  PetscNonlinearSolver<Number> * solver =
170  static_cast<PetscNonlinearSolver<Number> *> (ctx);
171 
172  // Get the current iteration number from the snes object,
173  // store it in the PetscNonlinearSolver object for possible use
174  // by the user's Jacobian function.
175  {
176  PetscInt n_iterations = 0;
177  ierr = SNESGetIterationNumber(snes, &n_iterations);
178  CHKERRABORT(solver->comm().get(),ierr);
179  solver->_current_nonlinear_iteration_number = cast_int<unsigned>(n_iterations);
180  }
181 
182  NonlinearImplicitSystem & sys = solver->system();
183 #if PETSC_RELEASE_LESS_THAN(3,5,0)
184  PetscMatrix<Number> PC(*pc, sys.comm());
185  PetscMatrix<Number> Jac(*jac, sys.comm());
186 #else
187  PetscMatrix<Number> PC(pc, sys.comm());
188  PetscMatrix<Number> Jac(jac, sys.comm());
189 #endif
190  PetscVector<Number> & X_sys = *cast_ptr<PetscVector<Number> *>(sys.solution.get());
191  PetscVector<Number> X_global(x, sys.comm());
192 
193  // Set the dof maps
194  PC.attach_dof_map(sys.get_dof_map());
195  Jac.attach_dof_map(sys.get_dof_map());
196 
197  // Use the systems update() to get a good local version of the parallel solution
198  X_global.swap(X_sys);
199  sys.update();
200  X_global.swap(X_sys);
201 
202  // Enforce constraints (if any) exactly on the
203  // current_local_solution. This is the solution vector that is
204  // actually used in the computation of the residual below, and is
205  // not locked by debug-enabled PETSc the way that "x" is.
206  sys.get_dof_map().enforce_constraints_exactly(sys, sys.current_local_solution.get());
207 
208  if (solver->_zero_out_jacobian)
209  PC.zero();
210 
211  //-----------------------------------------------------------------------------
212  // if the user has provided both function pointers and objects only the pointer
213  // will be used, so catch that as an error
214  if (solver->jacobian && solver->jacobian_object)
215  libmesh_error_msg("ERROR: cannot specify both a function and object to compute the Jacobian!");
216 
217  if (solver->matvec && solver->residual_and_jacobian_object)
218  libmesh_error_msg("ERROR: cannot specify both a function and object to compute the combined Residual & Jacobian!");
219 
220  if (solver->jacobian != libmesh_nullptr)
221  solver->jacobian(*sys.current_local_solution.get(), PC, sys);
222 
223  else if (solver->jacobian_object != libmesh_nullptr)
224  solver->jacobian_object->jacobian(*sys.current_local_solution.get(), PC, sys);
225 
226  else if (solver->matvec != libmesh_nullptr)
227  solver->matvec(*sys.current_local_solution.get(), libmesh_nullptr, &PC, sys);
228 
229  else if (solver->residual_and_jacobian_object != libmesh_nullptr)
230  solver->residual_and_jacobian_object->residual_and_jacobian (*sys.current_local_solution.get(), libmesh_nullptr, &PC, sys);
231 
232  else
233  libmesh_error_msg("Error! Unable to compute residual and/or Jacobian!");
234 
235  PC.close();
236  Jac.close();
237 #if PETSC_RELEASE_LESS_THAN(3,5,0)
238  *msflag = SAME_NONZERO_PATTERN;
239 #endif
240 
241  return ierr;
242  }
ImplicitSystem & sys
const class libmesh_nullptr_t libmesh_nullptr
PetscErrorCode Vec Mat Mat pc
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
PetscErrorCode Vec Mat Mat void * ctx
virtual void update()
Definition: system.C:420
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_petsc_snes_monitor ( SNES  ,
PetscInt  its,
PetscReal  fnorm,
void *   
)

Definition at line 54 of file petsc_nonlinear_solver.C.

References out.

Referenced by libMesh::PetscNonlinearSolver< T >::init().

55  {
56  //PetscErrorCode ierr=0;
57 
58  //if (its > 0)
59  libMesh::out << " NL step "
60  << std::setw(2) << its
61  << std::scientific
62  << ", |residual|_2 = " << fnorm
63  << std::endl;
64 
65  //return ierr;
66  return 0;
67  }
OStreamProxy out(std::cout)
PetscErrorCode libMesh::__libmesh_petsc_snes_postcheck ( #if PETSC_VERSION_LESS_THAN(3, 3, 0)  SNES,
Vec  x,
Vec  y,
Vec  w,
void *  context,
PetscBool changed_y,
PetscBool *changed_w#else  SNESLineSearch,
Vec  x,
Vec  y,
Vec  w,
PetscBool changed_y,
PetscBool changed_w,
void *context#  endif 
)

Definition at line 254 of file petsc_nonlinear_solver.C.

References libMesh::ParallelObject::comm(), libMesh::DofMap::enforce_constraints_exactly(), libMesh::System::get_dof_map(), ierr, libmesh_assert(), libMesh::DofMap::n_constrained_dofs(), libMesh::NonlinearImplicitSystem::ComputePostCheck::postcheck(), libMesh::NonlinearSolver< T >::postcheck, libMesh::NonlinearSolver< T >::postcheck_object, libMesh::System::solution, solver, libMesh::PetscVector< T >::swap(), sys, and libMesh::NonlinearSolver< T >::system().

Referenced by libMesh::PetscNonlinearSolver< T >::init().

261  {
262  LOG_SCOPE("postcheck()", "PetscNonlinearSolver");
263 
264  PetscErrorCode ierr = 0;
265 
266  // PETSc almost certainly initializes these to false already, but
267  // it doesn't hurt to be explicit.
268  *changed_w = PETSC_FALSE;
269  *changed_y = PETSC_FALSE;
270 
271  libmesh_assert(context);
272 
273  // Cast the context to a NonlinearSolver object.
274  PetscNonlinearSolver<Number> * solver =
275  static_cast<PetscNonlinearSolver<Number> *> (context);
276 
277  // If the user has provided both postcheck function pointer and
278  // object, this is ambiguous, so throw an error.
279  if (solver->postcheck && solver->postcheck_object)
280  libmesh_error_msg("ERROR: cannot specify both a function and object for performing the solve postcheck!");
281 
282  // It's also possible that we don't need to do anything at all, in
283  // that case return early...
284  NonlinearImplicitSystem & sys = solver->system();
285  DofMap & dof_map = sys.get_dof_map();
286 
287  if (!dof_map.n_constrained_dofs() && !solver->postcheck && !solver->postcheck_object)
288  return ierr;
289 
290  // We definitely need to wrap at least "w"
291  PetscVector<Number> petsc_w(w, sys.comm());
292 
293  // The user sets these flags in his/her postcheck function to
294  // indicate whether they changed something.
295  bool
296  changed_search_direction = false,
297  changed_new_soln = false;
298 
299  if (solver->postcheck || solver->postcheck_object)
300  {
301  PetscVector<Number> petsc_x(x, sys.comm());
302  PetscVector<Number> petsc_y(y, sys.comm());
303 
304  if (solver->postcheck)
305  solver->postcheck(petsc_x,
306  petsc_y,
307  petsc_w,
308  changed_search_direction,
309  changed_new_soln,
310  sys);
311 
312  else if (solver->postcheck_object)
313  solver->postcheck_object->postcheck(petsc_x,
314  petsc_y,
315  petsc_w,
316  changed_search_direction,
317  changed_new_soln,
318  sys);
319  }
320 
321  // Record whether the user changed the solution or the search direction.
322  if (changed_search_direction)
323  *changed_y = PETSC_TRUE;
324 
325  if (changed_new_soln)
326  *changed_w = PETSC_TRUE;
327 
328  if (dof_map.n_constrained_dofs())
329  {
330  PetscVector<Number> & system_soln = *cast_ptr<PetscVector<Number> *>(sys.solution.get());
331 
332  // ... and swap it in before enforcing the constraints.
333  petsc_w.swap(system_soln);
334 
335  dof_map.enforce_constraints_exactly(sys);
336 
337  // If we have constraints, we'll assume that we did change the
338  // solution w (hopefully slightly). Enforcing constraints
339  // does not change the search direction, y, but the user may
340  // have, so we leave it alone.
341  *changed_w = PETSC_TRUE;
342 
343  // Swap back
344  petsc_w.swap(system_soln);
345  }
346 
347  return ierr;
348  }
ImplicitSystem & sys
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
const DofMap & get_dof_map() const
Definition: system.h:2019
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_petsc_snes_residual ( SNES  snes,
Vec  x,
Vec  r,
void *  ctx 
)

Definition at line 74 of file petsc_nonlinear_solver.C.

References libMesh::PetscNonlinearSolver< T >::_current_nonlinear_iteration_number, libMesh::PetscNonlinearSolver< T >::_zero_out_residual, libMesh::ParallelObject::comm(), ctx, libMesh::Parallel::Communicator::get(), ierr, libmesh_assert(), libmesh_nullptr, libMesh::NonlinearSolver< T >::matvec, libMesh::NonlinearImplicitSystem::ComputeResidual::residual(), libMesh::NonlinearSolver< T >::residual, libMesh::NonlinearImplicitSystem::ComputeResidualandJacobian::residual_and_jacobian(), libMesh::NonlinearSolver< T >::residual_and_jacobian_object, libMesh::NonlinearSolver< T >::residual_object, solver, libMesh::PetscVector< T >::swap(), sys, and libMesh::NonlinearSolver< T >::system().

75  {
76  LOG_SCOPE("residual()", "PetscNonlinearSolver");
77 
78  PetscErrorCode ierr=0;
79 
81  libmesh_assert(r);
83 
84  // No way to safety-check this cast, since we got a void *...
85  PetscNonlinearSolver<Number> * solver =
86  static_cast<PetscNonlinearSolver<Number> *> (ctx);
87 
88  // Get the current iteration number from the snes object,
89  // store it in the PetscNonlinearSolver object for possible use
90  // by the user's residual function.
91  {
92  PetscInt n_iterations = 0;
93  ierr = SNESGetIterationNumber(snes, &n_iterations);
94  CHKERRABORT(solver->comm().get(),ierr);
95  solver->_current_nonlinear_iteration_number = cast_int<unsigned>(n_iterations);
96  }
97 
98  NonlinearImplicitSystem & sys = solver->system();
99 
100  PetscVector<Number> & X_sys = *cast_ptr<PetscVector<Number> *>(sys.solution.get());
101  PetscVector<Number> X_global(x, sys.comm()), R(r, sys.comm());
102 
103  // Use the system's update() to get a good local version of the
104  // parallel solution. This operation does not modify the incoming
105  // "x" vector, it only localizes information from "x" into
106  // sys.current_local_solution.
107  X_global.swap(X_sys);
108  sys.update();
109  X_global.swap(X_sys);
110 
111  // Enforce constraints (if any) exactly on the
112  // current_local_solution. This is the solution vector that is
113  // actually used in the computation of the residual below, and is
114  // not locked by debug-enabled PETSc the way that "x" is.
115  sys.get_dof_map().enforce_constraints_exactly(sys, sys.current_local_solution.get());
116 
117  if (solver->_zero_out_residual)
118  R.zero();
119 
120  //-----------------------------------------------------------------------------
121  // if the user has provided both function pointers and objects only the pointer
122  // will be used, so catch that as an error
123  if (solver->residual && solver->residual_object)
124  libmesh_error_msg("ERROR: cannot specifiy both a function and object to compute the Residual!");
125 
126  if (solver->matvec && solver->residual_and_jacobian_object)
127  libmesh_error_msg("ERROR: cannot specifiy both a function and object to compute the combined Residual & Jacobian!");
128 
129  if (solver->residual != libmesh_nullptr)
130  solver->residual(*sys.current_local_solution.get(), R, sys);
131 
132  else if (solver->residual_object != libmesh_nullptr)
133  solver->residual_object->residual(*sys.current_local_solution.get(), R, sys);
134 
135  else if (solver->matvec != libmesh_nullptr)
136  solver->matvec (*sys.current_local_solution.get(), &R, libmesh_nullptr, sys);
137 
138  else if (solver->residual_and_jacobian_object != libmesh_nullptr)
139  solver->residual_and_jacobian_object->residual_and_jacobian (*sys.current_local_solution.get(), &R, libmesh_nullptr, sys);
140 
141  else
142  libmesh_error_msg("Error! Unable to compute residual and/or Jacobian!");
143 
144  R.close();
145 
146  return ierr;
147  }
ImplicitSystem & sys
const class libmesh_nullptr_t libmesh_nullptr
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
PetscErrorCode Vec Mat Mat void * ctx
virtual void update()
Definition: system.C:420
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_equality_constraints ( Tao  ,
Vec  x,
Vec  ce,
void *  ctx 
)

Definition at line 198 of file tao_optimization_solver.C.

References libMesh::ParallelObject::comm(), ctx, libMesh::OptimizationSystem::ComputeEqualityConstraints::equality_constraints(), libMesh::OptimizationSolver< T >::equality_constraints_object, ierr, libmesh_assert(), libmesh_nullptr, solver, libMesh::PetscVector< T >::swap(), sys, libMesh::OptimizationSolver< T >::system(), and libMesh::PetscVector< T >::zero().

199  {
200  LOG_SCOPE("equality_constraints()", "TaoOptimizationSolver");
201 
202  PetscErrorCode ierr = 0;
203 
204  libmesh_assert(x);
205  libmesh_assert(ce);
207 
208  // ctx should be a pointer to the solver (it was passed in as void *)
209  TaoOptimizationSolver<Number> * solver =
210  static_cast<TaoOptimizationSolver<Number> *> (ctx);
211 
212  OptimizationSystem & sys = solver->system();
213 
214  // We'll use current_local_solution below, so let's ensure that it's consistent
215  // with the vector x that was passed in.
216  PetscVector<Number> & X_sys = *cast_ptr<PetscVector<Number> *>(sys.solution.get());
217  PetscVector<Number> X(x, sys.comm());
218 
219  // Perform a swap so that sys.solution points to X
220  X.swap(X_sys);
221  // Impose constraints on X
223  // Update sys.current_local_solution based on X
224  sys.update();
225  // Swap back
226  X.swap(X_sys);
227 
228  // We'll also pass the constraints vector ce into the assembly routine
229  // so let's make a PETSc vector for that too.
230  PetscVector<Number> eq_constraints(ce, sys.comm());
231 
232  // Clear the gradient prior to assembly
233  eq_constraints.zero();
234 
235  if (solver->equality_constraints_object != libmesh_nullptr)
236  solver->equality_constraints_object->equality_constraints(*(sys.current_local_solution), eq_constraints, sys);
237  else
238  libmesh_error_msg("Constraints function not defined in __libmesh_tao_equality_constraints");
239 
240  eq_constraints.close();
241 
242  return ierr;
243  }
ImplicitSystem & sys
const class libmesh_nullptr_t libmesh_nullptr
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
const DofMap & get_dof_map() const
Definition: system.h:2019
PetscErrorCode Vec Mat Mat void * ctx
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_equality_constraints_jacobian ( Tao  ,
Vec  x,
Mat  J,
Mat  Jpre,
void *  ctx 
)

Definition at line 249 of file tao_optimization_solver.C.

References libMesh::ParallelObject::comm(), ctx, libMesh::OptimizationSystem::ComputeEqualityConstraintsJacobian::equality_constraints_jacobian(), libMesh::OptimizationSolver< T >::equality_constraints_jacobian_object, ierr, libmesh_assert(), libmesh_nullptr, solver, libMesh::PetscVector< T >::swap(), sys, and libMesh::OptimizationSolver< T >::system().

250  {
251  LOG_SCOPE("equality_constraints_jacobian()", "TaoOptimizationSolver");
252 
253  PetscErrorCode ierr = 0;
254 
255  libmesh_assert(x);
256  libmesh_assert(J);
257  libmesh_assert(Jpre);
258 
259  // ctx should be a pointer to the solver (it was passed in as void *)
260  TaoOptimizationSolver<Number> * solver =
261  static_cast<TaoOptimizationSolver<Number> *> (ctx);
262 
263  OptimizationSystem & sys = solver->system();
264 
265  // We'll use current_local_solution below, so let's ensure that it's consistent
266  // with the vector x that was passed in.
267  PetscVector<Number> & X_sys = *cast_ptr<PetscVector<Number> *>(sys.solution.get());
268  PetscVector<Number> X(x, sys.comm());
269 
270  // Perform a swap so that sys.solution points to X
271  X.swap(X_sys);
272  // Impose constraints on X
274  // Update sys.current_local_solution based on X
275  sys.update();
276  // Swap back
277  X.swap(X_sys);
278 
279  // Let's also wrap J and Jpre in PetscMatrix objects for convenience
280  PetscMatrix<Number> J_petsc(J, sys.comm());
281  PetscMatrix<Number> Jpre_petsc(Jpre, sys.comm());
282 
283  if (solver->equality_constraints_jacobian_object != libmesh_nullptr)
284  solver->equality_constraints_jacobian_object->equality_constraints_jacobian(*(sys.current_local_solution), J_petsc, sys);
285  else
286  libmesh_error_msg("Constraints function not defined in __libmesh_tao_equality_constraints_jacobian");
287 
288  J_petsc.close();
289  Jpre_petsc.close();
290 
291  return ierr;
292  }
ImplicitSystem & sys
const class libmesh_nullptr_t libmesh_nullptr
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
const DofMap & get_dof_map() const
Definition: system.h:2019
PetscErrorCode Vec Mat Mat void * ctx
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_gradient ( Tao  ,
Vec  x,
Vec  g,
void *  ctx 
)

Definition at line 92 of file tao_optimization_solver.C.

References libMesh::ParallelObject::comm(), ctx, libMesh::OptimizationSystem::ComputeGradient::gradient(), libMesh::OptimizationSolver< T >::gradient_object, ierr, libmesh_assert(), libmesh_nullptr, solver, libMesh::PetscVector< T >::swap(), sys, libMesh::OptimizationSolver< T >::system(), and libMesh::PetscVector< T >::zero().

93  {
94  LOG_SCOPE("gradient()", "TaoOptimizationSolver");
95 
96  PetscErrorCode ierr = 0;
97 
99  libmesh_assert(g);
101 
102  // ctx should be a pointer to the solver (it was passed in as void *)
103  TaoOptimizationSolver<Number> * solver =
104  static_cast<TaoOptimizationSolver<Number> *> (ctx);
105 
106  OptimizationSystem & sys = solver->system();
107 
108  // We'll use current_local_solution below, so let's ensure that it's consistent
109  // with the vector x that was passed in.
110  PetscVector<Number> & X_sys = *cast_ptr<PetscVector<Number> *>(sys.solution.get());
111  PetscVector<Number> X(x, sys.comm());
112 
113  // Perform a swap so that sys.solution points to X
114  X.swap(X_sys);
115  // Impose constraints on X
117  // Update sys.current_local_solution based on X
118  sys.update();
119  // Swap back
120  X.swap(X_sys);
121 
122  // We'll also pass the gradient in to the assembly routine
123  // so let's make a PETSc vector for that too.
124  PetscVector<Number> gradient(g, sys.comm());
125 
126  // Clear the gradient prior to assembly
127  gradient.zero();
128 
129  if (solver->gradient_object != libmesh_nullptr)
130  solver->gradient_object->gradient(*(sys.current_local_solution), gradient, sys);
131  else
132  libmesh_error_msg("Gradient function not defined in __libmesh_tao_gradient");
133 
134  gradient.close();
135 
136  return ierr;
137  }
ImplicitSystem & sys
const class libmesh_nullptr_t libmesh_nullptr
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
const DofMap & get_dof_map() const
Definition: system.h:2019
PetscErrorCode Vec Mat Mat void * ctx
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_hessian ( Tao  ,
Vec  x,
Mat  h,
Mat  pc,
void *  ctx 
)

Definition at line 142 of file tao_optimization_solver.C.

References libMesh::SparseMatrix< T >::attach_dof_map(), libMesh::ParallelObject::comm(), ctx, libMesh::OptimizationSystem::ComputeHessian::hessian(), libMesh::OptimizationSolver< T >::hessian_object, ierr, libmesh_assert(), libmesh_nullptr, solver, libMesh::PetscVector< T >::swap(), sys, and libMesh::OptimizationSolver< T >::system().

143  {
144  LOG_SCOPE("hessian()", "TaoOptimizationSolver");
145 
146  PetscErrorCode ierr = 0;
147 
148  libmesh_assert(x);
149  libmesh_assert(h);
152 
153  // ctx should be a pointer to the solver (it was passed in as void *)
154  TaoOptimizationSolver<Number> * solver =
155  static_cast<TaoOptimizationSolver<Number> *> (ctx);
156 
157  OptimizationSystem & sys = solver->system();
158 
159  // We'll use current_local_solution below, so let's ensure that it's consistent
160  // with the vector x that was passed in.
161  PetscVector<Number> & X_sys = *cast_ptr<PetscVector<Number> *>(sys.solution.get());
162  PetscVector<Number> X(x, sys.comm());
163 
164  // Perform a swap so that sys.solution points to X
165  X.swap(X_sys);
166  // Impose constraints on X
168  // Update sys.current_local_solution based on X
169  sys.update();
170  // Swap back
171  X.swap(X_sys);
172 
173  // Let's also wrap pc and h in PetscMatrix objects for convenience
174  PetscMatrix<Number> PC(pc, sys.comm());
175  PetscMatrix<Number> hessian(h, sys.comm());
176  PC.attach_dof_map(sys.get_dof_map());
177  hessian.attach_dof_map(sys.get_dof_map());
178 
179  if (solver->hessian_object != libmesh_nullptr)
180  {
181  // Following PetscNonlinearSolver by passing in PC. It's not clear
182  // why we pass in PC and not hessian though?
183  solver->hessian_object->hessian(*(sys.current_local_solution), PC, sys);
184  }
185  else
186  libmesh_error_msg("Hessian function not defined in __libmesh_tao_hessian");
187 
188  PC.close();
189  hessian.close();
190 
191  return ierr;
192  }
ImplicitSystem & sys
const class libmesh_nullptr_t libmesh_nullptr
PetscErrorCode Vec Mat Mat pc
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
const DofMap & get_dof_map() const
Definition: system.h:2019
PetscErrorCode Vec Mat Mat void * ctx
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_inequality_constraints ( Tao  ,
Vec  x,
Vec  cineq,
void *  ctx 
)

Definition at line 297 of file tao_optimization_solver.C.

References libMesh::ParallelObject::comm(), ctx, ierr, libMesh::OptimizationSystem::ComputeInequalityConstraints::inequality_constraints(), libMesh::OptimizationSolver< T >::inequality_constraints_object, libmesh_assert(), libmesh_nullptr, solver, libMesh::PetscVector< T >::swap(), sys, libMesh::OptimizationSolver< T >::system(), and libMesh::PetscVector< T >::zero().

298  {
299  LOG_SCOPE("inequality_constraints()", "TaoOptimizationSolver");
300 
301  PetscErrorCode ierr = 0;
302 
303  libmesh_assert(x);
304  libmesh_assert(cineq);
306 
307  // ctx should be a pointer to the solver (it was passed in as void *)
308  TaoOptimizationSolver<Number> * solver =
309  static_cast<TaoOptimizationSolver<Number> *> (ctx);
310 
311  OptimizationSystem & sys = solver->system();
312 
313  // We'll use current_local_solution below, so let's ensure that it's consistent
314  // with the vector x that was passed in.
315  PetscVector<Number> & X_sys = *cast_ptr<PetscVector<Number> *>(sys.solution.get());
316  PetscVector<Number> X(x, sys.comm());
317 
318  // Perform a swap so that sys.solution points to X
319  X.swap(X_sys);
320  // Impose constraints on X
322  // Update sys.current_local_solution based on X
323  sys.update();
324  // Swap back
325  X.swap(X_sys);
326 
327  // We'll also pass the constraints vector ce into the assembly routine
328  // so let's make a PETSc vector for that too.
329  PetscVector<Number> ineq_constraints(cineq, sys.comm());
330 
331  // Clear the gradient prior to assembly
332  ineq_constraints.zero();
333 
334  if (solver->inequality_constraints_object != libmesh_nullptr)
335  solver->inequality_constraints_object->inequality_constraints(*(sys.current_local_solution), ineq_constraints, sys);
336  else
337  libmesh_error_msg("Constraints function not defined in __libmesh_tao_inequality_constraints");
338 
339  ineq_constraints.close();
340 
341  return ierr;
342  }
ImplicitSystem & sys
const class libmesh_nullptr_t libmesh_nullptr
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
const DofMap & get_dof_map() const
Definition: system.h:2019
PetscErrorCode Vec Mat Mat void * ctx
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_inequality_constraints_jacobian ( Tao  ,
Vec  x,
Mat  J,
Mat  Jpre,
void *  ctx 
)

Definition at line 348 of file tao_optimization_solver.C.

References libMesh::ParallelObject::comm(), ctx, ierr, libMesh::OptimizationSystem::ComputeInequalityConstraintsJacobian::inequality_constraints_jacobian(), libMesh::OptimizationSolver< T >::inequality_constraints_jacobian_object, libmesh_assert(), libmesh_nullptr, solver, libMesh::PetscVector< T >::swap(), sys, and libMesh::OptimizationSolver< T >::system().

349  {
350  LOG_SCOPE("inequality_constraints_jacobian()", "TaoOptimizationSolver");
351 
352  PetscErrorCode ierr = 0;
353 
354  libmesh_assert(x);
355  libmesh_assert(J);
356  libmesh_assert(Jpre);
357 
358  // ctx should be a pointer to the solver (it was passed in as void *)
359  TaoOptimizationSolver<Number> * solver =
360  static_cast<TaoOptimizationSolver<Number> *> (ctx);
361 
362  OptimizationSystem & sys = solver->system();
363 
364  // We'll use current_local_solution below, so let's ensure that it's consistent
365  // with the vector x that was passed in.
366  PetscVector<Number> & X_sys = *cast_ptr<PetscVector<Number> *>(sys.solution.get());
367  PetscVector<Number> X(x, sys.comm());
368 
369  // Perform a swap so that sys.solution points to X
370  X.swap(X_sys);
371  // Impose constraints on X
373  // Update sys.current_local_solution based on X
374  sys.update();
375  // Swap back
376  X.swap(X_sys);
377 
378  // Let's also wrap J and Jpre in PetscMatrix objects for convenience
379  PetscMatrix<Number> J_petsc(J, sys.comm());
380  PetscMatrix<Number> Jpre_petsc(Jpre, sys.comm());
381 
382  if (solver->inequality_constraints_jacobian_object != libmesh_nullptr)
383  solver->inequality_constraints_jacobian_object->inequality_constraints_jacobian(*(sys.current_local_solution), J_petsc, sys);
384  else
385  libmesh_error_msg("Constraints function not defined in __libmesh_tao_inequality_constraints_jacobian");
386 
387  J_petsc.close();
388  Jpre_petsc.close();
389 
390  return ierr;
391  }
ImplicitSystem & sys
const class libmesh_nullptr_t libmesh_nullptr
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
const DofMap & get_dof_map() const
Definition: system.h:2019
PetscErrorCode Vec Mat Mat void * ctx
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_objective ( Tao  ,
Vec  x,
PetscReal *  objective,
void *  ctx 
)

Definition at line 49 of file tao_optimization_solver.C.

References libMesh::ParallelObject::comm(), ctx, ierr, libmesh_assert(), libmesh_nullptr, libMesh::OptimizationSystem::ComputeObjective::objective(), libMesh::OptimizationSolver< T >::objective_object, solver, libMesh::PetscVector< T >::swap(), sys, and libMesh::OptimizationSolver< T >::system().

50  {
51  LOG_SCOPE("objective()", "TaoOptimizationSolver");
52 
53  PetscErrorCode ierr = 0;
54 
56  libmesh_assert(objective);
58 
59  // ctx should be a pointer to the solver (it was passed in as void *)
60  TaoOptimizationSolver<Number> * solver =
61  static_cast<TaoOptimizationSolver<Number> *> (ctx);
62 
63  OptimizationSystem & sys = solver->system();
64 
65  // We'll use current_local_solution below, so let's ensure that it's consistent
66  // with the vector x that was passed in.
67  PetscVector<Number> & X_sys = *cast_ptr<PetscVector<Number> *>(sys.solution.get());
68  PetscVector<Number> X(x, sys.comm());
69 
70  // Perform a swap so that sys.solution points to X
71  X.swap(X_sys);
72  // Impose constraints on X
74  // Update sys.current_local_solution based on X
75  sys.update();
76  // Swap back
77  X.swap(X_sys);
78 
79  if (solver->objective_object != libmesh_nullptr)
80  (*objective) = solver->objective_object->objective(*(sys.current_local_solution), sys);
81  else
82  libmesh_error_msg("Objective function not defined in __libmesh_tao_objective");
83 
84  return ierr;
85  }
ImplicitSystem & sys
const class libmesh_nullptr_t libmesh_nullptr
libmesh_assert(j)
PetscDiffSolver & solver
PetscErrorCode Vec x
const DofMap & get_dof_map() const
Definition: system.h:2019
PetscErrorCode Vec Mat Mat void * ctx
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
PetscErrorCode ierr
template<typename Tnew , typename Told >
Tnew libMesh::cast_int ( Told  oldvar)
inline

Definition at line 548 of file libmesh_common.h.

549 {
550  libmesh_assert_equal_to
551  (oldvar, static_cast<Told>(static_cast<Tnew>(oldvar)));
552 
553  return(static_cast<Tnew>(oldvar));
554 }
template<typename Tnew , typename Told >
Tnew libMesh::cast_ptr ( Told *  oldvar)
inline

Definition at line 511 of file libmesh_common.h.

References err, and libMesh::Quality::name().

Referenced by libMesh::Parameters::have_parameter().

512 {
513 #if !defined(NDEBUG) && defined(LIBMESH_HAVE_RTTI)
514  Tnew newvar = dynamic_cast<Tnew>(oldvar);
515  if (!newvar)
516  {
517  libMesh::err << "Failed to convert " << typeid(Told).name()
518  << " pointer to " << typeid(Tnew).name()
519  << std::endl;
520  libMesh::err << "The " << typeid(Told).name()
521  << " appears to be a "
522  << typeid(*oldvar).name() << std::endl;
523  libmesh_error();
524  }
525  return newvar;
526 #else
527  return(static_cast<Tnew>(oldvar));
528 #endif
529 }
std::string name(const ElemQuality q)
Definition: elem_quality.C:39
OStreamProxy err(std::cerr)
template<typename Tnew , typename Told >
Tnew libMesh::cast_ref ( Told &  oldvar)
inline

Definition at line 477 of file libmesh_common.h.

References err, and libMesh::Quality::name().

478 {
479 #if !defined(NDEBUG) && defined(LIBMESH_HAVE_RTTI) && defined(LIBMESH_ENABLE_EXCEPTIONS)
480  try
481  {
482  Tnew newvar = dynamic_cast<Tnew>(oldvar);
483  return newvar;
484  }
485  catch (std::bad_cast)
486  {
487  libMesh::err << "Failed to convert " << typeid(Told).name()
488  << " reference to " << typeid(Tnew).name()
489  << std::endl;
490  libMesh::err << "The " << typeid(Told).name()
491  << " appears to be a "
492  << typeid(*(&oldvar)).name() << std::endl;
493  libmesh_error();
494  }
495 #else
496  return(static_cast<Tnew>(oldvar));
497 #endif
498 }
std::string name(const ElemQuality q)
Definition: elem_quality.C:39
OStreamProxy err(std::cerr)
bool libMesh::closed ( )

Checks that the library has been closed. This should always return false when called from a library object. It is useful to libmesh_assert(!libMeshclosed()) in library object destructors.

Definition at line 279 of file libmesh.C.

References libMesh::libMeshPrivateData::_is_initialized.

Referenced by libMesh::SparseMatrix< Number >::add_block_matrix(), libMesh::EigenSparseVector< T >::l1_norm(), libMesh::LaspackVector< T >::l1_norm(), libMesh::EpetraVector< T >::l1_norm(), libMesh::PetscVector< T >::l1_norm(), libMesh::PetscMatrix< T >::l1_norm(), libMesh::EigenSparseVector< T >::l2_norm(), libMesh::LaspackVector< T >::l2_norm(), libMesh::EpetraVector< T >::l2_norm(), libMesh::PetscVector< T >::l2_norm(), libMesh::LibMeshInit::LibMeshInit(), libMesh::EigenSparseVector< T >::linfty_norm(), libMesh::LaspackVector< T >::linfty_norm(), libMesh::EpetraVector< T >::linfty_norm(), libMesh::PetscVector< T >::linfty_norm(), libMesh::PetscMatrix< T >::linfty_norm(), libMesh::PetscMatrix< T >::operator()(), libMesh::DistributedVector< T >::operator+=(), libMesh::EigenSparseVector< T >::operator+=(), libMesh::LaspackVector< T >::operator+=(), libMesh::EpetraVector< T >::operator+=(), libMesh::PetscVector< T >::operator+=(), libMesh::DistributedVector< T >::operator-=(), libMesh::LaspackVector< T >::operator-=(), libMesh::EigenSparseVector< T >::operator-=(), libMesh::EpetraVector< T >::operator-=(), libMesh::PetscVector< T >::operator-=(), libMesh::EigenSparseVector< T >::operator/=(), libMesh::EpetraVector< T >::operator/=(), libMesh::EigenSparseVector< T >::operator=(), libMesh::LaspackVector< T >::operator=(), libMesh::PetscVector< T >::operator=(), libMesh::PetscVector< T >::print_matlab(), libMesh::EigenSparseVector< T >::sum(), libMesh::LaspackVector< T >::sum(), libMesh::EpetraVector< T >::sum(), libMesh::PetscVector< T >::sum(), libMesh::MeshBase::~MeshBase(), libMesh::System::~System(), and libMesh::UnstructuredMesh::~UnstructuredMesh().

280 {
282 }
template<typename T >
T libMesh::command_line_next ( const std::string &  ,
 
)

Use GetPot's search()/next() functions to get following arguments from the command line.

Definition at line 957 of file libmesh.C.

References libmesh_assert().

Referenced by libMesh::NloptOptimizationSolver< T >::init(), and libMesh::DofMap::use_coupled_neighbor_dofs().

958 {
959  // Make sure the command line parser is ready for use
960  libmesh_assert(command_line.get());
961 
962  if (command_line->search(1, name.c_str()))
963  value = command_line->next(value);
964 
965  return value;
966 }
std::string name(const ElemQuality q)
Definition: elem_quality.C:39
libmesh_assert(j)
template double libMesh::command_line_next< double > ( const std::string &  ,
double   
)

Referenced by default_solver_package().

template float libMesh::command_line_next< float > ( const std::string &  ,
float   
)

Referenced by default_solver_package().

template int libMesh::command_line_next< int > ( const std::string &  ,
int   
)

Referenced by default_solver_package().

template long double libMesh::command_line_next< long double > ( const std::string &  ,
long  double 
)

Referenced by default_solver_package().

template std::string libMesh::command_line_next< std::string > ( const std::string &  ,
std::string   
)
template<typename T >
T libMesh::command_line_value ( const std::string &  ,
 
)
Returns
the value associated with name on the command line if it is specified, otherwise return the default, provided value. A second template function is provided to support recognizing multiple variations of a given option

Definition at line 925 of file libmesh.C.

References libmesh_assert().

Referenced by libMesh::LibMeshInit::LibMeshInit(), and petsc_auto_fieldsplit().

926 {
927  // Make sure the command line parser is ready for use
928  libmesh_assert(command_line.get());
929 
930  // only if the variable exists in the file
931  if (command_line->have_variable(name.c_str()))
932  value = (*command_line)(name.c_str(), value);
933 
934  return value;
935 }
std::string name(const ElemQuality q)
Definition: elem_quality.C:39
libmesh_assert(j)
template<typename T >
T libMesh::command_line_value ( const std::vector< std::string > &  name,
value 
)

Definition at line 938 of file libmesh.C.

References libmesh_assert().

939 {
940  // Make sure the command line parser is ready for use
941  libmesh_assert(command_line.get());
942 
943  // Check for multiple options (return the first that matches)
944  for (std::vector<std::string>::const_iterator i=name.begin(); i != name.end(); ++i)
945  if (command_line->have_variable(i->c_str()))
946  {
947  value = (*command_line)(i->c_str(), value);
948  break;
949  }
950 
951  return value;
952 }
std::string name(const ElemQuality q)
Definition: elem_quality.C:39
libmesh_assert(j)
template double libMesh::command_line_value< double > ( const std::string &  ,
double   
)

Referenced by default_solver_package().

template double libMesh::command_line_value< double > ( const std::vector< std::string > &  ,
double   
)
template float libMesh::command_line_value< float > ( const std::string &  ,
float   
)

Referenced by default_solver_package().

template float libMesh::command_line_value< float > ( const std::vector< std::string > &  ,
float   
)
template int libMesh::command_line_value< int > ( const std::string &  ,
int   
)

Referenced by default_solver_package().

template int libMesh::command_line_value< int > ( const std::vector< std::string > &  ,
int   
)
template long double libMesh::command_line_value< long double > ( const std::string &  ,
long  double 
)

Referenced by default_solver_package().

template long double libMesh::command_line_value< long double > ( const std::vector< std::string > &  ,
long  double 
)
template std::string libMesh::command_line_value< std::string > ( const std::string &  ,
std::string   
)
template std::string libMesh::command_line_value< std::string > ( const std::vector< std::string > &  ,
std::string   
)
template<typename T >
void libMesh::command_line_vector ( const std::string &  ,
std::vector< T > &   
)
Returns
the array of values associated with name on the command line if it is specified, otherwise return the default, provided array.

Definition at line 971 of file libmesh.C.

References libmesh_assert().

972 {
973  // Make sure the command line parser is ready for use
974  libmesh_assert(command_line.get());
975 
976  // only if the variable exists on the command line
977  if (command_line->have_variable(name.c_str()))
978  {
979  unsigned size = command_line->vector_variable_size(name.c_str());
980  vec.resize(size);
981 
982  for (unsigned i=0; i<size; ++i)
983  vec[i] = (*command_line)(name.c_str(), vec[i], i);
984  }
985 }
std::string name(const ElemQuality q)
Definition: elem_quality.C:39
libmesh_assert(j)
template void libMesh::command_line_vector< double > ( const std::string &  ,
std::vector< double > &   
)

Referenced by default_solver_package().

template void libMesh::command_line_vector< float > ( const std::string &  ,
std::vector< float > &   
)

Referenced by default_solver_package().

template void libMesh::command_line_vector< int > ( const std::string &  ,
std::vector< int > &   
)

Referenced by default_solver_package().

template void libMesh::command_line_vector< long double > ( const std::string &  ,
std::vector< long double > &   
)

Referenced by default_solver_package().

DiffSolver::SolveResult libMesh::convert_solve_result ( SNESConvergedReason  r)

Definition at line 279 of file petsc_diff_solver.C.

References libMesh::DiffSolver::CONVERGED_ABSOLUTE_RESIDUAL, libMesh::DiffSolver::CONVERGED_NO_REASON, libMesh::DiffSolver::CONVERGED_RELATIVE_RESIDUAL, libMesh::DiffSolver::CONVERGED_RELATIVE_STEP, libMesh::DiffSolver::DIVERGED_BACKTRACKING_FAILURE, libMesh::DiffSolver::DIVERGED_MAX_NONLINEAR_ITERATIONS, libMesh::DiffSolver::DIVERGED_NO_REASON, and libMesh::DiffSolver::INVALID_SOLVE_RESULT.

Referenced by libMesh::PetscDiffSolver::solve().

280 {
281  switch (r)
282  {
283  case SNES_CONVERGED_FNORM_ABS:
284  return DiffSolver::CONVERGED_ABSOLUTE_RESIDUAL;
285  case SNES_CONVERGED_FNORM_RELATIVE:
286  return DiffSolver::CONVERGED_RELATIVE_RESIDUAL;
287 #if PETSC_VERSION_LESS_THAN(3,2,1)
288  case SNES_CONVERGED_PNORM_RELATIVE:
289 #else
290  case SNES_CONVERGED_SNORM_RELATIVE:
291 #endif
292  return DiffSolver::CONVERGED_RELATIVE_STEP;
293  case SNES_CONVERGED_ITS:
294  case SNES_CONVERGED_TR_DELTA:
295  return DiffSolver::CONVERGED_NO_REASON;
296  case SNES_DIVERGED_FUNCTION_DOMAIN:
297  case SNES_DIVERGED_FUNCTION_COUNT:
298  case SNES_DIVERGED_FNORM_NAN:
299 #if !PETSC_VERSION_LESS_THAN(3,3,0)
300  case SNES_DIVERGED_INNER:
301 #endif
302  case SNES_DIVERGED_LINEAR_SOLVE:
303  case SNES_DIVERGED_LOCAL_MIN:
304  return DiffSolver::DIVERGED_NO_REASON;
305  case SNES_DIVERGED_MAX_IT:
306  return DiffSolver::DIVERGED_MAX_NONLINEAR_ITERATIONS;
307 #if PETSC_VERSION_LESS_THAN(3,2,0)
308  case SNES_DIVERGED_LS_FAILURE:
309 #else
310  case SNES_DIVERGED_LINE_SEARCH:
311 #endif
312  return DiffSolver::DIVERGED_BACKTRACKING_FAILURE;
313  // In PETSc, SNES_CONVERGED_ITERATING means
314  // the solve is still iterating, but by the
315  // time we get here, we must have either
316  // converged or diverged, so
317  // SNES_CONVERGED_ITERATING is invalid.
318  case SNES_CONVERGED_ITERATING:
319  return DiffSolver::INVALID_SOLVE_RESULT;
320  default:
321  break;
322  }
323  return DiffSolver::INVALID_SOLVE_RESULT;
324 }
template<typename T >
T libMesh::cross_norm ( const TypeVector< T > &  b,
const TypeVector< T > &  c 
)
inline

Calls cross_norm_sq() and takes the square root of the result.

Definition at line 1068 of file type_vector.h.

References cross_norm_sq().

Referenced by libMesh::Quad4::volume(), libMesh::Tri3::volume(), libMesh::Quad8::volume(), libMesh::Tri6::volume(), and libMesh::Quad9::volume().

1070 {
1071  // We only support cross products when LIBMESH_DIM==3, same goes for this.
1072  libmesh_assert_equal_to (LIBMESH_DIM, 3);
1073 
1074  return std::sqrt(cross_norm_sq(b,c));
1075 }
T cross_norm_sq(const TypeVector< T > &b, const TypeVector< T > &c)
Definition: type_vector.h:1048
template<typename T >
T libMesh::cross_norm_sq ( const TypeVector< T > &  b,
const TypeVector< T > &  c 
)
inline

Compute |b x c|^2 without creating the extra temporary produced by calling b.cross(c).norm_sq().

Definition at line 1048 of file type_vector.h.

References x.

Referenced by cross_norm().

1050 {
1051  // We only support cross products when LIBMESH_DIM==3, same goes for this.
1052  libmesh_assert_equal_to (LIBMESH_DIM, 3);
1053 
1054  T x = b(1)*c(2) - b(2)*c(1),
1055  y = b(0)*c(2) - b(2)*c(0),
1056  z = b(0)*c(1) - b(1)*c(0);
1057 
1058  return x*x + y*y + z*z;
1059 }
PetscErrorCode Vec x
SolverPackage libMesh::default_solver_package ( )
Returns
the default solver interface to use. The value depends on which solver packages were available when the library was configured. The command-line is also checked, allowing the user to override the compiled default. For example, –use-petsc will force the use of PETSc solvers, and –use-laspack will force the use of LASPACK solvers.

Definition at line 988 of file libmesh.C.

References libMes