|
Serac
0.1
Serac is an implicit thermal strucural 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 | 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 | NewtonSolver |
| Newton solver with a 2-way line-search. Reverts to regular Newton if max_line_search_iterations is set to 0. More... | |
| struct | TrustRegionSettings |
| Internal structure for storing trust region settings. More... | |
| struct | TrustRegionResults |
| Internal structure for storing trust region stateful data. More... | |
| class | TrustRegion |
| Equation solver class based on a standard preconditioned trust-region algorithm. 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 serac::Functional that the function serac::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 serac::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 serac::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 | tuple |
| This is a class that mimics most of std::tuple's interface, except that it is usable in CUDA kernels and admits some arithmetic operator overloads. More... | |
| struct | tuple< T0 > |
| Type that mimics std::tuple. More... | |
| struct | tuple< T0, T1 > |
| Type that mimics std::tuple. More... | |
| struct | tuple< T0, T1, T2 > |
| Type that mimics std::tuple. More... | |
| struct | tuple< T0, T1, T2, T3 > |
| Type that mimics std::tuple. More... | |
| struct | tuple< T0, T1, T2, T3, T4 > |
| Type that mimics std::tuple. More... | |
| struct | tuple< T0, T1, T2, T3, T4, T5 > |
| Type that mimics std::tuple. More... | |
| struct | tuple< T0, T1, T2, T3, T4, T5, T6 > |
| Type that mimics std::tuple. More... | |
| struct | tuple< T0, T1, T2, T3, T4, T5, T6, T7 > |
| Type that mimics std::tuple. More... | |
| struct | tuple< T0, T1, T2, T3, T4, T5, T6, T7, T8 > |
| Type that mimics std::tuple. More... | |
| struct | tuple< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 > |
| Type that mimics std::tuple. More... | |
| struct | tuple< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > |
| Type that mimics std::tuple. More... | |
| struct | tuple_size |
| struct | tuple_size< serac::tuple< Types... > > |
| struct | tuple_element |
| a struct used to determine the type at index I of a tuple More... | |
| struct | tuple_element< I, tuple< Head, Tail... > > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | tuple_element< 0, tuple< Head, Tail... > > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | is_tuple |
Trait for checking if a type is a serac::tuple. More... | |
| struct | is_tuple< serac::tuple< T... > > |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| struct | is_tuple_of_tuples |
Trait for checking if a type if a serac::tuple containing only serac::tuple. More... | |
| struct | is_tuple_of_tuples< serac::tuple< T... > > |
Trait for checking if a type if a serac::tuple containing only serac::tuple. 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 | 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 | 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 | 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 | 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 serac::ShapeAwareFunctional. More... | |
| class | FunctionalWeakForm |
| class | FunctionalWeakForm< spatial_dim, OutputSpace, Parameters< InputSpaces... >, std::integer_sequence< int, input_indices... > > |
| A nonlinear WeakForm class implemented using serac::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... | |
| class | HeatTransferWeakForm |
| class | HeatTransferWeakForm< order, dim, Parameters< InputSpaces... > > |
| The weak form for heat transfer. 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 serac. 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 | SolidWeakForm |
| class | SolidWeakForm< order, dim, Parameters< InputSpaces... > > |
| The weak form for solid mechanics. 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 | |
| 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 | 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<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 serac::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 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 | 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 , 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... | |
| std::string | about () |
| Returns a string about the configuration of Serac. 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 Serac. More... | |
| std::string | compiler () |
| Returns a string for the current compiler name and version. 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, serac::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, serac::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... | |
| void | printTrustRegionInfo (double realObjective, double modelObjective, size_t cgIters, double trSize, bool willAccept) |
| trust region printing utility function | |
| std::unique_ptr< mfem::HypreParMatrix > | buildMonolithicMatrix (const mfem::BlockOperator &block_operator) |
| Function for building a monolithic parallel Hypre matrix from a block system of smaller Hypre matrices. More... | |
| std::unique_ptr< mfem::NewtonSolver > | buildNonlinearSolver (const 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... | |
| 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 serac::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 serac::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 | InteriorFaces (const mesh_t &mesh) |
| constructs a domain from all the interior face 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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_HOST_DEVICE auto | operator- (dual< gradient_type_a > a, dual< gradient_type_b > b) |
| subtraction of two dual numbers | |
| template<typename gradient_type > | |
| constexpr SERAC_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 SERAC_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 SERAC_HOST_DEVICE auto | operator* (dual< gradient_type_a > a, dual< gradient_type_b > b) |
| multiplication of two dual numbers | |
| template<typename gradient_type > | |
| constexpr SERAC_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 SERAC_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 SERAC_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 SERAC_HOST_DEVICE auto & | operator+= (dual< gradient_type > &a, const dual< gradient_type > &b) |
| compound assignment (+) for dual numbers | |
| template<typename gradient_type > | |
| constexpr SERAC_HOST_DEVICE auto & | operator-= (dual< gradient_type > &a, const dual< gradient_type > &b) |
| compound assignment (-) for dual numbers | |
| template<typename gradient_type > | |
| constexpr SERAC_HOST_DEVICE auto & | operator+= (dual< gradient_type > &a, double b) |
compound assignment (+) for dual numbers with double righthand side | |
| template<typename gradient_type > | |
| constexpr SERAC_HOST_DEVICE auto & | operator-= (dual< gradient_type > &a, double b) |
compound assignment (-) for dual numbers with double righthand side | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | abs (dual< gradient_type > x) |
| Implementation of absolute value function for dual numbers. More... | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | max (dual< gradient_type > a, double b) |
| Implementation of max for dual numbers. More... | |
| template<typename gradient_type > | |
| SERAC_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 > | |
| SERAC_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 > | |
| SERAC_HOST_DEVICE auto | min (dual< gradient_type > a, double b) |
| Implementation of min for dual numbers. More... | |
| template<typename gradient_type > | |
| SERAC_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 > | |
| SERAC_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 SERAC_HOST_DEVICE auto | inner (const dual< S > &A, const dual< T > &B) |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE auto | inner (double A, const dual< T > &B) |
| template<typename S > | |
| constexpr SERAC_HOST_DEVICE auto | inner (const dual< S > &A, double B) |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | sqrt (dual< gradient_type > x) |
| implementation of square root for dual numbers | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | cos (dual< gradient_type > a) |
| implementation of cosine for dual numbers | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | sin (dual< gradient_type > a) |
| implementation of sine for dual numbers | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | atan (dual< gradient_type > a) |
| implementation of atan for dual numbers | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | atan2 (dual< gradient_type > y, dual< gradient_type > x) |
| implementation of atan2 for dual numbers | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | atan2 (double y, dual< gradient_type > x) |
| implementation of atan2 for dual numbers | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | atan2 (dual< gradient_type > y, double x) |
| implementation of atan2 for dual numbers | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | asin (dual< gradient_type > a) |
| implementation of asin for dual numbers | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | acos (dual< gradient_type > a) |
| implementation of acos for dual numbers | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | exp (dual< gradient_type > a) |
| implementation of exponential function for dual numbers | |
| template<typename gradient_type > | |
| SERAC_HOST_DEVICE auto | log (dual< gradient_type > a) |
| implementation of the natural logarithm function for dual numbers | |
| template<typename gradient_type > | |
| SERAC_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 > | |
| SERAC_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 > | |
| SERAC_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 > | |
| SERAC_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 SERAC_HOST_DEVICE auto | make_dual (double x) |
| promote a value to a dual number of the appropriate type | |
| template<typename T > | |
| constexpr SERAC_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 SERAC_HOST_DEVICE auto | get_value (dual< T > arg) |
| return the "value" part from a dual number type | |
| template<typename gradient_type > | |
| constexpr SERAC_HOST_DEVICE auto | get_gradient (dual< gradient_type > arg) |
| return the "gradient" part from a dual number type | |
| template<mfem::Geometry::Type g> | |
| constexpr SERAC_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> | |
| SERAC_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> | |
| SERAC_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 serac'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 SERAC_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 SERAC_HOST_DEVICE auto | operator* (S scale, isotropic_tensor< T, m, m > I) |
| scalar multiplication More... | |
| template<typename S , typename T , int m> | |
| constexpr SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_HOST_DEVICE auto | GaussLegendreNodes () |
| The positions of Gauss-Legendre points for different geometries. More... | |
| template<int n, mfem::Geometry::Type geom> | |
| constexpr SERAC_HOST_DEVICE auto | GaussLegendreWeights () |
| The weights associated with each Gauss-Legendre point. More... | |
| constexpr SERAC_HOST_DEVICE int | factorial (int n) |
| compute n! More... | |
| template<int n, typename T > | |
| constexpr SERAC_HOST_DEVICE tensor< T, n > | powers (T x) |
| compute the first n powers of x More... | |
| template<int n, typename S > | |
| constexpr SERAC_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 > | |
| SERAC_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 > | |
| SERAC_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 > | |
| SERAC_HOST_DEVICE tensor< T, n > | Bernstein (T s) |
| Bernstein Polynomials on the domain [0, 1]. More... | |
| template<int n, typename T > | |
| constexpr SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_HOST_DEVICE auto | operator+ (zero, zero) |
the sum of two zeros is zero | |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE auto | operator+ (zero, T other) |
the sum of zero with something non-zero just returns the other value | |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE auto | operator+ (T other, zero) |
the sum of zero with something non-zero just returns the other value | |
| constexpr SERAC_HOST_DEVICE auto | operator- (zero) |
the unary negation of zero is zero | |
| constexpr SERAC_HOST_DEVICE auto | operator- (zero, zero) |
the difference of two zeros is zero | |
| template<typename T > | |
| constexpr SERAC_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 SERAC_HOST_DEVICE auto | operator- (T other, zero) |
the difference of something else with zero is the other thing itself | |
| constexpr SERAC_HOST_DEVICE auto | operator* (zero, zero) |
the product of two zeros is zero | |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE auto | operator* (zero, T) |
the product zero with something else is also zero | |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE auto | operator* (T, zero) |
the product zero with something else is also zero | |
| template<typename T > | |
| constexpr SERAC_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 SERAC_HOST_DEVICE auto | operator+= (zero, zero) |
zero plus zero is zero | |
| constexpr SERAC_HOST_DEVICE auto | operator-= (zero, zero) |
zero minus zero is zero | |
| template<int i> | |
| SERAC_HOST_DEVICE zero & | get (zero &x) |
let zero be accessed like a tuple | |
| template<int i> | |
| SERAC_HOST_DEVICE zero | get (const zero &) |
let zero be accessed like a tuple | |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE zero | dot (const T &, zero) |
the dot product of anything with zero is zero | |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE zero | dot (zero, const T &) |
the dot product of anything with zero is zero | |
| template<typename T , int... n> | |
| constexpr SERAC_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 > | |
| SERAC_SUPPRESS_NVCC_HOSTDEVICE_WARNING constexpr SERAC_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 > | |
| SERAC_SUPPRESS_NVCC_HOSTDEVICE_WARNING constexpr SERAC_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 > | |
| SERAC_SUPPRESS_NVCC_HOSTDEVICE_WARNING constexpr SERAC_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 > | |
| SERAC_SUPPRESS_NVCC_HOSTDEVICE_WARNING constexpr SERAC_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 > | |
| SERAC_SUPPRESS_NVCC_HOSTDEVICE_WARNING constexpr SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_HOST_DEVICE auto & | operator+= (tensor< T, 1, n > &A, const tensor< T, n > &B) |
| compound assignment (+) on tensors More... | |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE auto & | operator+= (tensor< T, 1 > &A, const T &B) |
| compound assignment (+) on tensors More... | |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE auto & | operator+= (tensor< T, 1, 1 > &A, const T &B) |
| compound assignment (+) on tensors More... | |
| template<typename T , int... n> | |
| constexpr SERAC_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 SERAC_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 SERAC_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 SERAC_HOST_DEVICE auto | outer (double A, tensor< T, n > B) |
| template<typename T , int m> | |
| constexpr SERAC_HOST_DEVICE auto | outer (const tensor< T, m > &A, double B) |
| template<typename T , int n> | |
| constexpr SERAC_HOST_DEVICE auto | outer (zero, const tensor< T, n > &) |
| template<typename T , int n> | |
| constexpr SERAC_HOST_DEVICE auto | outer (const tensor< T, n > &, zero) |
| template<typename S , typename T , int m, int n> | |
| constexpr SERAC_HOST_DEVICE auto | outer (const tensor< S, m > &A, const tensor< T, n > &B) |
| template<typename S , typename T , int m, int n> | |
| constexpr SERAC_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 SERAC_HOST_DEVICE auto | inner (const tensor< S, m > &A, const tensor< T, m > &B) |
| constexpr SERAC_HOST_DEVICE auto | inner (double A, double B) |
| template<typename S , int m, int n> | |
| constexpr SERAC_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 SERAC_HOST_DEVICE auto | inner (const tensor< S, m > &, zero) |
| constexpr SERAC_HOST_DEVICE auto | inner (double, zero) |
| template<typename T , int m, int n> | |
| constexpr SERAC_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 SERAC_HOST_DEVICE auto | inner (zero, const tensor< T, m > &) |
| constexpr SERAC_HOST_DEVICE auto | inner (zero, double) |
| template<typename S , typename T , int m, int n, int p> | |
| constexpr SERAC_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 SERAC_HOST_DEVICE auto | dot (const tensor< T, m > &A, double B) |
| template<typename T , int m> | |
| constexpr SERAC_HOST_DEVICE auto | dot (double B, const tensor< T, m > &A) |
| template<typename S , typename T , int m> | |
| constexpr SERAC_HOST_DEVICE auto | dot (const tensor< S, m > &A, const tensor< T, m > &B) |
| template<typename S , typename T , int m, int n> | |
| constexpr SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 > | |
| 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 > | |
| 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 > | |
| 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 > | |
| 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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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> | |
| SERAC_HOST_DEVICE auto | norm (const tensor< T, n... > &A) |
| Returns the Frobenius norm of the tensor. More... | |
| constexpr SERAC_HOST_DEVICE auto | norm (zero) |
| overload of Frobenius norm for zero type | |
| template<typename T , int... n> | |
| SERAC_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 > | |
| SERAC_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 SERAC_HOST_DEVICE auto | tr (const tensor< T, n, n > &A) |
| Returns the trace of a square matrix. More... | |
| template<typename T , int n> | |
| constexpr SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_HOST_DEVICE tensor< double, dim, dim > | DenseIdentity () |
| Obtains the identity matrix of the specified dimension. More... | |
| template<typename T , int m, int n> | |
| constexpr SERAC_HOST_DEVICE auto | transpose (const tensor< T, m, n > &A) |
| Returns the transpose of the matrix. More... | |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE auto | I2 (const tensor< T, 3, 3 > &A) |
| Returns the second invariant of a 3x3 matrix. More... | |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE auto | det (const tensor< T, 2, 2 > &A) |
| Returns the determinant of a matrix. More... | |
| template<typename T > | |
| constexpr SERAC_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 SERAC_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 SERAC_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> | |
| SERAC_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 > | |
| SERAC_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> | |
| SERAC_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... | |
| SERAC_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... | |
| SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_HOST_DEVICE auto | linear_solve (const LuFactorization< S, n > &lu_factors, const tensor< T, n, m... > &b) |
| template<typename T , int n> | |
| constexpr SERAC_HOST_DEVICE auto | linear_solve (const LuFactorization< T, n > &, const zero) |
| constexpr SERAC_HOST_DEVICE tensor< double, 2, 2 > | inv (const tensor< double, 2, 2 > &A) |
| Inverts a matrix. More... | |
| constexpr SERAC_HOST_DEVICE tensor< double, 3, 3 > | inv (const tensor< double, 3, 3 > &A) |
| template<typename T , int n> | |
| constexpr SERAC_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... | |
| SERAC_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> | |
| SERAC_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 SERAC_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 SERAC_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. | |
| SERAC_HOST_DEVICE auto | get_gradient (double) |
| Retrieves the gradient component of a double (which is nothing) More... | |
| template<int... n> | |
| constexpr SERAC_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 SERAC_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 SERAC_HOST_DEVICE auto | chain_rule (const zero, const T) |
| template<typename T > | |
| constexpr SERAC_HOST_DEVICE auto | chain_rule (const T, const zero) |
| constexpr SERAC_HOST_DEVICE auto | chain_rule (const double df_dx, const double dx) |
| template<int... n> | |
| constexpr SERAC_HOST_DEVICE auto | chain_rule (const tensor< double, n... > &df_dx, const double dx) |
| template<int... n> | |
| constexpr SERAC_HOST_DEVICE auto | chain_rule (const tensor< double, n... > &df_dx, const tensor< double, n... > &dx) |
| template<int m, int... n> | |
| constexpr SERAC_HOST_DEVICE auto | chain_rule (const tensor< double, m, n... > &df_dx, const tensor< double, n... > &dx) |
| template<int m, int n, int... p> | |
| SERAC_HOST_DEVICE auto | chain_rule (const tensor< double, m, n, p... > &df_dx, const tensor< double, p... > &dx) |
| template<typename T , int... n> | |
| constexpr SERAC_HOST_DEVICE int | size (const tensor< T, n... > &) |
| returns the total number of stored values in a tensor More... | |
| constexpr SERAC_HOST_DEVICE int | size (const double &) |
overload of size() for double, we say a double "stores" 1 value More... | |
| constexpr SERAC_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 SERAC_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 SERAC_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... T> | |
| tuple (T...) -> tuple< T... > | |
| Class template argument deduction rule for tuples. More... | |
| template<typename... T> | |
| SERAC_HOST_DEVICE tuple< T... > | make_tuple (const T &... args) |
| helper function for combining a list of values into a tuple More... | |
| template<int i, typename... T> | |
| constexpr SERAC_HOST_DEVICE auto & | get (tuple< T... > &values) |
| return a reference to the ith tuple entry More... | |
| template<int i, typename... T> | |
| constexpr SERAC_HOST_DEVICE const auto & | get (const tuple< T... > &values) |
| return a copy of the ith tuple entry More... | |
| template<int i, typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | type (const tuple< T... > &values) |
| a function intended to be used for extracting the ith type from a tuple. More... | |
| template<typename... S, typename... T, int... i> | |
| constexpr SERAC_HOST_DEVICE auto | plus_helper (const tuple< S... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >) |
| A helper function for the + operator of tuples. More... | |
| template<typename... S, typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | operator+ (const tuple< S... > &x, const tuple< T... > &y) |
| return a tuple of values defined by elementwise sum of x and y More... | |
| template<typename... T, int... i> | |
| constexpr SERAC_HOST_DEVICE void | plus_equals_helper (tuple< T... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >) |
| A helper function for the += operator of tuples. More... | |
| template<typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | operator+= (tuple< T... > &x, const tuple< T... > &y) |
| add values contained in y, to the tuple x More... | |
| template<typename... T, int... i> | |
| constexpr SERAC_HOST_DEVICE void | minus_equals_helper (tuple< T... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >) |
| A helper function for the -= operator of tuples. More... | |
| template<typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | operator-= (tuple< T... > &x, const tuple< T... > &y) |
| add values contained in y, to the tuple x More... | |
| template<typename... S, typename... T, int... i> | |
| constexpr SERAC_HOST_DEVICE auto | minus_helper (const tuple< S... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >) |
| A helper function for the - operator of tuples. More... | |
| template<typename... S, typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | operator- (const tuple< S... > &x, const tuple< T... > &y) |
| return a tuple of values defined by elementwise difference of x and y More... | |
| template<typename... T, int... i> | |
| constexpr SERAC_HOST_DEVICE auto | unary_minus_helper (const tuple< T... > &x, std::integer_sequence< int, i... >) |
| A helper function for the - operator of tuples. More... | |
| template<typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | operator- (const tuple< T... > &x) |
| return a tuple of values defined by applying the unary minus operator to each element of x More... | |
| template<typename... S, typename... T, int... i> | |
| constexpr SERAC_HOST_DEVICE auto | div_helper (const tuple< S... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >) |
| A helper function for the / operator of tuples. More... | |
| template<typename... S, typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | operator/ (const tuple< S... > &x, const tuple< T... > &y) |
| return a tuple of values defined by elementwise division of x by y More... | |
| template<typename... T, int... i> | |
| constexpr SERAC_HOST_DEVICE auto | div_helper (const double a, const tuple< T... > &x, std::integer_sequence< int, i... >) |
| A helper function for the / operator of tuples. More... | |
| template<typename... T, int... i> | |
| constexpr SERAC_HOST_DEVICE auto | div_helper (const tuple< T... > &x, const double a, std::integer_sequence< int, i... >) |
| A helper function for the / operator of tuples. More... | |
| template<typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | operator/ (const double a, const tuple< T... > &x) |
| return a tuple of values defined by division of a by the elements of x More... | |
| template<typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | operator/ (const tuple< T... > &x, const double a) |
| return a tuple of values defined by elementwise division of x by a More... | |
| template<typename... S, typename... T, int... i> | |
| constexpr SERAC_HOST_DEVICE auto | mult_helper (const tuple< S... > &x, const tuple< T... > &y, std::integer_sequence< int, i... >) |
| A helper function for the * operator of tuples. More... | |
| template<typename... S, typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | operator* (const tuple< S... > &x, const tuple< T... > &y) |
| return a tuple of values defined by elementwise multiplication of x and y More... | |
| template<typename... T, int... i> | |
| constexpr SERAC_HOST_DEVICE auto | mult_helper (const double a, const tuple< T... > &x, std::integer_sequence< int, i... >) |
| A helper function for the * operator of tuples. More... | |
| template<typename... T, int... i> | |
| constexpr SERAC_HOST_DEVICE auto | mult_helper (const tuple< T... > &x, const double a, std::integer_sequence< int, i... >) |
| A helper function for the * operator of tuples. More... | |
| template<typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | operator* (const double a, const tuple< T... > &x) |
| multiply each component of x by the value a on the left More... | |
| template<typename... T> | |
| constexpr SERAC_HOST_DEVICE auto | operator* (const tuple< T... > &x, const double a) |
| multiply each component of x by the value a on the right More... | |
| template<typename... T, std::size_t... i> | |
| auto & | print_helper (std::ostream &out, const serac::tuple< T... > &A, std::integer_sequence< size_t, i... >) |
| helper used to implement printing a tuple of values More... | |
| template<typename... T> | |
| auto & | operator<< (std::ostream &out, const serac::tuple< T... > &A) |
| print a tuple of values More... | |
| template<typename lambda , typename... T, int... i> | |
| SERAC_HOST_DEVICE auto | apply_helper (lambda f, tuple< T... > &args, std::integer_sequence< int, i... >) |
| A helper to apply a lambda to a tuple. More... | |
| template<typename lambda , typename... T> | |
| SERAC_HOST_DEVICE auto | apply (lambda f, tuple< T... > &args) |
| a way of passing an n-tuple to a function that expects n separate arguments More... | |
| template<typename lambda , typename... T, int... i> | |
| SERAC_HOST_DEVICE auto | apply_helper (lambda f, const tuple< T... > &args, std::integer_sequence< int, i... >) |
| template<typename lambda , typename... T> | |
| SERAC_HOST_DEVICE auto | apply (lambda f, const tuple< T... > &args) |
| a way of passing an n-tuple to a function that expects n separate arguments 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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 > | |
| SERAC_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> | |
| SERAC_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 SERAC_HOST_DEVICE auto | make_dual_helper (const serac::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 serac::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 T1 , typename T2 , int n> | |
| SERAC_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> | |
| SERAC_HOST_DEVICE auto | get_value (const serac::tuple< T... > &tuple_of_values) |
| Retrieves the value components of a set of (possibly dual) numbers. More... | |
| template<typename... T> | |
| SERAC_HOST_DEVICE auto | get_gradient (dual< serac::tuple< T... >> arg) |
| Retrieves the gradient components of a set of dual numbers. More... | |
| template<typename... T, int... n> | |
| SERAC_HOST_DEVICE auto | get_gradient (const tensor< dual< serac::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> | |
| SERAC_HOST_DEVICE auto | get_gradient (serac::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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_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 SERAC_HOST_DEVICE auto | inv (tensor< dual< gradient_type >, n, n > A) |
| template<typename T , int... n> | |
| SERAC_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 SERAC_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 SERAC_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 serac::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 > | |
| SERAC_HOST_DEVICE tensor< int, 3 > | argsort (const tensor< T, 3 > &v) |
| Find indices that would sort a 3-vector. More... | |
| SERAC_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 SERAC_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::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< serac::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... | |
| template<int order, int dim, typename... ParameterSpaces> | |
| auto | create_solid_weak_form (const std::string &physics_name, std::shared_ptr< serac::Mesh > mesh, const std::vector< serac::FiniteElementState * > &states, const std::vector< serac::FiniteElementState * > ¶ms) |
| Utility function for creating a shared_ptr<SolidWeakForm<>> 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 serac 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.
The Serac namespace
| using serac::one_hot_t = typedef typename one_hot<i, n, T>::type |
a tuple type with n entries, all of which are of type serac::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 126 of file tuple_tensor_dual_functions.hpp.
| using serac::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 1824 of file tensor.hpp.
| using serac::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 272 of file tensor.hpp.
|
strong |
Solver types supported by AMGX.
Definition at line 217 of file solver_config.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 60 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 181 of file finite_element.hpp.
|
strong |
Linear solution method indicator.
Definition at line 102 of file solver_config.hpp.
|
strong |
Nonlinear solver method indicator.
Definition at line 149 of file solver_config.hpp.
|
strong |
Preconditioner types supported by PETSc.
Definition at line 256 of file solver_config.hpp.
|
strong |
The type of preconditioner to be used.
Definition at line 321 of file solver_config.hpp.
|
strong |
Timestep method of a solver.
Definition at line 25 of file solver_config.hpp.
| std::string serac::about | ( | ) |
| SERAC_HOST_DEVICE auto serac::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 1176 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.
| SERAC_HOST_DEVICE auto serac::apply | ( | lambda | f, |
| const tuple< T... > & | args | ||
| ) |
a way of passing an n-tuple to a function that expects n separate arguments
| lambda | a callable type |
| T | the types of arguments to be passed in to f |
| f | the callable object |
| args | a tuple of arguments |
e.g. foo(bar, baz) is equivalent to apply(foo, serac::tuple(bar,baz));
| SERAC_HOST_DEVICE auto serac::apply | ( | lambda | f, |
| tuple< T... > & | args | ||
| ) |
a way of passing an n-tuple to a function that expects n separate arguments
| lambda | a callable type |
| T | the types of arguments to be passed in to f |
| f | the callable object |
| args | a tuple of arguments |
e.g. foo(bar, baz) is equivalent to apply(foo, serac::tuple(bar,baz));
| SERAC_HOST_DEVICE auto serac::apply_helper | ( | lambda | f, |
| const tuple< T... > & | args, | ||
| std::integer_sequence< int, i... > | |||
| ) |
| SERAC_HOST_DEVICE auto serac::apply_helper | ( | lambda | f, |
| tuple< T... > & | args, | ||
| std::integer_sequence< int, i... > | |||
| ) |
| SERAC_HOST_DEVICE tensor<int, 3> serac::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 784 of file tuple_tensor_dual_functions.hpp.
| double serac::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 114 of file finite_element_vector.cpp.
| SERAC_HOST_DEVICE tensor<T, n> serac::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.
| serac::binary_comparator_overload | ( | ) |
implement operator< for dual numbers
implement operator> for dual numbers
implement operator== for dual numbers
|
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 serac::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 364 of file mesh_utils.cpp.
| mfem::Mesh serac::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 serac::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 serac::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 serac::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 serac::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 356 of file mesh_utils.cpp.
| std::pair< std::unique_ptr< mfem::Solver >, std::unique_ptr< mfem::Solver > > serac::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 1076 of file equation_solver.cpp.
| mfem::Mesh serac::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 > serac::buildMonolithicMatrix | ( | const mfem::BlockOperator & | block_operator | ) |
Function for building a monolithic parallel Hypre matrix from a block system of smaller Hypre matrices.
| block_operator | The block system of HypreParMatrices |
Definition at line 919 of file equation_solver.cpp.
| std::unique_ptr< mfem::NewtonSolver > serac::buildNonlinearSolver | ( | const 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 1003 of file equation_solver.cpp.
| std::unique_ptr< mfem::Solver > serac::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 1190 of file equation_solver.cpp.
| mfem::Mesh serac::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 serac::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 350 of file mesh_utils.cpp.
|
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 1872 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 1863 of file tensor.hpp.
| SERAC_HOST_DEVICE auto serac::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 1915 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 1901 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 1879 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 1889 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 1853 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.
| SERAC_HOST_DEVICE tensor<T, n> serac::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 1753 of file tensor.hpp.
| std::string serac::compiler | ( | ) |
| void serac::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 serac::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 serac::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.
| SERAC_HOST_DEVICE auto serac::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 1400 of file tensor.hpp.
| auto serac::create_solid_weak_form | ( | const std::string & | physics_name, |
| std::shared_ptr< serac::Mesh > | mesh, | ||
| const std::vector< serac::FiniteElementState * > & | states, | ||
| const std::vector< serac::FiniteElementState * > & | params | ||
| ) |
Utility function for creating a shared_ptr<SolidWeakForm<>>
Local enum to better document the expected indexing order to states
Definition at line 347 of file solid_weak_form.hpp.
| void serac::defineInputFileSchema | ( | axom::inlet::Inlet & | inlet | ) |
|
constexpr |
Obtains the identity matrix of the specified dimension.
Definition at line 1254 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 1297 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 1321 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 1195 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 1226 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 1240 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 1212 of file tensor.hpp.
|
inline |
this function is intended to only be used in combination with serac::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 42 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 1957 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 |
|
constexpr |
|
constexpr |
|
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 801 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 815 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 831 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 851 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 931 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 865 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 763 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 897 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 881 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 913 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 781 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 791 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 1039 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 1021 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 1001 of file tensor.hpp.
| serac::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 808 of file tuple_tensor_dual_functions.hpp.
| auto serac::eigenvalues | ( | const serac::tensor< T, size, size > & | A | ) |
compute the eigenvalues of a symmetric matrix A
| T | either double or a serac::dual type |
| size | the dimensions of the matrix |
| A | the matrix |
Definition at line 728 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 141 of file finite_element.hpp.
| auto serac::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 1035 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 365 of file tuple_tensor_dual_functions.hpp.
| auto serac::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 698 of file tuple_tensor_dual_functions.hpp.
| void serac::findDomainDofsOnNeighborRanks | ( | const serac::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 serac::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> > serac::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 serac::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 serac::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 serac::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 serac'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 114 of file functional.hpp.
|
inline |
count the number of elements of each geometry in a domain
| domain | the domain to count |
Definition at line 300 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 |
|
constexpr |
|
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 1838 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 512 of file tuple_tensor_dual_functions.hpp.
|
inline |
Retrieves the gradient component of a double (which is nothing)
Definition at line 1830 of file tensor.hpp.
| SERAC_HOST_DEVICE auto serac::get_gradient | ( | dual< serac::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 316 of file tuple_tensor_dual_functions.hpp.
| T* serac::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.
| SERAC_HOST_DEVICE auto serac::get_value | ( | const serac::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 305 of file tuple_tensor_dual_functions.hpp.
| SERAC_HOST_DEVICE auto serac::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 500 of file tuple_tensor_dual_functions.hpp.
| SERAC_HOST_DEVICE auto serac::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 290 of file tuple_tensor_dual_functions.hpp.
| std::pair< int, int > serac::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 403 of file functional_weak_form.hpp.
| std::string serac::gitSHA | ( | ) |
| bool serac::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 1286 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 60 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 715 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 683 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 705 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 667 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 696 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 724 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 743 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 733 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 752 of file tensor.hpp.
| double serac::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 141 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 1647 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 1665 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 1689 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 480 of file tuple_tensor_dual_functions.hpp.
| SERAC_HOST_DEVICE bool serac::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 1487 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 1507 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 1972 of file tensor.hpp.
| SERAC_HOST_DEVICE tensor<T, n> serac::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 1621 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 1637 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 426 of file tuple_tensor_dual_functions.hpp.
| auto serac::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 1014 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 345 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 189 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-serac::zero derivative term appears |
| N | how many entries in the gradient type |
| arg | the value to be promoted |
Definition at line 160 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-serac::zero derivative term appears |
| N | how many entries in the gradient type |
| arg | the value to be promoted |
Definition at line 143 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 275 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 299 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 318 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 342 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 369 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 399 of file tensor.hpp.
| SERAC_HOST_DEVICE tuple<T...> serac::make_tuple | ( | const T &... | args | ) |
| Integral serac::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 serac::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 serac::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 serac::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 1361 of file tensor.hpp.
| double serac::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 125 of file finite_element_vector.cpp.
| SERAC_HOST_DEVICE auto serac::max | ( | dual< gradient_type > | a, |
| double | b | ||
| ) |
| double serac::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 133 of file finite_element_vector.cpp.
| SERAC_HOST_DEVICE auto serac::min | ( | dual< gradient_type > | a, |
| double | b | ||
| ) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
| double serac::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.
| SERAC_HOST_DEVICE auto serac::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 1100 of file tensor.hpp.
| SERAC_HOST_DEVICE auto serac::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 1117 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 |
|
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 |
|
constexpr |
|
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 424 of file tensor.hpp.
|
constexpr |
|
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 476 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 535 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 547 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 520 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 505 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 559 of file tensor.hpp.
|
constexpr |
|
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 458 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 440 of file tensor.hpp.
|
constexpr |
|
constexpr |
|
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 573 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 588 of file tensor.hpp.
|
constexpr |
|
constexpr |
|
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 |
|
constexpr |
|
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& serac::operator<< | ( | std::ostream & | out, |
| const serac::tuple< T... > & | A | ||
| ) |
| auto& serac::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 1704 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 1719 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 646 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 612 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 636 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 598 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 626 of file tensor.hpp.
| SERAC_HOST_DEVICE void serac::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 268 of file finite_element.hpp.
| SERAC_HOST_DEVICE void serac::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 309 of file finite_element.hpp.
|
constexpr |
|
constexpr |
|
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.
| SERAC_HOST_DEVICE void serac::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 1737 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 1730 of file tensor.hpp.
| auto& serac::print_helper | ( | std::ostream & | out, |
| const serac::tuple< T... > & | A, | ||
| std::integer_sequence< size_t, i... > | |||
| ) |
| void serac::printRunInfo | ( | ) |
Outputs basic run information to the screen.
Note: Command line options are handled in infrastructure/cli.cpp
| SERAC_HOST_DEVICE auto serac::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 229 of file tuple_tensor_dual_functions.hpp.
| SERAC_HOST_DEVICE auto serac::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 210 of file tuple_tensor_dual_functions.hpp.
| double serac::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 1473 of file tensor.hpp.
| bool serac::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 serac::sgn | ( | T | val | ) |
Signum, returns sign of input.
| val | Input value. |
Definition at line 770 of file tuple_tensor_dual_functions.hpp.
| auto serac::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 123 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 1943 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 1934 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 1582 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 1563 of file tensor.hpp.
| auto serac::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 577 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 1603 of file tensor.hpp.
| auto serac::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 1056 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 1064 of file tensor.hpp.
| void serac::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 1159 of file tensor.hpp.
| auto serac::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 969 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.
| serac::tensor | ( | const T(&) | data[n1] | ) | -> tensor< T, n1 > |
class template argument deduction guide for type tensor.
| serac::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 282 of file tensor.hpp.
| SERAC_HOST_DEVICE tensor<T, 3, 3> serac::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 1128 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 1144 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 1270 of file tensor.hpp.
| serac::tuple | ( | T... | ) | -> tuple< T... > |
Class template argument deduction rule for tuples.
| T | The variadic template parameter for tuple types |
|
constexpr |
a function intended to be used for extracting the ith type from a tuple.
| i | the index of the tuple to query |
| T | the types stored in the tuple |
| values | the tuple of values |
| std::string serac::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.
|
constexpr |
| auto serac::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 serac::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 serac::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 serac::writeToFile | ( | axom::Array< T, 2, serac::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 serac::writeToFile | ( | axom::Array< T, 3, serac::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 serac::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 serac::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 serac::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 138 of file solver_config.hpp.
|
inline |
string->value matching for optionally entering options as string in command line
Definition at line 200 of file solver_config.hpp.
| std::shared_ptr< QuadratureData< Nothing > > serac::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 363 of file solver_config.hpp.