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

#include <Selection.hpp>

Inheritance diagram for polyfem::utils::FileSelection:
[legend]
Collaboration diagram for polyfem::utils::FileSelection:
[legend]

Public Member Functions

 FileSelection (const std::string &file_path, const int id_offset=0)
 
bool inside (const size_t p_id, const std::vector< int > &vs, const RowVectorNd &p) const override
 
int id (const size_t element_id, const std::vector< int > &vs, const RowVectorNd &p) const override
 
- Public Member Functions inherited from polyfem::utils::SpecifiedSelection
 SpecifiedSelection (const std::vector< int > &ids)
 
- Public Member Functions inherited from polyfem::utils::Selection
 Selection (const int id)
 
virtual ~Selection ()
 

Private Attributes

std::vector< std::pair< int, std::vector< int > > > data_
 

Additional Inherited Members

- Public Types inherited from polyfem::utils::Selection
typedef std::array< RowVectorNd, 2 > BBox
 
- Static Public Member Functions inherited from polyfem::utils::Selection
static std::shared_ptr< Selectionbuild (const json &j_selections, const BBox &mesh_bbox, const std::string &root_path="")
 Build a selection objects from a JSON selection.
 
static std::vector< std::shared_ptr< utils::Selection > > build_selections (const json &j_selections, const BBox &mesh_bbox, const std::string &root_path="")
 Build a vector of selection objects from a JSON selection(s).
 
- Protected Member Functions inherited from polyfem::utils::SpecifiedSelection
 SpecifiedSelection ()
 
- Protected Member Functions inherited from polyfem::utils::Selection
 Selection ()
 
- Protected Attributes inherited from polyfem::utils::SpecifiedSelection
std::vector< int > ids_
 
- Protected Attributes inherited from polyfem::utils::Selection
size_t id_
 

Detailed Description

Definition at line 186 of file Selection.hpp.

Constructor & Destructor Documentation

◆ FileSelection()

polyfem::utils::FileSelection::FileSelection ( const std::string &  file_path,
const int  id_offset = 0 
)

Definition at line 307 of file Selection.cpp.

References data_, polyfem::utils::SpecifiedSelection::ids_, polyfem::logger(), and polyfem::io::read_matrix().

Here is the call graph for this function:

Member Function Documentation

◆ id()

int polyfem::utils::FileSelection::id ( const size_t  element_id,
const std::vector< int > &  vs,
const RowVectorNd p 
) const
overridevirtual

Reimplemented from polyfem::utils::SpecifiedSelection.

Definition at line 356 of file Selection.cpp.

References data_, and polyfem::utils::SpecifiedSelection::id().

Here is the call graph for this function:

◆ inside()

bool polyfem::utils::FileSelection::inside ( const size_t  p_id,
const std::vector< int > &  vs,
const RowVectorNd p 
) const
overridevirtual

Reimplemented from polyfem::utils::SpecifiedSelection.

Definition at line 342 of file Selection.cpp.

References data_, and polyfem::utils::SpecifiedSelection::inside().

Here is the call graph for this function:

Member Data Documentation

◆ data_

std::vector<std::pair<int, std::vector<int> > > polyfem::utils::FileSelection::data_
private

Definition at line 197 of file Selection.hpp.

Referenced by FileSelection(), id(), and inside().


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