libMesh
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
libMesh Namespace Reference

The libMesh namespace provides an interface to certain functionality in the library. More...

Namespaces

 boostcopy
 
 DenseMatrices
 Provide Typedefs for dense matrices.
 
 FiniteElements
 Provide Typedefs for various element types.
 
 libMeshPrivateData
 Namespaces don't provide private data, so let's take the data we would like private and put it in an obnoxious namespace.
 
 MacroFunctions
 
 MeshTools
 Utility functions for operations on a Mesh object.
 
 Nemesis
 
 Parallel
 The Parallel namespace is for wrapper functions for common general parallel synchronization tasks.
 
 Predicates
 This namespace defines several multi_predicates which are used by the element and node iterators.
 
 Quality
 A namespace for quality utility functions.
 
 RBDataDeserialization
 
 RBDataSerialization
 
 ReferenceElem
 This namespace implements singleton reference elements for each fundamental element type supported by libMesh.
 
 SparsityPattern
 This defines the sparsity pattern, or graph, of a sparse matrix.
 
 TensorTools
 
 Threads
 The Threads namespace is for wrapper functions for common general multithreading algorithms and tasks.
 
 Trees
 For convenience we define QuadTrees and OctTrees explicitly.
 
 TriangleWrapper
 A special namespace for wrapping the standard Triangle API, as well as some helper functions for initializing/destroying the structs triangle uses to communicate.
 
 Utility
 

Classes

class  AbaqusIO
 The AbaqusIO class is a preliminary implementation for reading Abaqus mesh files in ASCII format. More...
 
class  AdaptiveTimeSolver
 This class wraps another UnsteadySolver derived class, and compares the results of timestepping with deltat and timestepping with 2*deltat to adjust future timestep lengths. More...
 
class  AdjointDofConstraintValues
 Storage for DofConstraint right hand sides for all adjoint problems. More...
 
class  AdjointRefinementEstimator
 This class implements a ``brute force'' goal-oriented error estimator which computes an estimate of error in a quantity of interest based on the residual of the current coarse grid primal solution as weighted against an adjoint solution on a uniformly refined (in h and/or p, for an arbitrary number of levels) grid. More...
 
class  AdjointResidualErrorEstimator
 This class implements a goal oriented error indicator, by weighting residual-based estimates from the primal problem against estimates from the adjoint problem. More...
 
class  AnalyticFunction
 This class provides function-like objects for which an analytical expression can be provided. More...
 
class  AutoPtr
 A simple smart pointer providing strict ownership semantics. More...
 
struct  AutoPtrRef
 A wrapper class to provide AutoPtr with reference semantics. More...
 
class  AztecLinearSolver
 This class provides an interface to AztecOO iterative solvers that is compatible with the libMesh LinearSolver<> More...
 
class  BasicOStreamProxy
 This class is intended to be reseatable like a pointer-to-ostream for flexibility, but to look like a reference when used to produce less awkward user code. More...
 
class  BoundaryInfo
 The BoundaryInfo class contains information relevant to boundary conditions including storing faces, edges, and nodes on the boundary, along with ids that can be used to identify the type of boundary each entity is part of. More...
 
class  BoundaryMesh
 The BoundaryMesh is a Mesh in its own right, but it contains a description of the boundary of some other mesh. More...
 
class  BoundaryProjectSolution
 This class implements projecting an arbitrary boundary function to the current mesh. More...
 
class  BoundaryVolumeSolutionTransfer
 SolutionTransfer derived class which is specifically for transferring solutions back and forth between a VolumeMesh and its associated BoundaryMesh. More...
 
class  BoundingBox
 Defines a Cartesian bounding box by the two corner extremum. More...
 
class  BuildProjectionList
 This class builds the send_list of old dof indices whose coefficients are needed to perform a projection. More...
 
class  Cell
 The Cell is an abstract element type that lives in three dimensions. More...
 
class  CentroidPartitioner
 Partitions the Mesh based on the locations of element centroids. More...
 
class  CheckpointIO
 The CheckpointIO class can be used to write simplified restart files that can be used to restart simulations that have crashed. More...
 
struct  CompareElemIdsByLevel
 Specific weak ordering for Elem *'s to be used in a set. More...
 
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
 This class extends EigenSystem to allow a simple way of solving (standard or generalized) eigenvalue problems in the case where we want to remove certain degrees of freedom from the system. More...
 
class  ConstCouplingAccessor
 This accessor class allows simple access to CouplingMatrix values. More...
 
class  ConstCouplingRow
 This proxy class acts like a container of indices from a single coupling row. More...
 
class  ConstCouplingRowConstIterator
 
class  ConstFEMFunction
 FEMFunction that returns a single value, regardless of the time and location inputs. More...
 
class  ConstFunction
 Function that returns a single value that never changes. More...
 
class  ConstParameterProxy
 
class  ConstTypeTensorColumn
 
class  ContinuationSystem
 This class inherits from the FEMSystem. More...
 
class  ConvergenceFailure
 A class representing a solver's failure to converge, to be thrown by "libmesh_convergence_failure();" This should be a last resort; more often, a solve which has failed should be reattempted after switching to a smaller timestep, adding underrelaxation, taking a smaller continuation step, etc. More...
 
class  CouplingAccessor
 This accessor class allows simple setting of CouplingMatrix values. More...
 
class  CouplingMatrix
 This class defines a coupling matrix. More...
 
class  DefaultCoupling
 This class implements the default algebraic coupling in libMesh: elements couple to themselves, but may also couple to neighbors both locally and across periodic boundary conditions. More...
 
class  DenseMatrix
 Defines a dense matrix for use in Finite Element-type computations. More...
 
class  DenseMatrixBase
 Defines an abstract dense matrix base class for use in Finite Element-type computations. More...
 
class  DenseSubMatrix
 Defines a dense submatrix for use in Finite Element-type computations. More...
 
class  DenseSubVector
 Defines a dense subvector for use in finite element computations. More...
 
class  DenseVector
 Defines a dense vector for use in Finite Element-type computations. More...
 
class  DenseVectorBase
 Defines an abstract dense vector base class for use in Finite Element-type computations. More...
 
class  DGFEMContext
 This class extends FEMContext in order to provide extra data required to perform local element residual and Jacobian assembly in the case of a discontinuous Galerkin (DG) discretization. More...
 
class  DiffContext
 This class provides all data required for a physics package (e.g. More...
 
class  DifferentiablePhysics
 This class provides a specific system class. More...
 
class  DifferentiableQoI
 This class provides a specific system class. More...
 
class  DifferentiableSystem
 This class provides a specific system class. More...
 
class  DiffSolver
 This is a generic class that defines a solver to handle ImplicitSystem classes, including NonlinearImplicitSystem and DifferentiableSystem A user can define a solver by deriving from this class and implementing certain functions. More...
 
class  DirectSolutionTransfer
 Implementation of a SolutionTransfer object that only works for transferring the solution but only in the case of: More...
 
class  DirichletBoundaries
 We're using a class instead of a typedef to allow forward declarations and future flexibility. More...
 
class  DirichletBoundary
 This class allows one to associate Dirichlet boundary values with a given set of mesh boundary ids and system variable ids. More...
 
class  DiscontinuityMeasure
 This class measures discontinuities between elements for debugging purposes. More...
 
class  DistributedMesh
 The DistributedMesh class is derived from the MeshBase class, and is intended to provide identical functionality to the user but be distributed rather than replicated across distributed-memory systems. More...
 
class  DofConstraints
 The constraint matrix storage format. More...
 
class  DofConstraintValueMap
 Storage for DofConstraint right hand sides for a particular problem. More...
 
class  DofMap
 This class handles the numbering of degrees of freedom on a mesh. More...
 
class  DofObject
 The DofObject defines an abstract base class for objects that have degrees of freedom associated with them. More...
 
class  DTKAdapter
 The DTKAdapter is used with the DTKSolutionTransfer object to adapt libmesh data to the DTK interface. More...
 
class  DTKEvaluator
 Implements the evaluate() function to compute FE solution values at points requested by DTK. More...
 
class  DTKSolutionTransfer
 Implementation of a SolutionTransfer object that uses the DataTransferKit (https://github.com/CNERG/DataTransferKit) to transfer variables back and forth between systems. More...
 
class  DynamicCastFailure
 A class representing that a dynamic cast failed to produce expected output. More...
 
class  Edge
 The Edge is an element in 1D. More...
 
class  Edge2
 The Edge2 is an element in 1D composed of 2 nodes. More...
 
class  Edge3
 The Edge3 is an element in 1D composed of 3 nodes. More...
 
class  EigenPreconditioner
 This class provides an interface to the suite of preconditioners available from Eigen. More...
 
class  EigenSolver
 This class provides an interface to solvers for eigenvalue problems. More...
 
class  EigenSparseLinearSolver
 This class provides an interface to Eigen iterative solvers that is compatible with the libMesh LinearSolver<> More...
 
class  EigenSparseMatrix
 
class  EigenSparseVector
 
class  EigenSystem
 This class provides a specific system class. More...
 
class  EigenTimeSolver
 The name of this class is confusing...it's meant to refer to the base class (TimeSolver) while still telling one that it's for solving (generalized) EigenValue problems that arise from finite element discretizations. More...
 
class  Elem
 This is the base class from which all geometric element types are derived. More...
 
class  ElemAssembly
 ElemAssembly provides a per-element (interior and boundary) assembly functionality. More...
 
class  ElemCutter
 This class implements cutting a single element into a collection of subelements. More...
 
struct  ElemHashUtils
 The ElemHashUtils struct defines functions used for the "Hash" and "Pred" template arguments of the various "unordered" containers, e.g. More...
 
class  EnsightIO
 This class implements writing meshes and solutions in Ensight's Gold format. More...
 
class  EquationSystems
 This is the EquationSystems class. More...
 
class  ErrorEstimator
 This class holds functions that will estimate the error in a finite element solution on a given mesh. More...
 
class  ErrorVector
 The ErrorVector is a specialization of the StatisticsVector for error data computed on a finite element mesh. More...
 
class  Euler2Solver
 This class defines a theta-method (defaulting to Backward Euler with theta = 1.0) solver to handle time integration of DifferentiableSystems. More...
 
class  EulerSolver
 This class defines a theta-method Euler (defaulting to Backward Euler with theta = 1.0) solver to handle time integration of DifferentiableSystems. More...
 
class  ExactErrorEstimator
 This class implements an "error estimator" based on the difference between the approximate and exact solution. More...
 
class  ExactSolution
 This class handles the computation of the L2 and/or H1 error for the Systems in the EquationSystems object which is passed to it. More...
 
class  ExodusII_IO
 The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs. More...
 
class  ExodusII_IO_Helper
 This is the ExodusII_IO_Helper class. More...
 
class  ExplicitSystem
 The ExplicitSystem provides only "right hand side" storage, which should be sufficient for solving most types of explicit problems. More...
 
class  Face
 The Face is an abstract element type that lives in two dimensions. More...
 
class  Factory
 Factory class definition. More...
 
class  FactoryImp
 Factory implementation class. More...
 
class  FastPoolAllocator
 An allocator which can be used in standard containers. More...
 
class  FE
 A specific instantiation of the FEBase class. More...
 
class  FEAbstract
 This class forms the foundation from which generic finite elements may be derived. More...
 
class  FEClough
 Clough-Tocher finite elements. More...
 
class  FEComputeData
 class FEComputeData hides arbitrary data to be passed to and from children of FEBase through the FEInterface::compute_data() method. More...
 
class  FEGenericBase
 This class forms the foundation from which generic finite elements may be derived. More...
 
class  FEHermite
 Hermite finite elements. More...
 
class  FEHierarchic
 Hierarchic finite elements. More...
 
class  FEInterface
 This class provides an encapsulated access to all static public member functions of finite element classes. More...
 
class  FEL2Hierarchic
 Discontinuous Hierarchic finite elements. More...
 
class  FEL2Lagrange
 Discontinuous Lagrange finite elements. More...
 
class  FELagrange
 Lagrange finite elements. More...
 
class  FELagrangeVec
 FELagrangeVec objects are used for working with vector-valued finite elements. More...
 
class  FEMap
 Class contained in FE that encapsulates mapping (i.e. More...
 
class  FEMContext
 This class provides all data required for a physics package (e.g. More...
 
class  FEMFunctionBase
 FEMFunctionBase is a base class from which users can derive in order to define "function-like" objects that can be used within FEMSystem. More...
 
class  FEMFunctionWrapper
 
class  FEMonomial
 Monomial finite elements. More...
 
class  FEMPhysics
 This class provides a specific system class. More...
 
class  FEMSystem
 This class provides a specific system class. More...
 
class  FENedelecOne
 FENedelecOne objects are used for working with vector-valued Nedelec finite elements of the first kind. More...
 
struct  FEOutputType
 Most finite element types in libMesh are scalar-valued. More...
 
struct  FEOutputType< LAGRANGE_VEC >
 Specialize for non-scalar-valued elements. More...
 
struct  FEOutputType< NEDELEC_ONE >
 
class  FEScalar
 The FEScalar class is used for working with SCALAR variables. More...
 
class  FESubdivision
 
class  FETransformationBase
 This class handles the computation of the shape functions in the physical domain. More...
 
class  FEType
 class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialized finite element families. More...
 
class  FEXYZ
 XYZ finite elements. More...
 
class  FEXYZMap
 An implementation of FEMap for "XYZ" elements. More...
 
class  FileError
 A class representing a failed attempt by the library to open a file (or construct an fstream, etc), to be thrown by "libmesh_file_error(filename);" For ease of debugging, "filename" should include any (absolute or relative or implicit) pathname that was part of the failed open. More...
 
class  FirstOrderUnsteadySolver
 Generic class from which first order UnsteadySolvers should subclass. More...
 
class  FloatingPointException
 A class representing a floating point exception. More...
 
class  FrequencySystem
 FrequencySystem provides a specific system class for frequency-dependent (linear) systems. More...
 
class  FroIO
 This class implements writing meshes in the .fro format used by the MIT ACDL. More...
 
class  FunctionBase
 This is the base class for functor-like classes. More...
 
class  GenericProjector
 This class implements the loops to other projection operations. More...
 
class  GhostingFunctor
 This abstract base class defines the interface by which library code and user code can report associations between elements. More...
 
class  GhostPointNeighbors
 This class implements the default geometry ghosting in libMesh: point neighbors and interior_parent elements are ghosted. More...
 
class  GmshIO
 This class implements writing meshes in the Gmsh format. More...
 
class  GMVIO
 This class implements writing meshes in the GMV format. More...
 
class  GnuPlotIO
 This class implements writing meshes using GNUplot, designed for use only with 1D meshes. More...
 
class  H1FETransformation
 This class handles the computation of the shape functions in the physical domain for H1 conforming elements. More...
 
class  HCurlFETransformation
 This class handles the computation of the shape functions in the physical domain for HCurl conforming elements. More...
 
class  Hex
 The Hex is an element in 3D with 6 sides. More...
 
class  HilbertSFCPartitioner
 The HilbertSFCPartitioner uses a Hilbert space filling curve to partition the elements. More...
 
class  HPCoarsenTest
 This class uses the error estimate given by different types of derefinement (h coarsening or p reduction) to choose between h refining and p elevation. More...
 
class  HPSelector
 Subclasses of this abstract base class choose between h refining and p elevation. More...
 
class  HPSingularity
 This class uses a user-provided list of singularity locations to choose between h refining and p elevation. More...
 
class  ImplicitSystem
 This class provides a specific system class. More...
 
class  InfCell
 The InfCell is an abstract element type that lives in three dimensions. More...
 
class  InfEdge2
 The InfEdge2 is an infinite element in 1D composed of 2 nodes. More...
 
class  InfElemBuilder
 This class is used to build infinite elements on top of an existing mesh. More...
 
class  InfFE
 A specific instantiation of the FEBase class. More...
 
class  InfHex
 The InfHex is an element in 3D with 5 sides. More...
 
class  InfPrism
 The InfPrism is an element in 3D with 4 sides. More...
 
class  InfQuad
 The InfQuad is an abstract element type that lives in two dimensions. More...
 
class  InfQuad4
 The INFQUAD4 is an infinite element in 2D composed of 4 nodes. More...
 
class  InfQuad6
 The INFQUAD6 is an infinite element in 2D composed of 6 nodes. More...
 
class  IntRange
 The IntRange templated class is intended to make it easy to loop over integers which are indices of a container. More...
 
class  InverseDistanceInterpolation
 Inverse distance interpolation. More...
 
class  JumpErrorEstimator
 This abstract base class implements utility functions for error estimators which are based on integrated jumps between elements. More...
 
class  KellyErrorEstimator
 This class implements the Kelly error indicator which is based on the flux jumps between elements. More...
 
class  LaplaceMeshSmoother
 This class defines the data structures necessary for Laplace smoothing. More...
 
class  LaplacianErrorEstimator
 This class is an error indicator based on laplacian jumps between elements. More...
 
class  LaspackLinearSolver
 This class provides an interface to Laspack iterative solvers that is compatible with the libMesh LinearSolver<> More...
 
class  LaspackVector
 
class  libmesh_final
 The Hex20 is an element in 3D composed of 20 nodes. More...
 
class  LibMeshInit
 The LibMeshInit class, when constructed, initializes the dependent libraries (e.g. More...
 
class  LinearImplicitSystem
 This class provides a specific system class. More...
 
class  LinearPartitioner
 The LinearPartitioner simply takes the element list and splits it into equal-sized chunks assigned to each processor. More...
 
class  LinearSolutionMonitor
 Functor for use as callback in solve of nonlinear solver. More...
 
class  LinearSolver
 This base class can be inherited from to provide interfaces to linear solvers from different packages like PETSc and LASPACK. More...
 
class  LocationMap
 Data structures that enable location-based lookups The key is a hash of the Point location. More...
 
class  LogicError
 A class to represent the internal "this should never happen" errors, to be thrown by "libmesh_error();". More...
 
class  MappedSubdomainPartitioner
 The MappedSubdomainPartitioner partitions the elements based on their subdomain ids. More...
 
class  mapvector
 This mapvector templated class is intended to provide the performance characteristics of a std::map with an interface more closely resembling that of a std::vector, for use with DistributedMesh. More...
 
class  MatlabIO
 This class implements reading meshes in the Matlab PDE toolkit in a proprietary format. More...
 
class  MEDITIO
 This class implements writing meshes in the mesh format used by the MEdit visualization tool developed in the Gamma Project at INRIA Roquencourt. More...
 
class  MemorySolutionHistory
 Subclass of Solution History that stores the solutions and other important vectors in memory. More...
 
class  Mesh
 The Mesh class is a thin wrapper, around the ReplicatedMesh class by default. More...
 
struct  mesh_inserter_iterator
 A class for templated methods that expect output iterator arguments, which adds objects to the Mesh. More...
 
class  MeshBase
 This is the MeshBase class. More...
 
class  MeshCommunication
 This is the MeshCommunication class. More...
 
class  MeshfreeInterpolation
 Base class to support various mesh-free interpolation methods. More...
 
class  MeshfreeSolutionTransfer
 Implementation of a SolutionTransfer object that utilizes the MeshfreeInterpolation system to interpolate one solution to another. More...
 
class  MeshFunction
 This class provides function-like objects for data distributed over a mesh. More...
 
class  MeshFunctionSolutionTransfer
 Implementation of a SolutionTransfer object that only works for transferring the solution using a MeshFunction. More...
 
class  MeshInput
 This class defines an abstract interface for Mesh input. More...
 
class  MeshlessInterpolationFunction
 
class  MeshOutput
 This class defines an abstract interface for Mesh output. More...
 
class  MeshRefinement
 This is the MeshRefinement class. More...
 
class  MeshSerializer
 Temporarily serialize a DistributedMesh for output; a distributed mesh is allgathered by the MeshSerializer constructor if need_serial is true, then remote elements are deleted again by the destructor. More...
 
class  MeshSmoother
 This class provides the necessary interface for mesh smoothing. More...
 
class  METIS_CSR_Graph
 This utility class provides a convenient implementation for building the compressed-row-storage graph required for the METIS/ParMETIS graph partitioning schemes. More...
 
class  MetisPartitioner
 The MetisPartitioner uses the Metis graph partitioner to partition the elements. More...
 
class  MortonSFCPartitioner
 The MortonSFCPartitioner uses a Morton space filling curve to partition the elements. More...
 
struct  myhash
 
class  NameBasedIO
 This class supports simple reads and writes in any libMesh-supported format, by dispatching to one of the other I/O classes based on filename. More...
 
class  Nemesis_IO
 The Nemesis_IO class implements reading parallel meshes in the Nemesis file format from Sandia National Labs. More...
 
class  Nemesis_IO_Helper
 This is the Nemesis_IO_Helper class. More...
 
class  NewmarkSolver
 This class defines a Newmark time integrator for second order (in time) DifferentiableSystems. More...
 
class  NewmarkSystem
 This class contains a specific system class. More...
 
class  NewtonSolver
 This class defines a solver which uses the default libMesh linear solver in a quasiNewton method to handle a DifferentiableSystem. More...
 
class  NloptOptimizationSolver
 This class provides an interface to the NLopt optimization solvers. More...
 
class  Node
 A Node is like a Point, but with more information. More...
 
class  NodeConstraints
 The Node constraint storage format. More...
 
class  NodeElem
 The NodeElem is a point element, generally used as a side of a 1D element. More...
 
class  NonlinearImplicitSystem
 This class provides a specific system class. More...
 
class  NonlinearSolver
 This base class can be inherited from to provide interfaces to nonlinear solvers from different packages like PETSc and Trilinos. More...
 
class  NoSolutionHistory
 'Save nothing' subclass of Solution History, this is the default. More...
 
class  NotImplemented
 A class to stub for features that should be in libMesh, but haven't been written yet, to be thrown by "libmesh_not_implemented();". More...
 
class  NoxNonlinearSolver
 This class provides an interface to nox iterative solvers that is compatible with the libMesh NonlinearSolver<> More...
 
struct  null_output_iterator
 A do-nothing class for templated methods that expect output iterator arguments. More...
 
class  NumericVector
 Numeric vector. More...
 
class  OFFIO
 This class is responsible for reading an unstructured, triangulated surface in the standard OFF OOGL format. More...
 
class  OldSolutionValue
 
class  OptimizationSolver
 This base class can be inherited from to provide interfaces to optimization solvers from different packages like PETSc/TAO and nlopt. More...
 
class  OptimizationSystem
 This System subclass enables us to assemble an objective function, gradient, Hessian and bounds for optimization problems. More...
 
class  OrderWrapper
 This provides a shim class that wraps the Order enum. More...
 
class  ParallelMesh
 
class  ParallelObject
 This class forms the base class for all other classes that are expected to be implemented in parallel. More...
 
class  ParameterAccessor
 Accessor object allowing reading and modification of the independent variables in a parameter sensitivity calculation. More...
 
class  ParameterMultiAccessor
 Accessor object allowing reading and modification of the independent variables in a parameter sensitivity calculation. More...
 
class  ParameterMultiPointer
 Accessor object allowing reading and modification of the independent variables in a parameter sensitivity calculation. More...
 
class  ParameterPointer
 Accessor object allowing reading and modification of the independent variables in a parameter sensitivity calculation. More...
 
class  ParameterProxy
 
class  Parameters
 This class provides the ability to map between arbitrary, user-defined strings and several data types. More...
 
class  ParameterVector
 Data structure for specifying which Parameters should be independent variables in a parameter sensitivity calculation. More...
 
class  ParmetisHelper
 The ParmetisHelper class allows us to use a 'pimpl' strategy in the ParmetisPartitioner class. More...
 
class  ParmetisPartitioner
 The ParmetisPartitioner uses the Parmetis graph partitioner to partition the elements. More...
 
class  ParsedFEMFunction
 ParsedFEMFunction provides support for FParser-based parsed functions in FEMSystem. More...
 
class  ParsedFEMFunctionParameter
 Accessor object allowing reading and modification of the independent variables in a parameter sensitivity calculation. More...
 
class  ParsedFunction
 A Function generated (via FParser) by parsing a mathematical expression. More...
 
class  ParsedFunctionParameter
 Accessor object allowing reading and modification of the independent variables in a parameter sensitivity calculation. More...
 
class  Partitioner
 The Partitioner class provides a uniform interface for partitioning algorithms. More...
 
class  Patch
 This class implements useful utility functions for a patch of elements. More...
 
class  PatchRecoveryErrorEstimator
 This class implements the Patch Recovery error indicator. More...
 
class  PerfData
 The PerfData class simply contains the performance data that is recorded for individual events. More...
 
struct  PerfItem
 Used for logging something that naturally lasts as long as some enclosing scope, such as the current function. More...
 
class  PerfLog
 The PerfLog class allows monitoring of specific events. More...
 
class  PerfMon
 PAPI stands for Performance Application Programming Interface. More...
 
class  PeriodicBoundaries
 We're using a class instead of a typedef to allow forward declarations and future flexibility. More...
 
class  PeriodicBoundary
 The definition of a periodic boundary. More...
 
class  PeriodicBoundaryBase
 The base class for defining periodic boundaries. More...
 
class  PetscDiffSolver
 This class defines a solver which uses a PETSc SNES context to handle a DifferentiableSystem. More...
 
class  PetscLinearSolver
 This class provides an interface to PETSc iterative solvers that is compatible with the libMesh LinearSolver<> More...
 
class  PetscMatrix
 
class  PetscNonlinearSolver
 This class provides an interface to PETSc iterative solvers that is compatible with the libMesh NonlinearSolver<> More...
 
class  PetscPreconditioner
 This class provides an interface to the suite of preconditioners available from PETSc. More...
 
class  PetscSolverException
 A specialization of the SolverException class for PETSc. More...
 
class  Plane
 This class defines a plane. More...
 
class  PltLoader
 This class will read a binary .plt file. More...
 
class  Point
 A Point defines a location in LIBMESH_DIM dimensional Real space. More...
 
class  PointerToPointerIter
 The PointerToPointerIter templated class is intended to wrap pointer-to-pointer iterators in an interface which works more like a standard iterator, by returning a value rather than a pointer. More...
 
class  PointLocatorBase
 This is the base class for point locators. More...
 
class  PointLocatorTree
 This is a point locator. More...
 
class  PointNeighborCoupling
 This class implements the default algebraic coupling in libMesh: elements couple to themselves, but may also couple to neighbors both locally and across periodic boundary conditions. More...
 
class  PoolAllocator
 An allocator which can be used in standard containers. More...
 
class  PostscriptIO
 This class implements writing 2D meshes in Postscript. More...
 
class  Preconditioner
 This class provides a uniform interface for preconditioners. More...
 
class  Prism
 The Prism is an element in 3D with 5 sides. More...
 
class  Problem_Interface
 
class  Pyramid
 The Pyramid is an element in 3D with 5 sides. More...
 
class  QBase
 The QBase class provides the basic functionality from which various quadrature rules can be derived. More...
 
class  QGauss
 This class implements specific orders of Gauss quadrature. More...
 
class  QoISet
 Data structure for specifying which Quantities of Interest should be calculated in an adjoint or a parameter sensitivity calculation. More...
 
class  QSimpson
 This class implements Simpson quadrature. More...
 
class  QTrap
 This class implements trapezoidal quadrature. More...
 
class  Quad
 The QUAD is an element in 2D composed of 4 sides. More...
 
class  Quad4
 The QUAD4 is an element in 2D composed of 4 nodes. More...
 
class  Quad8
 The QUAD8 is an element in 2D composed of 8 nodes. More...
 
class  Quad9
 The QUAD9 is an element in 2D composed of 9 nodes. More...
 
class  QuadShell4
 QuadShell4 is almost identical to Quad4. More...
 
class  QuadShell8
 QuadShell8 is almost identical to Quad8. More...
 
class  RadialBasisInterpolation
 Radial Basis Function interpolation. More...
 
class  RawAccessor
 This class provides single index access to FieldType (i.e. More...
 
class  RawAccessor< TypeNTensor< N, ScalarType > >
 Stub implementations for stub TypeNTensor object. More...
 
struct  RawFieldType
 What underlying data type would we need to access in each field? More...
 
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
 This class stores the set of ElemAssembly functor objects that define the "parameter-independent expansion" of a PDE. More...
 
class  RBConstruction
 This class is part of the rbOOmit framework. More...
 
class  RBConstructionBase
 This class is part of the rbOOmit framework. More...
 
class  RBEIMAssembly
 This class provides functionality required to define an assembly object that arises from an "Empirical Interpolation Method" (EIM) approximation. More...
 
class  RBEIMConstruction
 This class is part of the rbOOmit framework. More...
 
class  RBEIMEvaluation
 This class is part of the rbOOmit framework. More...
 
class  RBEIMTheta
 This class provides functionality required to define an RBTheta object that arises from an "Empirical Interpolation Method" (EIM) approximation. More...
 
class  RBEvaluation
 This class is part of the rbOOmit framework. More...
 
class  RBParameters
 This class is part of the rbOOmit framework. More...
 
class  RBParametrized
 This class is part of the rbOOmit framework. More...
 
class  RBParametrizedFunction
 A simple functor class that provides a RBParameter-dependent function. More...
 
class  RBSCMConstruction
 This class is part of the rbOOmit framework. More...
 
class  RBSCMEvaluation
 This class is part of the rbOOmit framework. More...
 
class  RBTemporalDiscretization
 Define a class that encapsulates the details of a "generalized Euler" temporal discretization to be used in the rbOOmit framework. More...
 
class  RBTheta
 This class is part of the rbOOmit framework. More...
 
class  RBThetaExpansion
 This class stores the set of RBTheta functor objects that define the "parameter-dependent expansion" of a PDE. More...
 
class  ReferenceCountedObject
 This class implements reference counting. More...
 
class  ReferenceCounter
 This is the base class for enabling reference counting. More...
 
class  RefinementSelector
 This abstract class provides an interface to methods for selecting the type of refinement to be used on each element in a given mesh. More...
 
class  RemoteElem
 In parallel meshes where a ghost element has neighbors which do not exist on the local processor, the ghost element's neighbors are set to point to the singleton RemoteElement instead. More...
 
class  ReplicatedMesh
 The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of a full mesh data structure on each processor. More...
 
class  safe_bool
 
class  safe_bool_base
 This is a helper class which can be used to make pre-C++11 operator bool() comparisons safer by making them behave a bit more like they have the "explicit" keyword attached. More...
 
struct  ScalarTraits
 
struct  ScalarTraits< std::complex< T > >
 
class  SecondOrderUnsteadySolver
 Generic class from which second order UnsteadySolvers should subclass. More...
 
class  SensitivityData
 Data structure for holding completed parameter sensitivity calculations. More...
 
class  SerialMesh
 
class  SFCPartitioner
 The SFCPartitioner uses a Hilbert or Morton-ordered space filling curve to partition the elements. More...
 
class  ShellMatrix
 Generic shell matrix, i.e. More...
 
class  SiblingCoupling
 This class adds coupling (for use in send_list construction) between active elements and all descendants of their parent. More...
 
class  Side
 This defines the Side class. More...
 
class  SideEdge
 This defines the SideEdge class. More...
 
class  SimpleRange
 The SimpleRange templated class is intended to make it easy to construct ranges from pairs of iterators. More...
 
class  Singleton
 Base class for all library singleton objects. More...
 
class  SlepcEigenSolver
 This class provides an interface to the SLEPc eigenvalue solver library from http://slepc.upv.es/. More...
 
class  SolutionHistory
 A SolutionHistory class that enables the storage and retrieval of timesteps and (in the future) adaptive steps. More...
 
class  SolutionTransfer
 Base class for objects that allow transferring variable values between different systems with different meshes. More...
 
class  SolverConfiguration
 This class stores solver configuration data, e.g. More...
 
class  SolverException
 A class representing an exception during a solve. More...
 
class  SparseMatrix
 Generic sparse matrix. More...
 
class  SparseShellMatrix
 This class allows to use any SparseMatrix object as a shell matrix. More...
 
class  Sphere
 This class defines a sphere. More...
 
class  StatisticsVector
 The StatisticsVector class is derived from the std::vector<> and therefore has all of its useful features. More...
 
class  SteadySolver
 This class implements a TimeSolver which does a single solve of the steady state problem. More...
 
class  StoredRange
 The StoredRange class defines a contiguous, divisible set of objects. More...
 
class  SubdomainPartitioner
 The SubdomainPartitioner partitions the elements in "chunks" of user-specified subdomain ids. More...
 
class  SumShellMatrix
 This class combines any number of shell matrices to a single shell matrix by summing them together. More...
 
class  Surface
 The base class for all "surface" related geometric objects. More...
 
struct  SyncNodalPositions
 
struct  SyncRefinementFlags
 
class  System
 This is the base class for classes which contain information related to any physical process that might be simulated. More...
 
class  SystemNorm
 This class defines a norm/seminorm to be applied to a NumericVector which contains coefficients in a finite element space. More...
 
class  SystemSubset
 This is a base class for classes which represent subsets of the dofs of a System. More...
 
class  SystemSubsetBySubdomain
 This class represents a subset of the dofs of a System, selected by the subdomain_id and possible the variable numbers. More...
 
class  TaoOptimizationSolver
 This class provides an interface to the Tao optimization solvers. More...
 
class  TecplotIO
 This class implements writing meshes in the Tecplot format. More...
 
class  TensorShellMatrix
 Shell matrix that is given by a tensor product of two vectors, i.e. More...
 
class  TensorValue
 This class defines a tensor in LIBMESH_DIM dimensional Real or Complex space. More...
 
class  TestClass
 
class  Tet
 The Tet is an element in 3D composed of 4 sides. More...
 
class  TetGenIO
 This class implements reading and writing meshes in the TetGen format. More...
 
class  TetGenMeshInterface
 Class TetGenMeshInterface provides an interface for tetrahedralization of meshes using the TetGen library. More...
 
class  TetGenWrapper
 The TetGenWrapper provides an interface for basic access to TetGen data structures and methods. More...
 
class  TimeSolver
 This is a generic class that defines a solver to handle time integration of DifferentiableSystems. More...
 
class  TopologyMap
 Data structures that enable topology-based lookups of nodes created by mesh refinement. More...
 
class  TransientRBAssemblyExpansion
 This extends RBAssemblyExpansion to provide an assembly expansion for the case of time-dependent PDEs. More...
 
class  TransientRBConstruction
 This class is part of the rbOOmit framework. More...
 
class  TransientRBEvaluation
 This class is part of the rbOOmit framework. More...
 
class  TransientRBThetaExpansion
 This class stores the set of RBTheta functor objects that define the "parameter-dependent expansion" of a PDE. More...
 
class  TransientSystem
 This class provides a specific system class. More...
 
class  Tree
 This class defines a tree that may be used for fast point location in space. More...
 
class  TreeBase
 This is the base class for trees, it allows pointer usage of trees. More...
 
class  TreeNode
 This class defines a node on a tree. More...
 
class  Tri
 The Tri is an element in 2D composed of 3 sides. More...
 
class  Tri3
 The Tri3 is an element in 2D composed of 3 nodes. More...
 
class  Tri6
 The Tri6 is an element in 2D composed of 6 nodes. More...
 
class  TriangleInterface
 A C++ interface between LibMesh and the Triangle library written by J.R. More...
 
class  TrilinosPreconditioner
 This class provides an interface to the suite of preconditioners available from Trilinos. More...
 
class  TriShell3
 TriShell3 is almost identical to Tri3. More...
 
class  TwostepTimeSolver
 This class wraps another UnsteadySolver derived class, and compares the results of timestepping with deltat and timestepping with 2*deltat to adjust future timestep lengths. More...
 
class  TypeNTensor
 This class will eventually define a rank-N tensor in LIBMESH_DIM dimensional space of type T. More...
 
struct  TypesEqual
 
struct  TypesEqual< T, T >
 
class  TypeTensor
 This class defines a tensor in LIBMESH_DIM dimensional space of type T. More...
 
class  TypeTensorColumn
 
class  TypeVector
 This class defines a vector in LIBMESH_DIM dimensional space of type T. More...
 
class  UCDIO
 This class implements reading & writing meshes in the AVS's UCD format. More...
 
class  UniformRefinementEstimator
 This class implements a ``brute force'' error estimator which integrates differences between the current solution and the solution on a uniformly refined (in h and/or p, for an arbitrary number of levels) grid. More...
 
class  UnsteadySolver
 This is a generic class that defines a solver to handle time integration of DifferentiableSystems. More...
 
class  UnstructuredMesh
 The UnstructuredMesh class is derived from the MeshBase class. More...
 
class  UNVIO
 The UNVIO class implements the Ideas UNV universal file format. More...
 
class  Variable
 This class defines the notion of a variable in the system. More...
 
class  VariableGroup
 This class defines a logically grouped set of variables in the system. More...
 
class  VariationalMeshSmoother
 This is an implementation of Larisa Branets' smoothing algorithms. More...
 
class  vectormap
 This vectormap templated class is intended to provide the performance characteristics of a sorted std::vector with an interface more closely resembling that of a std::map, for use in particular when memory is tight. More...
 
class  VectorSetAction
 This action class can be used with a GenericProjector to set projection values (which must be of type Val) as coefficients of the given NumericVector. More...
 
class  VectorValue
 This class defines a vector in LIBMESH_DIM dimensional Real or Complex space. More...
 
class  VTKIO
 This class implements reading and writing meshes in the VTK format. More...
 
class  WeightedPatchRecoveryErrorEstimator
 This class implements the Patch Recovery error indicator. More...
 
class  WendlandRBF
 Simple radial basis function. More...
 
class  WrappedFunction
 This class provides a wrapper with which to evaluate a (libMesh-style) function pointer in a FunctionBase-compatible interface. More...
 
class  WrappedFunctor
 This class provides a wrapper with which to evaluate a (libMesh-style) function pointer in a FunctionBase-compatible interface. More...
 
class  Xdr
 This class implements a C++ interface to the XDR (eXternal Data Representation) format. More...
 
class  XdrIO
 MeshIO class used for writing XDR (eXternal Data Representation) and XDA mesh files. More...
 
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
 A row of the Dof constraint matrix. More...
 
typedef std::map< const Node *, Real, std::less< const Node * >, Threads::scalable_allocator< std::pair< const Node *const, Real > > > NodeConstraintRow
 A row of the Node constraint mapping. More...
 
typedef TestClass subdomain_id_type
 Based on the 4-byte comment warning above, this probably doesn't work with exodusII at all... More...
 
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 FEGenericBase< RealFEBase
 
typedef TensorValue< NumberNumberTensorValue
 
typedef NumberTensorValue Tensor
 
typedef VectorValue< NumberNumberVectorValue
 
typedef NumberVectorValue Gradient
 
typedef VectorValue< RealRealVectorValue
 Useful typedefs to allow transparent switching between Real and Complex data types. More...
 
typedef TensorValue< RealRealTensorValue
 Useful typedefs to allow transparent switching between Real and Complex data types. More...
 
typedef RealVectorValue RealGradient
 
typedef RealTensorValue RealTensor
 
typedef FEGenericBase< RealGradientFEVectorBase
 
typedef std::unordered_multiset< Elem *, ElemHashUtils, ElemHashUtilsunordered_multiset_elem
 
typedef StoredRange< MeshBase::element_iterator, Elem * > ElemRange
 
typedef StoredRange< MeshBase::const_element_iterator, const Elem * > ConstElemRange
 
typedef StoredRange< MeshBase::node_iterator, Node * > NodeRange
 
typedef StoredRange< MeshBase::const_node_iterator, const Node * > ConstNodeRange
 
typedef DistributedMesh DefaultMesh
 
typedef Real REAL
 
typedef int32_t eigen_idx_type
 
typedef Eigen::SparseMatrix< Number, Eigen::RowMajor, eigen_idx_typeEigenSM
 
typedef Eigen::Matrix< Number, Eigen::Dynamic, 1 > EigenSV
 
typedef LinearImplicitSystem SteadyLinearSystem
 
typedef TransientSystem< LinearImplicitSystemTransientImplicitSystem
 
typedef TransientSystem< LinearImplicitSystemTransientLinearImplicitSystem
 
typedef TransientSystem< NonlinearImplicitSystemTransientNonlinearImplicitSystem
 
typedef TransientSystem< ExplicitSystemTransientExplicitSystem
 
typedef TransientSystem< SystemTransientBaseSystem
 
typedef TransientSystem< EigenSystemTransientEigenSystem
 
typedef BasicOStreamProxy OStreamProxy
 

Enumerations

enum  VariableIndexing { SYSTEM_VARIABLE_ORDER = 0, LOCAL_VARIABLE_ORDER }
 Dirichlet functions may be indexed either by "system variable order" or "local variable order", depending on how the DirichletBoundary object is constructed. More...
 
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
}
 Linear solver convergence flags (taken from the PETSc flags) More...
 
enum  EigenSolverType {
  POWER =0, LAPACK, SUBSPACE, ARNOLDI,
  LANCZOS, KRYLOVSCHUR, INVALID_EIGENSOLVER
}
 Defines an enum for iterative eigenproblem solver types. More...
 
enum  EigenProblemType {
  NHEP =0, HEP, GNHEP, GHEP,
  GHIEP, INVALID_EIGENPROBLEMTYPE
}
 Defines an enum for eigenproblem types. More...
 
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, INVALID_POSITION_OF_SPECTRUM
}
 Defines an enum for the position of the spectrum, i.e. More...
 
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
}
 Defines an enum for element quality metrics. More...
 
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,
  QUADSHELL8, INVALID_ELEM
}
 Defines an enum for geometric element types. More...
 
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
}
 defines an enum for finite element families. More...
 
enum  FEContinuity { DISCONTINUOUS, C_ZERO, C_ONE, H_CURL }
 defines an enum for finite element types to libmesh_assert a certain level (or type? Hcurl?) of continuity. More...
 
enum  FEFieldType { TYPE_SCALAR = 0, TYPE_VECTOR }
 defines an enum for finite element field types - i.e. More...
 
enum  InfMapType { CARTESIAN =0, SPHERICAL, ELLIPSOIDAL, INVALID_INF_MAP }
 defines an enum for the types of coordinate mappings available in infinite elements. More...
 
enum  IOPackage {
  TECPLOT, GMV, GMSH, VTK,
  DIVA, TETGEN, UCD, LIBMESH,
  INVALID_IO_PACKAGE
}
 libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files. More...
 
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
}
 defines an enum for norms defined on vectors of finite element coefficients More...
 
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
}
 defines an enum for polynomial orders. More...
 
enum  ParallelType {
  AUTOMATIC =0, SERIAL, PARALLEL, GHOSTED,
  INVALID_PARALLELIZATION
}
 Defines an enum for parallel data structure types. More...
 
enum  PointLocatorType { TREE = 0, TREE_ELEMENTS, TREE_LOCAL_ELEMENTS, INVALID_LOCATOR }
 defines an enum for the types of point locators (given a point with global coordinates, locate the corresponding element in space) available in libMesh. More...
 
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
}
 Defines an enum for preconditioner types. More...
 
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
}
 Defines an enum for currently available quadrature rules. More...
 
enum  SolverPackage {
  PETSC_SOLVERS =0, TRILINOS_SOLVERS, LASPACK_SOLVERS, SLEPC_SOLVERS,
  EIGEN_SOLVERS, NLOPT_SOLVERS, INVALID_SOLVER_PACKAGE
}
 Defines an enum for various linear solver packages. More...
 
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
}
 Defines an enum for iterative solver types. More...
 
enum  SubsetSolveMode { SUBSET_ZERO = 0, SUBSET_COPY_RHS, SUBSET_DONT_TOUCH }
 defines an enum for the question what happens to the dofs outside the given subset when a system is solved on a subset. More...
 
enum  XdrMODE {
  UNKNOWN = -1, ENCODE =0, DECODE, WRITE,
  READ
}
 Defines an enum for read/write mode in Xdr format. More...
 

Functions

template<typename T , typename... Args>
std::unique_ptr< T > make_unique (Args &&...args)
 
bool initialized ()
 Checks that library initialization has been done. More...
 
bool closed ()
 Checks that the library has been closed. More...
 
void enableFPE (bool on)
 Toggle hardware trap floating point exceptions. More...
 
void enableSEGV (bool on)
 Toggle libMesh reporting of segmentation faults. More...
 
bool on_command_line (const std::string &arg)
 
template<typename T >
command_line_value (const std::string &, T)
 
template<typename T >
command_line_value (const std::vector< std::string > &, T)
 
template<typename T >
command_line_next (const std::string &, T)
 Use GetPot's search()/next() functions to get following arguments from the command line. More...
 
template<typename T >
void command_line_vector (const std::string &, std::vector< T > &)
 
SolverPackage default_solver_package ()
 
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 ()
 Specifier for I/O file compatibility features. More...
 
void print_trace (std::ostream &out_stream=std::cerr)
 Print a stack trace (for code compiled with gcc) More...
 
std::string demangle (const char *name)
 Mostly system independent demangler. More...
 
void write_traceout ()
 Writes a stack trace to a uniquely named file if –enable-tracefiles has been set by configure, otherwise does nothing. More...
 
bool operator== (const OrderWrapper &lhs, const OrderWrapper &rhs)
 Overload comparison operators for OrderWrapper. More...
 
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)
 Overload stream operators. More...
 
 INSTANTIATE_INF_FE (1, CARTESIAN)
 Collect all 1D explicit instantiations for class InfFE. More...
 
 INSTANTIATE_INF_FE (2, CARTESIAN)
 Collect all 2D explicit instantiations for class InfFE. More...
 
 INSTANTIATE_INF_FE (3, CARTESIAN)
 Collect all 3D explicit instantiations for class InfFE. More...
 
std::ostream & operator<< (std::ostream &os, const Elem &e)
 
std::ostream & operator<< (std::ostream &os, const Node &n)
 
void query_ghosting_functors (const MeshBase &mesh, processor_id_type pid, bool newly_coarsened_only, std::set< const Elem *, CompareElemIdsByLevel > &connected_elements)
 
void connect_children (const MeshBase &mesh, processor_id_type pid, std::set< const Elem *, CompareElemIdsByLevel > &connected_elements)
 
void connect_families (std::set< const Elem *, CompareElemIdsByLevel > &connected_elements)
 
void reconnect_nodes (const std::set< const Elem *, CompareElemIdsByLevel > &connected_elements, std::set< const Node * > &connected_nodes)
 
PetscInt * numeric_petsc_cast (const numeric_index_type *p)
 
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)
 Compute |b x c|^2 without creating the extra temporary produced by calling b.cross(c).norm_sq(). More...
 
template<typename T >
cross_norm (const TypeVector< T > &b, const TypeVector< T > &c)
 Calls cross_norm_sq() and takes the square root of the result. More...
 
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_snes_monitor (SNES, PetscInt its, PetscReal fnorm, void *)
 
PetscErrorCode __libmesh_petsc_snes_residual (SNES, Vec x, Vec r, void *ctx)
 
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)
 
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 tao, Vec x, PetscReal *objective, void *ctx)
 
PetscErrorCode __libmesh_tao_gradient (Tao tao, Vec x, Vec g, void *ctx)
 
PetscErrorCode __libmesh_tao_hessian (Tao tao, Vec x, Mat h, Mat pc, void *ctx)
 
PetscErrorCode __libmesh_tao_equality_constraints (Tao tao, Vec x, Vec ce, void *ctx)
 
PetscErrorCode __libmesh_tao_equality_constraints_jacobian (Tao tao, Vec x, Mat J, Mat Jpre, void *ctx)
 
PetscErrorCode __libmesh_tao_inequality_constraints (Tao tao, Vec x, Vec cineq, void *ctx)
 
PetscErrorCode __libmesh_tao_inequality_constraints_jacobian (Tao tao, Vec x, Mat J, Mat Jpre, void *ctx)
 
 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)
 
template<typename P >
void print_helper (std::ostream &os, const P *param)
 Helper functions for printing scalar, vector and vector<vector> types. More...
 
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)
 
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 I >
SimpleRange< I > as_range (const std::pair< I, I > &p)
 Helper function that allows us to treat a homogenous pair as a range. More...
 
OStreamProxy out (std::cout)
 
OStreamProxy err (std::cerr)
 
bool warned_about_auto_ptr (false)
 
PerfLog perflog ("libMesh",#ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING true#else false#endif)
 
const Number imaginary (0., 1.)
 
void libmesh_terminate_handler ()
 
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 > &)
 
 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 libMesh::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 libMesh::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 libMesh::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 libMesh::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)
 
std::ostream & operator<< (std::ostream &os, const MeshfreeInterpolation &mfi)
 
template<typename T >
SIGN (T a, T b)
 
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)
 This function is called by PETSc to initialize the preconditioner. More...
 
PetscErrorCode __libmesh_petsc_preconditioner_apply (void *ctx, Vec x, Vec y)
 This function is called by PETSc to actually apply the preconditioner. More...
 
PetscErrorCode __libmesh_petsc_preconditioner_setup (PC pc)
 
PetscErrorCode __libmesh_petsc_preconditioner_apply (PC pc, Vec x, Vec y)
 
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)
 
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< long long > > (std::vector< long long > &, 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 *)
 

Variables

DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
 
DIE A HORRIBLE DEATH HERE typedef float ErrorVectorReal
 
FactoryImp< ExampleOneFunction, FunctionBase< Number > > example_one_factory ("example_one")
 
const Number imaginary
 The imaginary unit, $ \sqrt{-1} $. More...
 
const Real pi
 $ \pi=3.14159... $. More...
 
const Number zero = 0.
 $ zero=0. $. More...
 
const unsigned int invalid_uint = static_cast<unsigned int>(-1)
 A number which is used quite often to represent an invalid or uninitialized value. More...
 
static const Real TOLERANCE = 1.e-8
 
MPI_Comm COMM_WORLD = MPI_COMM_NULL
 MPI Communicator to be used in the library. More...
 
MPI_Comm GLOBAL_COMM_WORLD = MPI_COMM_NULL
 MPI Communicator used to initialize libMesh. More...
 
OStreamProxy out
 
OStreamProxy err
 
bool warned_about_auto_ptr
 
PerfLog perflog
 A PerfLog object to log performance. More...
 
const RemoteElemremote_elem
 
Parallel::FakeCommunicator CommWorld
 The default libMesh communicator. More...
 
const unsigned char triangular_number_row []
 
const unsigned char triangular_number_column []
 
const unsigned char square_number_row []
 
const unsigned char square_number_column []
 
const unsigned char cube_number_row []
 
const unsigned char cube_number_column []
 
const unsigned char cube_number_page []
 
MPI_Errhandler libmesh_errhandler
 
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 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
 

Detailed Description

The libMesh namespace provides an interface to certain functionality in the library.

Sanity check, without prior inclusion of libmesh_config.h.

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.

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.

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 34 of file elem_range.h.

Definition at line 34 of file node_range.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 31 of file elem_range.h.

Definition at line 37 of file exact_error_estimator.h.

Definition at line 668 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 139 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 48 of file exact_error_estimator.h.

Definition at line 51 of file exact_error_estimator.h.

Definition at line 92 of file id_types.h.

Definition at line 232 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.

Definition at line 34 of file steady_system.h.

typedef uint16_t libMesh::subdomain_id_type

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

Note
subdomain_id_type should be a positive integer, but due to a limitation in the exodusII API, we are forced to use a signed integer here to represent subdomains. This gives us 2^31 possible unique blocks.

Definition at line 43 of file id_types.h.

Definition at line 50 of file exact_error_estimator.h.

Definition at line 155 of file transient_system.h.

Definition at line 157 of file transient_system.h.

Definition at line 154 of file transient_system.h.

Definition at line 151 of file transient_system.h.

Definition at line 152 of file transient_system.h.

Definition at line 153 of file transient_system.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 std::unordered_multiset<Elem *, ElemHashUtils, ElemHashUtils> libMesh::unordered_multiset_elem

Definition at line 77 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 
QUADSHELL8 
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  QUADSHELL8, // 32
76 
77  INVALID_ELEM}; // 33 - 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 
INVALID_POSITION_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 
TRILINOS_SOLVERS 
LASPACK_SOLVERS 
SLEPC_SOLVERS 
EIGEN_SOLVERS 
NLOPT_SOLVERS 
INVALID_SOLVER_PACKAGE 

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
Data structure to hold solution values.
Definition: system.h:1523
IterBase * data
Ideally this private member data should have protected access.
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
Data structure to hold solution values.
Definition: system.h:1523
IterBase * data
Ideally this private member data should have protected access.
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
Data structure to hold solution values.
Definition: system.h:1523
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
OStreamProxy out
IterBase * data
Ideally this private member data should have protected access.
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::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
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::System::current_local_solution, 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, sys.current_local_solution.get());
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
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 actually apply the preconditioner.

ctx will hold the Preconditioner.

Definition at line 58 of file petsc_linear_solver.C.

References libMesh::Preconditioner< T >::apply(), libMesh::ParallelObject::comm(), and 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 libMesh::Preconditioner< T >::apply(), CHKERRQ(), libMesh::ParallelObject::comm(), 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, libMesh::Preconditioner< T >::initialized(), and libMesh::Preconditioner< T >::setup().

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, ierr, libMesh::Preconditioner< T >::initialized(), and libMesh::Preconditioner< T >::setup().

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, 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()
Update the local values to reflect the solution on neighboring processors.
Definition: system.C:425
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
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, 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:2030
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
Constrains the numeric vector v, which represents a solution defined on the mesh. ...
Definition: dof_map.h:1816
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, 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 specify 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 specify 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()
Update the local values to reflect the solution on neighboring processors.
Definition: system.C:425
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_equality_constraints ( Tao  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, sys, and libMesh::OptimizationSolver< T >::system().

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:2030
PetscErrorCode Vec Mat Mat void * ctx
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
Constrains the numeric vector v, which represents a solution defined on the mesh. ...
Definition: dof_map.h:1816
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_equality_constraints_jacobian ( Tao  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, 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:2030
PetscErrorCode Vec Mat Mat void * ctx
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
Constrains the numeric vector v, which represents a solution defined on the mesh. ...
Definition: dof_map.h:1816
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_gradient ( Tao  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, sys, and libMesh::OptimizationSolver< T >::system().

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:2030
PetscErrorCode Vec Mat Mat void * ctx
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
Constrains the numeric vector v, which represents a solution defined on the mesh. ...
Definition: dof_map.h:1816
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_hessian ( Tao  tao,
Vec  x,
Mat  h,
Mat  pc,
void *  ctx 
)

Definition at line 142 of file tao_optimization_solver.C.

References libMesh::ParallelObject::comm(), ctx, libMesh::OptimizationSystem::ComputeHessian::hessian(), libMesh::OptimizationSolver< T >::hessian_object, ierr, libmesh_assert(), libmesh_nullptr, solver, 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:2030
PetscErrorCode Vec Mat Mat void * ctx
void enforce_constraints_exactly(const System &system, NumericVector< Number > *v=libmesh_nullptr, bool homogeneous=false) const
Constrains the numeric vector v, which represents a solution defined on the mesh. ...
Definition: dof_map.h:1816
PetscErrorCode ierr
PetscErrorCode libMesh::__libmesh_tao_inequality_constraints ( Tao  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, sys, and libMesh::OptimizationSolver< T >::system().

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<