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
 
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 simplex_tets_
 
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 30 of file RefElementSampler.hpp.

Constructor & Destructor Documentation

◆ RefElementSampler()

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

Definition at line 33 of file RefElementSampler.hpp.

Member Function Documentation

◆ build()

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

Definition at line 214 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_, 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 36 of file RefElementSampler.hpp.

References cube_corners_.

◆ cube_edges()

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

Definition at line 40 of file RefElementSampler.hpp.

References cube_edges_.

◆ cube_faces()

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

Definition at line 38 of file RefElementSampler.hpp.

References cube_faces_.

◆ cube_points()

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

Definition at line 37 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 39 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 202 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 51 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:

◆ 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 368 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 409 of file RefElementSampler.cpp.

References faces, and polyfem::mesh::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 42 of file RefElementSampler.hpp.

References simplex_corners_.

◆ simplex_edges()

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

Definition at line 46 of file RefElementSampler.hpp.

References simplex_edges_.

◆ simplex_faces()

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

Definition at line 44 of file RefElementSampler.hpp.

References simplex_faces_.

◆ simplex_points()

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

Definition at line 43 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 45 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 72 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 62 of file RefElementSampler.hpp.

Referenced by build(), and cube_corners().

◆ cube_edges_

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

Definition at line 65 of file RefElementSampler.hpp.

Referenced by build(), and cube_edges().

◆ cube_faces_

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

Definition at line 64 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 63 of file RefElementSampler.hpp.

Referenced by build(), and cube_points().

◆ cube_tets_

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

Definition at line 59 of file RefElementSampler.hpp.

Referenced by build(), and cube_volume().

◆ is_volume_

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

Definition at line 73 of file RefElementSampler.hpp.

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

◆ simplex_corners_

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

Definition at line 67 of file RefElementSampler.hpp.

Referenced by build(), and simplex_corners().

◆ simplex_edges_

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

Definition at line 70 of file RefElementSampler.hpp.

Referenced by build(), and simplex_edges().

◆ simplex_faces_

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

Definition at line 69 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 68 of file RefElementSampler.hpp.

Referenced by build(), and simplex_points().

◆ simplex_tets_

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

Definition at line 60 of file RefElementSampler.hpp.

Referenced by build(), and simplex_volume().


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