PolyFEM
Loading...
Searching...
No Matches
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 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
 
Eigen::MatrixXd get_affine_matrix () const
 

Private Attributes

int problem_dim_
 
Eigen::VectorXi full_to_periodic_map_
 
Eigen::VectorXi periodic_mask_
 
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_, full_to_periodic_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 207 of file PeriodicBoundary.cpp.

◆ full_to_periodic() [1/3]

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

Definition at line 149 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 173 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 121 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 48 of file PeriodicBoundary.hpp.

References affine_matrix_.

◆ has_periodic_bc()

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

Definition at line 211 of file PeriodicBoundary.cpp.

Referenced by full_to_periodic().

Here is the caller graph for this function:

◆ is_periodic_dof()

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

Definition at line 41 of file PeriodicBoundary.hpp.

References periodic_mask_.

◆ n_periodic_dof()

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

Definition at line 40 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 188 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 55 of file PeriodicBoundary.hpp.

Referenced by get_affine_matrix(), and PeriodicBoundary().

◆ full_to_periodic_map_

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

◆ periodic_mask_

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

Definition at line 53 of file PeriodicBoundary.hpp.

Referenced by is_periodic_dof(), and PeriodicBoundary().

◆ problem_dim_

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

Definition at line 51 of file PeriodicBoundary.hpp.

Referenced by PeriodicBoundary().


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