Debian Codegraph @

tools/physicalModeling/mesh2faust/vega/libraries/include/volumetricMeshOrthotropicMaterial.h

raw symbols SCIP
1 /*************************************************************************
2 * *
3 * Vega FEM Simulation Library Version 3.1 *
4 * *
5 * "volumetricMesh" library , Copyright (C) 2007 CMU, 2009 MIT, 2016 USC *
6 * All rights reserved. *
7 * *
8 * Code author: Jernej Barbic *
9 * http://www.jernejbarbic.com/code *
10 * *
11 * Research: Jernej Barbic, Fun Shing Sin, Daniel Schroeder, *
12 * Doug L. James, Jovan Popovic *
13 * *
14 * Funding: National Science Foundation, Link Foundation, *
15 * Singapore-MIT GAMBIT Game Lab, *
16 * Zumberge Research and Innovation Fund at USC *
17 * *
18 * This library is free software; you can redistribute it and/or *
19 * modify it under the terms of the BSD-style license that is *
20 * included with this library in the file LICENSE.txt *
21 * *
22 * This library is distributed in the hope that it will be useful, *
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file *
25 * LICENSE.TXT for more details. *
26 * *
27 *************************************************************************/
28
29 /*
30 Stores an orthotropic material.
31 */
32
33 #ifndef _VOLUMETRICMESHORTHOTROPICMATERIAL_H_
34 #define _VOLUMETRICMESHORTHOTROPICMATERIAL_H_
35
36 #include "volumetricMesh.h"
37
38 // stores an orthotropic material
39 class VolumetricMesh::OrthotropicMaterial : public VolumetricMesh::Material
40 {
41 public:
42 OrthotropicMaterial(std::string name, double density, double E1, double E2, double E3, double nu12, double nu23, double nu31, double G12, double G23, double G31, double * R);
43 OrthotropicMaterial(const OrthotropicMaterial & orthotropicMaterial);
44 virtual ~OrthotropicMaterial() {}
45 virtual VolumetricMesh::Material * clone() const;
46 virtual VolumetricMesh::Material::materialType getType();
47
48 // Es, Nus and Gs are all given in the local coordinate system specified by R
49 inline double getE1() const; // Young's modulus in the x-direction
50 inline double getE2() const; // Young's modulus in the y-direction
51 inline double getE3() const; // Young's modulus in the z-direction
52 inline double getNu12() const; // Poisson's ratio when pulling in x-direction, contraction in y
53 inline double getNu23() const; // Poisson's ratio when pulling in y-direction, contraction in z
54 inline double getNu31() const; // Poisson's ratio when pulling in z-direction, contraction in x
55 inline double getG12() const; // shear modulus in xy
56 inline double getG23() const; // shear modulus in yz
57 inline double getG31() const; // shear modulus in zx
58 void getR(double * R) const; // rotation (3x3 matrix) of the local coordinate system, in row-major order
59
60 inline void setE1(double E1);
61 inline void setE2(double E2);
62 inline void setE3(double E3);
63 inline void setNu12(double nu12);
64 inline void setNu23(double nu23);
65 inline void setNu31(double nu31);
66 inline void setG12(double G12);
67 inline void setG23(double G23);
68 inline void setG31(double G31);
69 void setR(double * R);
70
71 protected:
72 double E1_, E2_, E3_, nu12_, nu23_, nu31_, G12_, G23_, G31_;
73 double R_[9];
74 };
75
76 inline double VolumetricMesh::OrthotropicMaterial::getE1() const { return E1_; }
77 inline double VolumetricMesh::OrthotropicMaterial::getE2() const { return E2_; }
78 inline double VolumetricMesh::OrthotropicMaterial::getE3() const { return E3_; }
79 inline double VolumetricMesh::OrthotropicMaterial::getNu12() const { return nu12_; }
80 inline double VolumetricMesh::OrthotropicMaterial::getNu23() const { return nu23_; }
81 inline double VolumetricMesh::OrthotropicMaterial::getNu31() const { return nu31_; }
82 inline double VolumetricMesh::OrthotropicMaterial::getG12() const { return G12_; }
83 inline double VolumetricMesh::OrthotropicMaterial::getG23() const { return G23_; }
84 inline double VolumetricMesh::OrthotropicMaterial::getG31() const { return G31_; }
85
86 inline void VolumetricMesh::OrthotropicMaterial::setE1(double E1) { E1_ = E1; }
87 inline void VolumetricMesh::OrthotropicMaterial::setE2(double E2) { E2_ = E2; }
88 inline void VolumetricMesh::OrthotropicMaterial::setE3(double E3) { E3_ = E3; }
89 inline void VolumetricMesh::OrthotropicMaterial::setNu12(double nu12) { nu12_ = nu12; }
90 inline void VolumetricMesh::OrthotropicMaterial::setNu23(double nu23) { nu23_ = nu23; }
91 inline void VolumetricMesh::OrthotropicMaterial::setNu31(double nu31) { nu31_ = nu31; }
92 inline void VolumetricMesh::OrthotropicMaterial::setG12(double G12) { G12_ = G12; }
93 inline void VolumetricMesh::OrthotropicMaterial::setG23(double G23) { G23_ = G23; }
94 inline void VolumetricMesh::OrthotropicMaterial::setG31(double G31) { G31_ = G31; }
95
96 // obtain pointer to OrthotropicMaterial (necessary inside classes that assume ENu material)
97 VolumetricMesh::OrthotropicMaterial * downcastOrthotropicMaterial(VolumetricMesh::Material * material); // performs a check via getType and returns NULL if material is not Orthotropic
98
99 #endif
100