⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defs.h

📁 crack modeling with xfem
💻 H
字号:
/* 2008 (c) Dorival M. Pedroso */#ifndef MPM_DEFS_H#define MPM_DEFS_H// Blitz++#include <blitz/tinyvec-et.h>#include <blitz/tinymat.h>// FLTK#include <FL/Enumerations.H> // for Fl_Color// Local#include "array.h"/** Curve type. */enum CurveType { CT_POINTS, CT_LINES, CT_BOTH };/** Nodes fixing type. */enum FixType { FIX_X, FIX_Y, FIX_Z, FIX_XY, FIX_YZ, FIX_ZX, FIX_XYZ };/** Model type. */enum Model2DType { LINELAST2D };/* Curve properties. */struct CurveProps{	CurveType Typ;      ///< Curve type	Fl_Color  Clr;      ///< Color	int       Lty;      ///< Line type	int       Lwd;      ///< Line width	int       Pch;      ///< Point type	int       Psz;      ///< Point size	char      Nam[256]; ///< Name};// Constantsconst double SQ2 = sqrt(2.0);const double SQ3 = sqrt(3.0);const double PI  = 4.0*atan(1.0);// Colorsstruct Colors{	double R;	double G;	double B;}; // struct Colors// Color mapsconst size_t CMR_NCOLORS = 9;const Colors CMR[]={{0.0 , 0.0 , 0.0 }, {0.15, 0.15, 0.5 }, {0.3 , 0.15, 0.75}, {0.6 , 0.2 , 0.5 }, {1.0 , 0.25, 0.15}, {0.9 , 0.5 , 0.0 }, {0.9 , 0.75, 0.1 }, {0.9 , 0.9 , 0.5 }, {1.0 , 1.0 , 1.0 }};// Typedefstypedef blitz::TinyVector<int   ,4>   Connec2D; ///< for quadrilateral connectivitiestypedef blitz::TinyVector<double,3>   Vector3D; ///< for position, veloc, accel, etc.typedef blitz::TinyVector<double,6>   STensor2; ///< Symmetric 2nd order tensors: for stress, strain, ...typedef blitz::TinyVector<double,9>   ATensor2; ///< Assymmetric 2nd order tensors: for deformation gradient, ...typedef blitz::TinyMatrix<double,6,6> STensor4; ///< Symmetric 4th order tensors: for stiffness ...typedef blitz::TinyMatrix<double,9,9> ATensor4; ///< Assymmetric 4th order tensors: for stiffness ...// Structuresstruct ShapeAndGrads2D{	double   S[16]; ///< Shape functions	Vector3D G[16]; ///< Gradients of the shape functions};// Typedefs for callback functionsclass Model2D;typedef bool      (*ptIsFixed)       (Vector3D const & N, FixType & FType);           ///< Callback for applying boundary conditionstypedef bool      (*ptIsPointInGeom) (Vector3D const & P);                            ///< Pointer to a function which checks if a mat point is inside the geometry.typedef double    (*ptDensity)       (Vector3D const & P);                            ///< Density functiontypedef Model2D * (*ptAllocateModel) (Vector3D const & P);                            ///< Allocate constitutive modeltypedef void      (*ptIniVelocity)   (Vector3D const & P, Vector3D & v);              ///< Initialize velocitiestypedef bool      (*ptHasTraction)   (Vector3D const & P, Array<Vector3D> const & N, Vector3D const & L, int nPCell, Vector3D & t);  ///< Apply traction to some points inside loaded cells. Nodes=Coordinates of each node. Forces=Forces on each node of the cell.typedef void      (*ptB     )        (double t,                      Vector3D & B  ); ///< Body forcetypedef void      (*ptLdM   )        (double t                     , double   & M  ); ///< Multiplier for applied external forcestypedef void      (*ptVeloc )        (double t, Vector3D const & XY, Vector3D & Vel); ///< Correct velocity at time t and position XYtypedef void      (*ptStress)        (double t, Vector3D const & XY, STensor2 & Sig); ///< Correct stress at time t and position XY#endif // MPM_DEFS_H/* 2008 (c) Dorival M. Pedroso */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -