PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
meshUtil.h
Go to the documentation of this file.
1/*
2 * -------------------------------------------
3 * Copyright (c) 2021 - 2024 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#pragma once
12
13#include "util/point.h"
14#include "util/matrix.h"
16#include <string>
17#include <vector>
18
19namespace fe {
20
21// forward declare Mesh
22class Mesh;
23
31void createUniformMesh(fe::Mesh *mesh_p, size_t dim, std::pair<std::vector<double>, std::vector<double>> box, std::vector<size_t> nGrid);
32
63void getCurrentQuadPoints(const fe::Mesh *mesh_p,
64 const std::vector<util::Point> &xRef,
65 const std::vector<util::Point> &u,
66 std::vector<util::Point> &xQuadCur,
67 size_t iNodeStart = 0,
68 size_t iQuadStart = 0,
69 size_t quadOrder = 1);
70
97void getStrainStress(const fe::Mesh *mesh_p,
98 const std::vector<util::Point> & xRef,
99 const std::vector<util::Point> &u,
100 bool isPlaneStrain,
101 std::vector<util::SymMatrix3> &strain,
102 std::vector<util::SymMatrix3> &stress,
103 size_t iNodeStart = 0,
104 size_t iStrainStart = 0,
105 double nu = 0.,
106 double lambda = 0.,
107 double mu = 0.,
108 bool computeStress = false,
109 size_t quadOrder = 1);
110
127void getMaxShearStressAndLoc(const fe::Mesh *mesh_p,
128 const std::vector<util::Point> & xRef,
129 const std::vector<util::Point> &u,
130 const std::vector<util::SymMatrix3> &stress,
131 double &maxShearStress,
132 util::Point &maxShearStressLocRef,
133 util::Point &maxShearStressLocCur,
134 size_t iNodeStart = 0,
135 size_t iStrainStart = 0,
136 size_t quadOrder = 1);
137
138} // namespace fe
A class for mesh data.
Definition mesh.h:51
Collection of methods and data related to finite element and mesh.
Definition baseElem.h:17
void getMaxShearStressAndLoc(const fe::Mesh *mesh_p, const std::vector< util::Point > &xRef, const std::vector< util::Point > &u, const std::vector< util::SymMatrix3 > &stress, double &maxShearStress, util::Point &maxShearStressLocRef, util::Point &maxShearStressLocCur, size_t iNodeStart=0, size_t iStrainStart=0, size_t quadOrder=1)
Get location where maximum of specified component of stress occurs in this particle.
Definition meshUtil.cpp:429
void getStrainStress(const fe::Mesh *mesh_p, const std::vector< util::Point > &xRef, const std::vector< util::Point > &u, bool isPlaneStrain, std::vector< util::SymMatrix3 > &strain, std::vector< util::SymMatrix3 > &stress, size_t iNodeStart=0, size_t iStrainStart=0, double nu=0., double lambda=0., double mu=0., bool computeStress=false, size_t quadOrder=1)
Strain and stress at quadrature points in the mesh.
Definition meshUtil.cpp:280
void createUniformMesh(fe::Mesh *mesh_p, size_t dim, std::pair< std::vector< double >, std::vector< double > > box, std::vector< size_t > nGrid)
Creates uniform mesh for rectangle/cuboid domain.
Definition meshUtil.cpp:23
void getCurrentQuadPoints(const fe::Mesh *mesh_p, const std::vector< util::Point > &xRef, const std::vector< util::Point > &u, std::vector< util::Point > &xQuadCur, size_t iNodeStart=0, size_t iQuadStart=0, size_t quadOrder=1)
Get current location of quadrature points of elements in the mesh. This function expects mesh has ele...
Definition meshUtil.cpp:176
A structure to represent 3d vectors.
Definition point.h:30