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

#include <PeriodicBoundary.hpp>

Public Member Functions

 PeriodicBoundary (const bool is_scalar, const int n_bases, const std::vector< basis::ElementBases > &bases, const std::shared_ptr< mesh::MeshNodes > &mesh_nodes, const Eigen::MatrixXd &affine_matrix, const double tol)
 
int full_to_periodic (StiffnessMatrix &A) const
 
Eigen::MatrixXd full_to_periodic (const Eigen::MatrixXd &b, bool accumulate) const
 
std::vector< int > full_to_periodic (const std::vector< int > &boundary_nodes) const
 
int dim () const
 
int n_periodic_dof () const
 
bool is_periodic_dof (const int idx) const
 
Eigen::MatrixXd periodic_to_full (const int ndofs, const Eigen::MatrixXd &x_periodic) const
 
bool all_direction_periodic () const
 
bool has_periodic_bc () const
 
int n_constraints () const
 
std::array< int, 2 > constraint (const int idx) const
 
const Eigen::VectorXi & index_map () const
 
Eigen::MatrixXd get_affine_matrix () const
 

Private Attributes

int problem_dim_
 
Eigen::VectorXi index_map_
 
Eigen::VectorXi dependent_map_
 
Eigen::VectorXi full_to_periodic_map_
 
Eigen::VectorXi periodic_mask_
 
std::vector< std::array< int, 2 > > constraint_list_
 
Eigen::MatrixXd affine_matrix_
 

Detailed Description

Definition at line 25 of file PeriodicBoundary.hpp.

Constructor & Destructor Documentation

◆ PeriodicBoundary()

polyfem::utils::PeriodicBoundary::PeriodicBoundary ( const bool  is_scalar,
const int  n_bases,
const std::vector< basis::ElementBases > &  bases,
const std::shared_ptr< mesh::MeshNodes > &  mesh_nodes,
const Eigen::MatrixXd &  affine_matrix,
const double  tol 
)

Definition at line 23 of file PeriodicBoundary.cpp.

References affine_matrix_, constraint_list_, dependent_map_, dim(), full_to_periodic_map_, index_map_, polyfem::log_and_throw_error(), periodic_mask_, problem_dim_, and V.

Here is the call graph for this function:

Member Function Documentation

◆ all_direction_periodic()

bool polyfem::utils::PeriodicBoundary::all_direction_periodic ( ) const

Definition at line 212 of file PeriodicBoundary.cpp.

◆ constraint()

std::array< int, 2 > polyfem::utils::PeriodicBoundary::constraint ( const int  idx) const
inline

Definition at line 50 of file PeriodicBoundary.hpp.

References constraint_list_.

◆ dim()

int polyfem::utils::PeriodicBoundary::dim ( ) const
inline

Definition at line 40 of file PeriodicBoundary.hpp.

References problem_dim_.

Referenced by PeriodicBoundary().

Here is the caller graph for this function:

◆ full_to_periodic() [1/3]

Eigen::MatrixXd polyfem::utils::PeriodicBoundary::full_to_periodic ( const Eigen::MatrixXd &  b,
bool  accumulate 
) const

Definition at line 154 of file PeriodicBoundary.cpp.

References full_to_periodic_map_.

◆ full_to_periodic() [2/3]

std::vector< int > polyfem::utils::PeriodicBoundary::full_to_periodic ( const std::vector< int > &  boundary_nodes) const

Definition at line 178 of file PeriodicBoundary.cpp.

References full_to_periodic_map_, and has_periodic_bc().

Here is the call graph for this function:

◆ full_to_periodic() [3/3]

int polyfem::utils::PeriodicBoundary::full_to_periodic ( StiffnessMatrix A) const

Definition at line 126 of file PeriodicBoundary.cpp.

References entries, and full_to_periodic_map_.

◆ get_affine_matrix()

Eigen::MatrixXd polyfem::utils::PeriodicBoundary::get_affine_matrix ( ) const
inline

Definition at line 53 of file PeriodicBoundary.hpp.

References affine_matrix_.

◆ has_periodic_bc()

bool polyfem::utils::PeriodicBoundary::has_periodic_bc ( ) const

Definition at line 216 of file PeriodicBoundary.cpp.

Referenced by full_to_periodic().

Here is the caller graph for this function:

◆ index_map()

const Eigen::VectorXi & polyfem::utils::PeriodicBoundary::index_map ( ) const
inline

Definition at line 51 of file PeriodicBoundary.hpp.

References index_map_.

◆ is_periodic_dof()

bool polyfem::utils::PeriodicBoundary::is_periodic_dof ( const int  idx) const
inline

Definition at line 42 of file PeriodicBoundary.hpp.

References periodic_mask_.

◆ n_constraints()

int polyfem::utils::PeriodicBoundary::n_constraints ( ) const
inline

Definition at line 49 of file PeriodicBoundary.hpp.

References constraint_list_.

◆ n_periodic_dof()

int polyfem::utils::PeriodicBoundary::n_periodic_dof ( ) const
inline

Definition at line 41 of file PeriodicBoundary.hpp.

References full_to_periodic_map_.

◆ periodic_to_full()

Eigen::MatrixXd polyfem::utils::PeriodicBoundary::periodic_to_full ( const int  ndofs,
const Eigen::MatrixXd &  x_periodic 
) const

Definition at line 193 of file PeriodicBoundary.cpp.

References full_to_periodic_map_.

Member Data Documentation

◆ affine_matrix_

Eigen::MatrixXd polyfem::utils::PeriodicBoundary::affine_matrix_
private

Definition at line 63 of file PeriodicBoundary.hpp.

Referenced by get_affine_matrix(), and PeriodicBoundary().

◆ constraint_list_

std::vector<std::array<int, 2> > polyfem::utils::PeriodicBoundary::constraint_list_
private

Definition at line 61 of file PeriodicBoundary.hpp.

Referenced by constraint(), n_constraints(), and PeriodicBoundary().

◆ dependent_map_

Eigen::VectorXi polyfem::utils::PeriodicBoundary::dependent_map_
private

Definition at line 58 of file PeriodicBoundary.hpp.

Referenced by PeriodicBoundary().

◆ full_to_periodic_map_

Eigen::VectorXi polyfem::utils::PeriodicBoundary::full_to_periodic_map_
private

◆ index_map_

Eigen::VectorXi polyfem::utils::PeriodicBoundary::index_map_
private

Definition at line 57 of file PeriodicBoundary.hpp.

Referenced by index_map(), and PeriodicBoundary().

◆ periodic_mask_

Eigen::VectorXi polyfem::utils::PeriodicBoundary::periodic_mask_
private

Definition at line 60 of file PeriodicBoundary.hpp.

Referenced by is_periodic_dof(), and PeriodicBoundary().

◆ problem_dim_

int polyfem::utils::PeriodicBoundary::problem_dim_
private

Definition at line 56 of file PeriodicBoundary.hpp.

Referenced by dim(), and PeriodicBoundary().


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