MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Contribution.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 CONTRIBUTION_H_
5#define CONTRIBUTION_H_
6
7#include "Eigen/Core"
8using Eigen::Vector3d;
9
19
20public:
21
25
28 virtual ~Contribution();
29
32 inline int getNodeId() const { return this->nodeId; }
33
36 inline double getWeight() const { return this->weight; }
37
40 inline const Vector3d& getGradients() const { return this->gradient; }
41
44 inline void setNodeId(int nodal_id) { this->nodeId=nodal_id; }
45
48 inline void setWeight(double nodal_weight) { this->weight=nodal_weight; }
49
52 inline void setGradients(const Vector3d& nodal_gradients) { this->gradient=nodal_gradients; };
53
54private:
55
56 int nodeId;
57
58 double weight;
59
60 Vector3d gradient;
61};
62
64:nodeId(0),weight(0.0),gradient(0.0,0.0,0.0)
65{ }
66
69
70#endif /* CONTRIBUTION_H_ */
Represents the node that the particle contributes.
Definition Contribution.h:18
const Vector3d & getGradients() const
Return the gradients values.
Definition Contribution.h:40
double weight
weight value of a node at a particle position
Definition Contribution.h:58
int getNodeId() const
Return the node identification.
Definition Contribution.h:32
Contribution()
Default constructor.
Definition Contribution.h:63
void setGradients(const Vector3d &nodal_gradients)
Configure gradients.
Definition Contribution.h:52
Vector3d gradient
gradient value of a node at a particle position .
Definition Contribution.h:60
double getWeight() const
Return the weight value.
Definition Contribution.h:36
void setWeight(double nodal_weight)
Configure weight.
Definition Contribution.h:48
int nodeId
identification of node
Definition Contribution.h:56
virtual ~Contribution()
Default destructor.
Definition Contribution.h:67
void setNodeId(int nodal_id)
Configure node identification.
Definition Contribution.h:44