Wildmeshing Toolkit
wmtk::function::utils Namespace Reference

Namespaces

 detail
 

Classes

class  AutoDiffRAII
 
class  PositionMapEvaluator
 

Functions

double Tet_AMIPS_energy_aux (const std::array< double, 12 > &T)
 
void Tet_AMIPS_jacobian (const std::array< double, 12 > &T, Eigen::Vector3d &result_0)
 
void Tet_AMIPS_hessian (const std::array< double, 12 > &T, Eigen::Matrix3d &result_0)
 
double Tet_AMIPS_energy (const std::array< double, 12 > &T)
 
template<typename Derived >
auto amips (const Eigen::MatrixBase< Derived > &B)
 
template<typename V0Type , typename V1Type , typename V2Type >
auto amips (const Eigen::MatrixBase< V0Type > &v0, const Eigen::MatrixBase< V1Type > &v1, const Eigen::MatrixBase< V2Type > &v2)
 
template<typename DScalarType , int Rows = Eigen::Dynamic, int Cols = Eigen::Dynamic>
auto make_DScalar_matrix (int rows=0, int cols=0)
 
template<typename DScalarType , typename Derived >
auto as_DScalar (const Eigen::MatrixBase< Derived > &data)
 
template<typename T >
std::tuple< std::vector< std::decay_t< typename attribute::ConstMapResult< T > > >, int64_t > get_simplex_attributes (const Mesh &mesh, const wmtk::attribute::Accessor< T > &accessor, const PrimitiveType primitive_type, const simplex::Simplex &simplex, const std::optional< wmtk::Tuple > &vertex_marker={})
 get attributes from a simplex More...
 
template std::tuple< std::vector< std::decay_t< typename attribute::ConstMapResult< char > > >, int64_t > get_simplex_attributes (const Mesh &mesh, const wmtk::attribute::Accessor< char > &accessor, const PrimitiveType primitive_type, const simplex::Simplex &simplex, const std::optional< wmtk::Tuple > &vertex_marker)
 
template std::tuple< std::vector< std::decay_t< typename attribute::ConstMapResult< int64_t > > >, int64_t > get_simplex_attributes (const Mesh &mesh, const wmtk::attribute::Accessor< int64_t > &accessor, const PrimitiveType primitive_type, const simplex::Simplex &simplex, const std::optional< wmtk::Tuple > &vertex_marker)
 
template std::tuple< std::vector< std::decay_t< typename attribute::ConstMapResult< double > > >, int64_t > get_simplex_attributes (const Mesh &mesh, const wmtk::attribute::Accessor< double > &accessor, const PrimitiveType primitive_type, const simplex::Simplex &simplex, const std::optional< wmtk::Tuple > &vertex_marker)
 
template std::tuple< std::vector< std::decay_t< typename attribute::ConstMapResult< Rational > > >, int64_t > get_simplex_attributes (const Mesh &mesh, const wmtk::attribute::Accessor< Rational > &accessor, const PrimitiveType primitive_type, const simplex::Simplex &simplex, const std::optional< wmtk::Tuple > &vertex_marker)
 

Function Documentation

◆ amips() [1/2]

template<typename Derived >
auto wmtk::function::utils::amips ( const Eigen::MatrixBase< Derived > &  B)

Definition at line 20 of file amips.hpp.

References wmtk::abs(), and wmtk::function::utils::detail::amips_reference_to_barycentric.

Referenced by amips(), wmtk::function::TriangleAMIPS::eval(), wmtk::function::PositionMapAMIPS2D::get_value_autodiff(), wmtk::components::internal::periodic_optimization(), wmtk::components::wildmeshing(), wmtk::components::internal::wildmeshing2d(), and wmtk::components::internal::wildmeshing3d().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ amips() [2/2]

template<typename V0Type , typename V1Type , typename V2Type >
auto wmtk::function::utils::amips ( const Eigen::MatrixBase< V0Type > &  v0,
const Eigen::MatrixBase< V1Type > &  v1,
const Eigen::MatrixBase< V2Type > &  v2 
)

Definition at line 49 of file amips.hpp.

References amips().

Here is the call graph for this function:

◆ as_DScalar()

template<typename DScalarType , typename Derived >
auto wmtk::function::utils::as_DScalar ( const Eigen::MatrixBase< Derived > &  data)

Definition at line 48 of file AutoDiffUtils.hpp.

References DiffScalarBase::getVariableCount().

Here is the call graph for this function:

◆ get_simplex_attributes() [1/5]

template std::tuple<std::vector<std::decay_t<typename attribute::ConstMapResult<char> > >, int64_t> wmtk::function::utils::get_simplex_attributes ( const Mesh mesh,
const wmtk::attribute::Accessor< char > &  accessor,
const PrimitiveType  primitive_type,
const simplex::Simplex simplex,
const std::optional< wmtk::Tuple > &  vertex_marker 
)

◆ get_simplex_attributes() [2/5]

template std::tuple<std::vector<std::decay_t<typename attribute::ConstMapResult<double> > >, int64_t> wmtk::function::utils::get_simplex_attributes ( const Mesh mesh,
const wmtk::attribute::Accessor< double > &  accessor,
const PrimitiveType  primitive_type,
const simplex::Simplex simplex,
const std::optional< wmtk::Tuple > &  vertex_marker 
)

◆ get_simplex_attributes() [3/5]

template std::tuple<std::vector<std::decay_t<typename attribute::ConstMapResult<int64_t> > >, int64_t> wmtk::function::utils::get_simplex_attributes ( const Mesh mesh,
const wmtk::attribute::Accessor< int64_t > &  accessor,
const PrimitiveType  primitive_type,
const simplex::Simplex simplex,
const std::optional< wmtk::Tuple > &  vertex_marker 
)

◆ get_simplex_attributes() [4/5]

template std:: tuple<std::vector<std::decay_t<typename attribute::ConstMapResult<Rational> > >, int64_t> wmtk::function::utils::get_simplex_attributes ( const Mesh mesh,
const wmtk::attribute::Accessor< Rational > &  accessor,
const PrimitiveType  primitive_type,
const simplex::Simplex simplex,
const std::optional< wmtk::Tuple > &  vertex_marker 
)

◆ get_simplex_attributes() [5/5]

template<typename T >
std::tuple< std::vector< std::decay_t< typename attribute::ConstMapResult< T > > >, int64_t > wmtk::function::utils::get_simplex_attributes ( const Mesh mesh,
const wmtk::attribute::Accessor< T > &  accessor,
const PrimitiveType  primitive_type,
const simplex::Simplex simplex,
const std::optional< wmtk::Tuple > &  vertex_marker = {} 
)

get attributes from a simplex

Parameters
meshmesh
accessoraccessor from where to read the attributes
primitive_typetype of the data to extract (eg if vertex it will extract the vertex attributes)
simplexsource simples (eg is simplex is triangle and primitive_type is vertex it extracts the vertex attributes for that triangle)
vertex_markeroptional, a tuple pointing to one of the simplicies of type primitive_type in the simplex (eg one of the vertices of the triangle)
Returns
a pair containing a vector of Vectors one for each attribute (eg 3 for a triangle) and an index poiting to the attr corresponding to the vertex_marker (-1 if not specified)

Definition at line 9 of file SimplexGetter.cpp.

References wmtk::simplex::SimplexCollection::begin(), wmtk::simplex::SimplexCollection::end(), wmtk::simplex::utils::SimplexComparisons::equal(), wmtk::simplex::faces(), wmtk::simplex::faces_single_dimension_tuples(), wmtk::Mesh::is_ccw(), wmtk::Mesh::orient_vertices(), wmtk::simplex::Simplex::primitive_type(), wmtk::simplex::SimplexCollection::size(), wmtk::Mesh::switch_tuple(), wmtk::simplex::Simplex::tuple(), and wmtk::Vertex.

Referenced by wmtk::function::PerSimplexAutodiffFunction::get_coordinates(), and wmtk::function::AMIPS::get_raw_coordinates().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_DScalar_matrix()

template<typename DScalarType , int Rows = Eigen::Dynamic, int Cols = Eigen::Dynamic>
auto wmtk::function::utils::make_DScalar_matrix ( int  rows = 0,
int  cols = 0 
)

Definition at line 8 of file AutoDiffUtils.hpp.

References DiffScalarBase::getVariableCount().

Here is the call graph for this function:

◆ Tet_AMIPS_energy()

double wmtk::function::utils::Tet_AMIPS_energy ( const std::array< double, 12 > &  T)

◆ Tet_AMIPS_energy_aux()

double wmtk::function::utils::Tet_AMIPS_energy_aux ( const std::array< double, 12 > &  T)

Definition at line 45 of file amips.cpp.

Referenced by Tet_AMIPS_energy().

Here is the caller graph for this function:

◆ Tet_AMIPS_hessian()

void wmtk::function::utils::Tet_AMIPS_hessian ( const std::array< double, 12 > &  T,
Eigen::Matrix3d &  result_0 
)

Definition at line 205 of file amips.cpp.

References wmtk::pow().

Here is the call graph for this function:

◆ Tet_AMIPS_jacobian()

void wmtk::function::utils::Tet_AMIPS_jacobian ( const std::array< double, 12 > &  T,
Eigen::Vector3d &  result_0 
)

Definition at line 108 of file amips.cpp.

References wmtk::pow().

Here is the call graph for this function: