Loading [MathJax]/extensions/tex2jax.js
PolyFEM
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
polyfem::assembler::AssemblerUtils Class Reference

#include <AssemblerUtils.hpp>

Public Types

enum class  BasisType { SIMPLEX_LAGRANGE , CUBE_LAGRANGE , SPLINE , POLY }
 

Public Member Functions

 AssemblerUtils ()=delete
 

Static Public Member Functions

static std::string other_assembler_name (const std::string &formulation)
 
static std::shared_ptr< Assemblermake_assembler (const std::string &formulation)
 
static std::shared_ptr< MixedAssemblermake_mixed_assembler (const std::string &formulation)
 
static void merge_mixed_matrices (const int n_bases, const int n_pressure_bases, const int problem_dim, const bool add_average, const StiffnessMatrix &velocity_stiffness, const StiffnessMatrix &mixed_stiffness, const StiffnessMatrix &pressure_stiffness, StiffnessMatrix &stiffness)
 utility to merge 3 blocks of mixed matrices, A=velocity_stiffness, B=mixed_stiffness, and C=pressure_stiffness A B B^T C
 
static int quadrature_order (const std::string &assembler, const int basis_degree, const BasisType &b_type, const int dim)
 utility for retrieving the needed quadrature order to precisely integrate the given form on the given element basis
 
static bool is_elastic_material (const std::string &material)
 utility to check if material is one of the elastic materials
 
static std::vector< std::string > elastic_materials ()
 list of all elastic materials
 

Detailed Description

Definition at line 10 of file AssemblerUtils.hpp.

Member Enumeration Documentation

◆ BasisType

Enumerator
SIMPLEX_LAGRANGE 
CUBE_LAGRANGE 
SPLINE 
POLY 

Definition at line 18 of file AssemblerUtils.hpp.

Constructor & Destructor Documentation

◆ AssemblerUtils()

polyfem::assembler::AssemblerUtils::AssemblerUtils ( )
delete

Member Function Documentation

◆ elastic_materials()

std::vector< std::string > polyfem::assembler::AssemblerUtils::elastic_materials ( )
static

list of all elastic materials

Definition at line 232 of file AssemblerUtils.cpp.

References elastic_materials().

Referenced by polyfem::assembler::AllElasticMaterials::AllElasticMaterials(), elastic_materials(), and is_elastic_material().

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

◆ is_elastic_material()

bool polyfem::assembler::AssemblerUtils::is_elastic_material ( const std::string &  material)
static

utility to check if material is one of the elastic materials

Definition at line 249 of file AssemblerUtils.cpp.

References elastic_materials().

Referenced by polyfem::State::formulation().

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

◆ make_assembler()

std::shared_ptr< Assembler > polyfem::assembler::AssemblerUtils::make_assembler ( const std::string &  formulation)
static

Definition at line 50 of file AssemblerUtils.cpp.

References polyfem::log_and_throw_error().

Referenced by polyfem::assembler::AllElasticMaterials::AllElasticMaterials(), polyfem::solver::AMIPSForm::AMIPSForm(), polyfem::State::init(), and polyfem::mesh::LocalRelaxationData< M >::init_assembler().

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

◆ make_mixed_assembler()

std::shared_ptr< MixedAssembler > polyfem::assembler::AssemblerUtils::make_mixed_assembler ( const std::string &  formulation)
static

Definition at line 109 of file AssemblerUtils.cpp.

References polyfem::log_and_throw_error().

Referenced by polyfem::State::init().

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

◆ merge_mixed_matrices()

void polyfem::assembler::AssemblerUtils::merge_mixed_matrices ( const int  n_bases,
const int  n_pressure_bases,
const int  problem_dim,
const bool  add_average,
const StiffnessMatrix velocity_stiffness,
const StiffnessMatrix mixed_stiffness,
const StiffnessMatrix pressure_stiffness,
StiffnessMatrix stiffness 
)
static

utility to merge 3 blocks of mixed matrices, A=velocity_stiffness, B=mixed_stiffness, and C=pressure_stiffness A B B^T C

Definition at line 121 of file AssemblerUtils.cpp.

References val.

Referenced by polyfem::State::build_stiffness_mat(), polyfem::solver::TransientNavierStokesSolver::minimize(), polyfem::solver::NavierStokesSolver::minimize(), polyfem::solver::TransientNavierStokesSolver::minimize_aux(), and polyfem::solver::NavierStokesSolver::minimize_aux().

Here is the caller graph for this function:

◆ other_assembler_name()

std::string polyfem::assembler::AssemblerUtils::other_assembler_name ( const std::string &  formulation)
static

Definition at line 38 of file AssemblerUtils.cpp.

Referenced by polyfem::State::init().

Here is the caller graph for this function:

◆ quadrature_order()

int polyfem::assembler::AssemblerUtils::quadrature_order ( const std::string &  assembler,
const int  basis_degree,
const BasisType b_type,
const int  dim 
)
static

utility for retrieving the needed quadrature order to precisely integrate the given form on the given element basis

Definition at line 186 of file AssemblerUtils.cpp.

References CUBE_LAGRANGE, and SIMPLEX_LAGRANGE.

Referenced by polyfem::basis::PolygonalBasis2d::build_bases(), polyfem::basis::PolygonalBasis3d::build_bases(), polyfem::basis::SplineBasis2d::build_bases(), polyfem::basis::SplineBasis3d::build_bases(), polyfem::basis::BarycentricBasis2d::build_bases(), and polyfem::State::n_boundary_samples().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: