|
Smith
0.1
Smith is an implicit thermal structural mechanics simulation code.
|
Accelerator functionality. More...
Namespaces | |
| accelerator | |
| Namespace for methods involving accelerator-enabled builds. | |
| cli | |
| Command line functionality. | |
| heat_transfer | |
| HeatTransfer helper structs. | |
| input | |
| The input related helper functions and objects. | |
| mesh | |
| Mesh related input options. | |
| output | |
| The output related helper functions and objects. | |
| profiling | |
| profiling namespace | |
| solid_mechanics | |
| SolidMechanics helper data types. | |
| thermomechanics | |
| Thermomechanics helper data types. | |
Classes | |
| class | CoupledSystemSolver |
| Orchestrates staggered solution for multiphysics systems. More... | |
| class | DifferentiablePhysics |
BasePhysics implementation that stores differentiable states in gretl for checkpointed reverse solves. More... | |
| class | DirichletBoundaryConditions |
| A generic class for setting Dirichlet boundary conditions on arbitrary physics. More... | |
| struct | zero_dual_from_state |
| functor which takes a std::shared_ptr<FiniteElementState>, and returns a zero-valued std::shared_ptr<FiniteElementDual> with the same space More... | |
| struct | zero_state_from_dual |
| functor which takes a std::shared_ptr<FiniteElementDual>, and returns a zero-valued std::shared_ptr<FiniteElementState> with the same space More... | |
| struct | FieldStateWeightedSum |
| temporary object to register the multiplication of a gretl::State<double> with a FieldState. Casts back More... | |
| struct | FieldType |
| Representation of a field type with a name and an optional unknown index. More... | |
| struct | FieldStore |
| Manages storage and metadata for fields, parameters, and weak forms. More... | |
| class | LumpedMassExplicitNewmarkStateAdvancer |
| Lumped mass explicit dynamics implementation for the StateAdvancer interface. More... | |
| class | MultiphysicsTimeIntegrator |
| Time integrator for multiphysics problems, coordinating multiple weak forms. More... | |
| class | NonlinearBlockSolverBase |
| Abstract interface for nonlinear block solvers that provide both forward and adjoint solves. More... | |
| class | NonlinearBlockSolver |
| Nonlinear block solver backed by an EquationSolver forward solve and linear adjoint solves. More... | |
| class | ParaviewWriter |
| Class which interactions with ParaViewDataCollection to write arbitrary field results to disk. This allows output independent of a particular BasePhysics. More... | |
| struct | SolidMechanicsSystem |
| System struct for solid dynamics with configurable time integration. More... | |
| struct | SolidMechanicsWithInternalVarsSystem |
| System struct for solid mechanics with an additional internal variable (L2 state). More... | |
| class | StateAdvancer |
| Base state advancer class, allows specification for quasi-static solve strategies, or time integration algorithms. More... | |
| struct | Parameters |
| a struct that is used in the physics modules to clarify which template arguments are user-controlled parameters (e.g. for design optimization) More... | |
| struct | ReactionInfo |
| Information about a dual field. More... | |
| struct | SystemBase |
| Base struct for physics systems containing common members and helper functions. More... | |
| struct | ThermalSystem |
| Container for a thermal system with configurable time integration. More... | |
| struct | ThermoMechanicsSystem |
| Container for a coupled thermo-mechanical system with configurable time integration. More... | |
| class | TimeDiscretizedWeakForm |
| class | TimeDiscretizedWeakForm< spatial_dim, OutputSpace, Parameters< InputSpaces... > > |
| A time-discretized weak form that provides TimeInfo to integrands. More... | |
| class | SecondOrderTimeDiscretizedWeakForms |
| A container holding the weak forms useful for second-order time-discretized systems. More... | |
| class | SecondOrderTimeDiscretizedWeakForm |
| class | SecondOrderTimeDiscretizedWeakForm< spatial_dim, OutputSpace, Parameters< TrialInputSpace, InputSpaces... > > |
| Convenience wrapper for second-order-in-time systems using an implicit Newmark rule. More... | |
| class | TimeIntegrationRule |
| Abstract time integration rule for discretizing odes in time. More... | |
| class | BackwardEulerFirstOrderTimeIntegrationRule |
| encodes rules for time discretizing first order odes (involving first time derivatives). When solving f(u, u_dot, t) = 0 this class provides the current discrete approximation for u and u_dot as a function of (u^{n+1}, u^n). More... | |
| class | QuasiStaticRule |
| encodes rules for time discretizing first order odes where time derivatives are zero. When solving f(u, t) = 0 this class provides the current discrete approximation for u as a function of u^{n+1}. More... | |
| struct | ImplicitNewmarkSecondOrderTimeIntegrationRule |
| encodes rules for time discretizing second order odes (involving first and second time derivatives). When solving f(u, u_dot, u_dot_dot, t) = 0 this class provides the current discrete approximation for u, u_dot, and u_dot_dot as a function of (u^{n+1},u^n,u_dot^n,u_dot_dot^n). More... | |
| struct | QuasiStaticSecondOrderTimeIntegrationRule |
| encodes rules for time discretizing second order odes (involving first and second time derivatives). When solving f(u, u_dot, u_dot_dot, t) = 0 this class provides the current discrete approximation for u, u_dot, and u_dot_dot as a function of (u^{n+1},u^n,u_dot^n,u_dot_dot^n). More... | |
| class | TimestepEstimator |
| Base class interface for estimating the stable timestep given the current state and parameters. More... | |
| class | ConstantTimeStepEstimator |
| TimeStepEstimator which uses a simple and fixed timestep. More... | |
| class | ApplicationManager |
| RAII Application Manager class. Initializes MPI and other important libraries as well as automatically finalizes them upon going out of scope. More... | |
| struct | variant_alternative |
Obtains the type at index I of a variant<T0, T1> More... | |
| struct | variant_alternative< 0, T0, T1 > |
| Obtains the type at index 0 of a variant<T0, T1> More... | |
| struct | variant_alternative< 1, T0, T1 > |
| Obtains the type at index 1 of a variant<T0, T1> More... | |
| struct | variant |
| A simple variant type that supports only two elements. More... | |
| class | BlockDiagonalPreconditioner |
| Simple block diagonal preconditioner for block systems. More... | |
| class | BlockTriangularPreconditioner |
| Simple block triangular preconditioner for block systems. More... | |
| class | BlockSchurPreconditioner |
| Simple 2x2 block Schur complement preconditioner for block systems. More... | |
| class | EquationSolver |
| This class manages the objects typically required to solve a nonlinear set of equations arising from discretization of a PDE of the form F(x) = 0. Specifically, it has. More... | |
| class | SuperLUSolver |
| A wrapper class for using the MFEM SuperLU solver with a HypreParMatrix. More... | |
| struct | DifferentiateWRT |
| struct | differentiate_wrt_this |
this type exists solely as a way to signal to smith::Functional that the function smith::Functional::operator() should differentiate w.r.t. a specific argument More... | |
| struct | Domain |
| a class for representing a geometric region that can be used for integration More... | |
| struct | dual |
| Dual number struct (value plus gradient) More... | |
| struct | is_dual_number |
| class for checking if a type is a dual number or not More... | |
| struct | is_dual_number< dual< T > > |
| class for checking if a type is a dual number or not More... | |
| struct | ElementRestriction |
| struct | BlockElementRestriction |
| a generalization of mfem::ElementRestriction that works with multiple kinds of element geometries. Instead of doing the "E->L" (gather) and "L->E" (scatter) operations for only one element geometry, this class does them with block "E-vectors", where each element geometry is a separate block. More... | |
| struct | TensorProductQuadratureRule |
| a convenience class for generating information about tensor product integration rules from the underlying 1D rule. More... | |
| struct | CompileTimeValue |
| struct | batched_jacobian |
| this struct is used to look up mfem's memory layout of the quadrature point jacobian matrices More... | |
| struct | batched_jacobian< mfem::Geometry::CUBE, q > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | batched_jacobian< mfem::Geometry::SQUARE, q > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | batched_jacobian< mfem::Geometry::TRIANGLE, q > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | batched_jacobian< mfem::Geometry::TETRAHEDRON, q > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | batched_position |
| this struct is used to look up mfem's memory layout of the quadrature point position vectors More... | |
| struct | batched_position< mfem::Geometry::CUBE, q > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | batched_position< mfem::Geometry::SQUARE, q > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | batched_position< mfem::Geometry::TRIANGLE, q > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | batched_position< mfem::Geometry::TETRAHEDRON, q > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | batched_position< mfem::Geometry::SEGMENT, q > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | H1 |
H1 elements of order p. More... | |
| struct | Hcurl |
H(curl) elements of order p. More... | |
| struct | L2 |
Discontinuous elements of order p. More... | |
| struct | QOI |
| "Quantity of Interest" elements (i.e. elements with a single shape function, 1) More... | |
| struct | FunctionSpace |
| a small POD class for tracking function space metadata More... | |
| struct | finite_element |
| Template prototype for finite element implementations. More... | |
| struct | DependsOn |
| struct | Index |
| Compile-time alias for index of differentiation. More... | |
| class | Functional< test(trials...), exec > |
Intended to be like std::function for finite element kernels. More... | |
| struct | QoIProlongation |
| this class behaves like a Prolongation operator, except is specialized for the case of a quantity of interest. The action of its MultTranspose() operator (the only thing it is used for) sums the values from different processors. More... | |
| struct | QoIElementRestriction |
| this class behaves like a Restriction operator, except is specialized for the case of a quantity of interest. The action of its ScatterAdd() operator (the only thing it is used for) sums the values on this local processor. More... | |
| class | Functional< double(trials...), exec > |
| a partial template specialization of Functional with test == double, implying "quantity of interest" More... | |
| struct | GeometricFactors |
| a class that computes and stores positions and jacobians at each quadrature point More... | |
| struct | Dimension |
| Compile-time alias for a dimension. More... | |
| struct | Integral |
| a class for representing a Integral calculations and their derivatives More... | |
| struct | isotropic_tensor |
an object representing a highly symmetric kind of tensor, that is interoperable with smith::tensor, but uses less memory and performs less calculation than its dense counterpart More... | |
| struct | isotropic_tensor< T, n > |
| there is no such thing as a rank-1 isotropic tensor, but we include this specialization to help explain that to users, rather than just producing an "incomplete type" compilation error More... | |
| struct | isotropic_tensor< T, m, m > |
| a rank-2 isotropic tensor is essentially just the Identity matrix, with a constant of proportionality More... | |
| struct | isotropic_tensor< T, 3, 3, 3 > |
| the only rank-3 isotropic tensor we suport is the alternating tensor (levi-civita symbol) More... | |
| struct | isotropic_tensor< T, m, m, m, m > |
| there are 3 independent rank-4 isotropic tensors (dilatational, symmetric, antisymmetric), so this object represents a linear combination of them More... | |
| struct | QuadratureRule |
A rule for numerical quadrature (set of points and weights) Can be thought of as a compile-time analogue of mfem::IntegrationRule. More... | |
| struct | Nothing |
| these classes are a little confusing. These two special types represent the similar (but different) cases of: More... | |
| struct | Empty |
see Nothing for a complete description of this class and when to use it More... | |
| struct | QuadratureData |
| A class for storing and access user-defined types at quadrature points. More... | |
| class | ShapeAwareFunctional< shape, test(trials...), exec > |
| This is a small wrapper around smith::Functional for shape-displaced domains of integration. More... | |
| struct | tensor |
| Arbitrary-rank tensor class. More... | |
| struct | zero |
| A sentinel struct for eliding no-op tensor operations. More... | |
| struct | is_zero |
checks if a type is zero More... | |
| struct | is_zero< zero > |
| struct | LuFactorization |
| Representation of an LU factorization. More... | |
| struct | is_tensor_of_dual_number |
| class for checking if a type is a tensor of dual numbers or not More... | |
| struct | is_tensor_of_dual_number< tensor< dual< T >, n... > > |
| class for checking if a type is a tensor of dual numbers or not More... | |
| struct | SolverStatus |
| Status and diagnostics of nonlinear equation solvers. More... | |
| struct | ScalarSolverOptions |
Settings for solve_scalar_equation. More... | |
| struct | ConvergenceStatus |
| Detailed status from evaluating nonlinear residual convergence. More... | |
| struct | NonlinearConvergenceContext |
| Stores initial residual norms used for relative nonlinear convergence checks. More... | |
| class | EquationSolverConvergenceManager |
Owns nonlinear convergence state for an inner EquationSolver solve. More... | |
| class | ConvergenceManagedNonlinearSolver |
| Small interface for nonlinear solvers that can accept Smith-managed convergence state. More... | |
| struct | TimesteppingOptions |
| A timestep and boundary condition enforcement method for a dynamic solver. More... | |
| struct | AMGXOptions |
| Stores the information required to configure a NVIDIA AMGX preconditioner. More... | |
| struct | AMGFContactOptions |
| Stores the configuration information for an AMGFContact preconditioner. More... | |
| struct | LinearSolverOptions |
| Parameters for an iterative linear solution scheme. More... | |
| struct | NonlinearSolverOptions |
| Nonlinear solution scheme parameters. More... | |
| class | BasePhysics |
| This is the abstract base class for a generic forward solver. More... | |
| class | BoundaryCondition |
| Boundary condition information bundle. More... | |
| class | BoundaryConditionManager |
| A container for the boundary condition information relating to a specific physics module. More... | |
| class | Components |
| A set to flag components of a vector field. More... | |
| struct | TimeInfo |
| struct storing time and timestep information More... | |
| class | Constraint |
| Abstract constraint class. More... | |
| struct | ContactOptions |
| Stores the options for a contact pair. More... | |
| class | ContactData |
| This class stores all ContactInteractions for a problem, calls Tribol functions that act on all contact interactions, and agglomerates fields that exist over different ContactInteractions. More... | |
| class | FunctionalObjective |
| class | FunctionalObjective< spatial_dim, Parameters< InputSpaces... >, std::integer_sequence< int, parameter_indices... > > |
| FunctionalObjective object, implements to the ScalarFunctional interface using smith::ShapeAwareFunctional. More... | |
| class | FunctionalWeakForm |
| class | FunctionalWeakForm< spatial_dim, OutputSpace, Parameters< InputSpaces... >, std::integer_sequence< int, input_indices... > > |
| A nonlinear WeakForm class implemented using smith::Functional. More... | |
| class | HeatTransfer |
| An object containing the solver for a heat transfer PDE. More... | |
| class | HeatTransfer< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | HeatTransferInputOptions |
| Stores all information held in the input file that is used to configure the solver. More... | |
| struct | HardeningInputOptions |
| Contains function that defines the schema for hardening laws. More... | |
| struct | LiquidCrystElastomerBrighenti |
| Brighenti's liquid crystal elastomer model. More... | |
| struct | LiquidCrystalElastomerBertoldi |
| Bertoldi's liquid crystal elastomer model Paper: Li, S., Librandi, G., Yao, Y., Richard, A. J., Schneider‐Yamamura, A., Aizenberg, J., & Bertoldi, K. (2021). Controlling Liquid Crystal Orientations for Programmable Anisotropic Transformations in Cellular Microstructures. Advanced Materials, 33(42), 2105024. More... | |
| struct | SolidMaterialInputOptions |
| Contains function that defines the schema for solid mechanics materials. More... | |
| struct | ThermalMaterialInputOptions |
| Contains function that defines the schema for heat transfer materials. More... | |
| class | Mesh |
| Helper class for constructing a mesh consistent with Smith. More... | |
| class | ScalarObjective |
| Abstract residual class. More... | |
| class | SolidMechanics |
| class | SolidMechanics< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > > |
| The nonlinear solid solver class. More... | |
| class | SolidMechanicsContact |
| class | SolidMechanicsContact< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > > |
| The nonlinear solid with contact solver class. More... | |
| struct | SolidMechanicsInputOptions |
| Stores all information held in the input file that is used to configure the solver. More... | |
| class | FiniteElementDual |
| Class for encapsulating the dual vector space of a finite element space (i.e. the space of linear forms as applied to a specific basis set) More... | |
| class | FiniteElementState |
| Class for encapsulating the critical MFEM components of a primal finite element field. More... | |
| class | FiniteElementVector |
| Class for encapsulating the data associated with a vector derived from a MFEM finite element space. Specifically, it contains the information needed for both primal finite element state fields and dual finite element vectors. More... | |
| class | StateManager |
| Manages the lifetimes of FEState objects such that restarts are abstracted from physics modules. More... | |
| class | Thermomechanics |
| The operator-split thermal-structural solver. More... | |
| struct | ThermomechanicsInputOptions |
| Stores all information held in the input file that is used to configure the thermal structural solver. More... | |
| class | ThermomechanicsMonolithic |
| class | ThermomechanicsMonolithic< order, dim, Parameters< parameter_space... >, std::integer_sequence< int, parameter_indices... > > |
| The monolithic thermal-structural solver with operator-split options. More... | |
| class | WeakForm |
| Abstract WeakForm class. More... | |
Typedefs | |
| using | FEFieldPtr = std::shared_ptr< FiniteElementState > |
| typedef | |
| using | FEDualPtr = std::shared_ptr< FiniteElementDual > |
| typedef | |
| using | FieldState = gretl::State< FEFieldPtr, FEDualPtr > |
| typedef | |
| using | ReactionState = gretl::State< FEDualPtr, FEFieldPtr > |
| typedef | |
| using | FieldVecState = gretl::State< std::vector< FEFieldPtr >, std::vector< FEDualPtr > > |
| typedef | |
| using | DoubleState = gretl::State< double, double > |
| typedef | |
| template<typename Rule , typename Space , typename... Tail> | |
| using | TimeRuleParams = decltype(detail::time_rule_params_impl< Space, Tail... >(std::make_index_sequence< Rule::num_states >{})) |
| Generate a Parameters<...> type with Rule::num_states copies of Space followed by additional Tail types. Used to build weak form parameter lists that adapt to the time integration rule's arity. | |
| using | QuasiStaticFirstOrderTimeIntegrationRule = BackwardEulerFirstOrderTimeIntegrationRule |
| Alias for BackwardEulerFirstOrderTimeIntegrationRule for convenience. Quasi-static still should compute velocities (viscosities) using backward Euler. | |
| template<typename T , int dim, ExecutionSpace space> | |
| using | ExecArray = axom::Array< T, dim, detail::execution_to_memory_v< space > > |
| Alias for an Array corresponding to a particular ExecutionSpace. | |
| template<typename T , int dim = 1> | |
| using | CPUArray = ExecArray< T, dim, ExecutionSpace::CPU > |
| Alias for an array on the CPU. | |
| template<typename T , int dim = 1> | |
| using | GPUArray = ExecArray< T, dim, ExecutionSpace::CPU > |
| Alias for an array on the GPU. | |
| template<typename T , int dim = 1> | |
| using | UnifiedArray = ExecArray< T, dim, ExecutionSpace::CPU > |
| Alias for an array in unified memory. | |
| template<typename T , int dim, ExecutionSpace space> | |
| using | ExecArrayView = axom::ArrayView< T, dim, detail::execution_to_memory_v< space > > |
| Alias for an ArrayView corresponding to a particular ExecutionSpace. | |
| template<typename T , int dim = 1> | |
| using | CPUArrayView = ExecArrayView< T, dim, ExecutionSpace::CPU > |
| Alias for an array view on the CPU. | |
| using | BlockOverride = std::pair< int, std::unique_ptr< const mfem::Operator > > |
| Optional override for a diagonal block operator. More... | |
| using | vec2 = tensor< double, 2 > |
| statically sized vector of 2 doubles | |
| using | vec3 = tensor< double, 3 > |
| statically sized vector of 3 doubles | |
| using | mat2 = tensor< double, 2, 2 > |
| statically sized 2x2 matrix of doubles | |
| using | mat3 = tensor< double, 3, 3 > |
| statically sized 3x3 matrix of doubles | |
| template<typename T , int n1, int n2 = 1> | |
| using | reduced_tensor = std::conditional_t<(n1==1 &&n2==1), double, std::conditional_t< n1==1, tensor< T, n2 >, std::conditional_t< n2==1, tensor< T, n1 >, tensor< T, n1, n2 > >> > |
| Removes 1s from tensor dimensions For example, a tensor<T, 1, 10> is equivalent to a tensor<T, 10> More... | |
| template<typename T1 , typename T2 > | |
| using | outer_product_t = typename detail::outer_prod< T1, T2 >::type |
| a type function that returns the tensor type of an outer product of two tensors More... | |
| template<typename... T> | |
| using | tuple = mfem::future::tuple< T... > |
| Expose MFEM tuple in the Smith namespace. | |
| template<class... Types> | |
| using | tuple_size = mfem::future::tuple_size< Types... > |
| Alias for the MFEM tuple size trait. | |
| template<size_t I, class T > | |
| using | tuple_element = mfem::future::tuple_element< I, T > |
| Alias for the MFEM tuple element trait. | |
| template<typename T > | |
| using | is_tuple = mfem::future::is_tuple< T > |
| Alias for the MFEM tuple detection trait. | |
| template<typename T > | |
| using | is_tuple_of_tuples = mfem::future::is_tuple_of_tuples< T > |
| Alias for the MFEM nested tuple detection trait. | |
| template<int i, int n, typename T > | |
| using | one_hot_t = typename one_hot< i, n, T >::type |
a tuple type with n entries, all of which are of type smith::zero, except for the i^{th} entry, which is of type T More... | |
| using | FieldPtr = FiniteElementState * |
| using | |
| using | DualFieldPtr = FiniteElementDual * |
| using | |
| using | ConstFieldPtr = FiniteElementState const * |
| using | |
| using | ConstDualFieldPtr = FiniteElementDual const * |
| using | |
| using | var_hardening_t = std::variant< solid_mechanics::LinearHardening, solid_mechanics::PowerLawHardening, solid_mechanics::VoceHardening > |
| Holds all possible isotropic hardening laws that can be utilized in our input file. | |
| using | var_solid_material_t = std::variant< solid_mechanics::NeoHookean, solid_mechanics::LinearIsotropic, solid_mechanics::J2SmallStrain< solid_mechanics::LinearHardening >, solid_mechanics::J2SmallStrain< solid_mechanics::PowerLawHardening >, solid_mechanics::J2SmallStrain< solid_mechanics::VoceHardening > > |
| All possible solid mechanics materials that can be utilized in our input file. | |
| using | var_thermal_material_t = std::variant< heat_transfer::LinearIsotropicConductor, heat_transfer::LinearConductor< 2 >, heat_transfer::LinearConductor< 3 > > |
| Holds all possible heat transfer materials that can be utilized in our Input Deck. | |
| using | GeneralCoefficient = variant< std::shared_ptr< mfem::Coefficient >, std::shared_ptr< mfem::VectorCoefficient > > |
| A sum type for encapsulating either a scalar or vector coeffient. | |
| using | QuadratureField = double |
| This is a placeholder for quadrature fields. | |
| using | QuadratureFieldPtr = double * |
| This is a placeholder for quadrature field pointers. | |
| using | ConstQuadratureFieldPtr = const double * |
| This is a placeholder for const quadrature field pointers. | |
Enumerations | |
| enum class | ExecutionSpace { CPU , GPU , Dynamic } |
| enum used for signalling whether or not to perform certain calculations on the CPU or GPU | |
| enum class | BlockTriangularType { Lower , Upper , Symmetric } |
| Selects the block triangular sweep used by BlockTriangularPreconditioner. More... | |
| enum class | BlockSchurType { Diagonal , Lower , Upper , Full } |
| Selects the block Schur preconditioner variant. More... | |
| enum class | SchurApproxType { DiagInv , A22Only , Custom } |
| Selects how the (1,1) Schur operator is approximated. More... | |
| enum class | Family { QOI , H1 , HCURL , HDIV , L2 } |
| Element conformity. More... | |
| enum class | TimestepMethod { QuasiStatic , BackwardEuler , SDIRK33 , ForwardEuler , RK2 , RK3SSP , RK4 , GeneralizedAlpha , ImplicitMidpoint , SDIRK23 , SDIRK34 , Newmark , HHTAlpha , WBZAlpha , AverageAcceleration , LinearAcceleration , CentralDifference , FoxGoodwin } |
| Timestep method of a solver. More... | |
| enum class | DirichletEnforcementMethod { DirectControl , RateControl , FullControl } |
| this enum describes which way to enforce the time-varying constraint u(t) == U(t) More... | |
| enum class | LinearSolver { CG , GMRES , SuperLU , Strumpack , PetscCG , PetscGMRES } |
| Linear solution method indicator. More... | |
| enum class | NonlinearSolver { Newton , LBFGS , NewtonLineSearch , TrustRegion , KINFullStep , KINBacktrackingLineSearch , KINPicard , PetscNewton , PetscNewtonBacktracking , PetscNewtonCriticalPoint , PetscTrustRegion } |
| Nonlinear solver method indicator. More... | |
| enum class | AMGXSolver { AMG , PCGF , CG , PCG , PBICGSTAB , BICGSTAB , FGMRES , JACOBI_L1 , GS , POLYNOMIAL , KPZ_POLYNOMIAL , BLOCK_JACOBI , MULTICOLOR_GS , MULTICOLOR_DILU } |
| Solver types supported by AMGX. More... | |
| enum class | PetscPCType { JACOBI , JACOBI_L1 , JACOBI_ROWSUM , JACOBI_ROWMAX , PBJACOBI , BJACOBI , LU , ILU , CHOLESKY , SVD , ASM , GASM , GAMG , HMG , NONE } |
| Preconditioner types supported by PETSc. More... | |
| enum class | Preconditioner { HypreJacobi , HypreL1Jacobi , HypreGaussSeidel , HypreAMG , HypreILU , AMGX , Petsc , AMGFContact , BlockDiagonal , BlockTriangular , BlockSchur , None } |
| The type of preconditioner to be used. More... | |
| enum | SubSpaceOptions { NEVER , WHEN_INDEFINITE , WHEN_INDEFINITE_OR_BOUNDARY , ALWAYS } |
| Enumerated options for when to use trust-region subspace solver. | |
| enum class | Component : size_t { X = 0b001 , Y = 0b010 , Z = 0b100 , ALL = 0b111 } |
| Type giving vector components meaningful names and restricting inputs to Components class to meaningful values. | |
| enum class | ContactMethod { SingleMortar } |
| Methodology for enforcing contact constraints (i.e. how you form the constraint equations) More... | |
| enum class | ContactEnforcement { Penalty , LagrangeMultiplier } |
| Describes how to enforce the contact constraint equations. More... | |
| enum class | ContactType { TiedNormal , Frictionless } |
| Mechanical constraint type on contact surfaces. More... | |
| enum class | ContactJacobian { Approximate , Exact } |
| Method for computing Jacobian of contact terms. More... | |
| enum class | ElementType { H1 , HCURL , HDIV , L2 } |
| The type of a finite element basis function. More... | |
Functions | |
| void | defineInputFileSchema (axom::inlet::Inlet &inlet) |
| Define the input file structure for the driver code. More... | |
| gretl::State< int > | make_milestone (const std::vector< FieldState > &states, const std::vector< ReactionState > &reactions) |
| gretl-function to create a dummy-state which records all states and params of interest to the mechanics. This is used to inject additional adjoint loads and evaluate individual timestep sensitivities for the BasePhysics interface. | |
| template<typename DispSpace , typename DensitySpace > | |
| auto | createKineticEnergyIntegrator (smith::Domain &domain, const mfem::ParFiniteElementSpace &velocity_space, const mfem::ParFiniteElementSpace &density_space) |
| Utility function to construct a smith::functional which evaluates the total kinetic energy. | |
| template<typename DispSpace , typename DensitySpace > | |
| gretl::State< double > | computeKineticEnergy (const std::shared_ptr< smith::Functional< double(DispSpace, DispSpace, DensitySpace)>> &energy_func, smith::FieldState disp, smith::FieldState velo, smith::FieldState density, double scaling) |
| Utility function which computes the kinetic energy and returns it as a gretl state (with its vjp defined) | |
| auto | checkGradients (const gretl::State< double > &objectiveState, FieldState &inputState, FiniteElementDual &inputDual, double objectiveBase, gretl::DataStore &dataStore, double eps) |
| testing utility to confirm order of convergence of the finite differences relative to the backprop gradient | |
| auto | checkGradients (const gretl::State< double > &objectiveState, gretl::State< double, double > &inputState, double &inputDual, double objectiveBase, gretl::DataStore &dataStore, double eps) |
| testing utility to confirm order of convergence of the finite differences relative to the backprop gradient | |
| double | checkGradWrt (const gretl::State< double > &objective, smith::FieldState &input, double eps, size_t num_fd_steps=4, bool printmore=false) |
| Testing utility function which runs a gretl graph num_fd_steps (with increasingly smaller finite difference steps) to check if the computed graph gradients are converging to the finite differenced gradients at the expected rate. | |
| double | checkGradWrt (const gretl::State< double > &objective, gretl::State< double, double > &input, double eps, size_t num_fd_steps=4, bool printmore=false) |
| Testing utility function which runs a gretl graph num_fd_steps (with increasingly smaller finite difference steps) to check if the computed graph gradients are converging to the finite differenced gradients at the expected rate. | |
| DoubleState | evaluateObjective (const ScalarObjective &objective, const FieldState &shape_disp, const std::vector< FieldState > &inputs, const TimeInfo &time_info=TimeInfo(0.0, 1.0, 0)) |
| Evaluates a DoubleState using a provided ScalarObjective reference, and the input arguments to that objective. This operation is tracked on the gretl graph. | |
| FieldState | computeLumpedMass (const WeakForm *mass_residual_eval, const FieldState &shape_u, const FieldState &lumped_field, const FieldState &rho) |
| gretl-function implementation to compute lumped mass vectors from shape_displacements FieldState and a density field FieldState. A lumped_field is also passed to communicate the intended dimension of the lumped mass. For example, as scalar lumped field will result in a single lumped mass per node, while a vector lumped field will give a nodal lumped field, where every component of the lumped vector per node has the full mass lumped value (the sum of all lumped masses will be dim * total_mass) | |
| FieldState | diagInverse (const FieldState &x) |
| gretl-function implementation to compute invert the values for every entry in a FieldState. | |
| FieldState | evalReaction (const WeakForm *residual_eval, FieldState shape_disp, const std::vector< FieldState > &states, const std::vector< FieldState > ¶ms, TimeInfo time_info, size_t inertial_index) |
| gretl-function implementation which evaluates the residual force (which is minus the mechanical force) given shape displacement, states and params. The inertial index denotes which index in the state corresponds to the highest time derivative term (e.g., acceleration for solid mechanics). | |
| FieldState | componentWiseMult (const FieldState &x, const FieldState &y, const BoundaryConditionManager *bc_manager) |
| gretl-function implementation which multiplies x and y component-wise to create a new FieldState. The bc_manager is used to zero the constrained dofs of the output Field. | |
| FieldState | negativeComponentWiseMult (const FieldState &x, const FieldState &y, const BoundaryConditionManager *bc_manager) |
| gretl-function implementation which multiplies and then negates x and y component-wise to create a new FieldState. The bc_manager is used to zero the constrained dofs of the output Field. The intended use-case here is explicit dynamics, where the residual is the negative of the force, and the inverse of the mass is strictly positive. The negative component-wise multiplication of these gives the nodal accelerations. | |
| FieldState | square (const FieldState &state) |
| gretl-function to square (x^2) every component of the Field | |
| gretl::State< double > | innerProduct (const FieldState &a, const FieldState &b) |
| gretl-function to compute the inner product (vector l2-norm) of a and b | |
| gretl::State< double > | innerProduct (const ReactionState &a, const ReactionState &b) |
| gretl-function to compute the inner product (vector l2-norm) of a and b | |
| FieldState | axpby (double a, const FieldState &x, double b, const FieldState &y) |
| gretl-function to compute a*x + b*y | |
| FieldState | zeroCopy (const FieldState &x) |
| gretl-function to make a deep-copy of a FieldState and initialize it to 0. | |
| FieldState | axpby (const gretl::State< double > &a, const FieldState &x, const gretl::State< double > &b, const FieldState &y) |
| axpby using State<double> and FieldState | |
| FieldState | weighted_sum (const std::vector< double > &weights, const std::vector< FieldState > &weighted_fields, const std::vector< gretl::State< double >> &differentiable_weights, const std::vector< FieldState > &differentiably_weighted_fields, const std::vector< double > &differentiable_scale_factors) |
| compute the differentiable weighted sum of fields, weighted by both double weights, and also gret::State<double> differentiable weights. The differentiable_scale_factors are applied to the differentiable weights to enable negation and scalar muliplication of weights. | |
| FieldStateWeightedSum | operator* (double a, const FieldState &b) |
| multiply scalar by a FieldState to get a temporary FieldStateWeightedSum which can cast back to a FieldState | |
| FieldStateWeightedSum | operator* (const FieldState &b, double a) |
| multiply scalar by a FieldState to get a temporary FieldStateWeightedSum which can cast back to a FieldState | |
| FieldStateWeightedSum | operator* (double a, const FieldStateWeightedSum &b) |
| multiply scalar by a FieldStateWeightedSum to get a temporary FieldStateWeightedSum which can cast back to a FieldState | |
| FieldStateWeightedSum | operator* (const FieldStateWeightedSum &b, double a) |
| multiply scalar by a FieldStateWeightedSum to get a temporary FieldStateWeightedSum which can cast back to a FieldState | |
| FieldStateWeightedSum | operator* (const gretl::State< double > &a, const FieldState &b) |
| multiply scalar by a FieldState to get a temporary FieldStateWeightedSum which can cast back to a FieldState | |
| FieldStateWeightedSum | operator* (const FieldState &b, const gretl::State< double > &a) |
| multiply scalar by a FieldState to get a temporary FieldStateWeightedSum which can cast back to a FieldState | |
| FieldStateWeightedSum | operator+ (const FieldState &x, const FieldState &y) |
| add two FieldState | |
| FieldStateWeightedSum | operator- (const FieldState &x, const FieldState &y) |
| subtract two FieldState | |
| FieldStateWeightedSum | operator+ (const FieldStateWeightedSum &ax, const FieldStateWeightedSum &by) |
| add two FieldStateWeightedSum | |
| FieldStateWeightedSum | operator- (const FieldStateWeightedSum &ax, const FieldStateWeightedSum &by) |
| subtract two FieldStateWeightedSum | |
| FieldStateWeightedSum | operator+ (const FieldStateWeightedSum &ax, const FieldState &y) |
| add FieldStateWeightedSum and FieldState | |
| FieldStateWeightedSum | operator+ (const FieldState &y, const FieldStateWeightedSum &ax) |
| add FieldStateWeightedSum and FieldState | |
| FieldStateWeightedSum | operator- (const FieldStateWeightedSum &ax, const FieldState &by) |
| subtract FieldState from FieldStateWeightedSum | |
| FieldStateWeightedSum | operator- (const FieldState &ax, const FieldStateWeightedSum &by) |
| subtract FieldStateWeightedSum from FieldState | |
| FieldState | createFieldState (gretl::DataStore &dataStore, const smith::FEFieldPtr &s) |
| initialize on the gretl::DataStore a FieldState with values from s | |
| FieldState | create_field_state (gretl::DataStore &dataStore, const smith::FEFieldPtr &s) |
Backward-compatible snake_case wrapper for createFieldState(dataStore, s). | |
| template<typename function_space > | |
| FieldState | createFieldState (gretl::DataStore &dataStore, function_space space, const std::string &name, const std::string &mesh_tag) |
| initialize on the gretl::DataStore a FieldState from a FiniteElementState of given space, name and mesh. | |
| template<typename function_space > | |
| FieldState | create_field_state (gretl::DataStore &dataStore, function_space space, const std::string &name, const std::string &mesh_tag) |
Backward-compatible snake_case wrapper for createFieldState(dataStore, space, name, mesh_tag). | |
| ReactionState | createReactionState (gretl::DataStore &dataStore, const smith::FEDualPtr &s) |
| initialize on the gretl::DataStore a ReactionState with values from s | |
| template<typename function_space > | |
| ReactionState | createReactionState (gretl::DataStore &dataStore, function_space space, const std::string &name, const std::string &mesh_tag) |
| initialize on the gretl::DataStore a ReactionState from a FiniteElementDual of given space, name and mesh. | |
| FieldState | weighted_average (const FieldState &a, const FieldState &b, double weight) |
| gretl-function to compute the weighted average a * weight + b * (1-weight) | |
| mfem::ParFiniteElementSpace & | space (FieldState field) |
| Get the space from the primal field of a field states. | |
| std::vector< const mfem::ParFiniteElementSpace * > | spaces (const std::vector< FieldState > &states, const std::vector< FieldState > ¶ms={}) |
| Get the spaces from the primal fields of a vector of field states. | |
| std::vector< FiniteElementState * > | getFieldPointers (std::vector< FieldState > &states, std::vector< FieldState > params={}) |
| Get a vector of FieldPtr or DualFieldPtr from a vector of FieldState. | |
| std::vector< const FiniteElementState * > | getConstFieldPointers (const std::vector< FieldState > &states, const std::vector< FieldState > ¶ms={}) |
| Get a vector of ConstFieldPtr or ConstDualFieldPtr from a vector of FieldState. | |
| template<int spatial_dim, typename TestSpaceType , typename... InputSpaceTypes> | |
| auto | createWeakForm (std::string name, FieldType< TestSpaceType > test_type, FieldStore &field_store, FieldType< InputSpaceTypes >... field_types) |
| Create a TimeDiscretizedWeakForm and register its fields in the FieldStore. More... | |
| FieldState | applyZeroBoundaryConditions (const FieldState &s, const BoundaryConditionManager *bc_manager) |
| uses the constrained dofs on the bc_manager to zero the corresponding dofs in FieldState s. | |
| template<int spatial_dim, typename LumpedFieldSpace , typename DensitySpace , typename... parameter_space> | |
| auto | createSolidMassWeakForm (const std::string &physics_name, std::shared_ptr< smith::Mesh > &mesh, const FiniteElementState &lumped_field, const FiniteElementState &density) |
| creates a lumped mass weak form | |
| std::vector< FieldState > | solve (const std::vector< std::shared_ptr< WeakForm >> &weak_forms, const FieldStore &field_store, const CoupledSystemSolver *solver, const TimeInfo &time_info, const std::vector< FieldState > ¶ms={}) |
| Solve a set of weak forms. More... | |
| double | matrixNorm (std::unique_ptr< mfem::HypreParMatrix > &K) |
| Utility to compute the matrix norm. | |
| double | skewMatrixNorm (std::unique_ptr< mfem::HypreParMatrix > &K) |
| Utility to compute 0.5*norm(K-K.T) | |
| std::shared_ptr< NonlinearBlockSolver > | buildNonlinearBlockSolver (NonlinearSolverOptions nonlinear_opts, LinearSolverOptions linear_opts, const smith::Mesh &mesh) |
| Create an equation-backed nonlinear block solver. More... | |
| void | applyBoundaryConditions (double time, const smith::BoundaryConditionManager *bc_manager, smith::FEFieldPtr &primal_field, const smith::FEFieldPtr &bc_field_ptr) |
| apply boundary conditions | |
| std::vector< FieldState > | block_solve (const std::vector< WeakForm * > &residual_evals, const std::vector< std::vector< size_t >> block_indices, const FieldState &shape_disp, const std::vector< std::vector< FieldState >> &states, const std::vector< std::vector< FieldState >> ¶ms, const TimeInfo &time_info, const NonlinearBlockSolverBase *solver, const std::vector< const BoundaryConditionManager * > &bc_managers) |
| Solve a block nonlinear system of equations as defined by the vector of weak form. More... | |
| FieldState | solve (const WeakForm &residual_eval, const FieldState &shape_disp, const std::vector< FieldState > &states, const std::vector< FieldState > ¶ms, const TimeInfo &time_info, const NonlinearBlockSolverBase &solver, const DirichletBoundaryConditions &bcs, size_t unknown_state_index=0) |
| Solve a single nonlinear system of equations as defined by one weak form. More... | |
| FieldState | solve ([[maybe_unused]] const FieldState &initial_guess, const FieldState &shape_disp, const std::vector< FieldState > &weak_form_inputs, const TimeInfo &time_info, const WeakForm &residual_eval, const NonlinearBlockSolverBase &solver, const DirichletBoundaryConditions &bcs, size_t unknown_state_index=0) |
| Backward-compatible overload that accepts but ignores an explicit initial guess. | |
| auto | createParaviewWriter (const smith::Mesh &mesh, const std::vector< FieldState > &states, std::string output_name, ParaviewWriter::Options opts) |
| Creates a ParaviewWriter from a mesh, vector of FieldState, and the name of the output paraview file. File will be in directory filename/filename.pvd. | |
| auto | createParaviewWriter (const smith::Mesh &mesh, const std::vector< FieldState > &states, std::string output_name) |
| Create a ParaView writer using the default output options. More... | |
| auto | createParaviewWriter (const mfem::ParMesh &mesh, const std::vector< const FiniteElementState * > &states, std::string output_name) |
| Creates a ParaviewWriter from an mfem::ParMesh, vector of FiniteElementState pointers, and the name of the output paraview file. File will be in directory filename/filename.pvd. | |
| auto | evaluateWeakForm (const std::shared_ptr< WeakForm > &weak_form, const TimeInfo &time_info, FieldState shape_disp, const std::vector< FieldState > &field_states, FieldState field_for_residual_space) |
| gretl-function implementation which evaluates the residual force (which is minus the mechanical force) given shape displacement, states and params. The field_for_residual_space Field is only used to set the appropriate size (mfem::ParFiniteElementSpace) for the residual field so it can be returned as a ReactionState | |
| template<int dim, int order, typename DisplacementTimeRule , typename... parameter_space> | |
| SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space... > | buildSolidMechanicsSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, DisplacementTimeRule disp_time_rule, std::string prepend_name="", std::shared_ptr< CoupledSystemSolver > cycle_zero_solver=nullptr, FieldType< parameter_space >... parameter_types) |
| Factory function to build a solid dynamics system with configurable time integration. More... | |
| template<int dim, int order, typename DisplacementTimeRule , typename... parameter_space> | |
| SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space... > | buildSolidMechanicsSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, DisplacementTimeRule disp_time_rule, std::string prepend_name, FieldType< parameter_space >... parameter_types) |
| Factory function to build a solid dynamics system with a physics name and parameter fields. | |
| template<int dim, int order, typename DisplacementTimeRule , typename... parameter_space> | |
| SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space... > | buildSolidMechanicsSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, DisplacementTimeRule disp_time_rule, std::shared_ptr< CoupledSystemSolver > cycle_zero_solver, FieldType< parameter_space >... parameter_types) |
| Factory function to build a solid dynamics system (without physics name). | |
| template<int dim, int order, typename DisplacementTimeRule , typename... parameter_space> | |
| SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space... > | buildSolidMechanicsSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, DisplacementTimeRule disp_time_rule, FieldType< parameter_space >... parameter_types) |
| Factory function to build a solid dynamics system (without physics name). | |
| template<int dim, int disp_order, typename StateSpace , typename DisplacementTimeRule , typename InternalVarTimeRule , typename... parameter_space> | |
| SolidMechanicsWithInternalVarsSystem< dim, disp_order, StateSpace, DisplacementTimeRule, InternalVarTimeRule, parameter_space... > | buildSolidMechanicsWithInternalVarsSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, DisplacementTimeRule disp_rule, InternalVarTimeRule state_rule, std::string prepend_name="", std::shared_ptr< CoupledSystemSolver > cycle_zero_solver=nullptr, FieldType< parameter_space >... parameter_types) |
| Factory function to build a solid mechanics system with internal variable. More... | |
| template<int dim, int disp_order, typename StateSpace , typename DisplacementTimeRule , typename InternalVarTimeRule , typename... parameter_space> | |
| auto | buildSolidMechanicsWithInternalVarsSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, DisplacementTimeRule disp_rule, InternalVarTimeRule state_rule, std::shared_ptr< CoupledSystemSolver > cycle_zero_solver=nullptr, FieldType< parameter_space >... parameter_types) |
| Factory function to build a solid mechanics with internal vars system (without physics name). | |
| TimeInfo | create_time_info (DoubleState t, DoubleState dt, size_t cycle) |
| creates a time info struct from gretl::State<double> More... | |
| template<int dim, int temp_order, typename TemperatureTimeRule , typename... parameter_space> | |
| ThermalSystem< dim, temp_order, TemperatureTimeRule, parameter_space... > | buildThermalSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, TemperatureTimeRule temp_rule, std::string prepend_name="", FieldType< parameter_space >... parameter_types) |
| Factory function to build a thermal system. More... | |
| template<int dim, int temp_order, typename... parameter_space> | |
| auto | buildThermalSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, std::string prepend_name="", FieldType< parameter_space >... parameter_types) |
| Factory function to build a thermal system with default quasi-static rule (backward compatible). | |
| template<int dim, int disp_order, int temp_order, typename DisplacementTimeRule , typename TemperatureTimeRule , typename... parameter_space> | |
| ThermoMechanicsSystem< dim, disp_order, temp_order, DisplacementTimeRule, TemperatureTimeRule, parameter_space... > | buildThermoMechanicsSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, DisplacementTimeRule disp_rule, TemperatureTimeRule temp_rule, std::string prepend_name="", std::shared_ptr< CoupledSystemSolver > cycle_zero_solver=nullptr, FieldType< parameter_space >... parameter_types) |
| Factory function to build a thermo-mechanical system. More... | |
| template<int dim, int disp_order, int temp_order, typename DisplacementTimeRule , typename TemperatureTimeRule , typename... parameter_space> | |
| auto | buildThermoMechanicsSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, DisplacementTimeRule disp_rule, TemperatureTimeRule temp_rule, std::string prepend_name, FieldType< parameter_space >... parameter_types) |
| Factory function to build a thermo-mechanical system with a physics name and parameter fields. | |
| template<int dim, int disp_order, int temp_order, typename DisplacementTimeRule , typename TemperatureTimeRule , typename... parameter_space> | |
| auto | buildThermoMechanicsSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, DisplacementTimeRule disp_rule, TemperatureTimeRule temp_rule, std::shared_ptr< CoupledSystemSolver > cycle_zero_solver, FieldType< parameter_space >... parameter_types) |
| Factory function to build a thermo-mechanical system (without physics name). | |
| template<int dim, int disp_order, int temp_order, typename DisplacementTimeRule , typename TemperatureTimeRule , typename... parameter_space> | |
| auto | buildThermoMechanicsSystem (std::shared_ptr< Mesh > mesh, std::shared_ptr< CoupledSystemSolver > solver, DisplacementTimeRule disp_rule, TemperatureTimeRule temp_rule, FieldType< parameter_space >... parameter_types) |
| Factory function to build a thermo-mechanical system (without physics name). | |
| std::string | about () |
| Returns a string about the configuration of Smith. More... | |
| std::string | gitSHA () |
| Returns a string for the Git SHA when the driver was built. More... | |
| void | printRunInfo () |
| Outputs basic run information to the screen. More... | |
| std::string | version (bool add_SHA=true) |
| Returns a string for the version of Smith. More... | |
| std::string | compiler () |
| Returns a string for the current compiler name and version. More... | |
| std::string | buildType () |
| Returns a string for the current CMake build type (e.g. Debug, Release) More... | |
| std::pair< int, int > | getMPIInfo (MPI_Comm comm=MPI_COMM_WORLD) |
| Get MPI Info. More... | |
| template<typename T , int dim, axom::MemorySpace space> | |
| auto | view (axom::Array< T, dim, space > &arr) |
| convenience function for creating a view of an axom::Array type | |
| void | finalizer () |
| Destroy MPI, signal handling, logging, profiling, hypre, sundials, petsc, and slepc. Note this should not be called by or exposed to users. | |
| template<typename T > | |
| std::string | typeString (T &var) |
| Return string of given parameter's type. More... | |
| template<typename T > | |
| void | writeToFile (std::vector< T > v, std::string filename) |
| write an array of values out to file, in a space-separated format More... | |
| void | writeToFile (mfem::Vector v, std::string filename) |
| write an array of doubles out to file, in a space-separated format More... | |
| void | writeToFile (mfem::SparseMatrix A, std::string filename) |
| write a sparse matrix out to file More... | |
| std::ostream & | operator<< (std::ostream &out, DoF dof) |
| stream output for DoF | |
| template<typename T > | |
| void | writeToFile (axom::Array< T, 2, smith::detail::host_memory_space > arr, std::string filename) |
| write a 2D array of values out to file, in a space-separated format More... | |
| template<typename T > | |
| void | writeToFile (axom::Array< T, 3, smith::detail::host_memory_space > arr, std::string filename) |
| write a 3D array of values out to file, in a mathematica-compatible format More... | |
| template<typename T , typename T0 , typename T1 > | |
| constexpr T & | get (variant< T0, T1 > &v) |
| Returns the variant member of specified type. More... | |
| template<typename T , typename T0 , typename T1 > | |
| constexpr const T & | get (const variant< T0, T1 > &v) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename Visitor , typename Variant > | |
| constexpr decltype(auto) | visit (Visitor visitor, Variant &&v) |
| Applies a functor to the active variant element. More... | |
| template<typename T , typename T0 , typename T1 > | |
| bool | holds_alternative (const variant< T0, T1 > &v) |
| Checks whether a variant's active member is of a certain type. More... | |
| template<typename T , typename T0 , typename T1 > | |
| T * | get_if (variant< T0, T1 > *v) |
Returns the member of requested type if it's active, otherwise nullptr. More... | |
| template<typename T , typename T0 , typename T1 > | |
| const T * | get_if (const variant< T0, T1 > *v) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| mfem::Mesh | buildMeshFromFile (const std::string &mesh_file) |
| Constructs an MFEM mesh from a file. More... | |
| void | squish (mfem::Mesh &mesh) |
| a transformation from the unit disk/sphere (in L1 norm) to a unit disk/sphere (in L2 norm) More... | |
| mfem::Mesh | buildDiskMesh (int approx_number_of_elements) |
| Constructs a 2D MFEM mesh of a unit disk, centered at the origin. More... | |
| mfem::Mesh | buildBallMesh (int approx_number_of_elements) |
| Constructs a 3D MFEM mesh of a unit ball, centered at the origin. More... | |
| mfem::Mesh | buildRectangleMesh (int elements_in_x, int elements_in_y, double size_x=1., double size_y=1.) |
| Constructs a 2D MFEM mesh of a rectangle. More... | |
| mfem::Mesh | buildCuboidMesh (int elements_in_x, int elements_in_y, int elements_in_z, double size_x=1., double size_y=1., double size_z=1.) |
| Constructs a 3D MFEM mesh of a cuboid. More... | |
| mfem::Mesh | buildCylinderMesh (int radial_refinement, int elements_lengthwise, double radius, double height) |
| Constructs a 3D MFEM mesh of a cylinder. More... | |
| mfem::Mesh | buildRing (int radial_refinement, double inner_radius, double outer_radius, double total_angle, int sectors) |
| Constructs a 2D MFEM mesh of a ring. | |
| mfem::Mesh | buildRingMesh (int radial_refinement, double inner_radius, double outer_radius, double total_angle=M_PI, int sectors=8) |
| Constructs a 2D MFEM mesh of a ring. More... | |
| mfem::Mesh | buildHollowCylinderMesh (int radial_refinement, int elements_lengthwise, double inner_radius, double outer_radius, double height, double total_angle=M_PI, int sectors=8) |
| Constructs a 3D MFEM mesh of a hollow cylinder. More... | |
| mfem::Mesh | build_hollow_quarter_cylinder (std::size_t radial_divisions, std::size_t angular_divisions, std::size_t vertical_divisions, double inner_radius, double outer_radius, double height) |
| Constructs an MFEM mesh of a hollow cylinder restricted to the first orthant. More... | |
| double | matrixNorm (const mfem::HypreParMatrix &K) |
| Utility to compute the matrix norm. | |
| std::unique_ptr< mfem::HypreParMatrix > | buildMonolithicMatrix (const mfem::BlockOperator &block_operator) |
| Build a monolithic HypreParMatrix from a BlockOperator. More... | |
| std::unique_ptr< mfem::NewtonSolver > | buildNonlinearSolver (NonlinearSolverOptions nonlinear_opts, const LinearSolverOptions &linear_opts, mfem::Solver &preconditioner, MPI_Comm comm=MPI_COMM_WORLD) |
| Build a nonlinear solver using the nonlinear option struct. More... | |
| std::pair< std::unique_ptr< mfem::Solver >, std::unique_ptr< mfem::Solver > > | buildLinearSolverAndPreconditioner (LinearSolverOptions linear_opts={}, MPI_Comm comm=MPI_COMM_WORLD) |
| Build the linear solver and its associated preconditioner given a linear options struct. More... | |
| bool | requiresMonolithicOperator (const LinearSolverOptions &linear_opts) |
| Return true if the configured linear solve stack requires block operators to be merged. More... | |
| std::unique_ptr< mfem::Solver > | buildPreconditioner (LinearSolverOptions linear_opts,[[maybe_unused]] MPI_Comm comm=MPI_COMM_WORLD) |
| Build a preconditioner from the available options. More... | |
| auto | differentiate_wrt (const mfem::Vector &v) |
this function is intended to only be used in combination with smith::Functional::operator(), as a way for the user to express that it should both evaluate and differentiate w.r.t. a specific argument (only 1 argument at a time) More... | |
| template<int d> | |
| std::vector< tensor< double, d > > | gather (const mfem::Vector &coordinates, mfem::Array< int > ids) |
| gather vertex coordinates for a list of vertices More... | |
| void | findDomainDofsOnNeighborRanks (const smith::fes_t *fes, mfem::Array< int > &local_dof_ids) |
| Get local dofs that are part of a domain, but are owned by a neighboring MPI rank. More... | |
| Domain | EntireDomain (const mesh_t &mesh) |
| constructs a domain from all the elements in a mesh | |
| Domain | EntireBoundary (const mesh_t &mesh) |
| constructs a domain from all the boundary elements in a mesh | |
| Domain | EntireInteriorBoundary (const mesh_t &mesh) |
| constructs a domain from all the interior boundary elements in a mesh | |
| template<int d> | |
| Domain | domain_of_interior_boundaries (const mesh_t &mesh, std::function< bool(std::vector< tensor< double, d >>, int)> predicate) |
| constructs a domain from some subset of the interior boundary elements in a mesh | |
| void | zip (std::vector< int2 > &ab, const std::vector< int > &a, const std::vector< int > &b) |
combine a pair of arrays of ints into a single array of int2, see also: unzip() | |
| void | unzip (const std::vector< int2 > &ab, std::vector< int > &a, std::vector< int > &b) |
split an array of int2 into a pair of arrays of ints, see also: zip() | |
| template<typename T > | |
| std::vector< T > | set_operation (SET_OPERATION op, const std::vector< T > &a, const std::vector< T > &b) |
| return a std::vector that is the result of applying (a op b) | |
| Domain | set_operation (SET_OPERATION op, const Domain &a, const Domain &b) |
| return a Domain that is the result of applying (a op b) | |
| Domain | operator| (const Domain &a, const Domain &b) |
create a new domain that is the union of a and b | |
| Domain | operator& (const Domain &a, const Domain &b) |
create a new domain that is the intersection of a and b | |
| Domain | operator- (const Domain &a, const Domain &b) |
create a new domain that is the set difference of a and b | |
| template<int dim> | |
| auto | by_attr (int value) |
| convenience predicate for creating domains by attribute | |
| template<int dim> | |
| auto | by_attr (std::set< int > values) |
| convenience predicate for creating domains by a set of attributes | |
| std::array< uint32_t, mfem::Geometry::NUM_GEOMETRIES > | geometry_counts (const Domain &domain) |
| count the number of elements of each geometry in a domain More... | |
| template<int dim> | |
| tensor< double, dim > | average (std::vector< tensor< double, dim >> &positions) |
| convenience function for computing the arithmetic mean of some list of vectors | |
| template<typename T > | |
| dual (double, T) -> dual< T > | |
class template argument deduction guide for type dual. More... | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto | operator+ (dual< gradient_type > a, double b) |
| addition of a dual number and a non-dual number | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto | operator+ (double a, dual< gradient_type > b) |
| addition of a dual number and a non-dual number | |
| template<typename gradient_type_a , typename gradient_type_b > | |
| constexpr SMITH_HOST_DEVICE auto | operator+ (dual< gradient_type_a > a, dual< gradient_type_b > b) |
| addition of two dual numbers | |
| template<typename gradient_type > | |
| constexpr auto | operator- (dual< gradient_type > x) |
| unary negation of a dual number | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto | operator- (dual< gradient_type > a, double b) |
| subtraction of a non-dual number from a dual number | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto | operator- (double a, dual< gradient_type > b) |
| subtraction of a dual number from a non-dual number | |
| template<typename gradient_type_a , typename gradient_type_b > | |
| constexpr SMITH_HOST_DEVICE auto | operator- (dual< gradient_type_a > a, dual< gradient_type_b > b) |
| subtraction of two dual numbers | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto | operator* (const dual< gradient_type > &a, double b) |
| multiplication of a dual number and a non-dual number | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto | operator* (double a, const dual< gradient_type > &b) |
| multiplication of a dual number and a non-dual number | |
| template<typename gradient_type_a , typename gradient_type_b > | |
| constexpr SMITH_HOST_DEVICE auto | operator* (dual< gradient_type_a > a, dual< gradient_type_b > b) |
| multiplication of two dual numbers | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto | operator/ (const dual< gradient_type > &a, double b) |
| division of a dual number by a non-dual number | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto | operator/ (double a, const dual< gradient_type > &b) |
| division of a non-dual number by a dual number | |
| template<typename gradient_type_a , typename gradient_type_b > | |
| constexpr SMITH_HOST_DEVICE auto | operator/ (dual< gradient_type_a > a, dual< gradient_type_b > b) |
| division of two dual numbers | |
| binary_comparator_overload (<) | |
| implement operator< for dual numbers More... | |
| binary_comparator_overload (<=) | |
| implement operator<= for dual numbers | |
| binary_comparator_overload (>=) | |
| implement operator>= for dual numbers | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto & | operator+= (dual< gradient_type > &a, const dual< gradient_type > &b) |
| compound assignment (+) for dual numbers | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto & | operator-= (dual< gradient_type > &a, const dual< gradient_type > &b) |
| compound assignment (-) for dual numbers | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto & | operator+= (dual< gradient_type > &a, double b) |
compound assignment (+) for dual numbers with double righthand side | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto & | operator-= (dual< gradient_type > &a, double b) |
compound assignment (-) for dual numbers with double righthand side | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | abs (dual< gradient_type > x) |
| Implementation of absolute value function for dual numbers. More... | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | max (dual< gradient_type > a, double b) |
| Implementation of max for dual numbers. More... | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | max (double a, dual< gradient_type > b) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | max (dual< gradient_type > a, dual< gradient_type > b) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | min (dual< gradient_type > a, double b) |
| Implementation of min for dual numbers. More... | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | min (double a, dual< gradient_type > b) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | min (dual< gradient_type > a, dual< gradient_type > b) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename S , typename T > | |
| constexpr SMITH_HOST_DEVICE auto | inner (const dual< S > &A, const dual< T > &B) |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | inner (double A, const dual< T > &B) |
| template<typename S > | |
| constexpr SMITH_HOST_DEVICE auto | inner (const dual< S > &A, double B) |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | sqrt (dual< gradient_type > x) |
| implementation of square root for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | cos (dual< gradient_type > a) |
| implementation of cosine for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | sin (dual< gradient_type > a) |
| implementation of sine for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | atan (dual< gradient_type > a) |
| implementation of atan for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | atan2 (dual< gradient_type > y, dual< gradient_type > x) |
| implementation of atan2 for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | atan2 (double y, dual< gradient_type > x) |
| implementation of atan2 for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | atan2 (dual< gradient_type > y, double x) |
| implementation of atan2 for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | asin (dual< gradient_type > a) |
| implementation of asin for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | acos (dual< gradient_type > a) |
| implementation of acos for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | exp (dual< gradient_type > a) |
| implementation of exponential function for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | log (dual< gradient_type > a) |
| implementation of the natural logarithm function for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | log1p (dual< gradient_type > a) |
| implementation of the natural logarithm of one plus the argument function for dual numbers | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | pow (dual< gradient_type > a, dual< gradient_type > b) |
implementation of a (dual) raised to the b (dual) power | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | pow (double a, dual< gradient_type > b) |
implementation of a (non-dual) raised to the b (dual) power | |
| template<typename gradient_type > | |
| SMITH_HOST_DEVICE auto | pow (dual< gradient_type > a, double b) |
implementation of a (dual) raised to the b (non-dual) power | |
| template<typename T , int... n> | |
| auto & | operator<< (std::ostream &out, dual< T > A) |
overload of operator<< for dual to work with std::cout and other std::ostreams | |
| constexpr SMITH_HOST_DEVICE auto | make_dual (double x) |
| promote a value to a dual number of the appropriate type | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | get_value (const T &arg) |
| return the "value" part from a given type. For non-dual types, this is just the identity function | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | get_value (dual< T > arg) |
| return the "value" part from a dual number type | |
| template<typename gradient_type > | |
| constexpr SMITH_HOST_DEVICE auto | get_gradient (dual< gradient_type > arg) |
| return the "gradient" part from a dual number type | |
| template<mfem::Geometry::Type g> | |
| constexpr SMITH_HOST_DEVICE int | elements_per_block (int q) |
| this function returns information about how many elements should be processed by a single thread block in CUDA (note: the optimal values are hardware and problem specific, but these values are still significantly faster than naively allocating only 1 element / block) More... | |
| template<Family f, typename T , int q, int dim> | |
| SMITH_HOST_DEVICE void | parent_to_physical (tensor< T, q > &qf_input, const tensor< double, dim, dim, q > &jacobians) |
| transform information in the parent space (i.e. values and derivatives w.r.t {xi, eta, zeta}) into the physical space (i.e. values and derivatives w.r.t. {x, y, z}) More... | |
| template<Family f, typename T , int q, int dim> | |
| SMITH_HOST_DEVICE void | physical_to_parent (tensor< T, q > &qf_output, const tensor< double, dim, dim, q > &jacobians) |
| transform information in the physical space (i.e. sources and fluxes w.r.t {x, y, z}) back to the parent space (i.e. values and derivatives w.r.t. {xi, eta, zeta}). Note: this also multiplies by the outputs by the determinant of the quadrature point Jacobian. More... | |
| template<typename... T> | |
| constexpr uint32_t | index_of_differentiation () |
given a list of types, this function returns the index that corresponds to the type dual_vector. More... | |
| void | check_for_missing_nodal_gridfunc (const mfem::Mesh &mesh) |
| function for verifying that the mesh has been fully initialized | |
| void | check_for_unsupported_elements (const mfem::Mesh &mesh) |
| function for verifying that there are no unsupported element types in the mesh | |
| template<typename function_space > | |
| std::pair< std::unique_ptr< mfem::ParFiniteElementSpace >, std::unique_ptr< mfem::FiniteElementCollection > > | generateParFiniteElementSpace (mfem::ParMesh *mesh) |
| create an mfem::ParFiniteElementSpace from one of Smith's tag types: H1, Hcurl, L2 More... | |
| void | updateFaceNbrData (const mfem::ParFiniteElementSpace *const_trial_space, mfem::ParGridFunction &trial_pgf, mfem::Vector &trial_tdof_vals) |
| helper function to locally cast away const on FE space so we can update face neighbor data with ExchangeFaceNbrData. This is ok because : 1) the original trial FE space is declared without const; 2) we constrained the non-constness locally; 3) the locally owned data associated with the trial function space is NOT altered and ONLY ghost data is updated. | |
| void | appendFaceNbrData (const mfem::ParFiniteElementSpace *trial_space, const mfem::ParGridFunction &trial_pgf, const int LSize, mfem::Vector &input_L) |
| helper functional to reorder the ordering of FaceNbrData for L2 space to byVDIM and append this vector to the end of local dof vector, which will result in a vector in form [ — L — | — FND — ] | |
| void | rearrangeFaceNbrDofGlobalIndex (const mfem::ParFiniteElementSpace *trial_space, mfem::Array< HYPRE_BigInt > &face_nbr_glob_vdof_map) |
| helper functional to reorder the face_nbr_glob_dof_map for L2 space to byVDIM | |
| template<int Q, mfem::Geometry::Type geom, typename function_space > | |
| void | compute_geometric_factors (mfem::Vector &positions_q, mfem::Vector &jacobians_q, const mfem::Vector &positions_e, const std::vector< int > &elements) |
| a kernel to compute the positions and jacobians at each quadrature point (mfem calls this "geometric factors") More... | |
| constexpr int | num_quadrature_points (mfem::Geometry::Type g, int Q) |
| return the number of quadrature points in a Gauss-Legendre rule with parameter "Q" More... | |
| constexpr int | dimension_of (mfem::Geometry::Type g) |
| Returns the dimension of an element geometry. More... | |
| std::array< uint32_t, mfem::Geometry::NUM_GEOMETRIES > | geometry_counts (const mfem::Mesh &mesh) |
| count the number of elements of each geometry in a mesh More... | |
| std::array< uint32_t, mfem::Geometry::NUM_GEOMETRIES > | boundary_geometry_counts (const mfem::Mesh &mesh) |
| count the number of boundary elements of each geometry in a mesh More... | |
| template<mfem::Geometry::Type geom, int Q, typename test , typename... trials, typename lambda_type , typename qpt_data_type > | |
| void | generate_kernels (FunctionSignature< test(trials...)> s, Integral &integral, const lambda_type &qf, std::shared_ptr< QuadratureData< qpt_data_type > > qdata) |
function to generate kernels held by an Integral object of type "Domain", with a specific element type More... | |
| template<typename s , int Q, int dim, typename lambda_type , typename qpt_data_type > | |
| Integral | MakeDomainIntegral (const Domain &domain, const lambda_type &qf, std::shared_ptr< QuadratureData< qpt_data_type > > qdata, std::vector< uint32_t > argument_indices) |
function to generate kernels held by an Integral object of type "Domain", for all element types More... | |
| template<mfem::Geometry::Type geom, int Q, typename test , typename... trials, typename lambda_type > | |
| void | generate_bdr_kernels (FunctionSignature< test(trials...)> s, Integral &integral, const lambda_type &qf) |
function to generate kernels held by an Integral object of type "BoundaryDomain", with a specific element type More... | |
| template<typename s , int Q, int dim, typename lambda_type > | |
| Integral | MakeBoundaryIntegral (const Domain &domain, const lambda_type &qf, std::vector< uint32_t > argument_indices) |
function to generate kernels held by an Integral object of type "Boundary", for all element types More... | |
| template<mfem::Geometry::Type geom, int Q, typename test , typename... trials, typename lambda_type > | |
| void | generate_interior_face_kernels (FunctionSignature< test(trials...)> s, Integral &integral, const lambda_type &qf) |
function to generate kernels held by an Integral object of type "InteriorFaceDomain", with a specific element type More... | |
| template<typename s , int Q, int dim, typename lambda_type > | |
| Integral | MakeInteriorFaceIntegral (const Domain &domain, const lambda_type &qf, std::vector< uint32_t > argument_indices) |
function to generate kernels held by an Integral object of type "Boundary", for all element types More... | |
| template<int m> | |
| constexpr SMITH_HOST_DEVICE isotropic_tensor< double, m, m > | Identity () |
| return the identity matrix of the specified size More... | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator* (S scale, isotropic_tensor< T, m, m > I) |
| scalar multiplication More... | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator* (isotropic_tensor< T, m, m > I, S scale) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator+ (isotropic_tensor< S, m, m > I1, isotropic_tensor< T, m, m > I2) |
| addition of isotropic tensors More... | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator- (isotropic_tensor< S, m, m > I1, isotropic_tensor< T, m, m > I2) |
| difference of isotropic tensors More... | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator+ (const isotropic_tensor< S, m, m > &I, const tensor< T, m, m > &A) |
| sum of isotropic and (nonisotropic) tensor More... | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator+ (const tensor< S, m, m > &A, const isotropic_tensor< T, m, m > &I) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator- (const isotropic_tensor< S, m, m > &I, const tensor< T, m, m > &A) |
| difference of isotropic and (nonisotropic) tensor More... | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator- (const tensor< S, m, m > &A, const isotropic_tensor< T, m, m > &I) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename S , typename T , int m, int... n> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const isotropic_tensor< S, m, m > &I, const tensor< T, m, n... > &A) |
| dot product between an isotropic and (nonisotropic) tensor More... | |
| template<typename S , typename T , int m, int... n> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, n... > &A, isotropic_tensor< T, m, m > I) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | double_dot (const isotropic_tensor< S, m, m > &I, const tensor< T, m, m > &A) |
| double-dot product between an isotropic and (nonisotropic) tensor More... | |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | sym (const isotropic_tensor< T, m, m > &I) |
| return the symmetric part of an isotropic tensor More... | |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | antisym (const isotropic_tensor< T, m, m > &) |
| return the antisymmetric part of an isotropic tensor More... | |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | tr (const isotropic_tensor< T, m, m > &I) |
| calculate the trace of an isotropic tensor More... | |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | transpose (const isotropic_tensor< T, m, m > &I) |
| return the transpose of an isotropic tensor More... | |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | inv (const isotropic_tensor< T, m, m > &I) |
| return the inverse of an isotropic tensor More... | |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | det (const isotropic_tensor< T, m, m > &I) |
| compute the determinant of an isotropic tensor More... | |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | norm (const isotropic_tensor< T, m, m > &I) |
| compute the Frobenius norm (sqrt(tr(dot(transpose(I), I)))) of an isotropic tensor More... | |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | squared_norm (const isotropic_tensor< T, m, m > &I) |
| compute the squared Frobenius norm (tr(dot(transpose(I), I))) of an isotropic tensor More... | |
| template<int m> | |
| constexpr SMITH_HOST_DEVICE auto | SymmetricIdentity () |
| a helper function for creating the rank-4 isotropic tensor defined by: d(sym(A)_{ij}) / d(A_{kl}) More... | |
| template<int m> | |
| constexpr SMITH_HOST_DEVICE auto | AntisymmetricIdentity () |
| a helper function for creating the rank-4 isotropic tensor defined by: d(antisym(A)_{ij}) / d(A_{kl}) More... | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator* (S scale, isotropic_tensor< T, m, m, m, m > I) |
| scalar multiplication More... | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator* (isotropic_tensor< S, m, m, m, m > I, T scale) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator+ (isotropic_tensor< S, m, m, m, m > I1, isotropic_tensor< T, m, m, m, m > I2) |
| addition of isotropic tensors More... | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | operator- (isotropic_tensor< S, m, m, m, m > I1, isotropic_tensor< T, m, m, m, m > I2) |
| difference of isotropic tensors More... | |
| template<typename S , typename T , int m, int... n> | |
| constexpr SMITH_HOST_DEVICE auto | double_dot (const isotropic_tensor< S, m, m, m, m > &I, const tensor< T, m, m, n... > &A) |
| double-dot product between an isotropic and (nonisotropic) tensor More... | |
| template<int n, typename T = double> | |
| constexpr SMITH_HOST_DEVICE tensor< T, n > | GaussLobattoNodes (T a=T(0), T b=T(1)) |
| The positions (in 1D space) of Gauss-Lobatto points. More... | |
| template<int n, mfem::Geometry::Type geom> | |
| constexpr SMITH_HOST_DEVICE auto | GaussLegendreNodes () |
| The positions of Gauss-Legendre points for different geometries. More... | |
| template<int n, mfem::Geometry::Type geom> | |
| constexpr SMITH_HOST_DEVICE auto | GaussLegendreWeights () |
| The weights associated with each Gauss-Legendre point. More... | |
| constexpr SMITH_HOST_DEVICE int | factorial (int n) |
| compute n! More... | |
| template<int n, typename T > | |
| constexpr SMITH_HOST_DEVICE tensor< T, n > | powers (T x) |
| compute the first n powers of x More... | |
| template<int n, typename S > | |
| constexpr SMITH_HOST_DEVICE tensor< S, n > | ChebyshevT (S x) |
| Chebyshev polynomials of the first kind Satisfying: T_n(cos(t)) == cos(n*t) More... | |
| template<int n, typename T > | |
| SMITH_HOST_DEVICE tensor< T, n > | ChebyshevU (T x) |
| Chebyshev polynomials of the second kind Satisfying: sin(t) U_n(cos(t)) == sin((n+1)*t) More... | |
| template<int n, typename T > | |
| SMITH_HOST_DEVICE tensor< T, n > | Legendre (T x) |
| Legendre Polynomials, orthogonal on the domain (-1, 1) with unit weight function. More... | |
| template<int n, typename T > | |
| SMITH_HOST_DEVICE tensor< T, n > | Bernstein (T s) |
| Bernstein Polynomials on the domain [0, 1]. More... | |
| template<int n, typename T > | |
| constexpr SMITH_HOST_DEVICE tensor< T, n > | GaussLobattoInterpolation ([[maybe_unused]] T x) |
| Lagrange Interpolating polynomials for nodes at Gauss-Lobatto points on the interval [0, 1]. More... | |
| template<int n, typename T > | |
| constexpr SMITH_HOST_DEVICE tensor< T, n > | GaussLobattoInterpolationDerivative ([[maybe_unused]] T x) |
| Derivatives of the Lagrange Interpolating polynomials for nodes at Gauss-Lobatto points on the interval [0, 1]. More... | |
| template<int n, typename T > | |
| constexpr SMITH_HOST_DEVICE tensor< T, n > | GaussLegendreInterpolation ([[maybe_unused]] T x) |
| Lagrange Interpolating polynomials for nodes at Gauss-Legendre points on the interval [0, 1]. More... | |
| template<int n, typename T > | |
| constexpr SMITH_HOST_DEVICE tensor< T, n > | GaussLegendreInterpolationDerivative ([[maybe_unused]] T x) |
| Derivatives of the Lagrange Interpolating polynomials for nodes at Gauss-Legendre points on the interval [-1, 1]. More... | |
| template<mfem::Geometry::Type g, int Q> | |
| constexpr SMITH_HOST_DEVICE auto | GaussQuadratureRule () |
| Returns the Gauss-Legendre quadrature rule for an element and order. More... | |
| template<typename T , int n1> | |
| tensor (const T(&data)[n1]) -> tensor< T, n1 > | |
class template argument deduction guide for type tensor. More... | |
| template<typename T , int n1, int n2> | |
| tensor (const T(&data)[n1][n2]) -> tensor< T, n1, n2 > | |
class template argument deduction guide for type tensor. More... | |
| constexpr SMITH_HOST_DEVICE auto | operator+ (zero, zero) |
the sum of two zeros is zero | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | operator+ (zero, T other) |
the sum of zero with something non-zero just returns the other value | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | operator+ (T other, zero) |
the sum of zero with something non-zero just returns the other value | |
| constexpr SMITH_HOST_DEVICE auto | operator- (zero) |
the unary negation of zero is zero | |
| constexpr SMITH_HOST_DEVICE auto | operator- (zero, zero) |
the difference of two zeros is zero | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | operator- (zero, T other) |
the difference of zero with something else is the unary negation of the other thing | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | operator- (T other, zero) |
the difference of something else with zero is the other thing itself | |
| constexpr SMITH_HOST_DEVICE auto | operator* (zero, zero) |
the product of two zeros is zero | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | operator* (zero, T) |
the product zero with something else is also zero | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | operator* (T, zero) |
the product zero with something else is also zero | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | operator/ (zero, T) |
zero divided by something is zero | |
| template<typename T > | |
| void | operator/ (T, zero) |
| Get a human-readable compiler error when you try to divide by zero. | |
| constexpr SMITH_HOST_DEVICE auto | operator+= (zero, zero) |
zero plus zero is zero | |
| constexpr SMITH_HOST_DEVICE auto | operator-= (zero, zero) |
zero minus zero is zero | |
| template<int i> | |
| SMITH_HOST_DEVICE zero & | get (zero &x) |
let zero be accessed like a tuple | |
| template<int i> | |
| SMITH_HOST_DEVICE zero | get (const zero &) |
let zero be accessed like a tuple | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE zero | dot (const T &, zero) |
the dot product of anything with zero is zero | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE zero | dot (zero, const T &) |
the dot product of anything with zero is zero | |
| template<typename T , int m, int... n> | |
| SMITH_HOST_DEVICE consteval int | first_dim (const tensor< T, m, n... > &) |
| return the size of the leftmost tensor dimension | |
| template<typename T , int... n> | |
| constexpr SMITH_HOST_DEVICE auto | tensor_with_shape (std::integer_sequence< int, n... >) |
Creates a tensor given the dimensions in a std::integer_sequence. More... | |
| template<typename lambda_type > | |
| SMITH_SUPPRESS_NVCC_HOSTDEVICE_WARNING constexpr SMITH_HOST_DEVICE auto | make_tensor (lambda_type f) |
Creates a tensor of requested dimension by subsequent calls to a functor Can be thought of as analogous to std::transform in that the set of possible indices for dimensions n are transformed into the values of the tensor by f. More... | |
| template<int n1, typename lambda_type > | |
| SMITH_SUPPRESS_NVCC_HOSTDEVICE_WARNING constexpr SMITH_HOST_DEVICE auto | make_tensor (lambda_type f) |
| Creates a tensor of requested dimension by subsequent calls to a functor. More... | |
| template<int n1, int n2, typename lambda_type > | |
| SMITH_SUPPRESS_NVCC_HOSTDEVICE_WARNING constexpr SMITH_HOST_DEVICE auto | make_tensor (lambda_type f) |
| Creates a tensor of requested dimension by subsequent calls to a functor. More... | |
| template<int n1, int n2, int n3, typename lambda_type > | |
| SMITH_SUPPRESS_NVCC_HOSTDEVICE_WARNING constexpr SMITH_HOST_DEVICE auto | make_tensor (lambda_type f) |
| Creates a tensor of requested dimension by subsequent calls to a functor. More... | |
| template<int n1, int n2, int n3, int n4, typename lambda_type > | |
| SMITH_SUPPRESS_NVCC_HOSTDEVICE_WARNING constexpr SMITH_HOST_DEVICE auto | make_tensor (lambda_type f) |
| Creates a tensor of requested dimension by subsequent calls to a functor. More... | |
| template<typename S , typename T , int m, int... n> | |
| constexpr SMITH_HOST_DEVICE auto | operator+ (const tensor< S, m, n... > &A, const tensor< T, m, n... > &B) |
| return the sum of two tensors More... | |
| template<typename T , int m, int... n> | |
| constexpr SMITH_HOST_DEVICE auto | operator- (const tensor< T, m, n... > &A) |
| return the unary negation of a tensor More... | |
| template<typename S , typename T , int m, int... n> | |
| constexpr SMITH_HOST_DEVICE auto | operator- (const tensor< S, m, n... > &A, const tensor< T, m, n... > &B) |
| return the difference of two tensors More... | |
| template<typename S , typename T , int m, int... n> | |
| constexpr SMITH_HOST_DEVICE auto & | operator+= (tensor< S, m, n... > &A, const tensor< T, m, n... > &B) |
| compound assignment (+) on tensors More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto & | operator+= (tensor< T, n, 1 > &A, const tensor< T, n > &B) |
| compound assignment (+) on tensors More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto & | operator+= (tensor< T, 1, n > &A, const tensor< T, n > &B) |
| compound assignment (+) on tensors More... | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto & | operator+= (tensor< T, 1 > &A, const T &B) |
| compound assignment (+) on tensors More... | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto & | operator+= (tensor< T, 1, 1 > &A, const T &B) |
| compound assignment (+) on tensors More... | |
| template<typename T , int... n> | |
| constexpr SMITH_HOST_DEVICE auto & | operator+= (tensor< T, n... > &A, zero) |
| compound assignment (+) between a tensor and zero (no-op) More... | |
| template<typename S , typename T , int m, int... n> | |
| constexpr SMITH_HOST_DEVICE auto & | operator-= (tensor< S, m, n... > &A, const tensor< T, m, n... > &B) |
| compound assignment (-) on tensors More... | |
| template<typename T , int... n> | |
| constexpr SMITH_HOST_DEVICE auto & | operator-= (tensor< T, n... > &A, zero) |
| compound assignment (-) between a tensor and zero (no-op) More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto | outer (double A, tensor< T, n > B) |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | outer (const tensor< T, m > &A, double B) |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto | outer (zero, const tensor< T, n > &) |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto | outer (const tensor< T, n > &, zero) |
| template<typename S , typename T , int m, int n> | |
| constexpr SMITH_HOST_DEVICE auto | outer (const tensor< S, m > &A, const tensor< T, n > &B) |
| template<typename S , typename T , int m, int n> | |
| constexpr SMITH_HOST_DEVICE auto | inner (const tensor< S, m, n > &A, const tensor< T, m, n > &B) |
| this function contracts over all indices of the two tensor arguments More... | |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | inner (const tensor< S, m > &A, const tensor< T, m > &B) |
| constexpr SMITH_HOST_DEVICE auto | inner (double A, double B) |
| template<typename S , int m, int n> | |
| constexpr SMITH_HOST_DEVICE auto | inner (const tensor< S, m, n > &, zero) |
| this function contracts over all indices of the two tensor arguments More... | |
| template<typename S , int m> | |
| constexpr SMITH_HOST_DEVICE auto | inner (const tensor< S, m > &, zero) |
| constexpr SMITH_HOST_DEVICE auto | inner (double, zero) |
| template<typename T , int m, int n> | |
| constexpr SMITH_HOST_DEVICE auto | inner (zero, const tensor< T, m, n > &) |
| this function contracts over all indices of the two tensor arguments More... | |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | inner (zero, const tensor< T, m > &) |
| constexpr SMITH_HOST_DEVICE auto | inner (zero, double) |
| template<typename S , typename T , int m, int n, int p> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, m, n > &A, const tensor< T, n, p > &B) |
| this function contracts over the "middle" index of the two tensor arguments More... | |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< T, m > &A, double B) |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | dot (double B, const tensor< T, m > &A) |
| template<typename S , typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, m > &A, const tensor< T, m > &B) |
| template<typename S , typename T , int m, int n> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, m > &A, const tensor< T, m, n > &B) |
| template<typename S , typename T , int m, int n, int p> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, m > &A, const tensor< T, m, n, p > &B) |
| template<typename S , typename T , int m, int n, int p, int q> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, m > &A, const tensor< T, m, n, p, q > &B) |
| template<typename S , typename T , int m, int n> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, m, n > &A, const tensor< T, n > &B) |
| template<typename S , typename T , int m, int n, int p, int q, int r> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, m, n > &A, const tensor< T, n, p, q, r > &B) |
| template<typename S , typename T , int m, int n, int p, int q> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, m, n > &A, const tensor< T, n, p, q > &B) |
| template<typename S , typename T , int m, int n, int p> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, m, n, p > &A, const tensor< T, p > &B) |
| template<typename S , typename T , typename U , int m, int n> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, m > &u, const tensor< T, m, n > &A, const tensor< U, n > &v) |
| template<typename S , typename T , int m, int n, int p, int q> | |
| constexpr SMITH_HOST_DEVICE auto | dot (const tensor< S, m, n, p, q > &A, const tensor< T, q > &B) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename T > | |
| SMITH_HOST_DEVICE auto | cross (const tensor< T, 3, 2 > &A) |
| compute the cross product of the columns of A: A(:,1) x A(:,2) | |
| template<typename T > | |
| SMITH_HOST_DEVICE auto | cross (const tensor< T, 2, 1 > &v) |
| return the in-plane components of the cross product of {v[0], v[1], 0} x {0, 0, 1} | |
| template<typename T > | |
| SMITH_HOST_DEVICE auto | cross (const tensor< T, 2 > &v) |
| return the in-plane components of the cross product of {v[0], v[1], 0} x {0, 0, 1} | |
| template<typename S , typename T > | |
| SMITH_HOST_DEVICE auto | cross (const tensor< S, 3 > &u, const tensor< T, 3 > &v) |
| compute the (right handed) cross product of two 3-vectors | |
| template<typename S , typename T , int m, int n, int p, int q> | |
| constexpr SMITH_HOST_DEVICE auto | double_dot (const tensor< S, m, n, p, q > &A, const tensor< T, p, q > &B) |
| double dot product, contracting over the two "middle" indices More... | |
| template<typename S , typename T , int m, int n, int p> | |
| constexpr SMITH_HOST_DEVICE auto | double_dot (const tensor< S, m, n, p > &A, const tensor< T, n, p > &B) |
| template<typename S , typename T , int m, int n> | |
| constexpr auto | double_dot (const tensor< S, m, n > &A, const tensor< T, m, n > &B) |
| template<typename S , typename T , int... m, int... n> | |
| constexpr SMITH_HOST_DEVICE auto | operator* (const tensor< S, m... > &A, const tensor< T, n... > &B) |
| this is a shorthand for dot(A, B) | |
| template<typename T , int m> | |
| constexpr SMITH_HOST_DEVICE auto | squared_norm (const tensor< T, m > &A) |
| Returns the squared Frobenius norm of the tensor. More... | |
| template<typename T , int m, int n> | |
| constexpr SMITH_HOST_DEVICE auto | squared_norm (const tensor< T, m, n > &A) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename T , int... n> | |
| constexpr SMITH_HOST_DEVICE auto | squared_norm (const tensor< T, n... > &A) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename T , int... n> | |
| SMITH_HOST_DEVICE auto | norm (const tensor< T, n... > &A) |
| Returns the Frobenius norm of the tensor. More... | |
| constexpr SMITH_HOST_DEVICE auto | norm (zero) |
| overload of Frobenius norm for zero type | |
| template<typename T , int... n> | |
| SMITH_HOST_DEVICE auto | normalize (const tensor< T, n... > &A) |
| Normalizes the tensor Each element is divided by the Frobenius norm of the tensor,. More... | |
| template<typename T > | |
| SMITH_HOST_DEVICE tensor< T, 3, 3 > | to_3x3 (const tensor< T, 2, 2 > &A) |
| promotes a 2x2 matrix to a 3x3 matrix, by populating the upper left block, leaving zeroes in the third row / column More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto | tr (const tensor< T, n, n > &A) |
| Returns the trace of a square matrix. More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto | sym (const tensor< T, n, n > &A) |
| Returns the symmetric part of a square matrix. More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto | antisym (const tensor< T, n, n > &A) |
| Returns the antisymmetric part of a square matrix. More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto | dev (const tensor< T, n, n > &A) |
| Calculates the deviator of a matrix (rank-2 tensor) More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto | diagonal_matrix (const tensor< T, n, n > &A) |
| Returns a square matrix (rank-2 tensor) containing the diagonal entries of the input square matrix with zeros in the off-diagonal positions. More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE tensor< T, n, n > | diag (const tensor< T, n > &d) |
| Returns a square diagonal matrix by specifying the diagonal entries. More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE tensor< T, n > | diag (const tensor< T, n, n > &D) |
| Returns an array containing the diagonal entries of a square matrix. More... | |
| template<int dim> | |
| constexpr SMITH_HOST_DEVICE tensor< double, dim, dim > | DenseIdentity () |
| Obtains the identity matrix of the specified dimension. More... | |
| template<typename T , int m, int n> | |
| constexpr SMITH_HOST_DEVICE auto | transpose (const tensor< T, m, n > &A) |
| Returns the transpose of the matrix. More... | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | I2 (const tensor< T, 3, 3 > &A) |
| Returns the second invariant of a 3x3 matrix. More... | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | det (const tensor< T, 2, 2 > &A) |
| Returns the determinant of a matrix. More... | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | det (const tensor< T, 3, 3 > &A) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | detApIm1 (const tensor< T, 2, 2 > &A) |
| computes det(A + I) - 1, where precision is not lost when the entries A_{ij} << 1 More... | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | detApIm1 (const tensor< T, 3, 3 > &A) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename T , int dim> | |
| auto | matrix_sqrt (const tensor< T, dim, dim > &A) |
| compute the matrix square root of a square, real-valued, symmetric matrix i.e. given A, find B such that A = dot(B, B) More... | |
| template<int i1, int i2, typename S , int m, int... n, typename T , int p, int q> | |
| SMITH_HOST_DEVICE auto | contract (const tensor< S, m, n... > &A, const tensor< T, p, q > &B) |
| a convenience function that computes a dot product between two tensor, but that allows the user to specify which indices should be summed over. For example: More... | |
| template<int i1, int i2, typename T > | |
| SMITH_HOST_DEVICE auto | contract (const zero &, const T &) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename T , int... n> | |
| double | relative_error (tensor< T, n... > A, tensor< T, n... > B) |
| computes the relative error (in the frobenius norm) between two tensors of the same shape More... | |
| template<int n> | |
| SMITH_HOST_DEVICE bool | is_symmetric (tensor< double, n, n > A, double tolerance=1.0e-8) |
| Return whether a square rank 2 tensor is symmetric. More... | |
| SMITH_HOST_DEVICE bool | is_symmetric_and_positive_definite (tensor< double, 2, 2 > A) |
| Return whether a matrix is symmetric and positive definite This check uses Sylvester's criterion, checking that each upper left subtensor has a determinant greater than zero. More... | |
| SMITH_HOST_DEVICE bool | is_symmetric_and_positive_definite (tensor< double, 3, 3 > A) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename T , int n, int... m> | |
| constexpr SMITH_HOST_DEVICE auto | solve_lower_triangular (const tensor< T, n, n > &L, const tensor< T, n, m... > &b, const tensor< int, n > &P) |
| Solves a lower triangular system Ly = b. More... | |
| template<typename T , int n, int... m> | |
| constexpr SMITH_HOST_DEVICE auto | solve_lower_triangular (const tensor< T, n, n > &L, const tensor< T, n, m... > &b) |
| template<typename T , int n, int... m> | |
| constexpr SMITH_HOST_DEVICE auto | solve_upper_triangular (const tensor< T, n, n > &U, const tensor< T, n, m... > &y) |
| Solves an upper triangular system Ux = y. More... | |
| template<typename S , typename T , int n, int... m> | |
| constexpr SMITH_HOST_DEVICE auto | linear_solve (const LuFactorization< S, n > &lu_factors, const tensor< T, n, m... > &b) |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto | linear_solve (const LuFactorization< T, n > &, const zero) |
| constexpr SMITH_HOST_DEVICE tensor< double, 2, 2 > | inv (const tensor< double, 2, 2 > &A) |
| Inverts a matrix. More... | |
| constexpr SMITH_HOST_DEVICE tensor< double, 3, 3 > | inv (const tensor< double, 3, 3 > &A) |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto | inv (const tensor< T, n, n > &A) |
| template<typename T , int m, int... n> | |
| auto & | operator<< (std::ostream &out, const tensor< T, m, n... > &A) |
| recursively serialize the entries in a tensor to an ostream. Output format uses braces and comma separators to mimic C syntax for multidimensional array initialization. More... | |
| auto & | operator<< (std::ostream &out, zero) |
| Write a zero out to an output stream. More... | |
| SMITH_HOST_DEVICE void | print (double value) |
print a double using printf, so that it is suitable for use inside cuda kernels. (used in final recursion of printf(tensor<...>)) More... | |
| template<int m, int... n> | |
| SMITH_HOST_DEVICE void | print (const tensor< double, m, n... > &A) |
print a tensor using printf, so that it is suitable for use inside cuda kernels. More... | |
| template<int n> | |
| constexpr SMITH_HOST_DEVICE auto | chop (const tensor< double, n > &A) |
| replace all entries in a tensor satisfying |x| < 1.0e-10 by literal zero More... | |
| template<int m, int n> | |
| constexpr SMITH_HOST_DEVICE auto | chop (const tensor< double, m, n > &A) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| SMITH_HOST_DEVICE auto | get_gradient (double) |
| Retrieves the gradient component of a double (which is nothing) More... | |
| template<int... n> | |
| constexpr SMITH_HOST_DEVICE auto | get_gradient (const tensor< double, n... > &) |
get the gradient of type tensor (note: since its stored type is not a dual number, the derivative term is identically zero) More... | |
| constexpr SMITH_HOST_DEVICE auto | chain_rule (const zero, const zero) |
| evaluate the change (to first order) in a function, f, given a small change in the input argument, dx. | |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | chain_rule (const zero, const T) |
| template<typename T > | |
| constexpr SMITH_HOST_DEVICE auto | chain_rule (const T, const zero) |
| constexpr SMITH_HOST_DEVICE auto | chain_rule (const double df_dx, const double dx) |
| template<int... n> | |
| constexpr SMITH_HOST_DEVICE auto | chain_rule (const tensor< double, n... > &df_dx, const double dx) |
| template<int... n> | |
| constexpr SMITH_HOST_DEVICE auto | chain_rule (const tensor< double, n... > &df_dx, const tensor< double, n... > &dx) |
| template<int m, int... n> | |
| constexpr SMITH_HOST_DEVICE auto | chain_rule (const tensor< double, m, n... > &df_dx, const tensor< double, n... > &dx) |
| template<int m, int n, int... p> | |
| SMITH_HOST_DEVICE auto | chain_rule (const tensor< double, m, n, p... > &df_dx, const tensor< double, p... > &dx) |
| template<typename T , int... n> | |
| constexpr SMITH_HOST_DEVICE int | size (const tensor< T, n... > &) |
| returns the total number of stored values in a tensor More... | |
| constexpr SMITH_HOST_DEVICE int | size (const double &) |
overload of size() for double, we say a double "stores" 1 value More... | |
| constexpr SMITH_HOST_DEVICE int | size (zero) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<int i, typename T , int... n> | |
| constexpr SMITH_HOST_DEVICE int | dimension (const tensor< T, n... > &) |
| a function for querying the ith dimension of a tensor More... | |
| template<typename T , int m, int... n> | |
| constexpr SMITH_HOST_DEVICE int | leading_dimension (tensor< T, m, n... >) |
| a function for querying the first dimension of a tensor More... | |
| template<typename T , int... n> | |
| bool | isnan (const tensor< T, n... > &A) |
returns true if any entry of a tensor is nan | |
| bool | isnan (const zero &) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename S , typename T , int m, int... n, typename = std::enable_if_t<std::is_arithmetic_v<S> || is_dual_number<S>::value>> | |
| constexpr SMITH_HOST_DEVICE auto | operator* (S scale, const tensor< T, m, n... > &A) |
| multiply a tensor by a scalar value More... | |
| template<typename S , typename T , int m, int... n, typename = std::enable_if_t<std::is_arithmetic_v<S> || is_dual_number<S>::value>> | |
| constexpr SMITH_HOST_DEVICE auto | operator* (const tensor< T, m, n... > &A, S scale) |
| multiply a tensor by a scalar value More... | |
| template<typename S , typename T , int m, int... n, typename = std::enable_if_t<std::is_arithmetic_v<S> || is_dual_number<S>::value>> | |
| constexpr SMITH_HOST_DEVICE auto | operator/ (S scale, const tensor< T, m, n... > &A) |
| divide a scalar by each element in a tensor More... | |
| template<typename S , typename T , int m, int... n, typename = std::enable_if_t<std::is_arithmetic_v<S> || is_dual_number<S>::value>> | |
| constexpr SMITH_HOST_DEVICE auto | operator/ (const tensor< T, m, n... > &A, S scale) |
| divide a tensor by a scalar More... | |
| template<int i, int N> | |
| constexpr SMITH_HOST_DEVICE auto | make_dual_helper (zero) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<int i, int N> | |
| constexpr SMITH_HOST_DEVICE auto | make_dual_helper (double arg) |
| promote a double value to dual number with a one_hot_t< i, N, double > gradient type More... | |
| template<int i, int N, typename T , int... n> | |
| constexpr SMITH_HOST_DEVICE auto | make_dual_helper (const tensor< T, n... > &arg) |
| promote a tensor value to dual number with a one_hot_t< i, N, tensor > gradient type More... | |
| template<typename T0 , typename T1 > | |
| constexpr SMITH_HOST_DEVICE auto | make_dual (const tuple< T0, T1 > &args) |
| Promote a tuple of values to their corresponding dual types. More... | |
| template<typename T0 , typename T1 , typename T2 > | |
| constexpr SMITH_HOST_DEVICE auto | make_dual (const tuple< T0, T1, T2 > &args) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<bool dualify, typename T > | |
| SMITH_HOST_DEVICE auto | promote_to_dual_when (const T &x) |
| a function that optionally (decided at compile time) converts a value to its dual type More... | |
| template<bool dualify, typename T , int n> | |
| SMITH_HOST_DEVICE auto | promote_each_to_dual_when (const tensor< T, n > &x) |
| a function that optionally (decided at compile time) converts a list of values to their dual types More... | |
| template<int n, typename... T, int... i> | |
| constexpr SMITH_HOST_DEVICE auto | make_dual_helper (const smith::tuple< T... > &args, std::integer_sequence< int, i... >) |
layer of indirection required to implement make_dual_wrt | |
| template<int n, typename... T> | |
| constexpr auto | make_dual_wrt (const smith::tuple< T... > &args) |
take a tuple of values, and promote the nth one to a one-hot dual number of the appropriate type More... | |
| template<typename... T> | |
| SMITH_HOST_DEVICE auto | get_value (const smith::tuple< T... > &tuple_of_values) |
| Retrieves the value components of a set of (possibly dual) numbers. More... | |
| template<typename T1 , typename T2 , int n> | |
| SMITH_HOST_DEVICE auto | get_value (const tensor< tuple< T1, T2 >, n > &input) |
| Extracts all of the values from a tensor of dual numbers. More... | |
| template<typename... T> | |
| SMITH_HOST_DEVICE auto | get_gradient (dual< smith::tuple< T... >> arg) |
| Retrieves the gradient components of a set of dual numbers. More... | |
| template<typename... T, int... n> | |
| SMITH_HOST_DEVICE auto | get_gradient (const tensor< dual< smith::tuple< T... >>, n... > &arg) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename... T> | |
| SMITH_HOST_DEVICE auto | get_gradient (smith::tuple< T... > tuple_of_values) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<int... n> | |
| constexpr SMITH_HOST_DEVICE auto | make_dual (const tensor< double, n... > &A) |
| Constructs a tensor of dual numbers from a tensor of values. More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE LuFactorization< T, n > | factorize_lu (const tensor< T, n, n > &A) |
| Compute LU factorization of a matrix with partial pivoting. More... | |
| template<typename S , typename T , int n, int... m> | |
| constexpr SMITH_HOST_DEVICE auto | linear_solve (const tensor< S, n, n > &A, const tensor< T, n, m... > &b) |
| Solves Ax = b for x using Gaussian elimination with partial pivoting. More... | |
| template<typename T , int n> | |
| constexpr SMITH_HOST_DEVICE auto | make_dual (const tensor< T, n > &x, const tensor< T, n > &dx) |
| Create a tensor of dual numbers with specified seed. | |
| template<typename T , int m, int n> | |
| constexpr SMITH_HOST_DEVICE auto | make_dual (const tensor< T, m, n > &x, const tensor< T, m, n > &dx) |
| Create a tensor of dual numbers with specified seed. | |
| template<typename gradient_type , int n> | |
| constexpr SMITH_HOST_DEVICE auto | inv (tensor< dual< gradient_type >, n, n > A) |
| template<typename T , int... n> | |
| SMITH_HOST_DEVICE auto | get_value (const tensor< dual< T >, n... > &arg) |
| Retrieves a value tensor from a tensor of dual numbers. More... | |
| template<int... n> | |
| constexpr SMITH_HOST_DEVICE auto | get_gradient (const tensor< dual< double >, n... > &arg) |
| Retrieves a gradient tensor from a tensor of dual numbers. More... | |
| template<int... n, int... m> | |
| constexpr SMITH_HOST_DEVICE auto | get_gradient (const tensor< dual< tensor< double, m... >>, n... > &arg) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename function , typename... ParamTypes> | |
| auto | solve_scalar_equation (const function &f, double x0, double lower_bound, double upper_bound, ScalarSolverOptions options, ParamTypes... params) |
| Solves a nonlinear scalar-valued equation and gives derivatives of solution to parameters. More... | |
| template<typename function , int n> | |
| auto | find_root (const function &f, tensor< double, n > x0) |
| Finds a root of a vector-valued nonlinear function. More... | |
| template<typename T , int size> | |
| auto | eigenvalues (const smith::tensor< T, size, size > &A) |
| compute the eigenvalues of a symmetric matrix A More... | |
| template<typename T > | |
| int | sgn (T val) |
| Signum, returns sign of input. More... | |
| template<typename T > | |
| SMITH_HOST_DEVICE tensor< int, 3 > | argsort (const tensor< T, 3 > &v) |
| Find indices that would sort a 3-vector. More... | |
| SMITH_HOST_DEVICE tuple< vec3, mat3 > | eig_symm (const mat3 &A) |
| template<typename T , typename Function , typename EigvalSecantFunction > | |
| auto | symmetric_mat3_function (tensor< T, 3, 3 > A, const Function &f, const EigvalSecantFunction &g) |
| Constructs an isotropic tensor-valued function of a symmetric 3x3 tensor from a scalar function. More... | |
| template<typename Gradient , typename Function > | |
| constexpr SMITH_HOST_DEVICE auto | symmetric_mat3_function_with_derivative (tensor< dual< Gradient >, 3, 3 > A, tensor< double, 3, 3 > f_A, vec3 lambda, mat3 Q, const Function &g) |
| Helper function for defining the derivative. | |
| template<typename T > | |
| auto | log_symm (tensor< T, 3, 3 > A) |
| Logarithm of a symmetric matrix. More... | |
| template<typename T > | |
| auto | exp_symm (tensor< T, 3, 3 > A) |
| Exponential of a symmetric matrix. More... | |
| template<typename T > | |
| auto | sqrt_symm (tensor< T, 3, 3 > A) |
| Square root of a symmetric matrix. More... | |
| std::vector< double > | computeResidualBlockNorms (const std::vector< mfem::Vector > &residuals, MPI_Comm comm) |
| Compute one L2 norm per residual block. More... | |
| ConvergenceStatus | evaluateResidualConvergence (double tolerance_multiplier, double abs_tol, double rel_tol, const std::vector< double > &block_norms, NonlinearConvergenceContext &context) |
| Evaluate scalar nonlinear residual convergence. More... | |
| std::string | linearName (const LinearSolver &s) |
| Convert linear solver enums to their string names. | |
| std::ostream & | operator<< (std::ostream &os, LinearSolver s) |
| output linear solver string representation to a stream | |
| std::string | nonlinearName (const NonlinearSolver &s) |
| Convert nonlinear linear solver enums to their string names. | |
| std::ostream & | operator<< (std::ostream &os, NonlinearSolver s) |
| output nonlinear solver string representation to a stream | |
| std::string | petscPCName (const PetscPCType &s) |
| Convert Petsc preconditioner enums to their string names. | |
| std::ostream & | operator<< (std::ostream &os, PetscPCType s) |
| output PETSc preconditioner string representation to a stream | |
| std::string | preconditionerName (Preconditioner p) |
| Convert preconditioner enums to their string names. | |
| std::ostream & | operator<< (std::ostream &os, Preconditioner p) |
| output preconditioner string representation to a stream | |
| Components | operator+ (Component i, Component j) |
| Construct a Components object from the sum of individual vector components. More... | |
| Components | operator+ (Component i, Components c) |
| Add an additional component to the set of flagged Components. More... | |
| template<typename T > | |
| auto | getFieldPointers (std::vector< std::shared_ptr< T >> &states, std::vector< std::shared_ptr< T >> ¶ms) |
| Get a vector of FieldPtr or DualFieldPtr from a vector of shared_pointers to FiniteElementState or FiniteElementDual. | |
| template<typename T > | |
| auto | getFieldPointers (std::vector< std::shared_ptr< T >> &states) |
| Get a vector of FieldPtr or DualFieldPtr from a vector of shared_pointers to FiniteElementState or FiniteElementDual. | |
| template<typename T > | |
| auto | getFieldPointers (std::vector< T > &states, std::vector< T > ¶ms) |
| Get a vector of FieldPtr or DualFieldPtr from a vector of FiniteElementState or FiniteElementDual. | |
| template<typename T > | |
| auto | getFieldPointers (std::vector< T > &states) |
| Get a vector of FieldPtr or DualFieldPtr from a vector of FiniteElementState or FiniteElementDual. | |
| template<typename T > | |
| auto | getFieldPointers (std::shared_ptr< T > &state) |
| Get a vector of FieldPtr or DualFieldPtr from a single shared_ptr<FiniteElementState> or shared_ptr<FiniteElementDual> | |
| template<typename T > | |
| auto | getFieldPointers (T &state) |
| Get a vector of FieldPtr or DualFieldPtr from a single FiniteElementState or FiniteElementDual. | |
| template<typename T > | |
| auto | getConstFieldPointers (const std::vector< std::shared_ptr< T >> &states, const std::vector< std::shared_ptr< T >> ¶ms={}) |
| Get a vector of ConstFieldPtr or ConstDualFieldPtr from a vector of shared_pointers to FiniteElementState or FiniteElementDual. | |
| template<typename T > | |
| auto | getConstFieldPointers (const std::vector< T * > &states, const std::vector< T * > ¶ms={}) |
| Get a vector of ConstFieldPtr or ConstDualFieldPtr from a vector of shared_pointers to FiniteElementState or FiniteElementDual. | |
| template<typename T > | |
| auto | getConstFieldPointers (const std::vector< T > &states, const std::vector< T > ¶ms={}) |
| Get a vector of ConstFieldPtr or ConstDualFieldPtr from a vector of FiniteElementState or FiniteElementDual. | |
| template<typename T > | |
| auto | getConstFieldPointers (const std::shared_ptr< T > &state) |
| Get a vector of ConstFieldPtr or ConstDualFieldPtr from a single shared_ptr<FiniteElementState> or shared_ptr<FiniteElementDual> | |
| template<typename T > | |
| auto | getConstFieldPointers (const T &state) |
| Get a vector of ConstFieldPtr or ConstDualFieldPtr from a single FiniteElementState or FiniteElementDual. | |
| template<int dim, typename signature , int... n, typename func , typename... T> | |
| FiniteElementState | fit (func f, mfem::ParMesh &pmesh, const T &... solution_fields) |
| determine field parameters to approximate the output of a user-provided q-function More... | |
| std::vector< const mfem::ParFiniteElementSpace * > | getSpaces (const std::vector< smith::FiniteElementState > &states) |
| Helper function to construct vector of spaces from an existing vector of FiniteElementState. More... | |
| template<typename MaterialType , typename StateType , typename... parameter_types> | |
| auto | uniaxial_stress_test (double t_max, size_t num_steps, const MaterialType material, const StateType initial_state, std::function< double(double)> epsilon_xx, const parameter_types... parameter_functions) |
| Drive the material model thorugh a uniaxial tension experiment. More... | |
| template<typename MaterialType , typename StateType , typename... parameter_types> | |
| auto | uniaxial_stress_test_rate_dependent (double t_max, size_t num_steps, const MaterialType material, const StateType initial_state, std::function< double(double)> epsilon_xx, const parameter_types... parameter_functions) |
| Drive a rate-dependent material model thorugh a uniaxial tension experiment. More... | |
| template<typename MaterialType , typename StateType , typename... functions> | |
| auto | single_quadrature_point_test (double t_max, size_t num_steps, const MaterialType material, const StateType initial_state, const functions... f) |
This function takes a material model (and associate state variables), subjects it to a time history of stimuli, described by functions ... f, and returns the outputs at each step. This is intended to be used for testing materials, to ensure their response is in agreement with known data (analytic or experimental). More... | |
| double | norm (const FiniteElementState &state, const double p=2) |
| Find the Lp norm of a finite element state across all dofs. More... | |
| double | computeL2Error (const FiniteElementState &state, mfem::VectorCoefficient &exact_solution) |
| Find the L2 norm of the error of a vector-valued finite element state with respect to an exact solution. More... | |
| double | computeL2Error (const FiniteElementState &state, mfem::Coefficient &exact_solution) |
| Find the L2 norm of the error of a scalar-valued finite element state with respect to an exact solution. More... | |
| bool | is_scalar_valued (const GeneralCoefficient &coef) |
| convenience function for querying the type stored in a GeneralCoefficient | |
| bool | is_vector_valued (const GeneralCoefficient &coef) |
| convenience function for querying the type stored in a GeneralCoefficient | |
| bool | sameFiniteElementSpace (const mfem::FiniteElementSpace &left, const mfem::FiniteElementSpace &right) |
| Check if two finite element spaces are the same. More... | |
| double | avg (const FiniteElementVector &fe_vector) |
| Find the average value of a finite element vector across all dofs. More... | |
| double | max (const FiniteElementVector &fe_vector) |
| Find the max value of a finite element vector across all dofs. More... | |
| double | min (const FiniteElementVector &fe_vector) |
| Find the min value of a finite element vector across all dofs. More... | |
| double | innerProduct (const FiniteElementVector &vec1, const FiniteElementVector &vec2) |
| Find the inner prodcut between two finite element vectors across all dofs. More... | |
| void | checkMesh (const mfem::ParMesh &pmesh, bool is_restart=false) |
| Check that a mesh satisfies our required properties. | |
Variables | |
| constexpr ExecutionSpace | default_execution_space = ExecutionSpace::CPU |
| The default execution space for Smith builds. | |
| std::shared_ptr< QuadratureData< Nothing > > | NoQData = ::std::make_shared<QuadratureData<Nothing>>() |
a single instance of a QuadratureData container of Nothings, since they are all interchangeable More... | |
| std::shared_ptr< QuadratureData< Empty > > | EmptyQData = ::std::make_shared<QuadratureData<Empty>>() |
a single instance of a QuadratureData container of Emptys, since they are all interchangeable | |
| const ScalarSolverOptions | default_solver_options {.xtol = 1e-8, .rtol = 0, .max_iter = 25} |
Default options for solve_scalar_equation. | |
| std::map< std::string, LinearSolver > | linearSolverMap |
| string->value matching for optionally entering options as string in command line More... | |
| std::map< std::string, NonlinearSolver > | nonlinearSolverMap |
| string->value matching for optionally entering options as string in command line More... | |
| std::map< std::string, Preconditioner > | preconditionerMap |
| string->value matching for optionally entering options as string in command line More... | |
| constexpr int | SHAPE_ORDER = 1 |
| Polynomial order used to discretize the shape displacement field. | |
| constexpr H1< SHAPE_ORDER, 2 > | SHAPE_DIM_2 |
| Function space for shape displacement on dimension 2 meshes. | |
| constexpr H1< SHAPE_ORDER, 3 > | SHAPE_DIM_3 |
| Function space for shape displacement on dimension 2 meshes. | |
Accelerator functionality.
| using smith::BlockOverride = typedef std::pair<int, std::unique_ptr<const mfem::Operator> > |
Optional override for a diagonal block operator.
The integer is the block index i and the operator replaces the Jacobian block A_ii (or, for 2x2 Schur systems, the block used to build/approximate the (1,1) Schur operator).
Ownership of the operator is transferred to the preconditioner.
Definition at line 19 of file block_preconditioner.hpp.
| using smith::one_hot_t = typedef typename one_hot<i, n, T>::type |
a tuple type with n entries, all of which are of type smith::zero, except for the i^{th} entry, which is of type T
e.g. one_hot_t< 2, 4, T > == tuple<zero, zero, T, zero>
Definition at line 125 of file tuple_tensor_dual_functions.hpp.
| using smith::outer_product_t = typedef typename detail::outer_prod<T1, T2>::type |
a type function that returns the tensor type of an outer product of two tensors
| T1 | the first argument to the outer product |
| T2 | the second argument to the outer product |
Definition at line 1829 of file tensor.hpp.
| using smith::reduced_tensor = typedef std::conditional_t< (n1 == 1 && n2 == 1), double, std::conditional_t<n1 == 1, tensor<T, n2>, std::conditional_t<n2 == 1, tensor<T, n1>, tensor<T, n1, n2> >> > |
Removes 1s from tensor dimensions For example, a tensor<T, 1, 10> is equivalent to a tensor<T, 10>
| T | The scalar type of the tensor |
| n1 | The first dimension |
| n2 | The second dimension |
Definition at line 277 of file tensor.hpp.
|
strong |
Solver types supported by AMGX.
Definition at line 219 of file solver_config.hpp.
|
strong |
Selects the block Schur preconditioner variant.
| Enumerator | |
|---|---|
| Diagonal | Block diagonal: apply $ A_{11}^{-1} $ and $ S^{-1} $ only. |
| Lower | Lower factor form. |
| Upper | Upper factor form. |
| Full | Full factor form (lower, diagonal, upper). |
Definition at line 172 of file block_preconditioner.hpp.
|
strong |
Selects the block triangular sweep used by BlockTriangularPreconditioner.
| Enumerator | |
|---|---|
| Lower | Forward (lower triangular) sweep. |
| Upper | Backward (upper triangular) sweep. |
| Symmetric | Apply a symmetric combination of lower and upper sweeps. |
Definition at line 84 of file block_preconditioner.hpp.
|
strong |
Describes how to enforce the contact constraint equations.
| Enumerator | |
|---|---|
| Penalty | Equal penalty applied to all constrained dofs |
| LagrangeMultiplier | Solve for exact pressures to satisfy constraints |
Definition at line 28 of file contact_config.hpp.
|
strong |
Method for computing Jacobian of contact terms.
| Enumerator | |
|---|---|
| Approximate | Ignore higher order contributions to the Jacobian |
| Exact | Compute exact Jacobian (needed for quadratic convergence with Newton) |
Definition at line 46 of file contact_config.hpp.
|
strong |
Methodology for enforcing contact constraints (i.e. how you form the constraint equations)
| Enumerator | |
|---|---|
| SingleMortar | Puso and Laursen 2004 |
Definition at line 20 of file contact_config.hpp.
|
strong |
Mechanical constraint type on contact surfaces.
| Enumerator | |
|---|---|
| TiedNormal | Tied contact in the normal direction, no friction |
| Frictionless | Enforce gap >= 0, pressure <= 0, gap * pressure = 0 in the normal direction |
Definition at line 37 of file contact_config.hpp.
|
strong |
this enum describes which way to enforce the time-varying constraint u(t) == U(t)
Definition at line 62 of file solver_config.hpp.
|
strong |
The type of a finite element basis function.
Definition at line 38 of file finite_element_vector.hpp.
|
strong |
Element conformity.
QOI denotes a "quantity of interest", implying integration with the test function "1" H1 denotes a function space where values are continuous across element boundaries HCURL denotes a vector-valued function space where only the tangential component is continuous across element boundaries HDIV denotes a vector-valued function space where only the normal component is continuous across element boundaries L2 denotes a function space where values are discontinuous across element boundaries
Definition at line 180 of file finite_element.hpp.
|
strong |
Linear solution method indicator.
Definition at line 104 of file solver_config.hpp.
|
strong |
Nonlinear solver method indicator.
Definition at line 151 of file solver_config.hpp.
|
strong |
Preconditioner types supported by PETSc.
Definition at line 273 of file solver_config.hpp.
|
strong |
The type of preconditioner to be used.
Definition at line 338 of file solver_config.hpp.
|
strong |
Selects how the (1,1) Schur operator is approximated.
Definition at line 184 of file block_preconditioner.hpp.
|
strong |
Timestep method of a solver.
Definition at line 27 of file solver_config.hpp.
| std::string smith::about | ( | ) |
| SMITH_HOST_DEVICE auto smith::abs | ( | dual< gradient_type > | x | ) |
|
constexpr |
return the antisymmetric part of an isotropic tensor
| T | the types stored in the isotropic tensor |
| m | the number of rows and columns in I |
zero (isotropic matrices are symmetric, so the antisymmetric part is identically zero) Definition at line 256 of file isotropic_tensor.hpp.
|
constexpr |
Returns the antisymmetric part of a square matrix.
| [in] | A | The matrix to obtain the antisymmetric part of |
Definition at line 1181 of file tensor.hpp.
|
constexpr |
a helper function for creating the rank-4 isotropic tensor defined by: d(antisym(A)_{ij}) / d(A_{kl})
| m | the dimension |
Definition at line 394 of file isotropic_tensor.hpp.
| SMITH_HOST_DEVICE tensor<int, 3> smith::argsort | ( | const tensor< T, 3 > & | v | ) |
Find indices that would sort a 3-vector.
| v | 3-vector to sort. |
v in ascending order. Definition at line 783 of file tuple_tensor_dual_functions.hpp.
| double smith::avg | ( | const FiniteElementVector & | fe_vector | ) |
Find the average value of a finite element vector across all dofs.
| fe_vector | The state variable to compute the average of |
Definition at line 117 of file finite_element_vector.cpp.
| SMITH_HOST_DEVICE tensor<T, n> smith::Bernstein | ( | T | s | ) |
Bernstein Polynomials on the domain [0, 1].
| n | how many entries to compute |
| [in] | s | where to evaluate the polynomials |
Definition at line 467 of file polynomials.hpp.
| smith::binary_comparator_overload | ( | ) |
implement operator< for dual numbers
implement operator> for dual numbers
implement operator== for dual numbers
| std::vector< FieldState > smith::block_solve | ( | const std::vector< WeakForm * > & | residual_evals, |
| const std::vector< std::vector< size_t >> | block_indices, | ||
| const FieldState & | shape_disp, | ||
| const std::vector< std::vector< FieldState >> & | states, | ||
| const std::vector< std::vector< FieldState >> & | params, | ||
| const TimeInfo & | time_info, | ||
| const NonlinearBlockSolverBase * | solver, | ||
| const std::vector< const BoundaryConditionManager * > & | bc_managers | ||
| ) |
Solve a block nonlinear system of equations as defined by the vector of weak form.
| residual_evals | Vector of weak forms which define the equations to be solved |
| block_indices | Matrix of index arguments specifying where in each WeakForm the unknown fields are passed in. Example: for a 2 weak-form system, with weak-forms, r1, r2 r1(a,b,c) r2(b,d,e,a) |
| shape_disp | The mesh-morphed shape displacement |
| states | The time varying states as inputs to the weak form |
| params | The fixed field parameters as inputs to the weak form |
| time_info | Timestep information (time, dt, cycle) |
| solver | The nonlinear block solver used to solve the system of equations |
| bc_managers | Holds information about which degrees of freedom (DOFS) |
Definition at line 29 of file nonlinear_solve.cpp.
|
inline |
count the number of boundary elements of each geometry in a mesh
| mesh | the mesh to count |
Definition at line 89 of file geometry.hpp.
| mfem::Mesh smith::build_hollow_quarter_cylinder | ( | std::size_t | radial_divisions, |
| std::size_t | angular_divisions, | ||
| std::size_t | vertical_divisions, | ||
| double | inner_radius, | ||
| double | outer_radius, | ||
| double | height | ||
| ) |
Constructs an MFEM mesh of a hollow cylinder restricted to the first orthant.
| radial_divisions | number of elements in the radial direction |
| angular_divisions | number of elements in the theta direction |
| vertical_divisions | number of elements in the z-direction |
| inner_radius | the radius of the inner wall of the cylinder |
| outer_radius | the radius of the outer wall of the cylinder |
| height | the height of the top surface of the cylinder |
Definition at line 370 of file mesh_utils.cpp.
| mfem::Mesh smith::buildBallMesh | ( | int | approx_number_of_elements | ) |
Constructs a 3D MFEM mesh of a unit ball, centered at the origin.
This routine creates a mesh by refining a coarse ball mesh until the number of elements is as close as possible to the user-specified number of elements
| [in] | approx_number_of_elements | Approximate number of elements |
Definition at line 113 of file mesh_utils.cpp.
| mfem::Mesh smith::buildCuboidMesh | ( | int | elements_in_x, |
| int | elements_in_y, | ||
| int | elements_in_z, | ||
| double | size_x = 1., |
||
| double | size_y = 1., |
||
| double | size_z = 1. |
||
| ) |
Constructs a 3D MFEM mesh of a cuboid.
| [in] | elements_in_x | the number of elements in the x-direction |
| [in] | elements_in_y | the number of elements in the y-direction |
| [in] | elements_in_z | the number of elements in the z-direction |
| [in] | size_x | Overall size in the x-direction |
| [in] | size_y | Overall size in the y-direction |
| [in] | size_z | Overall size in the z-direction |
Definition at line 155 of file mesh_utils.cpp.
| mfem::Mesh smith::buildCylinderMesh | ( | int | radial_refinement, |
| int | elements_lengthwise, | ||
| double | radius, | ||
| double | height | ||
| ) |
Constructs a 3D MFEM mesh of a cylinder.
| [in] | radial_refinement | the number of times to apply uniform mesh refinement to the cross section |
| [in] | elements_lengthwise | the number of elements in the z-direction |
| [in] | radius | the radius of the cylinder |
| [in] | height | the number of elements in the z-direction |
Definition at line 162 of file mesh_utils.cpp.
| mfem::Mesh smith::buildDiskMesh | ( | int | approx_number_of_elements | ) |
Constructs a 2D MFEM mesh of a unit disk, centered at the origin.
This routine creates a mesh by refining a coarse disk mesh until the number of elements is as close as possible to the user-specified number of elements
| [in] | approx_number_of_elements | The appoximate number of elements |
Definition at line 80 of file mesh_utils.cpp.
| mfem::Mesh smith::buildHollowCylinderMesh | ( | int | radial_refinement, |
| int | elements_lengthwise, | ||
| double | inner_radius, | ||
| double | outer_radius, | ||
| double | height, | ||
| double | total_angle = M_PI, |
||
| int | sectors = 8 |
||
| ) |
Constructs a 3D MFEM mesh of a hollow cylinder.
| [in] | radial_refinement | the number of times to apply uniform mesh refinement to the cross section |
| [in] | elements_lengthwise | the number of elements in the z-direction |
| [in] | inner_radius | inner radius the radius of the cylindrical shell |
| [in] | outer_radius | ouer radius the radius of the cylindrical shell |
| [in] | height | the number of elements in the z-direction |
| [in] | total_angle | the angle in radians over which to generate the portion of an extruded cylinder |
| [in] | sectors | the number of starting sectors in the hollow cylinder |
Definition at line 359 of file mesh_utils.cpp.
| std::pair< std::unique_ptr< mfem::Solver >, std::unique_ptr< mfem::Solver > > smith::buildLinearSolverAndPreconditioner | ( | LinearSolverOptions | linear_opts = {}, |
| MPI_Comm | comm = MPI_COMM_WORLD |
||
| ) |
Build the linear solver and its associated preconditioner given a linear options struct.
| linear_opts | The options to configure the linear solver and preconditioner |
| comm | The MPI communicator for the supplied HypreParMatrix and HypreParVectors |
Definition at line 1316 of file equation_solver.cpp.
| mfem::Mesh smith::buildMeshFromFile | ( | const std::string & | mesh_file | ) |
Constructs an MFEM mesh from a file.
This opens and reads an external mesh file and constructs a serial MFEM Mesh object.
| [in] | mesh_file | The mesh file to open |
Definition at line 25 of file mesh_utils.cpp.
| std::unique_ptr< mfem::HypreParMatrix > smith::buildMonolithicMatrix | ( | const mfem::BlockOperator & | block_operator | ) |
Build a monolithic HypreParMatrix from a BlockOperator.
Function for building a monolithic parallel Hypre matrix from a block system of smaller Hypre matrices.
PERFORMANCE NOTE: This function creates a NEW monolithic matrix by copying data from the block structure. This incurs a performance overhead:
This is necessary when using direct solvers (SuperLU, Strumpack) that require monolithic matrices. For iterative solvers, the BlockOperator can be used directly without this copy overhead.
| block_operator | The block operator to convert. |
Definition at line 1158 of file equation_solver.cpp.
| std::shared_ptr< NonlinearBlockSolver > smith::buildNonlinearBlockSolver | ( | NonlinearSolverOptions | nonlinear_opts, |
| LinearSolverOptions | linear_opts, | ||
| const smith::Mesh & | mesh | ||
| ) |
Create an equation-backed nonlinear block solver.
| nonlinear_opts | nonlinear options struct |
| linear_opts | linear options struct |
| mesh | mesh |
Definition at line 263 of file nonlinear_block_solver.cpp.
| std::unique_ptr< mfem::NewtonSolver > smith::buildNonlinearSolver | ( | NonlinearSolverOptions | nonlinear_opts, |
| const LinearSolverOptions & | linear_opts, | ||
| mfem::Solver & | preconditioner, | ||
| MPI_Comm | comm = MPI_COMM_WORLD |
||
| ) |
Build a nonlinear solver using the nonlinear option struct.
| nonlinear_opts | The options to configure the nonlinear solution scheme |
| linear_opts | The options to configure the linear solution scheme |
| preconditioner | A preconditioner to help with either linear or nonlinear solves |
| comm | The MPI communicator for the supplied nonlinear operators and HypreParVectors |
Definition at line 1245 of file equation_solver.cpp.
| std::unique_ptr< mfem::Solver > smith::buildPreconditioner | ( | LinearSolverOptions | linear_opts, |
| [[maybe_unused] ] MPI_Comm | comm = MPI_COMM_WORLD |
||
| ) |
Build a preconditioner from the available options.
| linear_opts | The options to configure the linear solver and preconditioner |
| comm | The communicator for the underlying operator and HypreParVectors |
Definition at line 1436 of file equation_solver.cpp.
| mfem::Mesh smith::buildRectangleMesh | ( | int | elements_in_x, |
| int | elements_in_y, | ||
| double | size_x = 1., |
||
| double | size_y = 1. |
||
| ) |
Constructs a 2D MFEM mesh of a rectangle.
| [in] | elements_in_x | the number of elements in the x-direction |
| [in] | elements_in_y | the number of elements in the y-direction |
| [in] | size_x | Overall size in the x-direction |
| [in] | size_y | Overall size in the y-direction |
Definition at line 150 of file mesh_utils.cpp.
| mfem::Mesh smith::buildRingMesh | ( | int | radial_refinement, |
| double | inner_radius, | ||
| double | outer_radius, | ||
| double | total_angle = M_PI, |
||
| int | sectors = 8 |
||
| ) |
Constructs a 2D MFEM mesh of a ring.
| [in] | radial_refinement | the number of times to apply uniform mesh refinement to the cross section |
| [in] | inner_radius | inner radius the radius of the cylindrical shell |
| [in] | outer_radius | ouer radius the radius of the cylindrical shell |
| [in] | total_angle | the angle in radians over which to generate the portion of an extruded cylinder |
| [in] | sectors | the number of starting sectors in the hollow cylinder |
Definition at line 353 of file mesh_utils.cpp.
| SolidMechanicsSystem<dim, order, DisplacementTimeRule, parameter_space...> smith::buildSolidMechanicsSystem | ( | std::shared_ptr< Mesh > | mesh, |
| std::shared_ptr< CoupledSystemSolver > | solver, | ||
| DisplacementTimeRule | disp_time_rule, | ||
| std::string | prepend_name = "", |
||
| std::shared_ptr< CoupledSystemSolver > | cycle_zero_solver = nullptr, |
||
| FieldType< parameter_space >... | parameter_types | ||
| ) |
Factory function to build a solid dynamics system with configurable time integration.
| dim | Spatial dimension. |
| order | Polynomial order for displacement field. |
| DisplacementTimeRule | Time integration rule type (must have num_states == 4, deduced from argument). |
| parameter_space | Parameter spaces for material properties. |
| mesh | The mesh. |
| solver | The coupled system solver. |
| disp_time_rule | The time integration rule. |
| prepend_name | The name of the physics (used as field prefix). |
| cycle_zero_solver | Optional override for the cycle-zero solve. Defaults to solver->singleBlockSolver(0). |
| parameter_types | Parameter field types. |
Definition at line 319 of file solid_mechanics_system.hpp.
| SolidMechanicsWithInternalVarsSystem<dim, disp_order, StateSpace, DisplacementTimeRule, InternalVarTimeRule, parameter_space...> smith::buildSolidMechanicsWithInternalVarsSystem | ( | std::shared_ptr< Mesh > | mesh, |
| std::shared_ptr< CoupledSystemSolver > | solver, | ||
| DisplacementTimeRule | disp_rule, | ||
| InternalVarTimeRule | state_rule, | ||
| std::string | prepend_name = "", |
||
| std::shared_ptr< CoupledSystemSolver > | cycle_zero_solver = nullptr, |
||
| FieldType< parameter_space >... | parameter_types | ||
| ) |
Factory function to build a solid mechanics system with internal variable.
| mesh | The mesh. |
| solver | The coupled system solver. |
| disp_rule | The displacement time integration rule. |
| state_rule | The internal-variable time integration rule. |
| prepend_name | Optional field-name prefix. |
| cycle_zero_solver | Optional override for the cycle-zero solve. Defaults to solver->singleBlockSolver(0). |
| parameter_types | Optional parameter field descriptors. |
Definition at line 386 of file solid_mechanics_with_internal_vars_system.hpp.
| ThermalSystem<dim, temp_order, TemperatureTimeRule, parameter_space...> smith::buildThermalSystem | ( | std::shared_ptr< Mesh > | mesh, |
| std::shared_ptr< CoupledSystemSolver > | solver, | ||
| TemperatureTimeRule | temp_rule, | ||
| std::string | prepend_name = "", |
||
| FieldType< parameter_space >... | parameter_types | ||
| ) |
Factory function to build a thermal system.
| dim | Spatial dimension. |
| temp_order | Order of the temperature basis. |
| TemperatureTimeRule | Time integration rule type (must have num_states == 2). |
| parameter_space | Finite element spaces for optional parameters. |
| mesh | The mesh. |
| solver | The coupled system solver. |
| temp_rule | The time integration rule for temperature. |
| prepend_name | The name of the physics (used as field prefix). |
| parameter_types | Parameter field types. |
Definition at line 203 of file thermal_system.hpp.
| ThermoMechanicsSystem<dim, disp_order, temp_order, DisplacementTimeRule, TemperatureTimeRule, parameter_space...> smith::buildThermoMechanicsSystem | ( | std::shared_ptr< Mesh > | mesh, |
| std::shared_ptr< CoupledSystemSolver > | solver, | ||
| DisplacementTimeRule | disp_rule, | ||
| TemperatureTimeRule | temp_rule, | ||
| std::string | prepend_name = "", |
||
| std::shared_ptr< CoupledSystemSolver > | cycle_zero_solver = nullptr, |
||
| FieldType< parameter_space >... | parameter_types | ||
| ) |
Factory function to build a thermo-mechanical system.
| mesh | The mesh. |
| solver | The coupled system solver. |
| disp_rule | The displacement time integration rule. |
| temp_rule | The temperature time integration rule. |
| prepend_name | Optional field-name prefix. |
| cycle_zero_solver | Optional override for the cycle-zero solve. Defaults to solver->singleBlockSolver(0). |
| parameter_types | Optional parameter field descriptors. |
Definition at line 376 of file thermo_mechanics_system.hpp.
| std::string smith::buildType | ( | ) |
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1877 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1868 of file tensor.hpp.
| SMITH_HOST_DEVICE auto smith::chain_rule | ( | const tensor< double, m, n, p... > & | df_dx, |
| const tensor< double, p... > & | dx | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1920 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1906 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1884 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1894 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1858 of file tensor.hpp.
|
constexpr |
Chebyshev polynomials of the first kind Satisfying: T_n(cos(t)) == cos(n*t)
| n | how many entries to compute |
| [in] | x | where to evaluate the polynomials |
Definition at line 407 of file polynomials.hpp.
| SMITH_HOST_DEVICE tensor<T, n> smith::ChebyshevU | ( | T | x | ) |
Chebyshev polynomials of the second kind Satisfying: sin(t) U_n(cos(t)) == sin((n+1)*t)
| n | how many entries to compute |
| [in] | x | where to evaluate the polynomials |
Definition at line 428 of file polynomials.hpp.
|
constexpr |
replace all entries in a tensor satisfying |x| < 1.0e-10 by literal zero
| [in] | A | The tensor to "chop" |
Definition at line 1758 of file tensor.hpp.
| std::string smith::compiler | ( | ) |
| void smith::compute_geometric_factors | ( | mfem::Vector & | positions_q, |
| mfem::Vector & | jacobians_q, | ||
| const mfem::Vector & | positions_e, | ||
| const std::vector< int > & | elements | ||
| ) |
a kernel to compute the positions and jacobians at each quadrature point (mfem calls this "geometric factors")
| Q | a parameter controlling the number of quadrature points an element |
| function_space | the polynomial order and kind of function space used to interpolate |
| geom | the element geometry |
| positions_q | (output) the positions for each quadrature point |
| jacobians_q | (output) the jacobians for each quadrature point |
| positions_e | (input) the "e-vector" of position data |
| elements | (input) the list of element indices that are part of this domain |
Definition at line 27 of file geometric_factors.cpp.
| double smith::computeL2Error | ( | const FiniteElementState & | state, |
| mfem::Coefficient & | exact_solution | ||
| ) |
Find the L2 norm of the error of a scalar-valued finite element state with respect to an exact solution.
| state | The numerical solution |
| exact_solution | The exact solution to measure error against |
state and exact_solution Definition at line 122 of file finite_element_state.cpp.
| double smith::computeL2Error | ( | const FiniteElementState & | state, |
| mfem::VectorCoefficient & | exact_solution | ||
| ) |
Find the L2 norm of the error of a vector-valued finite element state with respect to an exact solution.
| state | The numerical solution |
| exact_solution | The exact solution to measure error against |
state and exact_solution Definition at line 117 of file finite_element_state.cpp.
| std::vector< double > smith::computeResidualBlockNorms | ( | const std::vector< mfem::Vector > & | residuals, |
| MPI_Comm | comm | ||
| ) |
Compute one L2 norm per residual block.
| residuals | Residual vectors, one per logical block. |
| comm | MPI communicator used for parallel norm reduction. |
Definition at line 33 of file nonlinear_convergence.cpp.
| SMITH_HOST_DEVICE auto smith::contract | ( | const tensor< S, m, n... > & | A, |
| const tensor< T, p, q > & | B | ||
| ) |
a convenience function that computes a dot product between two tensor, but that allows the user to specify which indices should be summed over. For example:
| i1 | the index of contraction for the left operand |
| i2 | the index of contraction for the right operand |
| S | the datatype stored in the left operand |
| m | leading dimension of the left operand |
| n | the trailing dimensions of the left operand |
| T | the datatype stored in the right operand |
| p | the number of rows in the right operand |
| q | the number of columns in the right operand |
| A | the left operand |
| B | the right operand |
Definition at line 1405 of file tensor.hpp.
|
inline |
creates a time info struct from gretl::State<double>
| t | time |
| dt | timestep |
| cycle | iteration |
Definition at line 41 of file state_advancer.hpp.
|
inline |
Create a ParaView writer using the default output options.
| [in] | mesh | Mesh used to define the ParaView data collection. |
| [in] | states | Field states whose values and duals will be registered for output. |
| [in] | output_name | Base name for the ParaView output directory and .pvd file. |
Definition at line 176 of file paraview_writer.hpp.
| auto smith::createWeakForm | ( | std::string | name, |
| FieldType< TestSpaceType > | test_type, | ||
| FieldStore & | field_store, | ||
| FieldType< InputSpaceTypes >... | field_types | ||
| ) |
Create a TimeDiscretizedWeakForm and register its fields in the FieldStore.
Thin convenience wrapper: registers test_type as the reaction field, registers all field_types as input arguments, and constructs the weak form in one call.
Definition at line 432 of file field_store.hpp.
| void smith::defineInputFileSchema | ( | axom::inlet::Inlet & | inlet | ) |
|
constexpr |
Obtains the identity matrix of the specified dimension.
Definition at line 1259 of file tensor.hpp.
|
constexpr |
compute the determinant of an isotropic tensor
| T | the types stored in the isotropic tensor |
| m | the number of rows and columns in I |
| I | the isotropic tensor to compute the determinant of |
Definition at line 311 of file isotropic_tensor.hpp.
|
constexpr |
Returns the determinant of a matrix.
| [in] | A | The matrix to obtain the determinant of |
Definition at line 1302 of file tensor.hpp.
|
constexpr |
computes det(A + I) - 1, where precision is not lost when the entries A_{ij} << 1
detApIm1(A) = det(A + I) - 1 When the entries of A are small compared to unity, computing det(A + I) - 1 directly will suffer from catastrophic cancellation.
| A | Input matrix |
Definition at line 1326 of file tensor.hpp.
|
constexpr |
Calculates the deviator of a matrix (rank-2 tensor)
| [in] | A | The matrix to calculate the deviator of In the context of stress tensors, the deviator is obtained by subtracting the mean stress (average of main diagonal elements) from each element on the main diagonal |
Definition at line 1200 of file tensor.hpp.
|
constexpr |
Returns a square diagonal matrix by specifying the diagonal entries.
| [in] | d | a list of diagonal entries |
Definition at line 1231 of file tensor.hpp.
|
constexpr |
Returns an array containing the diagonal entries of a square matrix.
| [in] | D | the matrix to extract the diagonal entries from |
Definition at line 1245 of file tensor.hpp.
|
constexpr |
Returns a square matrix (rank-2 tensor) containing the diagonal entries of the input square matrix with zeros in the off-diagonal positions.
| [in] | A | The input square matrix This operation is used to compute a term in the constitutive response of a linear, cubic solid material |
Definition at line 1217 of file tensor.hpp.
|
inline |
this function is intended to only be used in combination with smith::Functional::operator(), as a way for the user to express that it should both evaluate and differentiate w.r.t. a specific argument (only 1 argument at a time)
For example:
Definition at line 41 of file differentiate_wrt.hpp.
|
constexpr |
a function for querying the ith dimension of a tensor
| i | which dimension to query |
| T | the datatype stored in the tensor |
| n | the tensor extents |
Definition at line 1962 of file tensor.hpp.
|
constexpr |
Returns the dimension of an element geometry.
| [in] | g | The Geometry to retrieve the dimension of |
Definition at line 55 of file geometry.hpp.
|
constexpr |
dot product between an isotropic and (nonisotropic) tensor
| S | the types stored in isotropic tensor |
| T | the types stored in tensor |
| m | the number of rows and columns in I |
| n | the trailing dimensions of A |
| I | the left operand |
| A | the (full) right operand |
Definition at line 203 of file isotropic_tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 806 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 820 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 836 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
this overload, and others of the form dot(vector, tensor), can be implemented more succinctly as a single variadic function, but for some reason gcc-11 (but not gcc-10 or gcc-12) seemed to break when compiling that compact implementation, so we're manually writing out some of the different dot product overloads in order to support that compiler and version
Definition at line 856 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 936 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 870 of file tensor.hpp.
|
constexpr |
this function contracts over the "middle" index of the two tensor arguments
| S | the underlying type of the tensor (lefthand) argument |
| T | the underlying type of the tensor (righthand) argument |
| n | integers describing the tensor shape |
| [in] | A | The lefthand tensor |
| [in] | B | The righthand tensor |
Definition at line 768 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 902 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 886 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 918 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 786 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 796 of file tensor.hpp.
|
constexpr |
double-dot product between an isotropic and (nonisotropic) tensor
| S | the types stored in isotropic tensor |
| T | the types stored in tensor |
| m | the number of rows and columns in I, A |
| I | the left operand |
| A | the (full) right operand |
Definition at line 229 of file isotropic_tensor.hpp.
|
constexpr |
double-dot product between an isotropic and (nonisotropic) tensor
| S | the types stored in isotropic tensor |
| T | the types stored in tensor |
| m | the dimension of each extent of I |
| I | the left operand |
| A | the (full) right operand |
Definition at line 466 of file isotropic_tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1044 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1026 of file tensor.hpp.
|
constexpr |
double dot product, contracting over the two "middle" indices
| S | the underlying type of the tensor (lefthand) argument |
| T | the underlying type of the tensor (righthand) argument |
| m | first dimension of A |
| n | second dimension of A |
| p | third dimension of A, first dimensions of B |
| q | fourth dimension of A, second dimensions of B |
| [in] | A | The lefthand tensor |
| [in] | B | The righthand tensor |
Definition at line 1006 of file tensor.hpp.
| smith::dual | ( | double | , |
| T | |||
| ) | -> dual< T > |
class template argument deduction guide for type dual.
|
inline |
Eigendecomposition for a symmetric 3x3 matrix
| A | Matrix for which the eigendecomposition will be computed. Must be symmetric, this is not checked. |
Definition at line 807 of file tuple_tensor_dual_functions.hpp.
| auto smith::eigenvalues | ( | const smith::tensor< T, size, size > & | A | ) |
compute the eigenvalues of a symmetric matrix A
| T | either double or a smith::dual type |
| size | the dimensions of the matrix |
| A | the matrix |
Definition at line 727 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
this function returns information about how many elements should be processed by a single thread block in CUDA (note: the optimal values are hardware and problem specific, but these values are still significantly faster than naively allocating only 1 element / block)
| g | the element geometry |
| q | the number of quadrature points per dimension |
Definition at line 140 of file finite_element.hpp.
| ConvergenceStatus smith::evaluateResidualConvergence | ( | double | tolerance_multiplier, |
| double | abs_tol, | ||
| double | rel_tol, | ||
| const std::vector< double > & | block_norms, | ||
| NonlinearConvergenceContext & | context | ||
| ) |
Evaluate scalar nonlinear residual convergence.
| tolerance_multiplier | Extra scale factor applied to the computed convergence goals. |
| abs_tol | Scalar absolute tolerance. |
| rel_tol | Scalar relative tolerance. |
| block_norms | Current residual norm for each block. |
| context | Stored initial norms for relative tolerance evaluation. |
Definition at line 42 of file nonlinear_convergence.cpp.
| auto smith::exp_symm | ( | tensor< T, 3, 3 > | A | ) |
Exponential of a symmetric matrix.
| A | Matrix to operate on. Must be symmetric. This is not checked. |
A. Definition at line 1033 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
|
constexpr |
Compute LU factorization of a matrix with partial pivoting.
The convention followed is to place ones on the diagonal of the lower triangular factor.
| [in] | A | The matrix to factorize |
Definition at line 364 of file tuple_tensor_dual_functions.hpp.
| auto smith::find_root | ( | const function & | f, |
| tensor< double, n > | x0 | ||
| ) |
Finds a root of a vector-valued nonlinear function.
Uses Newton-Raphson iteration.
| function | Type for the functor object |
| n | Vector dimension of the equation |
| f | A callable representing the function of which a root is sought. Must take an n-vector argument and return an n-vector |
| x0 | Initial guess for root. Must be an n-vector. |
f. Definition at line 697 of file tuple_tensor_dual_functions.hpp.
| void smith::findDomainDofsOnNeighborRanks | ( | const smith::fes_t * | fes, |
| mfem::Array< int > & | local_dof_ids | ||
| ) |
Get local dofs that are part of a domain, but are owned by a neighboring MPI rank.
This is necessary for situations like this: Mesh before parallel partition: 3 -----— 2 | /| | / | | / | | / | <– Edge we want in Domain | / | | / | | / | |/ | Node 0 -----— 1
Possible mesh after partition into two ranks:
RANK 0 RANK 1
3 -----— 2 2 o | / /| | / / | | / / | | / / | <– Edge we want in Domain | / / | | / / | | / / | |/ / | 0 * 0 o-----—* 1
*: locally owned node o: node owned by a neighbor rank
We create a domain containing the right vertical edge, and then ask for its local dofs. The dof list returned for Rank 1 will be correct, containing the local indices for nodes 1 and 2. However, the dof list on rank 0 will not be correct without parallel communication. It will see that it doesn't own the edge in question, so when it then goes to fetch the local dofs on the domain, it will be an empty list.
This function corrects for that, flagging the dofs we want on the domain on each rank (using the local_dof_ids list), and then exchanging this info with neighboring ranks, so that rank 0 will be told that its local dof for node 2 should be added to the list of dofs on the domain.
Before findDomainDofsOnNeighborRanks(): dof list on Rank 0: {} dof list on Rank 1: {1, 2}
After: dof list on Rank 0: {2} dof list on Rank 1: {1, 2}
Note: the sets will actually contain the ldof indices corresponding to the global (tdof) indices in the sets above.
This function operates on the local_dof_ids data in place.
Definition at line 436 of file domain.cpp.
| FiniteElementState smith::fit | ( | func | f, |
| mfem::ParMesh & | pmesh, | ||
| const T &... | solution_fields | ||
| ) |
determine field parameters to approximate the output of a user-provided q-function
| [in] | f | the user-provided function to approximate |
| [in] | pmesh | the region over which to approximate the function f |
| [in] | solution_fields | [optional] any auxiliary field quantities needed to evaluate f |
| std::vector<tensor<double, d> > smith::gather | ( | const mfem::Vector & | coordinates, |
| mfem::Array< int > | ids | ||
| ) |
gather vertex coordinates for a list of vertices
| coordinates | mfem's 1D list of vertex coordinates |
| ids | the list of vertex indices to gather |
Definition at line 47 of file domain.cpp.
|
constexpr |
Lagrange Interpolating polynomials for nodes at Gauss-Legendre points on the interval [0, 1].
Do[xi = GaussianQuadratureWeights[n, 0, 1, 30][[All, 1]]; Print["if constexpr (n == " <> ToString[n] <> ") return " <> ToString[CForm /@ HornerForm /@ (InterpolatingPolynomial[Transpose[{xi, #}], x] & /@ IdentityMatrix[n])] <> ";"], {n, 1, 4} ]
note: the quadratic (n == 2) and cubic (n == 3) versions of this function only satisfied the kronecker delta property to an error of ~1.0e-13 and keeping more than 16 significant figures seems to help bring that error down to machine epsilon again.
| n | how many entries to compute |
| [in] | x | where to evaluate the polynomials |
Definition at line 558 of file polynomials.hpp.
|
constexpr |
Derivatives of the Lagrange Interpolating polynomials for nodes at Gauss-Legendre points on the interval [-1, 1].
Mathematica/Wolfram Language code to generate more entries in the table: Do[xi = GaussianQuadratureWeights[n, 0, 1, 30][[All, 1]]; Print["if constexpr (n == " <> ToString[n] <> ") return " <> ToString[CForm /@ HornerForm /@ (D[InterpolatingPolynomial[Transpose[{xi, #}], x], x] & /@ IdentityMatrix[n])] <> ";"], {n, 1, 4} ]
| n | how many entries to compute |
| [in] | x | where to evaluate the polynomials |
Definition at line 595 of file polynomials.hpp.
|
constexpr |
The positions of Gauss-Legendre points for different geometries.
| n | The number of points per dimension |
Mathematica/Wolfram Language code to generate the 1D entries in the table: Do[Print["if constexpr (n == " <> ToString[n] <> ") return " <> ToString[GaussianQuadratureWeights[n, 0, 1, 17][[All, 1]]] <> ";"], {n, 1, 8}]
Definition at line 43 of file polynomials.hpp.
|
constexpr |
The weights associated with each Gauss-Legendre point.
| n | The number of points |
Mathematica/Wolfram Language code to generate more entries in the table: Do[Print["if constexpr (n == " <> ToString[n] <> ") return " <> ToString[GaussianQuadratureWeights[n, 0, 1, 17][[All, 2]]] <> ";"], {n, 1, 8}]
Definition at line 272 of file polynomials.hpp.
|
constexpr |
Lagrange Interpolating polynomials for nodes at Gauss-Lobatto points on the interval [0, 1].
| n | how many entries to compute |
| [in] | x | where to evaluate the polynomials |
Definition at line 494 of file polynomials.hpp.
|
constexpr |
Derivatives of the Lagrange Interpolating polynomials for nodes at Gauss-Lobatto points on the interval [0, 1].
| n | how many entries to compute |
| [in] | x | where to evaluate the polynomials |
Definition at line 521 of file polynomials.hpp.
|
constexpr |
The positions (in 1D space) of Gauss-Lobatto points.
| n | The number of points |
| [in] | a | The left endpoint of the interval |
| [in] | b | The right endpoint of the interval |
Definition at line 28 of file polynomials.hpp.
|
constexpr |
Returns the Gauss-Legendre quadrature rule for an element and order.
| The | shape of the element to produce a quadrature rule for |
| Q | the number of quadrature points per dimension |
Definition at line 45 of file quadrature.hpp.
| void smith::generate_bdr_kernels | ( | FunctionSignature< test(trials...)> | s, |
| Integral & | integral, | ||
| const lambda_type & | qf | ||
| ) |
function to generate kernels held by an Integral object of type "BoundaryDomain", with a specific element type
| geom | the element geometry |
| Q | a parameter that controls the number of quadrature points |
| test | the kind of test functions used in the integral |
| trials | the trial space(s) of the integral's inputs |
| lambda_type | a callable object that implements the q-function concept |
| s | an object used to pass around test/trial information |
| integral | the Integral object to initialize |
| qf | the quadrature function |
Definition at line 290 of file integral.hpp.
| void smith::generate_interior_face_kernels | ( | FunctionSignature< test(trials...)> | s, |
| Integral & | integral, | ||
| const lambda_type & | qf | ||
| ) |
function to generate kernels held by an Integral object of type "InteriorFaceDomain", with a specific element type
| geom | the element geometry |
| Q | a parameter that controls the number of quadrature points |
| test | the kind of test functions used in the integral |
| trials | the trial space(s) of the integral's inputs |
| lambda_type | a callable object that implements the q-function concept |
| s | an object used to pass around test/trial information |
| integral | the Integral object to initialize |
| qf | the quadrature function |
Definition at line 376 of file integral.hpp.
| void smith::generate_kernels | ( | FunctionSignature< test(trials...)> | s, |
| Integral & | integral, | ||
| const lambda_type & | qf, | ||
| std::shared_ptr< QuadratureData< qpt_data_type > > | qdata | ||
| ) |
function to generate kernels held by an Integral object of type "Domain", with a specific element type
| geom | the element geometry |
| Q | a parameter that controls the number of quadrature points |
| test | the kind of test functions used in the integral |
| trials | the trial space(s) of the integral's inputs |
| lambda_type | a callable object that implements the q-function concept |
| qpt_data_type | any quadrature point data needed by the material model |
| s | an object used to pass around test/trial information |
| integral | the Integral object to initialize |
| qf | the quadrature function |
| qdata | the values of any quadrature point data for the material |
Definition at line 202 of file integral.hpp.
|
inline |
create an mfem::ParFiniteElementSpace from one of Smith's tag types: H1, Hcurl, L2
| function_space | a tag type containing the kind of function space and polynomial order |
| mesh | the mesh on which the space is defined |
Definition at line 113 of file functional.hpp.
|
inline |
count the number of elements of each geometry in a domain
| domain | the domain to count |
Definition at line 312 of file domain.hpp.
|
inline |
count the number of elements of each geometry in a mesh
| mesh | the mesh to count |
Definition at line 76 of file geometry.hpp.
|
constexpr |
Returns the variant member of specified type.
Returns the variant member at the provided index.
| T | The type of the element to retrieve |
| T0 | The first member type of the variant |
| T1 | The second member type of the variant |
| [in] | v | The variant to return the element of |
T0 or T1 Definition at line 338 of file variant.hpp.
|
constexpr |
get the gradient of type tensor (note: since its stored type is not a dual number, the derivative term is identically zero)
Definition at line 1843 of file tensor.hpp.
|
constexpr |
Retrieves a gradient tensor from a tensor of dual numbers.
| [in] | arg | The tensor of dual numbers |
Definition at line 511 of file tuple_tensor_dual_functions.hpp.
|
inline |
Retrieves the gradient component of a double (which is nothing)
Definition at line 1835 of file tensor.hpp.
| SMITH_HOST_DEVICE auto smith::get_gradient | ( | dual< smith::tuple< T... >> | arg | ) |
Retrieves the gradient components of a set of dual numbers.
| [in] | arg | The set of numbers to retrieve gradients from |
Definition at line 315 of file tuple_tensor_dual_functions.hpp.
| T* smith::get_if | ( | variant< T0, T1 > * | v | ) |
Returns the member of requested type if it's active, otherwise nullptr.
| T | The type to check for |
| [in] | v | The variant to check/retrieve from |
Definition at line 398 of file variant.hpp.
| SMITH_HOST_DEVICE auto smith::get_value | ( | const smith::tuple< T... > & | tuple_of_values | ) |
Retrieves the value components of a set of (possibly dual) numbers.
| [in] | tuple_of_values | The tuple of numbers to retrieve values from |
dual numbers or doubles Definition at line 285 of file tuple_tensor_dual_functions.hpp.
| SMITH_HOST_DEVICE auto smith::get_value | ( | const tensor< dual< T >, n... > & | arg | ) |
Retrieves a value tensor from a tensor of dual numbers.
| [in] | arg | The tensor of dual numbers |
Definition at line 499 of file tuple_tensor_dual_functions.hpp.
| SMITH_HOST_DEVICE auto smith::get_value | ( | const tensor< tuple< T1, T2 >, n > & | input | ) |
Extracts all of the values from a tensor of dual numbers.
| T1 | the first type of the tuple stored in the tensor |
| T2 | the second type of the tuple stored in the tensor |
| n | the number of entries in the input argument |
| [in] | input | The tensor of dual numbers |
Definition at line 301 of file tuple_tensor_dual_functions.hpp.
| std::pair< int, int > smith::getMPIInfo | ( | MPI_Comm | comm = MPI_COMM_WORLD | ) |
|
inline |
Helper function to construct vector of spaces from an existing vector of FiniteElementState.
| states | vector of FiniteElementState |
Definition at line 530 of file functional_weak_form.hpp.
| std::string smith::gitSHA | ( | ) |
| bool smith::holds_alternative | ( | const variant< T0, T1 > & | v | ) |
Checks whether a variant's active member is of a certain type.
| T | The type to check for |
| [in] | v | The variant to check |
Definition at line 381 of file variant.hpp.
|
constexpr |
Returns the second invariant of a 3x3 matrix.
| [in] | A | The matrix |
Definition at line 1291 of file tensor.hpp.
|
constexpr |
return the identity matrix of the specified size
| m | the number of rows and columns |
Definition at line 61 of file isotropic_tensor.hpp.
|
constexpr |
given a list of types, this function returns the index that corresponds to the type dual_vector.
| T | a list of types, containing at most 1 differentiate_wrt_this |
e.g.
Definition at line 59 of file functional.hpp.
|
constexpr |
|
constexpr |
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 720 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 688 of file tensor.hpp.
|
constexpr |
this function contracts over all indices of the two tensor arguments
| S | the underlying type of the tensor (lefthand) argument |
| m | the number of rows |
| n | the number of columns |
Definition at line 710 of file tensor.hpp.
|
constexpr |
this function contracts over all indices of the two tensor arguments
| S | the underlying type of the tensor (lefthand) argument |
| T | the underlying type of the tensor (righthand) argument |
| m | the number of rows |
| n | the number of columns |
| [in] | A | The lefthand tensor |
| [in] | B | The righthand tensor |
Definition at line 672 of file tensor.hpp.
|
constexpr |
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 701 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 729 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 748 of file tensor.hpp.
|
constexpr |
this function contracts over all indices of the two tensor arguments
| T | the underlying type of the tensor (righthand) argument |
| m | the number of rows |
| n | the number of columns |
Definition at line 738 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 757 of file tensor.hpp.
| double smith::innerProduct | ( | const FiniteElementVector & | vec1, |
| const FiniteElementVector & | vec2 | ||
| ) |
Find the inner prodcut between two finite element vectors across all dofs.
| vec1 | The first vector |
| vec2 | The second vector |
Definition at line 144 of file finite_element_vector.cpp.
|
constexpr |
return the inverse of an isotropic tensor
| T | the types stored in the isotropic tensor |
| m | the number of rows and columns in I |
| I | the isotropic tensor to compute the inverse of |
Definition at line 298 of file isotropic_tensor.hpp.
|
constexpr |
Inverts a matrix.
| [in] | A | The matrix to invert |
Definition at line 1652 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1670 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1694 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
TODO: compare performance of this hardcoded implementation to just using inv() directly
Definition at line 479 of file tuple_tensor_dual_functions.hpp.
| SMITH_HOST_DEVICE bool smith::is_symmetric | ( | tensor< double, n, n > | A, |
| double | tolerance = 1.0e-8 |
||
| ) |
Return whether a square rank 2 tensor is symmetric.
| n | The height of the tensor |
| A | The square rank 2 tensor |
| tolerance | The tolerance to check for symmetry |
Definition at line 1492 of file tensor.hpp.
|
inline |
Return whether a matrix is symmetric and positive definite This check uses Sylvester's criterion, checking that each upper left subtensor has a determinant greater than zero.
| A | The matrix to test for positive definiteness |
Definition at line 1512 of file tensor.hpp.
|
constexpr |
a function for querying the first dimension of a tensor
| T | the datatype stored in the tensor |
| m | the first dimension of the tensor |
| n | the trailing dimensions of the tensor |
Definition at line 1977 of file tensor.hpp.
| SMITH_HOST_DEVICE tensor<T, n> smith::Legendre | ( | T | x | ) |
Legendre Polynomials, orthogonal on the domain (-1, 1) with unit weight function.
| n | how many entries to compute |
| [in] | x | where to evaluate the polynomials |
Definition at line 448 of file polynomials.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1626 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1642 of file tensor.hpp.
|
constexpr |
Solves Ax = b for x using Gaussian elimination with partial pivoting.
| [in] | A | The coefficient matrix A |
| [in] | b | The righthand side vector b |
Definition at line 425 of file tuple_tensor_dual_functions.hpp.
| auto smith::log_symm | ( | tensor< T, 3, 3 > | A | ) |
Logarithm of a symmetric matrix.
| A | Matrix to operate on. Must be SPD. This is not checked. |
A. Definition at line 1013 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
Constructs a tensor of dual numbers from a tensor of values.
| [in] | A | The tensor of values |
Definition at line 344 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
Promote a tuple of values to their corresponding dual types.
| T0 | the first type of the tuple argument |
| T1 | the first type of the tuple argument |
| args | the values to be promoted |
example:
Definition at line 188 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
promote a tensor value to dual number with a one_hot_t< i, N, tensor > gradient type
| i | the index where the non-smith::zero derivative term appears |
| N | how many entries in the gradient type |
| arg | the value to be promoted |
Definition at line 159 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
promote a double value to dual number with a one_hot_t< i, N, double > gradient type
| i | the index where the non-smith::zero derivative term appears |
| N | how many entries in the gradient type |
| arg | the value to be promoted |
Definition at line 142 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
take a tuple of values, and promote the nth one to a one-hot dual number of the appropriate type
| n | the index of the tuple argument to be made into a dual number |
| T | the types of the values in the tuple |
| args | the values to be promoted |
Definition at line 274 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
Creates a tensor of requested dimension by subsequent calls to a functor Can be thought of as analogous to std::transform in that the set of possible indices for dimensions n are transformed into the values of the tensor by f.
| lambda_type | The type of the functor |
| [in] | f | The functor to generate the tensor values from |
auto parameters. Definition at line 304 of file tensor.hpp.
|
constexpr |
Creates a tensor of requested dimension by subsequent calls to a functor.
| n1 | The dimension of the tensor |
| lambda_type | The type of the functor |
| [in] | f | The functor to generate the tensor values from |
n1 arguments of type int auto parameters. Definition at line 323 of file tensor.hpp.
|
constexpr |
Creates a tensor of requested dimension by subsequent calls to a functor.
| n1 | The first dimension of the tensor |
| n2 | The second dimension of the tensor |
| lambda_type | The type of the functor |
| [in] | f | The functor to generate the tensor values from |
n1 x n2 arguments of type int auto parameters. Definition at line 347 of file tensor.hpp.
|
constexpr |
Creates a tensor of requested dimension by subsequent calls to a functor.
| n1 | The first dimension of the tensor |
| n2 | The second dimension of the tensor |
| n3 | The third dimension of the tensor |
| lambda_type | The type of the functor |
| [in] | f | The functor to generate the tensor values from |
n1 x n2 x n3 arguments of type int auto parameters. Definition at line 374 of file tensor.hpp.
|
constexpr |
Creates a tensor of requested dimension by subsequent calls to a functor.
| n1 | The first dimension of the tensor |
| n2 | The second dimension of the tensor |
| n3 | The third dimension of the tensor |
| n4 | The fourth dimension of the tensor |
| lambda_type | The type of the functor |
| [in] | f | The functor to generate the tensor values from |
n1 x n2 x n3 x n4 arguments of type int auto parameters. Definition at line 404 of file tensor.hpp.
| Integral smith::MakeBoundaryIntegral | ( | const Domain & | domain, |
| const lambda_type & | qf, | ||
| std::vector< uint32_t > | argument_indices | ||
| ) |
function to generate kernels held by an Integral object of type "Boundary", for all element types
| s | a function signature type containing test/trial space informationa type containing a function signature |
| Q | a parameter that controls the number of quadrature points |
| dim | the dimension of the domain |
| lambda_type | a callable object that implements the q-function concept |
| domain | the domain of integration |
| qf | the quadrature function |
| argument_indices | the indices of trial space arguments used in the Integral |
Definition at line 341 of file integral.hpp.
| Integral smith::MakeDomainIntegral | ( | const Domain & | domain, |
| const lambda_type & | qf, | ||
| std::shared_ptr< QuadratureData< qpt_data_type > > | qdata, | ||
| std::vector< uint32_t > | argument_indices | ||
| ) |
function to generate kernels held by an Integral object of type "Domain", for all element types
| s | a function signature type containing test/trial space informationa type containing a function signature |
| Q | a parameter that controls the number of quadrature points |
| dim | the dimension of the domain |
| lambda_type | a callable object that implements the q-function concept |
| qpt_data_type | any quadrature point data needed by the material model |
| domain | the domain of integration |
| qf | the quadrature function |
| qdata | the values of any quadrature point data for the material |
| argument_indices | the indices of trial space arguments used in the Integral |
Definition at line 253 of file integral.hpp.
| Integral smith::MakeInteriorFaceIntegral | ( | const Domain & | domain, |
| const lambda_type & | qf, | ||
| std::vector< uint32_t > | argument_indices | ||
| ) |
function to generate kernels held by an Integral object of type "Boundary", for all element types
| s | a function signature type containing test/trial space informationa type containing a function signature |
| Q | a parameter that controls the number of quadrature points |
| dim | the dimension of the domain |
| lambda_type | a callable object that implements the q-function concept |
| domain | the domain of integration |
| qf | the quadrature function |
| argument_indices | the indices of trial space arguments used in the Integral |
Definition at line 427 of file integral.hpp.
| auto smith::matrix_sqrt | ( | const tensor< T, dim, dim > & | A | ) |
compute the matrix square root of a square, real-valued, symmetric matrix i.e. given A, find B such that A = dot(B, B)
| T | the data type stored in each element of the matrix |
| A | the matrix to compute the square root of |
dot(B, B) == A Definition at line 1366 of file tensor.hpp.
| double smith::max | ( | const FiniteElementVector & | fe_vector | ) |
Find the max value of a finite element vector across all dofs.
| fe_vector | The state variable to compute a max of |
Definition at line 128 of file finite_element_vector.cpp.
| SMITH_HOST_DEVICE auto smith::max | ( | dual< gradient_type > | a, |
| double | b | ||
| ) |
| double smith::min | ( | const FiniteElementVector & | fe_vector | ) |
Find the min value of a finite element vector across all dofs.
| fe_vector | The state variable to compute a min of |
Definition at line 136 of file finite_element_vector.cpp.
| SMITH_HOST_DEVICE auto smith::min | ( | dual< gradient_type > | a, |
| double | b | ||
| ) |
| double smith::norm | ( | const FiniteElementState & | state, |
| const double | p = 2 |
||
| ) |
Find the Lp norm of a finite element state across all dofs.
| state | The state variable to compute a norm of |
| p | The order norm to compute |
Definition at line 104 of file finite_element_state.cpp.
|
constexpr |
compute the Frobenius norm (sqrt(tr(dot(transpose(I), I)))) of an isotropic tensor
| T | the types stored in the isotropic tensor |
| m | the number of rows and columns in I |
| I | the isotropic tensor to compute the norm of |
Definition at line 324 of file isotropic_tensor.hpp.
| SMITH_HOST_DEVICE auto smith::norm | ( | const tensor< T, n... > & | A | ) |
Returns the Frobenius norm of the tensor.
| [in] | A | The tensor to obtain the norm from |
Definition at line 1105 of file tensor.hpp.
| SMITH_HOST_DEVICE auto smith::normalize | ( | const tensor< T, n... > & | A | ) |
Normalizes the tensor Each element is divided by the Frobenius norm of the tensor,.
| [in] | A | The tensor to normalize |
Definition at line 1122 of file tensor.hpp.
|
constexpr |
return the number of quadrature points in a Gauss-Legendre rule with parameter "Q"
| g | the element geometry |
| Q | the number of quadrature points per dimension |
Definition at line 31 of file geometry.hpp.
|
constexpr |
multiply a tensor by a scalar value
| S | the scalar value type. Must be arithmetic (e.g. float, double, int) or a dual number |
| T | the underlying type of the tensor (righthand) argument |
| n | integers describing the tensor shape |
| [in] | A | The tensor to be scaled |
| [in] | scale | The scaling factor |
Definition at line 58 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
multiply a tensor by a scalar value
| S | the scalar value type. Must be arithmetic (e.g. float, double, int) or a dual number |
| T | the underlying type of the tensor (righthand) argument |
| n | integers describing the tensor shape |
| [in] | scale | The scaling factor |
| [in] | A | The tensor to be scaled |
Definition at line 39 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
scalar multiplication
| S | the type of the left operand, scale |
| T | the type of the isotropic tensor |
| m | the number of rows and columns in the isotropic tensor |
| scale | the value that multiplies each entry of I (from the left) |
| I | the isotropic tensor being scaled |
Definition at line 77 of file isotropic_tensor.hpp.
|
constexpr |
scalar multiplication
| S | the type of the left operand, scale |
| T | the type of the isotropic tensor |
| m | the dimension of each rank-4 isotropic tensor |
| scale | the value that multiplies each entry of I (from the left) |
| I | the isotropic tensor being scaled |
Definition at line 410 of file isotropic_tensor.hpp.
|
inline |
Construct a Components object from the sum of individual vector components.
See docstring on function declaration.
Definition at line 56 of file components.hpp.
|
inline |
Add an additional component to the set of flagged Components.
See docstring on function definition.
Definition at line 59 of file components.hpp.
|
constexpr |
sum of isotropic and (nonisotropic) tensor
| S | the type of the left isotropic tensor |
| T | the type of the right tensor |
| m | the number of rows and columns in each tensor |
| I | the left operand |
| A | the (full) right operand |
Definition at line 132 of file isotropic_tensor.hpp.
|
constexpr |
return the sum of two tensors
| S | the underlying type of the lefthand argument |
| T | the underlying type of the righthand argument |
| n | integers describing the tensor shape |
| [in] | A | The lefthand operand |
| [in] | B | The righthand operand |
Definition at line 429 of file tensor.hpp.
|
constexpr |
addition of isotropic tensors
| S | the type of the left isotropic tensor |
| T | the type of the right isotropic tensor |
| m | the number of rows and columns in each isotropic tensor |
| I1 | the left operand |
| I2 | the right operand |
Definition at line 100 of file isotropic_tensor.hpp.
|
constexpr |
addition of isotropic tensors
| S | the type of the left isotropic tensor |
| T | the type of the right isotropic tensor |
| m | the dimension of each rank-4 isotropic tensor |
| I1 | the left operand |
| I2 | the right operand |
Definition at line 433 of file isotropic_tensor.hpp.
|
constexpr |
compound assignment (+) on tensors
| S | the underlying type of the tensor (lefthand) argument |
| T | the underlying type of the tensor (righthand) argument |
| n | integers describing the tensor shape |
| [in] | A | The lefthand tensor |
| [in] | B | The righthand tensor |
Definition at line 481 of file tensor.hpp.
|
constexpr |
compound assignment (+) on tensors
| T | the underlying type of the tensor argument |
| [in] | A | The lefthand tensor |
| [in] | B | The righthand tensor |
Definition at line 540 of file tensor.hpp.
|
constexpr |
compound assignment (+) on tensors
| T | the underlying type of the tensor argument |
| [in] | A | The lefthand tensor |
| [in] | B | The righthand tensor |
Definition at line 552 of file tensor.hpp.
|
constexpr |
compound assignment (+) on tensors
| T | the underlying type of the tensor argument |
| [in] | A | The lefthand tensor |
| [in] | B | The righthand tensor |
Definition at line 525 of file tensor.hpp.
|
constexpr |
compound assignment (+) on tensors
| T | the underlying type of the tensor argument |
| [in] | A | The lefthand tensor |
| [in] | B | The righthand tensor |
Definition at line 510 of file tensor.hpp.
|
constexpr |
compound assignment (+) between a tensor and zero (no-op)
| T | the underlying type of the tensor (righthand) argument |
| n | integers describing the tensor shape |
| [in] | A | The lefthand tensor |
Definition at line 564 of file tensor.hpp.
|
constexpr |
difference of isotropic and (nonisotropic) tensor
| S | the type of the left isotropic tensor |
| T | the type of the right tensor |
| m | the number of rows and columns in each tensor |
| I | the left operand |
| A | the (full) right operand |
Definition at line 167 of file isotropic_tensor.hpp.
|
constexpr |
return the difference of two tensors
| S | the underlying type of the lefthand argument |
| T | the underlying type of the righthand argument |
| n | integers describing the tensor shape |
| [in] | A | The lefthand operand |
| [in] | B | The righthand operand |
Definition at line 463 of file tensor.hpp.
|
constexpr |
return the unary negation of a tensor
| T | the underlying type of the righthand argument |
| n | integers describing the tensor shape |
| [in] | A | The tensor to negate |
Definition at line 445 of file tensor.hpp.
|
constexpr |
difference of isotropic tensors
| S | the type of the left isotropic tensor |
| T | the type of the right isotropic tensor |
| m | the number of rows and columns in each isotropic tensor |
| I1 | the left operand |
| I2 | the right operand |
Definition at line 116 of file isotropic_tensor.hpp.
|
constexpr |
difference of isotropic tensors
| S | the type of the left isotropic tensor |
| T | the type of the right isotropic tensor |
| m | the dimension of each rank-4 isotropic tensor |
| I1 | the left operand |
| I2 | the right operand |
Definition at line 449 of file isotropic_tensor.hpp.
|
constexpr |
compound assignment (-) on tensors
| S | the underlying type of the tensor (lefthand) argument |
| T | the underlying type of the tensor (righthand) argument |
| n | integers describing the tensor shape |
| [in] | A | The lefthand tensor |
| [in] | B | The righthand tensor |
Definition at line 578 of file tensor.hpp.
|
constexpr |
compound assignment (-) between a tensor and zero (no-op)
| T | the underlying type of the tensor (righthand) argument |
| n | integers describing the tensor shape |
| [in] | A | The lefthand tensor |
Definition at line 593 of file tensor.hpp.
|
constexpr |
divide a tensor by a scalar
| S | the scalar value type. Must be arithmetic (e.g. float, double, int) or a dual number |
| T | the underlying type of the tensor (righthand) argument |
| n | integers describing the tensor shape |
| [in] | A | The tensor of numerators |
| [in] | scale | The denominator |
Definition at line 96 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
divide a scalar by each element in a tensor
| S | the scalar value type. Must be arithmetic (e.g. float, double, int) or a dual number |
| T | the underlying type of the tensor (righthand) argument |
| n | integers describing the tensor shape |
| [in] | scale | The numerator |
| [in] | A | The tensor of denominators |
Definition at line 77 of file tuple_tensor_dual_functions.hpp.
| auto& smith::operator<< | ( | std::ostream & | out, |
| const tensor< T, m, n... > & | A | ||
| ) |
recursively serialize the entries in a tensor to an ostream. Output format uses braces and comma separators to mimic C syntax for multidimensional array initialization.
| [in] | out | the std::ostream to write to (e.g. std::cout or std::ofstream) |
| [in] | A | The tensor to write out |
Definition at line 1709 of file tensor.hpp.
|
inline |
Write a zero out to an output stream.
| [in] | out | the std::ostream to write to (e.g. std::cout or std::ofstream) |
Definition at line 1724 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 651 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 617 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
zero Definition at line 641 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 603 of file tensor.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
zero, and the right argument is a tensor Definition at line 631 of file tensor.hpp.
| SMITH_HOST_DEVICE void smith::parent_to_physical | ( | tensor< T, q > & | qf_input, |
| const tensor< double, dim, dim, q > & | jacobians | ||
| ) |
transform information in the parent space (i.e. values and derivatives w.r.t {xi, eta, zeta}) into the physical space (i.e. values and derivatives w.r.t. {x, y, z})
| f | the element family, used to determine which kind of transformation to apply |
| T | the types of quantities to be transformed |
| q | how many values need to be transformed |
| dim | the spatial dimension |
| qf_input | the values to be transformed from parent to physical space |
| jacobians | the jacobians of the isoparametric map from parent to physical space of each quadrature point |
Definition at line 267 of file finite_element.hpp.
| SMITH_HOST_DEVICE void smith::physical_to_parent | ( | tensor< T, q > & | qf_output, |
| const tensor< double, dim, dim, q > & | jacobians | ||
| ) |
transform information in the physical space (i.e. sources and fluxes w.r.t {x, y, z}) back to the parent space (i.e. values and derivatives w.r.t. {xi, eta, zeta}). Note: this also multiplies by the outputs by the determinant of the quadrature point Jacobian.
| f | the element family, used to determine which kind of transformation to apply |
| T | the types of quantities to be transformed |
| q | how many values need to be transformed |
| dim | the spatial dimension |
| qf_output | the values to be transformed from physical back to parent space |
| jacobians | the jacobians of the isoparametric map from parent to physical space of each quadrature point |
Definition at line 308 of file finite_element.hpp.
|
constexpr |
compute the first n powers of x
| n | how many powers to compute |
| [in] | x | the number to be raised to varying powers |
Definition at line 389 of file polynomials.hpp.
| SMITH_HOST_DEVICE void smith::print | ( | const tensor< double, m, n... > & | A | ) |
print a tensor using printf, so that it is suitable for use inside cuda kernels.
| [in] | A | The tensor to write out |
Definition at line 1742 of file tensor.hpp.
|
inline |
print a double using printf, so that it is suitable for use inside cuda kernels. (used in final recursion of printf(tensor<...>))
| [in] | value | The value to write out |
Definition at line 1735 of file tensor.hpp.
| void smith::printRunInfo | ( | ) |
Outputs basic run information to the screen.
Note: Command line options are handled in infrastructure/cli.cpp
| SMITH_HOST_DEVICE auto smith::promote_each_to_dual_when | ( | const tensor< T, n > & | x | ) |
a function that optionally (decided at compile time) converts a list of values to their dual types
| dualify | specify whether or not the input should be made into its dual type |
| T | the type of the values passed in |
| n | how many values were passed in |
| x | the values to be promoted |
Definition at line 228 of file tuple_tensor_dual_functions.hpp.
| SMITH_HOST_DEVICE auto smith::promote_to_dual_when | ( | const T & | x | ) |
a function that optionally (decided at compile time) converts a value to its dual type
| dualify | specify whether or not the value should be made into its dual type |
| T | the type of the value passed in |
| x | the values to be promoted |
Definition at line 209 of file tuple_tensor_dual_functions.hpp.
| double smith::relative_error | ( | tensor< T, n... > | A, |
| tensor< T, n... > | B | ||
| ) |
computes the relative error (in the frobenius norm) between two tensors of the same shape
| T | the datatype stored in each tensor |
| n | the dimensions of each tensor |
| A | the left argument |
| B | the right argument |
Definition at line 1478 of file tensor.hpp.
| bool smith::requiresMonolithicOperator | ( | const LinearSolverOptions & | linear_opts | ) |
Return true if the configured linear solve stack requires block operators to be merged.
| linear_opts | Linear solver and preconditioner options. |
Definition at line 1375 of file equation_solver.cpp.
| bool smith::sameFiniteElementSpace | ( | const mfem::FiniteElementSpace & | left, |
| const mfem::FiniteElementSpace & | right | ||
| ) |
Check if two finite element spaces are the same.
| left | |
| right |
Definition at line 25 of file finite_element_vector.cpp.
| int smith::sgn | ( | T | val | ) |
Signum, returns sign of input.
| val | Input value. |
Definition at line 769 of file tuple_tensor_dual_functions.hpp.
| auto smith::single_quadrature_point_test | ( | double | t_max, |
| size_t | num_steps, | ||
| const MaterialType | material, | ||
| const StateType | initial_state, | ||
| const functions... | f | ||
| ) |
This function takes a material model (and associate state variables), subjects it to a time history of stimuli, described by functions ... f, and returns the outputs at each step. This is intended to be used for testing materials, to ensure their response is in agreement with known data (analytic or experimental).
| MaterialType | the type of the material model under test |
| StateType | the associated state variables to be provided to the material |
| functions | a variadic list of callables |
| t_max | the final time value for |
| num_steps | the number of timesteps to be |
| material | an instance of a material model under test |
| initial_state | the initial conditions for materials that exhibit hysteresis |
| f | the functions (e.g. std::function, lambdas, etc) that are used to generate the inputs to the material model at each timestep |
Definition at line 124 of file material_verification_tools.hpp.
|
constexpr |
overload of size() for double, we say a double "stores" 1 value
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1948 of file tensor.hpp.
|
constexpr |
returns the total number of stored values in a tensor
| T | the datatype stored in the tensor |
| n | the extents of each dimension |
Definition at line 1939 of file tensor.hpp.
| std::vector< FieldState > smith::solve | ( | const std::vector< std::shared_ptr< WeakForm >> & | weak_forms, |
| const FieldStore & | field_store, | ||
| const CoupledSystemSolver * | solver, | ||
| const TimeInfo & | time_info, | ||
| const std::vector< FieldState > & | params = {} |
||
| ) |
Solve a set of weak forms.
| weak_forms | List of weak forms to solve. |
| field_store | Field store containing the fields. |
| solver | The solver to use. |
| time_info | Current time information. |
| params | Optional parameter fields. |
Definition at line 173 of file multiphysics_time_integrator.cpp.
|
inline |
Solve a single nonlinear system of equations as defined by one weak form.
| residual_eval | The weak form that defines the residual. |
| shape_disp | The mesh-morphed shape displacement. |
| states | The weak-form state inputs, including the primary unknown at unknown_state_index. |
| params | The fixed field parameters passed to the weak form. |
| time_info | Timestep information (time, dt, cycle). |
| solver | The nonlinear block solver used to solve the system. |
| bcs | Boundary conditions applied to the primary unknown field. |
| unknown_state_index | Index of the primary unknown within states. |
Definition at line 64 of file nonlinear_solve.hpp.
|
constexpr |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1587 of file tensor.hpp.
|
constexpr |
Solves a lower triangular system Ly = b.
L must be lower triangular and normalized such that the diagonal entries are unity. This is not checked in the function, so failure to obey this will produce meaningless results.
| [in] | L | A lower triangular matrix |
| [in] | b | The right hand side |
| [in] | P | A list of indices to index into b in a permuted fashion. |
Definition at line 1568 of file tensor.hpp.
| auto smith::solve_scalar_equation | ( | const function & | f, |
| double | x0, | ||
| double | lower_bound, | ||
| double | upper_bound, | ||
| ScalarSolverOptions | options, | ||
| ParamTypes... | params | ||
| ) |
Solves a nonlinear scalar-valued equation and gives derivatives of solution to parameters.
| function | Function object type for the nonlinear equation to solve |
| ...ParamTypes | Types of the (optional) parameters to the nonlinear function |
| f | Nonlinear function of which a root is sought. Must have the form $f(x, p_1, p_2, ...)$, where $x$ is the independent variable, and the $p_i$ are optional parameters (scalars or tensors of arbitrary order). |
| x0 | Initial guess of root. If x0 is outside the search interval, the initial guess will be changed to the midpoint of the search interval. |
| lower_bound | Lower bound of interval to search for root. |
| upper_bound | Upper bound of interval to search for root. |
| options | Options controlling behavior of solver. |
| ...params | Optional parameters to the nonlinear function. |
x, status) where x is the root, and status is a SolverStatus object reporting the status of the solution procedure. If any of the parameters are dual number-valued, x will be dual containing the corresponding directional derivative of the root. Otherwise, x will be a double containing the root. For example, if one gives the function as $f(x, p)$, where $p$ is a dual<double> with p.gradient = 1, then the x.gradient will be $dx/dp$.The solver uses Newton's method, safeguarded by bisection. If the Newton update would take the next iterate out of the search interval, or the absolute value of the residual is not decreasing fast enough, bisection will be used to compute the next iterate. The bounds of the search interval are updated automatically to maintain a bracket around the root. If the sign of the residual is the same at both lower_bound and upper_bound, the solver aborts.
Definition at line 576 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
Solves an upper triangular system Ux = y.
U must be upper triangular. This is not checked, so failure to obey this will produce meaningless results.
| [in] | U | An upper triangular matrix |
| [in] | y | The right hand side |
Definition at line 1608 of file tensor.hpp.
| auto smith::sqrt_symm | ( | tensor< T, 3, 3 > | A | ) |
Square root of a symmetric matrix.
| A | Matrix to operate on. Must be SPD. This is not checked. |
Definition at line 1053 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
compute the squared Frobenius norm (tr(dot(transpose(I), I))) of an isotropic tensor
| T | the types stored in the isotropic tensor |
| m | the number of rows and columns in I |
| I | the isotropic tensor to compute the squared norm of |
Definition at line 337 of file isotropic_tensor.hpp.
|
constexpr |
Returns the squared Frobenius norm of the tensor.
| [in] | A | The tensor to obtain the squared norm from |
Definition at line 1069 of file tensor.hpp.
| void smith::squish | ( | mfem::Mesh & | mesh | ) |
a transformation from the unit disk/sphere (in L1 norm) to a unit disk/sphere (in L2 norm)
| mesh | The mesh to transform |
Definition at line 56 of file mesh_utils.cpp.
|
constexpr |
return the symmetric part of an isotropic tensor
| T | the types stored in the isotropic tensor |
| m | the number of rows and columns in I |
| I | the isotropic tensor to symmetrize |
Definition at line 243 of file isotropic_tensor.hpp.
|
constexpr |
Returns the symmetric part of a square matrix.
| [in] | A | The matrix to obtain the symmetric part of |
Definition at line 1164 of file tensor.hpp.
| auto smith::symmetric_mat3_function | ( | tensor< T, 3, 3 > | A, |
| const Function & | f, | ||
| const EigvalSecantFunction & | g | ||
| ) |
Constructs an isotropic tensor-valued function of a symmetric 3x3 tensor from a scalar function.
This allows one to use a scalar-valued function of a scalar to construct an isotropic tensor-valued function of a symmetric tensor. The scalar function is applied to the principal values of the matrix, and then rotated back into the external coordinate system with the eigenvector matrix.
If A = V diag(lambda_0, lambda_1, lambda_2) V^T, then f(A) = V diag(f(lambda_0), f(lambda_1), f(lambda_2)) V^T
The function g, which we call the eigenvalue secant function, is only used if the derivative of the function is sought by having a dual number input tensor A. It must compute | df/dx, if lam1 = lam2 g(lam1, lam2) = | | ( f(lam1) - f(lam2) ) / (lam1 - lam2), otherwise
Analytically, this is a continuous function. However, in floating point arithmetic the direct implementation will often suffer from catastrophic cancellation. The presence of the g argument gives you a way to write this function in a numerically stable way (and thus preserve accuracy in the derivative of the tensor function).
| T | The datatype stored in the tensor |
| Function | Type for the functor object representing the scalar function |
| EigvalSecantFunction | Type for the functor object representing the secant eigenvalue function (see below) |
| A | The matrix to apply the isotropic tensor function to. |
| f | A scalar-valued function of a scalar. This is applied to the eigenvalues of A. |
| g | The eigenvalue secant function |
Definition at line 968 of file tuple_tensor_dual_functions.hpp.
|
constexpr |
a helper function for creating the rank-4 isotropic tensor defined by: d(sym(A)_{ij}) / d(A_{kl})
| m | the dimension |
Definition at line 383 of file isotropic_tensor.hpp.
| smith::tensor | ( | const T(&) | data[n1] | ) | -> tensor< T, n1 > |
class template argument deduction guide for type tensor.
| smith::tensor | ( | const T(&) | data[n1][n2] | ) | -> tensor< T, n1, n2 > |
class template argument deduction guide for type tensor.
|
constexpr |
Creates a tensor given the dimensions in a std::integer_sequence.
| n | The parameter pack of integer dimensions |
Definition at line 287 of file tensor.hpp.
| SMITH_HOST_DEVICE tensor<T, 3, 3> smith::to_3x3 | ( | const tensor< T, 2, 2 > & | A | ) |
promotes a 2x2 matrix to a 3x3 matrix, by populating the upper left block, leaving zeroes in the third row / column
| [in] | A | the 2x2 matrix to be promoted to a 3x3 matrix |
Definition at line 1133 of file tensor.hpp.
|
constexpr |
calculate the trace of an isotropic tensor
| T | the types stored in the isotropic tensor |
| m | the number of rows and columns in I |
| I | the isotropic tensor to compute the trace of |
Definition at line 270 of file isotropic_tensor.hpp.
|
constexpr |
Returns the trace of a square matrix.
| [in] | A | The matrix to compute the trace of |
Definition at line 1149 of file tensor.hpp.
|
constexpr |
return the transpose of an isotropic tensor
| T | the types stored in the isotropic tensor |
| m | the number of rows and columns in I |
| I | the isotropic tensor to compute the trace of |
Definition at line 284 of file isotropic_tensor.hpp.
|
constexpr |
Returns the transpose of the matrix.
| [in] | A | The matrix to obtain the transpose of |
Definition at line 1275 of file tensor.hpp.
| std::string smith::typeString | ( | T & | var | ) |
Return string of given parameter's type.
| T | the type to get a string name for |
| [in] | var | the variable to get the type of |
Definition at line 36 of file debug_print.hpp.
| auto smith::uniaxial_stress_test | ( | double | t_max, |
| size_t | num_steps, | ||
| const MaterialType | material, | ||
| const StateType | initial_state, | ||
| std::function< double(double)> | epsilon_xx, | ||
| const parameter_types... | parameter_functions | ||
| ) |
Drive the material model thorugh a uniaxial tension experiment.
Drives material model through specified axial displacement gradient history. The time elaspses from 0 up to t_max. Currently only implemented for isotropic materials (or orthotropic materials with the principal axes aligned with the coordinate directions).
| t_max | upper limit of the time interval. |
| num_steps | The number of discrete time points at which the response is sampled (uniformly spaced). This is inclusive of the point at time zero. |
| material | The material model to use |
| initial_state | The state variable collection for this material, set to the desired initial condition. |
| epsilon_xx | A function describing the desired axial displacement gradient as a function of time. (NB axial displacement gradient is equivalent to engineering strain). |
| parameter_functions | Pack of functions that return each parameter as a function of time. Leave empty if the material has no parameters. |
Definition at line 42 of file material_verification_tools.hpp.
| auto smith::uniaxial_stress_test_rate_dependent | ( | double | t_max, |
| size_t | num_steps, | ||
| const MaterialType | material, | ||
| const StateType | initial_state, | ||
| std::function< double(double)> | epsilon_xx, | ||
| const parameter_types... | parameter_functions | ||
| ) |
Drive a rate-dependent material model thorugh a uniaxial tension experiment.
Drives material model through specified axial displacement gradient history. The time elapses from 0 up to t_max. Currently only implemented for isotropic materials (or orthotropic materials with the principal axes aligned with the coordinate directions).
Definition at line 92 of file material_verification_tools.hpp.
| std::string smith::version | ( | bool | add_SHA = true | ) |
|
constexpr |
Applies a functor to the active variant element.
| [in] | visitor | The functor to apply |
| [in] | v | The variant to apply the functor to |
Definition at line 365 of file variant.hpp.
| void smith::writeToFile | ( | axom::Array< T, 2, smith::detail::host_memory_space > | arr, |
| std::string | filename | ||
| ) |
write a 2D array of values out to file, in a space-separated format
| T | the type of each value in the array |
| arr | the array to write to file |
| filename | the name of the output file |
Definition at line 113 of file debug_print.hpp.
| void smith::writeToFile | ( | axom::Array< T, 3, smith::detail::host_memory_space > | arr, |
| std::string | filename | ||
| ) |
write a 3D array of values out to file, in a mathematica-compatible format
| T | the type of each value in the array |
| arr | the array to write to file |
| filename | the name of the output file |
Definition at line 136 of file debug_print.hpp.
| void smith::writeToFile | ( | mfem::SparseMatrix | A, |
| std::string | filename | ||
| ) |
write a sparse matrix out to file
| A | the matrix to write to file |
| filename | the name of the output file |
Definition at line 90 of file debug_print.hpp.
| void smith::writeToFile | ( | mfem::Vector | v, |
| std::string | filename | ||
| ) |
write an array of doubles out to file, in a space-separated format
| v | the values to write to file |
| filename | the name of the output file |
Definition at line 76 of file debug_print.hpp.
| void smith::writeToFile | ( | std::vector< T > | v, |
| std::string | filename | ||
| ) |
write an array of values out to file, in a space-separated format
| T | the type of each value in the array |
| v | the values to write to file |
| filename | the name of the output file |
Definition at line 62 of file debug_print.hpp.
|
inline |
string->value matching for optionally entering options as string in command line
Definition at line 140 of file solver_config.hpp.
|
inline |
string->value matching for optionally entering options as string in command line
Definition at line 202 of file solver_config.hpp.
| std::shared_ptr< QuadratureData< Nothing > > smith::NoQData = ::std::make_shared<QuadratureData<Nothing>>() |
a single instance of a QuadratureData container of Nothings, since they are all interchangeable
these values exist to serve as default arguments for materials without material state
Definition at line 18 of file quadrature_data.cpp.
|
inline |
string->value matching for optionally entering options as string in command line
Definition at line 392 of file solver_config.hpp.