PolyFEM
Loading...
Searching...
No Matches
polyfem::basis::LagrangeBasis2d Class Reference

#include <LagrangeBasis2d.hpp>

Static Public Member Functions

static int build_bases (const mesh::Mesh2D &mesh, const std::string &assembler, const int quadrature_order, const int mass_quadrature_order, const int discr_order, const bool serendipity, const bool has_polys, const bool is_geom_bases, const bool use_corner_quadrature, std::vector< ElementBases > &bases, std::vector< mesh::LocalBoundary > &local_boundary, std::map< int, InterfaceData > &poly_edge_to_data, std::shared_ptr< mesh::MeshNodes > &mesh_nodes)
 Builds FE basis functions over the entire mesh (P1, P2 over triangles, Q1, Q2 over quads).
 
static int build_bases (const mesh::Mesh2D &mesh, const std::string &assembler, const int quadrature_order, const int mass_quadrature_order, const Eigen::VectorXi &discr_order, const bool serendipity, const bool has_polys, const bool is_geom_bases, const bool use_corner_quadrature, std::vector< ElementBases > &bases, std::vector< mesh::LocalBoundary > &local_boundary, std::map< int, InterfaceData > &poly_edge_to_data, std::shared_ptr< mesh::MeshNodes > &mesh_nodes)
 Builds FE basis functions over the entire mesh (P1, P2 over triangles, Q1, Q2 over quads).
 
static Eigen::VectorXi tri_edge_local_nodes (const int p, const mesh::Mesh2D &mesh, mesh::Navigation::Index index)
 
static Eigen::VectorXi quad_edge_local_nodes (const int q, const mesh::Mesh2D &mesh, mesh::Navigation::Index index)
 

Detailed Description

Definition at line 19 of file LagrangeBasis2d.hpp.

Member Function Documentation

◆ build_bases() [1/2]

static int polyfem::basis::LagrangeBasis2d::build_bases ( const mesh::Mesh2D mesh,
const std::string &  assembler,
const int  quadrature_order,
const int  mass_quadrature_order,
const Eigen::VectorXi &  discr_order,
const bool  serendipity,
const bool  has_polys,
const bool  is_geom_bases,
const bool  use_corner_quadrature,
std::vector< ElementBases > &  bases,
std::vector< mesh::LocalBoundary > &  local_boundary,
std::map< int, InterfaceData > &  poly_edge_to_data,
std::shared_ptr< mesh::MeshNodes > &  mesh_nodes 
)
static

Builds FE basis functions over the entire mesh (P1, P2 over triangles, Q1, Q2 over quads).

Polygonal facets with > 4 vertices are dealt later on by the PolygonalBasis2d class.

Parameters
[in]meshThe input planar mesh
[in]assemblerThe pde to solve
[in]quadrature_orderThe quadrature order
[in]mass_quadrature_orderThe quadrature for mass matrix
[in]discr_orderThe order for each element
[in]serendipityUses serendipity bases or not (only for quads)
[in]has_polysDoes the mesh has polygons, if not the interface mapping is not necessary
[in]is_geom_basesFlag to decide if build geometric mapping or normal bases, used to decide if the nodes are important
[out]basesList of basis functions per element
[out]local_boundaryList of descriptor per element, indicating which edge of the canonical elements lie on the boundary of the mesh
[out]poly_edge_to_dataData for edges at the interface with a polygon (used to build the harmonics inside polygons)
[out]mesh_nodesObject for retrieving assigned node IDs.
Returns
The number of basis functions created.

◆ build_bases() [2/2]

static int polyfem::basis::LagrangeBasis2d::build_bases ( const mesh::Mesh2D mesh,
const std::string &  assembler,
const int  quadrature_order,
const int  mass_quadrature_order,
const int  discr_order,
const bool  serendipity,
const bool  has_polys,
const bool  is_geom_bases,
const bool  use_corner_quadrature,
std::vector< ElementBases > &  bases,
std::vector< mesh::LocalBoundary > &  local_boundary,
std::map< int, InterfaceData > &  poly_edge_to_data,
std::shared_ptr< mesh::MeshNodes > &  mesh_nodes 
)
static

Builds FE basis functions over the entire mesh (P1, P2 over triangles, Q1, Q2 over quads).

Polygonal facets with > 4 vertices are dealt later on by the PolygonalBasis2d class.

Parameters
[in]meshThe input planar mesh
[in]assemblerThe pde to solve
[in]quadrature_orderThe quadrature order
[in]mass_quadrature_orderThe quadrature for mass matrix
[in]discr_orderThe order of the elements (1-4)
[in]serendipityUses serendipity bases or not (only for quads)
[in]has_polysDoes the mesh has polygons, if not the interface mapping is not necessary
[in]is_geom_basesFlag to decide if build geometric mapping or normal bases, used to decide if the nodes are important
[out]basesList of basis functions per element
[out]local_boundaryList of descriptor per element, indicating which edge of the canonical elements lie on the boundary of the mesh
[out]poly_edge_to_dataData for edges at the interface with a polygon (used to build the harmonics inside polygons)
[out]mesh_nodesObject for retrieving assigned node IDs.
Returns
The number of basis functions created.

Referenced by polyfem::mesh::Remesher::build_bases(), and polyfem::State::build_basis().

Here is the caller graph for this function:

◆ quad_edge_local_nodes()

Eigen::VectorXi LagrangeBasis2d::quad_edge_local_nodes ( const int  q,
const mesh::Mesh2D mesh,
mesh::Navigation::Index  index 
)
static

Definition at line 642 of file LagrangeBasis2d.cpp.

References polyfem::mesh::Navigation::Index::face, polyfem::mesh::Mesh::is_cube(), polyfem::mesh::Mesh2D::switch_vertex(), and polyfem::mesh::Navigation::Index::vertex.

Referenced by polyfem::basis::SplineBasis2d::build_bases().

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

◆ tri_edge_local_nodes()

Eigen::VectorXi LagrangeBasis2d::tri_edge_local_nodes ( const int  p,
const mesh::Mesh2D mesh,
mesh::Navigation::Index  index 
)
static

Definition at line 611 of file LagrangeBasis2d.cpp.

References polyfem::mesh::Navigation::Index::face, polyfem::mesh::Mesh::is_simplex(), polyfem::mesh::Mesh2D::switch_vertex(), and polyfem::mesh::Navigation::Index::vertex.

Here is the call graph for this function:

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