NimbleSM
NimbleSM is a solid mechanics simulation code for dynamic systems
Loading...
Searching...
No Matches
nimble::KokkosContactManager Class Reference

#include <kokkos_contact_manager.h>

Inheritance diagram for nimble::KokkosContactManager:
nimble::ContactManager

Additional Inherited Members

- Public Types inherited from nimble::ContactManager
enum  ProjectionType { UNKNOWN = 0 , NODE_OR_EDGE = 1 , FACE = 2 }
 
typedef enum nimble::ContactManager::ProjectionType PROJECTION_TYPE
 
- Public Member Functions inherited from nimble::ContactManager
 ContactManager (std::shared_ptr< ContactInterface > interface, nimble::DataManager &data_manager)
 Constructor.
 
virtual ~ContactManager ()=default
 Default destructor.
 
bool ContactEnabled () const
 Indicates whether contact is enabled or not.
 
void SetPenaltyParameter (double penalty_parameter)
 Set the penalty parameter for enforcing contact.
 
void CreateContactEntities (GenesisMesh const &mesh, nimble::VectorCommunicator &mpi_container, std::vector< int > const &primary_block_ids, std::vector< int > const &secondary_block_ids)
 Create contact entities between different blocks.
 
virtual void InitializeContactVisualization (std::string const &contact_visualization_exodus_file_name)
 Initialize contact visualization output.
 
virtual void ContactVisualizationWriteStep (double time_current)
 Write information about contact.
 
virtual void ComputeContactForce (int step, bool debug_output, nimble::Viewify< 2 > contact_force)
 Compute the contact force.
 
size_t numContactFaces () const
 Returns the number of contact faces.
 
size_t numContactNodes () const
 Returns the number of contact nodes.
 
size_t numActiveContactFaces () const
 Returns the number of contact faces "actively" in collision.
 
size_t numActiveContactNodes () const
 Returns the number of contact nodes "actively" in collision.
 
const std::unordered_map< std::string, double > & getTimers ()
 Return timing information.
 
double GetPenaltyForceParam () const noexcept
 Return the penalty coefficient for enforcing contact force.
 
- Static Public Member Functions inherited from nimble::ContactManager
static void SkinBlocks (GenesisMesh const &mesh, std::vector< int > const &block_ids, int entity_id_offset, std::vector< std::vector< int > > &skin_faces, std::vector< int > &entity_ids)
 
static void RemoveInternalSkinFaces (GenesisMesh const &mesh, std::vector< std::vector< int > > &faces, std::vector< int > &entity_ids)
 
static void SimpleClosestPointProjectionSingle (const ContactEntity &node, const ContactEntity &tri, PROJECTION_TYPE *projection_type, ContactEntity::vertex *closest_point, double &gap, double *normal, double tolerance=1.e-8)
 Compute the projection of a point onto a triangular face.
 
static void Projection (const ContactEntity &node, const ContactEntity &tri, bool &in, double &gap, double *normal, double *barycentric_coordinates, double tolerance=1.e-8)
 Compute the projection of a point onto a triangular face.
 
- Protected Member Functions inherited from nimble::ContactManager
void WriteVisualizationData (double t)
 Write visualization data to Exodus file at time t.
 
template<typename ArgT>
void CreateContactNodesAndFaces (std::vector< std::vector< int > > const &primary_skin_faces, std::vector< int > const &primary_skin_entity_ids, std::vector< int > const &secondary_node_ids, std::vector< int > const &secondary_node_entity_ids, std::map< int, double > const &secondary_node_char_lens, ArgT &contact_nodes, ArgT &contact_faces) const
 
void BoundingBox (double &x_min, double &x_max, double &y_min, double &y_max, double &z_min, double &z_max) const
 
double BoundingBoxAverageCharacteristicLengthOverAllRanks () const
 
void ComputeContactForce (int step, bool debug_output)
 
void ApplyDisplacements (nimble_kokkos::DeviceVectorNodeView displacement_d)
 
void GetForces (nimble_kokkos::DeviceVectorNodeView contact_force_d) const
 
void BruteForceBoxIntersectionSearch (std::vector< ContactEntity > const &nodes, std::vector< ContactEntity > const &triangles)
 
void ClosestPointProjection (const ContactEntity *nodes, const ContactEntity *triangles, ContactEntity::vertex *closest_points, PROJECTION_TYPE *projection_types, std::size_t num_elements)
 
void ClosestPointProjectionSingle (const ContactEntity &node, const ContactEntity &tri, ContactEntity::vertex *closest_point, PROJECTION_TYPE *projection_type, double tolerance)
 
const ContactEntitygetContactFace (size_t i_face) const
 Returns a read-only reference to contact face entity.
 
const ContactEntitygetContactNode (size_t i_node) const
 Returns a read-only reference to contact node entity.
 
void ResetContactStatus ()
 Reset the contact status for all entities.
 
void ZeroContactForce ()
 Zero the contact forces.
 
template<typename VecType>
void EnforceNodeFaceInteraction (ContactEntity &node, ContactEntity &face, const double gap, const double direction[3], const double facet_coordinates[3], VecType &full_contact_force) const
 
NIMBLE_INLINE_FUNCTION void startTimer (const std::string &str_val)
 
NIMBLE_INLINE_FUNCTION void stopTimer (const std::string &str_val)
 
- Protected Attributes inherited from nimble::ContactManager
nimble::DataManagerdata_manager_
 
nimble::TimeKeeper total_search_time
 
nimble::TimeKeeper total_enforcement_time
 
std::size_t total_num_contacts = 0
 
PenaltyContactEnforcement enforcement
 
bool contact_enabled_ = false
 
double penalty_parameter_
 
std::vector< int > node_ids_
 
std::vector< double > model_coord_
 
std::vector< double > coord_
 
std::vector< double > force_
 
double contact_visualization_model_coord_bounding_box_ [6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
 
nimble::GenesisMesh genesis_mesh_for_contact_visualization_
 
nimble::ExodusOutput exodus_output_for_contact_visualization_
 
nimble_kokkos::DeviceIntegerArrayView node_ids_d_ = nimble_kokkos::DeviceIntegerArrayView("contact node_ids_d", 1)
 
nimble_kokkos::DeviceScalarNodeView model_coord_d_ = nimble_kokkos::DeviceScalarNodeView("contact model_coord_d", 1)
 
nimble_kokkos::DeviceScalarNodeView coord_d_ = nimble_kokkos::DeviceScalarNodeView("contact coord_d", 1)
 
nimble_kokkos::DeviceScalarNodeView force_d_ = nimble_kokkos::DeviceScalarNodeView("contact force_d", 1)
 
nimble_kokkos::DeviceContactEntityArrayView contact_faces_d_
 
nimble_kokkos::DeviceContactEntityArrayView contact_nodes_d_
 
nimble_kokkos::HostContactEntityArrayView contact_faces_h_
 
nimble_kokkos::HostContactEntityArrayView contact_nodes_h_
 
nimble_kokkos::ModelDatamodel_data_ = nullptr
 
std::unordered_map< std::string, double > timers_
 
std::shared_ptr< ContactInterfacecontact_interface
 

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