PolyFEM
Loading...
Searching...
No Matches
polyfem::utils::RefElementSampler Class Reference

#include <RefElementSampler.hpp>

Public Member Functions

 RefElementSampler ()
 
void init (const bool is_volume, const int n_elements, const double target_rel_area)
 
const Eigen::MatrixXd & cube_corners () const
 
const Eigen::MatrixXd & cube_points () const
 
const Eigen::MatrixXi & cube_faces () const
 
const Eigen::MatrixXi & cube_volume () const
 
const Eigen::MatrixXi & cube_edges () const
 
const Eigen::MatrixXd & simplex_corners () const
 
const Eigen::MatrixXd & simplex_points () const
 
const Eigen::MatrixXi & simplex_faces () const
 
const Eigen::MatrixXi & simplex_volume () const
 
const Eigen::MatrixXi & simplex_edges () const
 
const Eigen::MatrixXd & prism_corners () const
 
const Eigen::MatrixXd & prism_points () const
 
const Eigen::MatrixXi & prism_faces () const
 
const Eigen::MatrixXi & prism_volume () const
 
const Eigen::MatrixXi & prism_edges () const
 
const Eigen::MatrixXd & pyramid_corners () const
 
const Eigen::MatrixXd & pyramid_points () const
 
const Eigen::MatrixXi & pyramid_faces () const
 
const Eigen::MatrixXi & pyramid_volume () const
 
const Eigen::MatrixXi & pyramid_edges () const
 
void sample_polygon (const Eigen::MatrixXd &poly, Eigen::MatrixXd &pts, Eigen::MatrixXi &faces, Eigen::MatrixXi &edges) const
 
void sample_polyhedron (const Eigen::MatrixXd &vertices, const Eigen::MatrixXi &f, Eigen::MatrixXd &pts, Eigen::MatrixXi &faces, Eigen::MatrixXi &edges) const
 
int num_samples () const
 

Private Member Functions

void build ()
 

Private Attributes

Eigen::MatrixXi cube_tets_
 
Eigen::MatrixXi prism_tets_
 
Eigen::MatrixXi pyramid_tets_
 
Eigen::MatrixXi simplex_tets_
 
Eigen::MatrixXd prism_corners_
 
Eigen::MatrixXd prism_points_
 
Eigen::MatrixXi prism_faces_
 
Eigen::MatrixXi prism_edges_
 
Eigen::MatrixXd pyramid_corners_
 
Eigen::MatrixXd pyramid_points_
 
Eigen::MatrixXi pyramid_faces_
 
Eigen::MatrixXi pyramid_edges_
 
Eigen::MatrixXd cube_corners_
 
Eigen::MatrixXd cube_points_
 
Eigen::MatrixXi cube_faces_
 
Eigen::MatrixXi cube_edges_
 
Eigen::MatrixXd simplex_corners_
 
Eigen::MatrixXd simplex_points_
 
Eigen::MatrixXi simplex_faces_
 
Eigen::MatrixXi simplex_edges_
 
double area_param_
 
double is_volume_
 

Detailed Description

Definition at line 38 of file RefElementSampler.hpp.

Constructor & Destructor Documentation

◆ RefElementSampler()

polyfem::utils::RefElementSampler::RefElementSampler ( )
inline

Definition at line 41 of file RefElementSampler.hpp.

Member Function Documentation

◆ build()

void polyfem::utils::RefElementSampler::build ( )
private

Definition at line 229 of file RefElementSampler.cpp.

References area_param_, cube_corners_, cube_edges_, cube_faces_, cube_points_, cube_tets_, polyfem::mesh::extract_parent_edges(), faces, is_volume_, prism_corners_, prism_edges_, prism_faces_, prism_points_, prism_tets_, pyramid_corners_, pyramid_edges_, pyramid_faces_, pyramid_points_, pyramid_tets_, polyfem::utils::regular_2d_grid(), polyfem::utils::regular_3d_grid(), simplex_corners_, simplex_edges_, simplex_faces_, simplex_points_, and simplex_tets_.

Referenced by init().

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

◆ cube_corners()

const Eigen::MatrixXd & polyfem::utils::RefElementSampler::cube_corners ( ) const
inline

Definition at line 44 of file RefElementSampler.hpp.

References cube_corners_.

◆ cube_edges()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::cube_edges ( ) const
inline

Definition at line 48 of file RefElementSampler.hpp.

References cube_edges_.

◆ cube_faces()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::cube_faces ( ) const
inline

Definition at line 46 of file RefElementSampler.hpp.

References cube_faces_.

◆ cube_points()

const Eigen::MatrixXd & polyfem::utils::RefElementSampler::cube_points ( ) const
inline

Definition at line 45 of file RefElementSampler.hpp.

References cube_points_.

Referenced by polyfem::io::Evaluator::check_scalar_value(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::io::Evaluator::interpolate_function(), and polyfem::io::Evaluator::mark_flipped_cells().

Here is the caller graph for this function:

◆ cube_volume()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::cube_volume ( ) const
inline

Definition at line 47 of file RefElementSampler.hpp.

References cube_faces_, cube_tets_, and is_volume_.

◆ init()

void polyfem::utils::RefElementSampler::init ( const bool  is_volume,
const int  n_elements,
const double  target_rel_area 
)

Definition at line 217 of file RefElementSampler.cpp.

References area_param_, build(), and is_volume_.

Referenced by polyfem::io::OutGeometryData::init_sampler().

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

◆ num_samples()

int polyfem::utils::RefElementSampler::num_samples ( ) const
inline

Definition at line 70 of file RefElementSampler.hpp.

References area_param_, and is_volume_.

Referenced by polyfem::io::OutGeometryData::build_vis_boundary_mesh().

Here is the caller graph for this function:

◆ prism_corners()

const Eigen::MatrixXd & polyfem::utils::RefElementSampler::prism_corners ( ) const
inline

Definition at line 56 of file RefElementSampler.hpp.

References prism_corners_.

◆ prism_edges()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::prism_edges ( ) const
inline

Definition at line 60 of file RefElementSampler.hpp.

References prism_edges_.

◆ prism_faces()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::prism_faces ( ) const
inline

Definition at line 58 of file RefElementSampler.hpp.

References prism_faces_.

◆ prism_points()

const Eigen::MatrixXd & polyfem::utils::RefElementSampler::prism_points ( ) const
inline

Definition at line 57 of file RefElementSampler.hpp.

References prism_points_.

Referenced by polyfem::io::Evaluator::check_scalar_value(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_tensor_value(), and polyfem::io::Evaluator::interpolate_function().

Here is the caller graph for this function:

◆ prism_volume()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::prism_volume ( ) const
inline

Definition at line 59 of file RefElementSampler.hpp.

References prism_tets_.

◆ pyramid_corners()

const Eigen::MatrixXd & polyfem::utils::RefElementSampler::pyramid_corners ( ) const
inline

Definition at line 62 of file RefElementSampler.hpp.

References pyramid_corners_.

◆ pyramid_edges()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::pyramid_edges ( ) const
inline

Definition at line 66 of file RefElementSampler.hpp.

References pyramid_edges_.

◆ pyramid_faces()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::pyramid_faces ( ) const
inline

Definition at line 64 of file RefElementSampler.hpp.

References pyramid_faces_.

◆ pyramid_points()

const Eigen::MatrixXd & polyfem::utils::RefElementSampler::pyramid_points ( ) const
inline

Definition at line 63 of file RefElementSampler.hpp.

References pyramid_points_.

Referenced by polyfem::io::Evaluator::check_scalar_value(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_tensor_value(), and polyfem::io::Evaluator::interpolate_function().

Here is the caller graph for this function:

◆ pyramid_volume()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::pyramid_volume ( ) const
inline

Definition at line 65 of file RefElementSampler.hpp.

References pyramid_tets_.

◆ sample_polygon()

void polyfem::utils::RefElementSampler::sample_polygon ( const Eigen::MatrixXd &  poly,
Eigen::MatrixXd &  pts,
Eigen::MatrixXi &  faces,
Eigen::MatrixXi &  edges 
) const

Definition at line 462 of file RefElementSampler.cpp.

References area_param_, and faces.

Referenced by polyfem::io::Evaluator::check_scalar_value(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::io::Evaluator::interpolate_function(), and polyfem::io::Evaluator::mark_flipped_cells().

Here is the caller graph for this function:

◆ sample_polyhedron()

void polyfem::utils::RefElementSampler::sample_polyhedron ( const Eigen::MatrixXd &  vertices,
const Eigen::MatrixXi &  f,
Eigen::MatrixXd &  pts,
Eigen::MatrixXi &  faces,
Eigen::MatrixXi &  edges 
) const

Definition at line 503 of file RefElementSampler.cpp.

References faces, and polyfem::tertrahedralize_star_shaped_surface().

Referenced by polyfem::io::Evaluator::check_scalar_value(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::io::Evaluator::interpolate_function(), and polyfem::io::Evaluator::mark_flipped_cells().

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

◆ simplex_corners()

const Eigen::MatrixXd & polyfem::utils::RefElementSampler::simplex_corners ( ) const
inline

Definition at line 50 of file RefElementSampler.hpp.

References simplex_corners_.

◆ simplex_edges()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::simplex_edges ( ) const
inline

Definition at line 54 of file RefElementSampler.hpp.

References simplex_edges_.

◆ simplex_faces()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::simplex_faces ( ) const
inline

Definition at line 52 of file RefElementSampler.hpp.

References simplex_faces_.

◆ simplex_points()

const Eigen::MatrixXd & polyfem::utils::RefElementSampler::simplex_points ( ) const
inline

Definition at line 51 of file RefElementSampler.hpp.

References simplex_points_.

Referenced by polyfem::io::Evaluator::check_scalar_value(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::io::Evaluator::interpolate_function(), polyfem::io::Evaluator::mark_flipped_cells(), and polyfem::io::OutGeometryData::save_wire().

Here is the caller graph for this function:

◆ simplex_volume()

const Eigen::MatrixXi & polyfem::utils::RefElementSampler::simplex_volume ( ) const
inline

Definition at line 53 of file RefElementSampler.hpp.

References is_volume_, simplex_faces_, and simplex_tets_.

Referenced by polyfem::io::OutGeometryData::build_vis_mesh().

Here is the caller graph for this function:

Member Data Documentation

◆ area_param_

double polyfem::utils::RefElementSampler::area_param_
private

Definition at line 103 of file RefElementSampler.hpp.

Referenced by build(), init(), num_samples(), and sample_polygon().

◆ cube_corners_

Eigen::MatrixXd polyfem::utils::RefElementSampler::cube_corners_
private

Definition at line 93 of file RefElementSampler.hpp.

Referenced by build(), and cube_corners().

◆ cube_edges_

Eigen::MatrixXi polyfem::utils::RefElementSampler::cube_edges_
private

Definition at line 96 of file RefElementSampler.hpp.

Referenced by build(), and cube_edges().

◆ cube_faces_

Eigen::MatrixXi polyfem::utils::RefElementSampler::cube_faces_
private

Definition at line 95 of file RefElementSampler.hpp.

Referenced by build(), cube_faces(), and cube_volume().

◆ cube_points_

Eigen::MatrixXd polyfem::utils::RefElementSampler::cube_points_
private

Definition at line 94 of file RefElementSampler.hpp.

Referenced by build(), and cube_points().

◆ cube_tets_

Eigen::MatrixXi polyfem::utils::RefElementSampler::cube_tets_
private

Definition at line 78 of file RefElementSampler.hpp.

Referenced by build(), and cube_volume().

◆ is_volume_

double polyfem::utils::RefElementSampler::is_volume_
private

Definition at line 104 of file RefElementSampler.hpp.

Referenced by build(), cube_volume(), init(), num_samples(), and simplex_volume().

◆ prism_corners_

Eigen::MatrixXd polyfem::utils::RefElementSampler::prism_corners_
private

Definition at line 83 of file RefElementSampler.hpp.

Referenced by build(), and prism_corners().

◆ prism_edges_

Eigen::MatrixXi polyfem::utils::RefElementSampler::prism_edges_
private

Definition at line 86 of file RefElementSampler.hpp.

Referenced by build(), and prism_edges().

◆ prism_faces_

Eigen::MatrixXi polyfem::utils::RefElementSampler::prism_faces_
private

Definition at line 85 of file RefElementSampler.hpp.

Referenced by build(), and prism_faces().

◆ prism_points_

Eigen::MatrixXd polyfem::utils::RefElementSampler::prism_points_
private

Definition at line 84 of file RefElementSampler.hpp.

Referenced by build(), and prism_points().

◆ prism_tets_

Eigen::MatrixXi polyfem::utils::RefElementSampler::prism_tets_
private

Definition at line 79 of file RefElementSampler.hpp.

Referenced by build(), and prism_volume().

◆ pyramid_corners_

Eigen::MatrixXd polyfem::utils::RefElementSampler::pyramid_corners_
private

Definition at line 88 of file RefElementSampler.hpp.

Referenced by build(), and pyramid_corners().

◆ pyramid_edges_

Eigen::MatrixXi polyfem::utils::RefElementSampler::pyramid_edges_
private

Definition at line 91 of file RefElementSampler.hpp.

Referenced by build(), and pyramid_edges().

◆ pyramid_faces_

Eigen::MatrixXi polyfem::utils::RefElementSampler::pyramid_faces_
private

Definition at line 90 of file RefElementSampler.hpp.

Referenced by build(), and pyramid_faces().

◆ pyramid_points_

Eigen::MatrixXd polyfem::utils::RefElementSampler::pyramid_points_
private

Definition at line 89 of file RefElementSampler.hpp.

Referenced by build(), and pyramid_points().

◆ pyramid_tets_

Eigen::MatrixXi polyfem::utils::RefElementSampler::pyramid_tets_
private

Definition at line 80 of file RefElementSampler.hpp.

Referenced by build(), and pyramid_volume().

◆ simplex_corners_

Eigen::MatrixXd polyfem::utils::RefElementSampler::simplex_corners_
private

Definition at line 98 of file RefElementSampler.hpp.

Referenced by build(), and simplex_corners().

◆ simplex_edges_

Eigen::MatrixXi polyfem::utils::RefElementSampler::simplex_edges_
private

Definition at line 101 of file RefElementSampler.hpp.

Referenced by build(), and simplex_edges().

◆ simplex_faces_

Eigen::MatrixXi polyfem::utils::RefElementSampler::simplex_faces_
private

Definition at line 100 of file RefElementSampler.hpp.

Referenced by build(), simplex_faces(), and simplex_volume().

◆ simplex_points_

Eigen::MatrixXd polyfem::utils::RefElementSampler::simplex_points_
private

Definition at line 99 of file RefElementSampler.hpp.

Referenced by build(), and simplex_points().

◆ simplex_tets_

Eigen::MatrixXi polyfem::utils::RefElementSampler::simplex_tets_
private

Definition at line 81 of file RefElementSampler.hpp.

Referenced by build(), and simplex_volume().


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