PolyFEM
Loading...
Searching...
No Matches
polyfem::mesh::LocalRelaxationData< M > Class Template Reference

#include <LocalRelaxationData.hpp>

Collaboration diagram for polyfem::mesh::LocalRelaxationData< M >:
[legend]

Public Member Functions

 LocalRelaxationData (const State &state, LocalMesh< M > &local_mesh, const double current_time, const bool contact_enabled)
 
Eigen::MatrixXd sol () const
 
bool is_volume () const
 
int dim () const
 
int n_bases () const
 
int ndof () const
 
int n_free_dof () const
 

Public Attributes

solver::SolveData solve_data
 
LocalMesh< M > & local_mesh
 

Private Member Functions

void init_mesh (const State &state)
 
void init_bases (const State &state)
 
void init_boundary_conditions (const State &state)
 
void init_assembler (const State &state)
 
void init_mass_matrix (const State &state)
 
void init_solve_data (const State &state, const double current_time, const bool contact_enabled)
 

Private Attributes

std::unique_ptr< Meshmesh
 
int m_n_bases
 
std::vector< polyfem::basis::ElementBasesbases
 
std::shared_ptr< assembler::Assemblerassembler
 Assembler data.
 
assembler::AssemblyValsCache assembly_vals_cache
 
std::shared_ptr< assembler::Massmass_matrix_assembler
 
assembler::AssemblyValsCache mass_assembly_vals_cache
 
Eigen::SparseMatrix< double > mass
 
std::shared_ptr< assembler::PressureAssemblerpressure_assembler
 
std::shared_ptr< assembler::Problemproblem
 current problem, it contains rhs and bc
 
std::vector< int > boundary_nodes
 list of boundary nodes
 
std::vector< mesh::LocalBoundarylocal_boundary
 mapping from elements to nodes for dirichlet boundary conditions
 
std::vector< mesh::LocalBoundarylocal_neumann_boundary
 mapping from elements to nodes for neumann boundary conditions
 
std::vector< mesh::LocalBoundarylocal_pressure_boundary
 mapping from elements to nodes for pressure boundary conditions
 
std::vector< int > dirichlet_nodes
 per node dirichlet
 
std::vector< RowVectorNddirichlet_nodes_position
 
std::vector< int > neumann_nodes
 per node neumann
 
std::vector< RowVectorNdneumann_nodes_position
 
std::unordered_map< int, std::vector< LocalBoundary > > local_pressure_cavity
 
std::vector< int > pressure_boundary_nodes
 
Eigen::MatrixXd rhs
 
ipc::CollisionMesh collision_mesh
 

Detailed Description

template<typename M>
class polyfem::mesh::LocalRelaxationData< M >

Definition at line 12 of file LocalRelaxationData.hpp.

Constructor & Destructor Documentation

◆ LocalRelaxationData()

template<typename M >
polyfem::mesh::LocalRelaxationData< M >::LocalRelaxationData ( const State state,
LocalMesh< M > &  local_mesh,
const double  current_time,
const bool  contact_enabled 
)

Member Function Documentation

◆ dim()

template<typename M >
int polyfem::mesh::LocalRelaxationData< M >::dim ( ) const
inline

Definition at line 27 of file LocalRelaxationData.hpp.

References polyfem::mesh::LocalRelaxationData< M >::mesh.

Referenced by polyfem::mesh::LocalRelaxationData< M >::ndof().

Here is the caller graph for this function:

◆ init_assembler()

template<typename M >
void polyfem::mesh::LocalRelaxationData< M >::init_assembler ( const State state)
private

Definition at line 148 of file LocalRelaxationData.cpp.

References polyfem::State::args, polyfem::State::formulation(), polyfem::utils::is_param_valid(), polyfem::assembler::AssemblerUtils::make_assembler(), POLYFEM_REMESHER_SCOPED_TIMER, and polyfem::State::units.

Referenced by polyfem::mesh::LocalRelaxationData< M >::LocalRelaxationData().

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

◆ init_bases()

template<typename M >
void polyfem::mesh::LocalRelaxationData< M >::init_bases ( const State state)
private

Definition at line 71 of file LocalRelaxationData.cpp.

References polyfem::mesh::Remesher::build_bases(), polyfem::State::formulation(), and POLYFEM_REMESHER_SCOPED_TIMER.

Referenced by polyfem::mesh::LocalRelaxationData< M >::LocalRelaxationData().

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

◆ init_boundary_conditions()

template<typename M >
void polyfem::mesh::LocalRelaxationData< M >::init_boundary_conditions ( const State state)
private

Definition at line 101 of file LocalRelaxationData.cpp.

References polyfem::log_and_throw_error(), polyfem::mesh::Obstacle::n_vertices(), polyfem::State::obstacle, POLYFEM_REMESHER_SCOPED_TIMER, and polyfem::State::problem.

Referenced by polyfem::mesh::LocalRelaxationData< M >::LocalRelaxationData().

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

◆ init_mass_matrix()

template<typename M >
void polyfem::mesh::LocalRelaxationData< M >::init_mass_matrix ( const State state)
private

Definition at line 166 of file LocalRelaxationData.cpp.

References polyfem::State::avg_mass, and POLYFEM_REMESHER_SCOPED_TIMER.

Referenced by polyfem::mesh::LocalRelaxationData< M >::LocalRelaxationData().

Here is the caller graph for this function:

◆ init_mesh()

template<typename M >
void polyfem::mesh::LocalRelaxationData< M >::init_mesh ( const State state)
private

Definition at line 34 of file LocalRelaxationData.cpp.

References polyfem::mesh::Mesh::create(), and POLYFEM_REMESHER_SCOPED_TIMER.

Referenced by polyfem::mesh::LocalRelaxationData< M >::LocalRelaxationData().

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

◆ init_solve_data()

template<typename M >
void polyfem::mesh::LocalRelaxationData< M >::init_solve_data ( const State state,
const double  current_time,
const bool  contact_enabled 
)
private

Definition at line 187 of file LocalRelaxationData.cpp.

References polyfem::State::args, polyfem::State::avg_mass, polyfem::time_integrator::ImplicitTimeIntegrator::construct_time_integrator(), polyfem::solver::SolveData::contact_form, polyfem::State::n_boundary_samples(), POLYFEM_REMESHER_SCOPED_TIMER, polyfem::State::problem, polyfem::State::solve_data, polyfem::mesh::Remesher::split_time_integrator_quantities(), and polyfem::State::units.

Referenced by polyfem::mesh::LocalRelaxationData< M >::LocalRelaxationData().

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

◆ is_volume()

template<typename M >
bool polyfem::mesh::LocalRelaxationData< M >::is_volume ( ) const
inline

◆ n_bases()

template<typename M >
int polyfem::mesh::LocalRelaxationData< M >::n_bases ( ) const
inline

Definition at line 28 of file LocalRelaxationData.hpp.

References polyfem::mesh::LocalRelaxationData< M >::m_n_bases.

Referenced by polyfem::mesh::LocalRelaxationData< M >::ndof().

Here is the caller graph for this function:

◆ n_free_dof()

template<typename M >
int polyfem::mesh::LocalRelaxationData< M >::n_free_dof ( ) const
inline

Definition at line 30 of file LocalRelaxationData.hpp.

References polyfem::mesh::LocalRelaxationData< M >::boundary_nodes, and polyfem::mesh::LocalRelaxationData< M >::ndof().

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

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

◆ ndof()

template<typename M >
int polyfem::mesh::LocalRelaxationData< M >::ndof ( ) const
inline

Definition at line 29 of file LocalRelaxationData.hpp.

References polyfem::mesh::LocalRelaxationData< M >::dim(), and polyfem::mesh::LocalRelaxationData< M >::n_bases().

Referenced by polyfem::mesh::LocalRelaxationData< M >::n_free_dof().

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

◆ sol()

template<typename M >
Eigen::MatrixXd polyfem::mesh::LocalRelaxationData< M >::sol ( ) const
inline

Definition at line 21 of file LocalRelaxationData.hpp.

References polyfem::utils::flatten(), and polyfem::mesh::LocalRelaxationData< M >::local_mesh.

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

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

Member Data Documentation

◆ assembler

template<typename M >
std::shared_ptr<assembler::Assembler> polyfem::mesh::LocalRelaxationData< M >::assembler
private

Assembler data.

Definition at line 55 of file LocalRelaxationData.hpp.

◆ assembly_vals_cache

template<typename M >
assembler::AssemblyValsCache polyfem::mesh::LocalRelaxationData< M >::assembly_vals_cache
private

Definition at line 56 of file LocalRelaxationData.hpp.

◆ bases

template<typename M >
std::vector<polyfem::basis::ElementBases> polyfem::mesh::LocalRelaxationData< M >::bases
private

Definition at line 52 of file LocalRelaxationData.hpp.

◆ boundary_nodes

template<typename M >
std::vector<int> polyfem::mesh::LocalRelaxationData< M >::boundary_nodes
private

list of boundary nodes

Definition at line 68 of file LocalRelaxationData.hpp.

Referenced by polyfem::mesh::LocalRelaxationData< M >::n_free_dof().

◆ collision_mesh

template<typename M >
ipc::CollisionMesh polyfem::mesh::LocalRelaxationData< M >::collision_mesh
private

Definition at line 87 of file LocalRelaxationData.hpp.

◆ dirichlet_nodes

template<typename M >
std::vector<int> polyfem::mesh::LocalRelaxationData< M >::dirichlet_nodes
private

per node dirichlet

Definition at line 76 of file LocalRelaxationData.hpp.

◆ dirichlet_nodes_position

template<typename M >
std::vector<RowVectorNd> polyfem::mesh::LocalRelaxationData< M >::dirichlet_nodes_position
private

Definition at line 77 of file LocalRelaxationData.hpp.

◆ local_boundary

template<typename M >
std::vector<mesh::LocalBoundary> polyfem::mesh::LocalRelaxationData< M >::local_boundary
private

mapping from elements to nodes for dirichlet boundary conditions

Definition at line 70 of file LocalRelaxationData.hpp.

◆ local_mesh

template<typename M >
LocalMesh<M>& polyfem::mesh::LocalRelaxationData< M >::local_mesh

◆ local_neumann_boundary

template<typename M >
std::vector<mesh::LocalBoundary> polyfem::mesh::LocalRelaxationData< M >::local_neumann_boundary
private

mapping from elements to nodes for neumann boundary conditions

Definition at line 72 of file LocalRelaxationData.hpp.

◆ local_pressure_boundary

template<typename M >
std::vector<mesh::LocalBoundary> polyfem::mesh::LocalRelaxationData< M >::local_pressure_boundary
private

mapping from elements to nodes for pressure boundary conditions

Definition at line 74 of file LocalRelaxationData.hpp.

◆ local_pressure_cavity

template<typename M >
std::unordered_map<int, std::vector<LocalBoundary> > polyfem::mesh::LocalRelaxationData< M >::local_pressure_cavity
private

Definition at line 82 of file LocalRelaxationData.hpp.

◆ m_n_bases

template<typename M >
int polyfem::mesh::LocalRelaxationData< M >::m_n_bases
private

◆ mass

template<typename M >
Eigen::SparseMatrix<double> polyfem::mesh::LocalRelaxationData< M >::mass
private

Definition at line 60 of file LocalRelaxationData.hpp.

◆ mass_assembly_vals_cache

template<typename M >
assembler::AssemblyValsCache polyfem::mesh::LocalRelaxationData< M >::mass_assembly_vals_cache
private

Definition at line 59 of file LocalRelaxationData.hpp.

◆ mass_matrix_assembler

template<typename M >
std::shared_ptr<assembler::Mass> polyfem::mesh::LocalRelaxationData< M >::mass_matrix_assembler
private

Definition at line 58 of file LocalRelaxationData.hpp.

◆ mesh

template<typename M >
std::unique_ptr<Mesh> polyfem::mesh::LocalRelaxationData< M >::mesh
private

◆ neumann_nodes

template<typename M >
std::vector<int> polyfem::mesh::LocalRelaxationData< M >::neumann_nodes
private

per node neumann

Definition at line 79 of file LocalRelaxationData.hpp.

◆ neumann_nodes_position

template<typename M >
std::vector<RowVectorNd> polyfem::mesh::LocalRelaxationData< M >::neumann_nodes_position
private

Definition at line 80 of file LocalRelaxationData.hpp.

◆ pressure_assembler

template<typename M >
std::shared_ptr<assembler::PressureAssembler> polyfem::mesh::LocalRelaxationData< M >::pressure_assembler
private

Definition at line 62 of file LocalRelaxationData.hpp.

◆ pressure_boundary_nodes

template<typename M >
std::vector<int> polyfem::mesh::LocalRelaxationData< M >::pressure_boundary_nodes
private

Definition at line 83 of file LocalRelaxationData.hpp.

◆ problem

template<typename M >
std::shared_ptr<assembler::Problem> polyfem::mesh::LocalRelaxationData< M >::problem
private

current problem, it contains rhs and bc

Definition at line 65 of file LocalRelaxationData.hpp.

Referenced by polyfem::mesh::LocalRelaxationData< M >::LocalRelaxationData().

◆ rhs

template<typename M >
Eigen::MatrixXd polyfem::mesh::LocalRelaxationData< M >::rhs
private

Definition at line 85 of file LocalRelaxationData.hpp.

◆ solve_data


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