MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Solver.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2021-2025 MPM-Geomechanics Development Team
3
4#ifndef SOLVER_H_
5#define SOLVER_H_
6
7#include <vector>
8using std::vector;
9
10#include "TerrainContact.h"
11#include "ContactManager.h"
12
13class Body;
14class Mesh;
15class Particle;
16
19class Solver {
20
21public:
22
25 Solver();
26
29 virtual ~Solver();
30
33 virtual void Solve()=0;
34
37 inline void registerMesh(Mesh* mesh){ this->mesh=mesh; }
38
41 inline void registerBodies(vector<Body*>* bodies){ this->bodies=bodies; }
42
44 inline void registerParticles(vector<Particle*>* p){ this->particles=p; }
45
48
50 inline void registerContactManager(ContactManager* contactManager) { this->contactManager = contactManager; }
51
52protected:
53
55 vector<Body*>* bodies;
56 vector<Particle*>* particles;
59};
60
61inline Solver::Solver():mesh(0),bodies(0),particles(0),terrainContact(0) { }
62inline Solver::~Solver() { }
63
64#endif /* SOLVER_H_ */
Represents a body in the space forming by a group of materials points and identified by a number.
Definition Body.h:15
Manages Slave-Master contact method data and operations using two velocity fields.
Definition ContactManager.h:21
Class representing a rectangular grid mesh.
Definition Mesh.h:29
Represents a Lagrangian material point This class contain all Lagrangian variables that represents th...
Definition Particle.h:25
Represents the operations to solve the equations in time.
Definition Solver.h:19
void registerBodies(vector< Body * > *bodies)
Register the bodies in the solver.
Definition Solver.h:41
void registerParticles(vector< Particle * > *p)
Register the particles in the solver.
Definition Solver.h:44
virtual void Solve()=0
Solve the problem in time.
TerrainContact * terrainContact
pointer to terrain contact
Definition Solver.h:57
void registerMesh(Mesh *mesh)
Register the mesh in the solver.
Definition Solver.h:37
ContactManager * contactManager
pointer to contact manager
Definition Solver.h:58
Mesh * mesh
pointer to mesh
Definition Solver.h:54
Solver()
Default constructor.
Definition Solver.h:61
void registerTerrainContact(TerrainContact *terrainContact)
Register the terrain contact in the solver.
Definition Solver.h:47
virtual ~Solver()
Default destructor.
Definition Solver.h:62
vector< Particle * > * particles
pointer to particles
Definition Solver.h:56
vector< Body * > * bodies
pointer to bodies
Definition Solver.h:55
void registerContactManager(ContactManager *contactManager)
Register the contact manager in the solver.
Definition Solver.h:50
Class to compute terrain contact.
Definition TerrainContact.h:11