PolyFEM
Loading...
Searching...
No Matches
polyfem::mesh::PhysicsRemesher< WMTKMesh > Class Template Reference

#include <PhysicsRemesher.hpp>

Inheritance diagram for polyfem::mesh::PhysicsRemesher< WMTKMesh >:
[legend]
Collaboration diagram for polyfem::mesh::PhysicsRemesher< WMTKMesh >:
[legend]

Public Types

using Tuple = typename Super::Tuple
 
using Operations = typename Super::Operations
 
using VectorNd = typename Super::VectorNd
 
- Public Types inherited from polyfem::mesh::WildRemesher< WMTKMesh >
using VectorNd = Eigen::Matrix< double, DIM, 1 >
 
using Tuple = typename WMTKMesh::Tuple
 
- Public Types inherited from polyfem::mesh::Remesher
template<typename T >
using EdgeMap = std::unordered_map< std::array< size_t, 2 >, T, polyfem::utils::HashUnorderedArray< size_t, 2 >, polyfem::utils::EqualUnorderedArray< size_t, 2 > >
 Map from a (sorted) edge to an integer (ID)
 
template<typename T >
using FaceMap = std::unordered_map< std::array< size_t, 3 >, T, polyfem::utils::HashUnorderedArray< size_t, 3 >, polyfem::utils::EqualUnorderedArray< size_t, 3 > >
 Map from a (sorted) edge to an integer (ID)
 
template<typename T >
using TetMap = std::unordered_map< std::array< size_t, 4 >, T, polyfem::utils::HashUnorderedArray< size_t, 4 >, polyfem::utils::EqualUnorderedArray< size_t, 4 > >
 
template<typename T >
using BoundaryMap = std::variant< EdgeMap< T >, FaceMap< T > >
 

Public Member Functions

 PhysicsRemesher (const State &state, const Eigen::MatrixXd &obstacle_displacements, const Eigen::MatrixXd &obstacle_vals, const double current_time, const double starting_energy)
 
virtual ~PhysicsRemesher ()
 
void split_edges () override
 
bool split_edge_before (const Tuple &t) override
 
bool split_edge_after (const Tuple &t) override
 
void collapse_edges () override
 
bool collapse_edge_before (const Tuple &t) override
 
bool collapse_edge_after (const Tuple &t) override
 
bool smooth_before (const Tuple &t) override
 
bool smooth_after (const Tuple &t) override
 
- Public Member Functions inherited from polyfem::mesh::WildRemesher< WMTKMesh >
 WildRemesher (const State &state, const Eigen::MatrixXd &obstacle_displacements, const Eigen::MatrixXd &obstacle_vals, const double current_time, const double starting_energy)
 Construct a new WildRemesher object.
 
virtual ~WildRemesher ()=default
 
virtual void init (const Eigen::MatrixXd &rest_positions, const Eigen::MatrixXd &positions, const Eigen::MatrixXi &elements, const Eigen::MatrixXd &projection_quantities, const BoundaryMap< int > &boundary_to_id, const std::vector< int > &body_ids, const EdgeMap< double > &elastic_energy, const EdgeMap< double > &contact_energy) override
 Initialize the mesh.
 
bool execute () override
 Execute the remeshing.
 
virtual void smooth_vertices ()
 
virtual void swap_edges ()
 
int dim () const override
 Dimension of the mesh.
 
Eigen::MatrixXd rest_positions () const override
 Exports rest positions of the stored mesh.
 
Eigen::MatrixXd displacements () const override
 Exports positions of the stored mesh.
 
Eigen::MatrixXd positions () const override
 Exports displacements of the stored mesh.
 
Eigen::MatrixXi edges () const override
 Exports edges of the stored mesh.
 
Eigen::MatrixXi elements () const override
 Exports elements of the stored mesh.
 
Eigen::MatrixXi boundary_edges () const override
 Exports boundary edges of the stored mesh.
 
Eigen::MatrixXi boundary_faces () const override
 Exports boundary faces of the stored mesh.
 
Eigen::MatrixXd projection_quantities () const override
 Exports projected quantities of the stored mesh.
 
BoundaryMap< int > boundary_ids () const override
 Exports boundary ids of the stored mesh.
 
std::vector< int > body_ids () const override
 Exports body ids of the stored mesh.
 
std::vector< int > boundary_nodes (const Eigen::VectorXi &vertex_to_basis) const override
 Get the boundary nodes of the stored mesh.
 
int n_quantities () const override
 Number of projection quantities (not including the position)
 
std::vector< Tupleget_facets () const
 Get a vector of all facets (edges or triangles)
 
std::vector< Tupleget_elements () const
 Get a vector of all elements (triangles or tetrahedra)
 
void set_rest_positions (const Eigen::MatrixXd &positions) override
 Set rest positions of the stored mesh.
 
void set_positions (const Eigen::MatrixXd &positions) override
 Set deformed positions of the stored mesh.
 
void set_projection_quantities (const Eigen::MatrixXd &projection_quantities) override
 Set projected quantities of the stored mesh.
 
void set_fixed (const std::vector< bool > &fixed) override
 Set if a vertex is fixed.
 
void set_boundary_ids (const BoundaryMap< int > &boundary_to_id) override
 Set the boundary IDs of all edges.
 
void set_body_ids (const std::vector< int > &body_ids) override
 Set the body IDs of all elements.
 
double rest_edge_length (const Tuple &e) const
 Compute the length of an edge.
 
double deformed_edge_length (const Tuple &e) const
 
VectorNd rest_edge_center (const Tuple &e) const
 Compute the center of the edge.
 
VectorNd deformed_edge_center (const Tuple &e) const
 
Eigen::VectorXd edge_adjacent_element_volumes (const Tuple &e) const
 
double element_volume (const Tuple &e) const
 Compute the volume (area) of an tetrahedron (triangle) element.
 
bool is_boundary_vertex (const Tuple &v) const
 Is the given vertex tuple on the boundary of the mesh?
 
bool is_body_boundary_vertex (const Tuple &v) const
 Is the given vertex tuple on the boundary of a body?
 
bool is_boundary_edge (const Tuple &e) const
 Is the given edge tuple on the boundary of the mesh?
 
bool is_body_boundary_edge (const Tuple &e) const
 Is the given edge tuple on the boundary of a body?
 
bool is_boundary_facet (const Tuple &t) const
 Is the given tuple on the boundary of the mesh?
 
bool is_boundary_op () const
 Is the currently cached operation a boundary operation?
 
std::vector< Tupleboundary_facets (std::vector< int > *boundary_ids=nullptr) const
 Get the boundary facets of the mesh.
 
std::array< Tuple, DIMfacet_vertices (const Tuple &t) const
 Get the vertex tuples of a facet.
 
std::array< size_t, DIMfacet_vids (const Tuple &t) const
 Get the vertex ids of a facet.
 
std::array< Tuple, VERTICES_PER_ELEMENTelement_vertices (const Tuple &t) const
 Get the vertex tuples of an element.
 
std::array< size_t, VERTICES_PER_ELEMENTelement_vids (const Tuple &t) const
 Get the vertex ids of an element.
 
void element_aabb (const Tuple &t, polyfem::VectorNd &el_min, polyfem::VectorNd &el_max) const
 Get a AABB for an element.
 
std::array< size_t, VERTICES_PER_ELEMENTorient_preserve_element_reorder (const std::array< size_t, VERTICES_PER_ELEMENT > &conn, const size_t v0) const
 Reorder the element vertices so that the first vertex is v0.
 
std::vector< Tupleget_one_ring_elements_for_vertex (const Tuple &t) const
 Get the one ring of elements around a vertex.
 
std::vector< Tupleget_one_ring_boundary_edges_for_vertex (const Tuple &v) const
 
std::array< Tuple, 2 > get_boundary_faces_for_edge (const Tuple &e) const
 
std::vector< Tupleget_one_ring_boundary_faces_for_vertex (const Tuple &v) const
 
std::vector< Tupleget_edges_for_elements (const std::vector< Tuple > &elements) const
 
size_t facet_id (const Tuple &t) const
 Get the id of a facet (edge for triangle, triangle for tetrahedra)
 
size_t element_id (const Tuple &t) const
 Get the id of an element (triangle or tetrahedra)
 
Tuple tuple_from_element (size_t elem_id) const
 Get a tuple of an element.
 
Tuple tuple_from_facet (size_t elem_id, int local_facet_id) const
 Get a tuple of an element with a local facet.
 
std::vector< Tupleget_incident_elements_for_edge (const Tuple &t) const
 Get the incident elements for an edge.
 
void extend_local_patch (std::vector< Tuple > &patch) const
 Extend the local patch by including neighboring elements.
 
Tuple opposite_vertex_on_face (const Tuple &e) const
 Get the opposite vertex on a face.
 
CollapseEdgeTo collapse_boundary_edge_to (const Tuple &e) const
 Determine where to collapse an edge to.
 
void write_edge_ranks_mesh (const EdgeMap< typename EdgeAttributes::EnergyRank > &elastic_ranks, const EdgeMap< typename EdgeAttributes::EnergyRank > &contact_ranks) const
 
EdgeAttributesedge_attr (const size_t e_id)
 Get a reference to an edge's attributes.
 
const EdgeAttributesedge_attr (const size_t e_id) const
 Get a const reference to an edge's attributes.
 
- Public Member Functions inherited from polyfem::mesh::Remesher
 Remesher (const State &state, const Eigen::MatrixXd &obstacle_displacements, const Eigen::MatrixXd &obstacle_quantities, const double current_time, const double starting_energy)
 Construct a new Remesher object.
 
virtual ~Remesher ()=default
 
virtual bool is_volume () const
 Is the mesh a volumetric mesh.
 
const Obstacleobstacle () const
 Get a reference to the collision obstacles.
 
const Eigen::MatrixXd & obstacle_displacements () const
 Get a reference to the collision obstacles' displacements.
 
const Eigen::MatrixXd & obstacle_quantities () const
 Get a reference to the collision obstacles' extra quantities.
 
void write_mesh (const std::string &path) const
 Writes a VTU mesh file.
 
void init_assembler (const std::vector< int > &body_ids) const
 Create an assembler object.
 

Public Attributes

wmtk::AttributeCollection< VertexAttributesvertex_attrs
 
- Public Attributes inherited from polyfem::mesh::WildRemesher< WMTKMesh >
wmtk::AttributeCollection< VertexAttributesvertex_attrs
 
wmtk::AttributeCollection< BoundaryAttributesboundary_attrs
 
wmtk::AttributeCollection< ElementAttributeselement_attrs
 
- Public Attributes inherited from polyfem::mesh::Remesher
const Statestate
 Reference to the simulation state.
 
int max_op_attempts = 1
 

Protected Member Functions

Operations renew_neighbor_tuples (const std::string &op, const std::vector< Tuple > &tris) const override
 Renew the neighbor tuples of an operation.
 
bool local_relaxation (const Tuple &t, const double acceptance_tolerance)
 Relax a local n-ring around a vertex.
 
bool local_relaxation (const VectorNd &center, const double acceptance_tolerance)
 Relax a local n-ring around a vertex.
 
bool local_relaxation (const std::vector< Tuple > &local_mesh_tuples, const double acceptance_tolerance)
 Relax a local mesh.
 
std::vector< Tuplelocal_mesh_tuples (const VectorNd &center) const
 Get the local n-ring around a vertex.
 
std::vector< Tuplelocal_mesh_tuples (const Tuple &v) const
 Get the local n-ring around a vertex.
 
double local_mesh_energy (const VectorNd &local_mesh_center) const
 Compute the energy of a local n-ring around a vertex.
 
double local_energy_before () const
 Get the energy of the local n-ring around a vertex.
 
double edge_elastic_energy (const Tuple &e) const
 Compute the average elastic energy of the faces containing an edge.
 
void write_priority_queue_mesh (const std::string &path, const Tuple &e) const
 Write a visualization mesh of the priority queue.
 
- Protected Member Functions inherited from polyfem::mesh::WildRemesher< WMTKMesh >
void init_attributes_and_connectivity (const size_t num_vertices, const Eigen::MatrixXi &elements) override
 Create an internal mesh representation and associate attributes.
 
virtual bool swap_edge_before (const Tuple &t) override
 
virtual bool swap_edge_after (const Tuple &t) override
 
bool invariants (const std::vector< Tuple > &new_tris) override
 Check if invariants are satisfied.
 
bool is_rest_inverted (const Tuple &loc) const
 Check if a triangle's rest shape is inverted.
 
bool is_inverted (const Tuple &loc) const
 Check if a triangle's rest and deformed shapes are inverted.
 
void cache_split_edge (const Tuple &e)
 Cache the split edge operation.
 
void cache_collapse_edge (const Tuple &e, const CollapseEdgeTo collapse_to)
 Cache the edge collapse operation.
 
void cache_swap_edge (const Tuple &e)
 Cache the edge swap operation.
 
void map_edge_split_edge_attributes (const Tuple &t)
 
void map_edge_split_boundary_attributes (const Tuple &t)
 
void map_edge_split_element_attributes (const Tuple &t)
 
void map_edge_collapse_vertex_attributes (const Tuple &t)
 
void map_edge_collapse_boundary_attributes (const Tuple &t)
 
void map_edge_collapse_edge_attributes (const Tuple &t)
 
void map_edge_swap_edge_attributes (const Tuple &t)
 
void map_edge_swap_element_attributes (const Tuple &t)
 
- Protected Member Functions inherited from polyfem::mesh::Remesher
void project_quantities ()
 Update the mesh positions and other projection quantities.
 
void cache_before ()
 Cache quantities before applying an operation.
 

Protected Attributes

wmtk::ExecutePass< WildRemesher, EXECUTION_POLICYexecutor
 
- Protected Attributes inherited from polyfem::mesh::WildRemesher< WMTKMesh >
wmtk::ExecutePass< WildRemesher, EXECUTION_POLICYexecutor
 
int m_n_quantities
 
double total_volume
 
std::conditional< std::is_same< WMTKMesh, wmtk::TriMesh >::value, std::shared_ptr< TriOperationCache >, std::shared_ptr< TetOperationCache > >::type op_cache
 
- Protected Attributes inherited from polyfem::mesh::Remesher
GlobalProjectionCache global_projection_cache
 
const json args
 Copy of remesh args.
 
const Eigen::MatrixXd m_obstacle_displacements
 Collision obstacles' displacements.
 
Eigen::MatrixXd m_obstacle_quantities
 Collision obstacles' extra quantities.
 
const double current_time
 Current time.
 
const double starting_energy
 Starting energy.
 

Private Types

using Super = WildRemesher< WMTKMesh >
 
using This = PhysicsRemesher< WMTKMesh >
 

Additional Inherited Members

- Static Public Member Functions inherited from polyfem::mesh::Remesher
static Eigen::MatrixXd combine_time_integrator_quantities (const std::shared_ptr< time_integrator::ImplicitTimeIntegrator > &time_integrator)
 Combine the quantities of a time integrator into a single matrix (one column per quantity)
 
static void split_time_integrator_quantities (const Eigen::MatrixXd &quantities, const int dim, Eigen::MatrixXd &x_prevs, Eigen::MatrixXd &v_prevs, Eigen::MatrixXd &a_prevs)
 Split the quantities of a time integrator into separate vectors.
 
static int build_bases (const Mesh &mesh, const std::string &assembler_formulation, std::vector< polyfem::basis::ElementBases > &bases, std::vector< LocalBoundary > &local_boundary, Eigen::VectorXi &vertex_to_basis)
 Build bases for a given mesh (V, F)
 
static void log_timings ()
 
- Static Public Attributes inherited from polyfem::mesh::WildRemesher< WMTKMesh >
static constexpr int DIM
 
static constexpr int VERTICES_PER_ELEMENT
 
static constexpr int EDGES_PER_ELEMENT
 
static constexpr int FACETS_PER_ELEMENT
 
static constexpr wmtk::ExecutionPolicy EXECUTION_POLICY = wmtk::ExecutionPolicy::kSeq
 Current execuation policy (sequencial or parallel)
 
- Static Public Attributes inherited from polyfem::mesh::Remesher
static std::unordered_map< std::string, utils::Timingtimings
 Timings for the remeshing operations.
 
static double total_time = 0
 
static size_t num_solves = 0
 
static size_t total_ndofs = 0
 
- Protected Types inherited from polyfem::mesh::WildRemesher< WMTKMesh >
using Operations = std::vector< std::pair< std::string, Tuple > >
 

Detailed Description

template<class WMTKMesh>
class polyfem::mesh::PhysicsRemesher< WMTKMesh >

Definition at line 11 of file PhysicsRemesher.hpp.

Member Typedef Documentation

◆ Operations

template<class WMTKMesh >
using polyfem::mesh::PhysicsRemesher< WMTKMesh >::Operations = typename Super::Operations

Definition at line 25 of file PhysicsRemesher.hpp.

◆ Super

template<class WMTKMesh >
using polyfem::mesh::PhysicsRemesher< WMTKMesh >::Super = WildRemesher<WMTKMesh>
private

Definition at line 14 of file PhysicsRemesher.hpp.

◆ This

template<class WMTKMesh >
using polyfem::mesh::PhysicsRemesher< WMTKMesh >::This = PhysicsRemesher<WMTKMesh>
private

Definition at line 15 of file PhysicsRemesher.hpp.

◆ Tuple

template<class WMTKMesh >
using polyfem::mesh::PhysicsRemesher< WMTKMesh >::Tuple = typename Super::Tuple

Definition at line 24 of file PhysicsRemesher.hpp.

◆ VectorNd

template<class WMTKMesh >
using polyfem::mesh::PhysicsRemesher< WMTKMesh >::VectorNd = typename Super::VectorNd

Definition at line 26 of file PhysicsRemesher.hpp.

Constructor & Destructor Documentation

◆ PhysicsRemesher()

template<class WMTKMesh >
polyfem::mesh::PhysicsRemesher< WMTKMesh >::PhysicsRemesher ( const State state,
const Eigen::MatrixXd &  obstacle_displacements,
const Eigen::MatrixXd &  obstacle_vals,
const double  current_time,
const double  starting_energy 
)
inline

Definition at line 28 of file PhysicsRemesher.hpp.

◆ ~PhysicsRemesher()

template<class WMTKMesh >
virtual polyfem::mesh::PhysicsRemesher< WMTKMesh >::~PhysicsRemesher ( )
inlinevirtual

Definition at line 38 of file PhysicsRemesher.hpp.

Member Function Documentation

◆ collapse_edge_after()

template<class WMTKMesh >
bool polyfem::mesh::PhysicsRemesher< WMTKMesh >::collapse_edge_after ( const Tuple t)
overridevirtual

Reimplemented from polyfem::mesh::WildRemesher< WMTKMesh >.

Definition at line 205 of file Collapse.cpp.

References polyfem::utils::Timer::start(), and polyfem::utils::Timer::stop().

Here is the call graph for this function:

◆ collapse_edge_before()

template<class WMTKMesh >
bool polyfem::mesh::PhysicsRemesher< WMTKMesh >::collapse_edge_before ( const Tuple t)
overridevirtual

◆ collapse_edges()

template<class WMTKMesh >
void polyfem::mesh::PhysicsRemesher< WMTKMesh >::collapse_edges ( )
overridevirtual

Implements polyfem::mesh::WildRemesher< WMTKMesh >.

Definition at line 222 of file Collapse.cpp.

References polyfem::mesh::WildRemesher< WMTKMesh >::get_edges_for_elements(), polyfem::mesh::WildRemesher< WMTKMesh >::get_one_ring_elements_for_vertex(), and polyfem::mesh::WildRemesher< WMTKMesh >::rest_edge_length().

Here is the call graph for this function:

◆ edge_elastic_energy()

template<class WMTKMesh >
double polyfem::mesh::PhysicsRemesher< WMTKMesh >::edge_elastic_energy ( const Tuple e) const
protected

Compute the average elastic energy of the faces containing an edge.

Definition at line 90 of file PhysicsRemesher.cpp.

◆ local_energy_before()

template<class WMTKMesh >
double polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_energy_before ( ) const
inlineprotected

Get the energy of the local n-ring around a vertex.

Definition at line 105 of file PhysicsRemesher.hpp.

References polyfem::mesh::WildRemesher< WMTKMesh >::op_cache.

◆ local_mesh_energy()

template<class WMTKMesh >
double polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_mesh_energy ( const VectorNd local_mesh_center) const
protected

Compute the energy of a local n-ring around a vertex.

Parameters
local_mesh_centerCenter of the local n-ring.
Returns
Energy of the local n-ring.

Definition at line 21 of file PhysicsRemesher.cpp.

References polyfem::solver::SolveData::nl_problem, polyfem::mesh::LocalRelaxationData< M >::sol(), and polyfem::mesh::LocalRelaxationData< M >::solve_data.

Here is the call graph for this function:

◆ local_mesh_tuples() [1/2]

template<class WMTKMesh >
std::vector< Tuple > polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_mesh_tuples ( const Tuple v) const
inlineprotected

Get the local n-ring around a vertex.

Parameters
vCenter of the local n-ring
Returns
Tuple of the local n-ring

Definition at line 94 of file PhysicsRemesher.hpp.

References polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_mesh_tuples(), and polyfem::mesh::PhysicsRemesher< WMTKMesh >::vertex_attrs.

Here is the call graph for this function:

◆ local_mesh_tuples() [2/2]

template<class WMTKMesh >
std::vector< typename PhysicsRemesher< WMTKMesh >::Tuple > polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_mesh_tuples ( const VectorNd center) const
protected

Get the local n-ring around a vertex.

Parameters
centerCenter of the local n-ring
Returns
Tuple of the local n-ring

Definition at line 12 of file PhysicsRemesher.cpp.

References polyfem::mesh::LocalMesh< M >::ball_selection().

Referenced by polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_mesh_tuples(), polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_relaxation(), and polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_relaxation().

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

◆ local_relaxation() [1/3]

template<class WMTKMesh >
bool polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_relaxation ( const std::vector< Tuple > &  local_mesh_tuples,
const double  acceptance_tolerance 
)
protected

Relax a local mesh.

Parameters
local_mesh_tuplesTuples of the local mesh
acceptance_toleranceAcceptance tolerance.
Returns
If the local relaxation reduced the energy "significantly"

Definition at line 32 of file LocalRelaxation.cpp.

References polyfem::logger(), polyfem::mesh::LocalRelaxationData< M >::n_free_dof(), polyfem::solver::SolveData::nl_problem, POLYFEM_REMESHER_SCOPED_TIMER, polyfem::mesh::LocalRelaxationData< M >::sol(), and polyfem::mesh::LocalRelaxationData< M >::solve_data.

Here is the call graph for this function:

◆ local_relaxation() [2/3]

template<class WMTKMesh >
bool polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_relaxation ( const Tuple t,
const double  acceptance_tolerance 
)
inlineprotected

Relax a local n-ring around a vertex.

Parameters
tCenter of the local n-ring
Returns
If the local relaxation reduced the energy "significantly"

Definition at line 65 of file PhysicsRemesher.hpp.

References polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_mesh_tuples(), and polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_relaxation().

Referenced by polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_relaxation(), and polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_relaxation().

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

◆ local_relaxation() [3/3]

template<class WMTKMesh >
bool polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_relaxation ( const VectorNd center,
const double  acceptance_tolerance 
)
inlineprotected

Relax a local n-ring around a vertex.

Parameters
local_mesh_tuplesTuples of the local mesh
Returns
If the local relaxation reduced the energy "significantly"

Definition at line 73 of file PhysicsRemesher.hpp.

References polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_mesh_tuples(), and polyfem::mesh::PhysicsRemesher< WMTKMesh >::local_relaxation().

Here is the call graph for this function:

◆ renew_neighbor_tuples()

template<class WMTKMesh >
PhysicsRemesher< WMTKMesh >::Operations polyfem::mesh::PhysicsRemesher< WMTKMesh >::renew_neighbor_tuples ( const std::string &  op,
const std::vector< Tuple > &  tris 
) const
overrideprotectedvirtual

Renew the neighbor tuples of an operation.

Parameters
opOperation
trisTuples of the operation
Returns
New operations

Reimplemented from polyfem::mesh::WildRemesher< WMTKMesh >.

Definition at line 44 of file PhysicsRemesher.cpp.

◆ smooth_after()

template<class WMTKMesh >
bool polyfem::mesh::PhysicsRemesher< WMTKMesh >::smooth_after ( const Tuple t)
overridevirtual

Reimplemented from polyfem::mesh::WildRemesher< WMTKMesh >.

Definition at line 280 of file Smooth.cpp.

References polyfem::utils::Timer::start(), and polyfem::utils::Timer::stop().

Here is the call graph for this function:

◆ smooth_before()

template<class WMTKMesh >
bool polyfem::mesh::PhysicsRemesher< WMTKMesh >::smooth_before ( const Tuple t)
overridevirtual

Reimplemented from polyfem::mesh::WildRemesher< WMTKMesh >.

Definition at line 171 of file Smooth.cpp.

◆ split_edge_after()

template<class WMTKMesh >
bool polyfem::mesh::PhysicsRemesher< WMTKMesh >::split_edge_after ( const Tuple t)
overridevirtual

Reimplemented from polyfem::mesh::WildRemesher< WMTKMesh >.

Definition at line 127 of file Split.cpp.

References polyfem::utils::Timer::start(), and polyfem::utils::Timer::stop().

Here is the call graph for this function:

◆ split_edge_before()

template<class WMTKMesh >
bool polyfem::mesh::PhysicsRemesher< WMTKMesh >::split_edge_before ( const Tuple t)
overridevirtual

Reimplemented from polyfem::mesh::WildRemesher< WMTKMesh >.

Definition at line 37 of file Split.cpp.

◆ split_edges()

template<class WMTKMesh >
void polyfem::mesh::PhysicsRemesher< WMTKMesh >::split_edges ( )
overridevirtual

Implements polyfem::mesh::WildRemesher< WMTKMesh >.

Definition at line 169 of file Split.cpp.

◆ write_priority_queue_mesh()

template<class WMTKMesh >
void polyfem::mesh::PhysicsRemesher< WMTKMesh >::write_priority_queue_mesh ( const std::string &  path,
const Tuple e 
) const
protected

Write a visualization mesh of the priority queue.

Parameters
ecurrent edge tuple to be split

Definition at line 108 of file PhysicsRemesher.cpp.

Member Data Documentation

◆ executor

template<class WMTKMesh >
wmtk::ExecutePass<WildRemesher, EXECUTION_POLICY> polyfem::mesh::WildRemesher< WMTKMesh >::executor
protected

Definition at line 413 of file WildRemesher.hpp.

◆ vertex_attrs

template<class WMTKMesh >
wmtk::AttributeCollection<VertexAttributes> polyfem::mesh::WildRemesher< WMTKMesh >::vertex_attrs

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