PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
contact.h
Go to the documentation of this file.
1/*
2 * -------------------------------------------
3 * Copyright (c) 2021 - 2026 Prashant K. Jha
4 * -------------------------------------------
5 * PeriDEM https://github.com/prashjha/PeriDEM
6 *
7 * Distributed under the Boost Software License, Version 1.0. (See accompanying
8 * file LICENSE)
9 */
10
11#ifndef CONTACT_CONTACT_H
12#define CONTACT_CONTACT_H
13
14#include "damping.h"
15#include "pairForce.h"
16#include "wallContact.h"
17
18#include <memory>
19
20namespace data {
21class ModelData;
22}
23
24namespace contact {
25
28class Contact {
29public:
30 Contact();
31 virtual ~Contact() = default;
32
37
38 void setPairForce(std::unique_ptr<PairForce> p) { d_pairForce = std::move(p); }
39 void setDamping(std::unique_ptr<Damping> d) { d_damping = std::move(d); }
40 void setWallContact(std::unique_ptr<WallContact> w) {
41 d_wallContact = std::move(w);
42 }
43
44 std::unique_ptr<PairForce> d_pairForce;
45 std::unique_ptr<Damping> d_damping;
46 std::unique_ptr<WallContact> d_wallContact;
48 bool d_useNodeDamping = true;
49};
50
51} // namespace contact
52
53#endif // CONTACT_CONTACT_H
Contact neighbor search and force assembly. Pair law and damping are separate types on this object.
Definition contact.h:28
void setWallContact(std::unique_ptr< WallContact > w)
Definition contact.h:40
virtual ~Contact()=default
void setPairForce(std::unique_ptr< PairForce > p)
Definition contact.h:38
std::unique_ptr< PairForce > d_pairForce
Definition contact.h:44
void updateNeighborlist(data::ModelData &data)
Definition contact.cpp:281
void computeForces(data::ModelData &data)
Definition contact.cpp:449
void setDamping(std::unique_ptr< Damping > d)
Definition contact.h:39
std::unique_ptr< Damping > d_damping
Definition contact.h:45
std::unique_ptr< WallContact > d_wallContact
Definition contact.h:46
void setup(data::ModelData &data)
Definition contact.cpp:43
bool d_useNodeDamping
Apply node-level damping inside the pair assembly loop.
Definition contact.h:48
bool updateSearchParameters(data::ModelData &data)
Definition contact.cpp:128
A class to store model data.
Definition modelData.h:50
Definition contact.h:20