PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
bMatrix.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 FE_BMATRIX_H
12#define FE_BMATRIX_H
13
14#include <vector>
15
16namespace fe {
17
25class B {
26public:
27 B(const std::vector<std::vector<double>> &dNdx, int dim);
28
29 int nStrain() const { return d_nStrain; }
30 int nDof() const { return d_nDof; }
31 int dim() const { return d_dim; }
32
33 double operator()(int i, int j) const {
34 return d_data[i * d_nDof + j];
35 }
36
37private:
38 int d_dim;
40 int d_nDof;
41 std::vector<double> d_data;
42};
43
44} // namespace fe
45
46#endif // FE_BMATRIX_H
int d_nDof
Definition bMatrix.h:40
double operator()(int i, int j) const
Definition bMatrix.h:33
int dim() const
Definition bMatrix.h:31
int d_nStrain
Definition bMatrix.h:39
int nDof() const
Definition bMatrix.h:30
int d_dim
Definition bMatrix.h:38
int nStrain() const
Definition bMatrix.h:29
std::vector< double > d_data
Definition bMatrix.h:41
Definition baseElem.h:17