PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
triElem.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_TRIELEM_H
12#define FE_TRIELEM_H
13
14#include "baseElem.h" // base class BaseElem
15
16namespace fe {
17
91class TriElem : public BaseElem {
92
93public:
98 explicit TriElem(size_t order);
99
116 double elemSize(const std::vector<util::Point> &nodes) override;
117
129 std::vector<double>
130 getShapes(const util::Point &p,
131 const std::vector<util::Point> &nodes) override;
132
180 std::vector<std::vector<double>>
181 getDerShapes(const util::Point &p,
182 const std::vector<util::Point> &nodes) override;
183
184private:
191 std::vector<double> getShapes(const util::Point &p) override;
192
200 std::vector<std::vector<double>> getDerShapes(const util::Point &p) override;
201
234 const std::vector<util::Point> &nodes) override;
235
244 double getJacobian(const util::Point &p,
245 const std::vector<util::Point> &nodes,
246 std::vector<std::vector<double>> *J) override;
247
251 void init() override;
252};
253
254} // namespace fe
255
256#endif // FE_TRIELEM_H
A base class which provides methods to map points to/from reference element and to compute quadrature...
Definition baseElem.h:84
A class for mapping and quadrature related operations for linear triangle element.
Definition triElem.h:91
double elemSize(const std::vector< util::Point > &nodes) override
Returns the area of element.
Definition triElem.cpp:25
double getJacobian(const util::Point &p, const std::vector< util::Point > &nodes, std::vector< std::vector< double > > *J) override
Computes the Jacobian of map .
Definition triElem.cpp:111
std::vector< std::vector< double > > getDerShapes(const util::Point &p, const std::vector< util::Point > &nodes) override
Returns the values of derivative of shape function at point p.
Definition triElem.cpp:37
std::vector< double > getShapes(const util::Point &p, const std::vector< util::Point > &nodes) override
Returns the values of shape function at point p.
Definition triElem.cpp:31
util::Point mapPointToRefElem(const util::Point &p, const std::vector< util::Point > &nodes) override
Maps point p in a given element to the reference element.
Definition triElem.cpp:79
void init() override
Compute the quadrature points for triangle element.
Definition triElem.cpp:129
Definition baseElem.h:17
A structure to represent 3d vectors.
Definition point.h:30