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
12class Body;
13class Mesh;
14class Particle;
15
18class Solver {
19
20public:
21
24 Solver();
25
28 virtual ~Solver();
29
32 virtual void Solve()=0;
33
36 inline void registerMesh(Mesh* mesh){ this->mesh=mesh; }
37
40 inline void registerBodies(vector<Body*>* bodies){ this->bodies=bodies; }
41
43 inline void registerParticles(vector<Particle*>* p){ this->particles=p; }
44
47
48protected:
49
51 vector<Body*>* bodies;
52 vector<Particle*>* particles;
54};
55
56inline Solver::Solver():mesh(0),bodies(0),particles(0),terrainContact(0) { }
57inline Solver::~Solver() { }
58
59#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
Class representing a rectangular grid mesh.
Definition Mesh.h:26
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:18
void registerBodies(vector< Body * > *bodies)
Register the bodies in the solver.
Definition Solver.h:40
void registerParticles(vector< Particle * > *p)
Register the particles in the solver.
Definition Solver.h:43
virtual void Solve()=0
Solve the problem in time.
TerrainContact * terrainContact
pointer to terrain contact
Definition Solver.h:53
void registerMesh(Mesh *mesh)
Register the mesh in the solver.
Definition Solver.h:36
Mesh * mesh
pointer to mesh
Definition Solver.h:50
Solver()
Default constructor.
Definition Solver.h:56
void registerTerrainContact(TerrainContact *terrainContact)
Register the terrain contact in the solver.
Definition Solver.h:46
virtual ~Solver()
Default destructor.
Definition Solver.h:57
vector< Particle * > * particles
pointer to particles
Definition Solver.h:52
vector< Body * > * bodies
pointer to bodies
Definition Solver.h:51
Class to compute terrain contact.
Definition TerrainContact.h:11