PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
Jacobian.h File Reference

Functions to compute jacobians, their determinants, domain quadrature weights and mapping domain to reference space. More...

#include "Concepts.h"
#include "pbat/common/Concepts.h"
#include <Eigen/Cholesky>
#include <Eigen/LU>
#include <Eigen/SVD>
#include <fmt/core.h>
#include <pbat/Aliases.h>
#include <pbat/common/Eigen.h>
#include <pbat/profiling/Profiling.h>
#include <string>
#include <tbb/parallel_for.h>

Go to the source code of this file.

Namespaces

namespace  pbat
 The main namespace of the library.
 
namespace  pbat::fem
 Finite Element Method (FEM)
 

Functions

template<CElement TElement, class TDerivedX, class TDerivedx, common::CFloatingPoint TScalar = typename TDerivedX::Scalar>
auto pbat::fem::Jacobian (Eigen::MatrixBase< TDerivedX > const &X, Eigen::MatrixBase< TDerivedx > const &x) -> Eigen::Matrix< TScalar, TDerivedx::RowsAtCompileTime, TElement::kDims >
 Given a map \( x(\xi) = \sum_i x_i N_i(\xi) \), where \( \xi \in \Omega^{\text{ref}} \) is in reference space coordinates, computes \( \nabla_\xi x \).
 
template<class TDerived>
auto pbat::fem::DeterminantOfJacobian (Eigen::MatrixBase< TDerived > const &J) -> typename TDerived::Scalar
 Computes the determinant of a (potentially non-square) Jacobian matrix.
 
template<CElement TElement, int QuadratureOrder, class TDerivedE, class TDerivedX>
auto pbat::fem::DeterminantOfJacobian (Eigen::DenseBase< TDerivedE > const &E, Eigen::MatrixBase< TDerivedX > const &X) -> Eigen::Matrix< typename TDerivedX::Scalar, TElement::template QuadratureType< QuadratureOrder, typename TDerivedX::Scalar >::kPoints, Eigen::Dynamic >
 Computes the determinant of the Jacobian matrix at element quadrature points.
 
template<int QuadratureOrder, CMesh TMesh>
auto pbat::fem::DeterminantOfJacobian (TMesh const &mesh) -> Eigen::Matrix< typename TMesh::ScalarType, TMesh::ElementType::template QuadratureType< QuadratureOrder, typename TMesh::ScalarType >::kPoints, Eigen::Dynamic >
 
template<CElement TElement, class TDerivedEg, class TDerivedX, class TDerivedXi>
auto pbat::fem::DeterminantOfJacobianAt (Eigen::DenseBase< TDerivedEg > const &Eg, Eigen::MatrixBase< TDerivedX > const &X, Eigen::MatrixBase< TDerivedXi > const &Xi) -> Eigen::Vector< typename TDerivedX::Scalar, Eigen::Dynamic >
 Computes the determinant of the Jacobian matrix at element quadrature points.
 
template<CElement TElement, class TDerivedE, class TDerivedX, class TDerivedeg, class TDerivedXi>
auto pbat::fem::DeterminantOfJacobianAt (Eigen::DenseBase< TDerivedE > const &E, Eigen::MatrixBase< TDerivedX > const &X, Eigen::MatrixBase< TDerivedeg > const &eg, Eigen::MatrixBase< TDerivedXi > const &Xi) -> Eigen::Vector< typename TDerivedX::Scalar, Eigen::Dynamic >
 Computes the determinant of the Jacobian matrix at element quadrature points.
 
template<CElement TElement, class TDerivedX, class TDerivedx, common::CFloatingPoint TScalar = typename TDerivedX::Scalar>
auto pbat::fem::ReferencePosition (Eigen::MatrixBase< TDerivedX > const &X, Eigen::MatrixBase< TDerivedx > const &x, int const maxIterations=5, TScalar const eps=1e-10) -> Eigen::Vector< TScalar, TElement::kDims >
 Computes the reference position \( \xi \) such that \( x(\xi) = x \). This inverse problem is solved using Gauss-Newton iterations.
 
template<CElement TElement, class TDerivedEg, class TDerivedX, class TDerivedXg, common::CFloatingPoint TScalar = typename TDerivedXg::Scalar>
auto pbat::fem::ReferencePositions (Eigen::DenseBase< TDerivedEg > const &Eg, Eigen::MatrixBase< TDerivedX > const &X, Eigen::MatrixBase< TDerivedXg > const &Xg, int maxIterations=5, TScalar eps=1e-10) -> Eigen::Matrix< TScalar, TElement::kDims, Eigen::Dynamic >
 Computes reference positions \( \xi \) such that \( X(\xi) = X_n \) for every point in \( \mathbf{X} \in \mathbb{R}^{d \times n} \).
 
template<CElement TElement, class TDerivedE, class TDerivedX, class TDerivedEg, class TDerivedXg>
auto pbat::fem::ReferencePositions (Eigen::DenseBase< TDerivedE > const &E, Eigen::MatrixBase< TDerivedX > const &X, Eigen::DenseBase< TDerivedEg > const &eg, Eigen::MatrixBase< TDerivedXg > const &Xg, int maxIterations=5, typename TDerivedXg::Scalar eps=1e-10) -> Eigen::Matrix< typename TDerivedXg::Scalar, TElement::kDims, Eigen::Dynamic >
 
template<CMesh TMesh, class TDerivedEg, class TDerivedXg>
auto pbat::fem::ReferencePositions (TMesh const &mesh, Eigen::DenseBase< TDerivedEg > const &eg, Eigen::MatrixBase< TDerivedXg > const &Xg, int maxIterations=5, typename TMesh::ScalarType eps=1e-10) -> Eigen::Matrix< typename TMesh::ScalarType, TMesh::ElementType::kDims, Eigen::Dynamic >
 Computes reference positions \( \xi \) such that \( X(\xi) = X_n \) for every point in \( \mathbf{X} \in \mathbb{R}^{d \times n} \).
 

Detailed Description

Functions to compute jacobians, their determinants, domain quadrature weights and mapping domain to reference space.

Author
Quoc-Minh Ton-That (tonth.nosp@m.at.q.nosp@m.uocmi.nosp@m.nh@g.nosp@m.mail..nosp@m.com)
Date
2025-02-11