#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "rio.h"
#include "load.h"
#include "elm.h"
#include "node.h"
#include "material.h"
#include "xgplib.h"
#include "alg.h"
Go to the source code of this file.
Data Structures | |
struct | sQ4Data |
Functions | |
static void | _Q4GetCoord (sElement *, sCoord[]) |
static void | _Q4ShapeFunc (double, double, double[]) |
static void | _Q4Jacobian (double, double, sCoord[], double *, double[2][2]) |
static void | _Q4BMatrix (double, double, sCoord[], double[3][8]) |
static void | _Q4DerivShp (double, double, sDerivRST[]) |
static void | _Q4GetDisplacement (sElement *, double *, double[]) |
static double | _Q4MinHeight (sCoord *) |
static double | _Q4CalcLength (sCoord *, sCoord *) |
static void | _Q4ElementCenter (sElement *, sCoord[]) |
static double | _Q4PoroPressure (sElement *elm, double lambda) |
static void | _Q4ElementCenter (sElement *elm, sCoord coord[1]) |
static void | _Q4GetCoord (sElement *elm, sCoord coord[3]) |
static void | _Q4GetDisplacement (sElement *elm, double *U, double ue[6]) |
static void | _Q4BMatrix (double r, double s, sCoord coord[4], double bm[3][8]) |
static void | _Q4Jacobian (double r, double s, sCoord coord[4], double *detjac, double jac[2][2]) |
static void | _Q4ShapeFunc (double r, double s, double shape[4]) |
static void | _Q4DerivShp (double r, double s, sDerivRST dshp[4]) |
static void | Q4New (int, int, int, int, sElement **, sElement **, sNode *) |
static void | Q4Free (sElement *) |
static void | Q4Read (sElement *) |
static int | Q4ReadInitStress (sElement *) |
static void | Q4ReadProfile (sElement *) |
static void | Q4MassMatrix (sElement *, double *) |
static double | Q4RigidCoeff (sElement *) |
static void | Q4Connect (sElement *, int *) |
static void | Q4NumNodes (sElement *, int *) |
static void | Q4Gravity (sElement *, double *, double *, double *) |
static void | Q4AssVector (sElement *, double *, double *) |
static void | Q4TimeStep (sElement *, double *) |
static void | Q4InterForce (sElement *, sTensor *, double *) |
static void | Q4StressStrain (sElement *, double, double *, double *, sTensor *, sTensor *) |
static void | Q4WriteStress (sElement *, FILE *, double *, double *) |
static void | Q4WriteGaussResult (sElement *, FILE *, FILE *) |
static void | Q4WriteGaussVectorResult (sElement *, int, FILE *, FILE *) |
static void | Q4WriteNodalResult (sElement *, FILE *, FILE *) |
static void | Q4UpdateStress (sElement *, double, double *, sTensor *) |
static void | Q4PercForces (sElement *, double *) |
static void | Q4SetPressure (sElement *, double) |
static void | Q4SetInitStress (sElement *, sTensor *) |
static void | Q4ViscoForce (sElement *, double, sTensor *, double *) |
static void | Q4KMatrix (sElement *, double[24][24]) |
static void | Q4GetDof (sElement *, int[24], int *) |
static void | Q4Load (sElement *elm, eLoadType ltype, int key, int noi, int noj, int nok, int *nol, double *q1x, double *q1y, double *q1z, double *q2x, double *q2y, double *q2z, double *q3x, double *q3y, double *q3z, double *q4x, double *q4y, double *q4z) |
static void | Q4GetInc (sElement *elm, int inc[8], int *index) |
void | Q4Init (void) |
Variables | |
static double | _GPoint [2] = { -0.577350269189626, 0.577350269189626 } |
static double | _GWeight [2] = { 1.000000000000000, 1.000000000000000 } |
static double | _TRMatrix [4][4] |
static int | _Edges [4][2] = { { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 0 } } |
static double | GForce = 9.85 |
static void _Q4BMatrix | ( | double | r, | |
double | s, | |||
sCoord | coord[4], | |||
double | bm[3][8] | |||
) | [static] |
Definition at line 243 of file q4.c.
References _Q4DerivShp(), _Q4Jacobian(), and sDerivRST::r.
static void _Q4BMatrix | ( | double | , | |
double | , | |||
sCoord | [], | |||
double | [3][8] | |||
) | [static] |
Referenced by Q4InterForce(), Q4KMatrix(), Q4PercForces(), Q4StressStrain(), Q4UpdateStress(), and Q4ViscoForce().
static void _Q4DerivShp | ( | double | r, | |
double | s, | |||
sDerivRST | dshp[4] | |||
) | [static] |
static void _Q4DerivShp | ( | double | , | |
double | , | |||
sDerivRST | [] | |||
) | [static] |
Definition at line 125 of file q4.c.
References sNode::coord, sElement::data, sQ4Data::inc, NodeVector, sQ4Data::NumNodes, NumNodes, sCoord::x, sCoord::y, and sCoord::z.
Definition at line 197 of file q4.c.
References sNode::coord, sElement::data, sQ4Data::inc, sElement::nodes, sCoord::x, sCoord::y, and sCoord::z.
Referenced by Q4Gravity(), Q4InterForce(), Q4KMatrix(), Q4MassMatrix(), Q4PercForces(), Q4RigidCoeff(), Q4SetPressure(), Q4StressStrain(), Q4TimeStep(), Q4UpdateStress(), and Q4ViscoForce().
static void _Q4GetDisplacement | ( | sElement * | elm, | |
double * | U, | |||
double | ue[6] | |||
) | [static] |
static void _Q4GetDisplacement | ( | sElement * | , | |
double * | , | |||
double | [] | |||
) | [static] |
static void _Q4Jacobian | ( | double | r, | |
double | s, | |||
sCoord | coord[4], | |||
double * | detjac, | |||
double | jac[2][2] | |||
) | [static] |
Definition at line 286 of file q4.c.
References _Q4DerivShp(), sDerivRST::r, sDerivRST::s, sCoord::x, and sCoord::y.
static void _Q4Jacobian | ( | double | , | |
double | , | |||
sCoord | [], | |||
double * | , | |||
double | [2][2] | |||
) | [static] |
static double _Q4MinHeight | ( | sCoord * | coord | ) | [static] |
Definition at line 165 of file q4.c.
References _Edges, and _Q4CalcLength().
Referenced by Q4TimeStep().
static double _Q4PoroPressure | ( | sElement * | elm, | |
double | lambda | |||
) | [static] |
Definition at line 949 of file q4.c.
References Config, sElement::data, GForce, sConfig::loadfactor, MatDensity, sQ4Data::matid, MatList, and sQ4Data::prof.
Referenced by Q4StressStrain(), and Q4WriteGaussResult().
static void _Q4ShapeFunc | ( | double | r, | |
double | s, | |||
double | shape[4] | |||
) | [static] |
static void _Q4ShapeFunc | ( | double | , | |
double | , | |||
double | [] | |||
) | [static] |
static void Q4AssVector | ( | sElement * | elm, | |
double * | GMatrix, | |||
double * | matrix | |||
) | [static] |
Definition at line 774 of file q4.c.
References sElement::data, ElmConnect, and sQ4Data::NumNodes.
Referenced by Q4Init().
static void Q4Connect | ( | sElement * | elm, | |
int * | conn | |||
) | [static] |
Definition at line 708 of file q4.c.
References sElement::data, sQ4Data::inc, and NumNodes.
Referenced by Q4Init().
static void Q4Free | ( | sElement * | elm | ) | [static] |
Definition at line 445 of file q4.c.
References sElement::data.
Referenced by Q4Init().
static void Q4GetDof | ( | sElement * | elm, | |
int | u[24], | |||
int * | index | |||
) | [static] |
Definition at line 1850 of file q4.c.
References sElement::data, sQ4Data::inc, and NumNodes.
Referenced by Q4Init().
static void Q4GetInc | ( | sElement * | elm, | |
int | inc[8], | |||
int * | index | |||
) | [static] |
Definition at line 1870 of file q4.c.
References sElement::data, sQ4Data::inc, and NumNodes.
Referenced by Q4Init().
static void Q4Gravity | ( | sElement * | elm, | |
double * | qx, | |||
double * | qy, | |||
double * | qz | |||
) | [static] |
Definition at line 736 of file q4.c.
References _Q4GetCoord(), sElement::data, GravForce, MatDensity, sQ4Data::matid, MatList, and Q4RigidCoeff().
Referenced by Q4Init().
void Q4Init | ( | void | ) |
Definition at line 983 of file q4.c.
References _GPoint, _GWeight, _Q4BMatrix(), _Q4GetCoord(), _Q4Jacobian(), sElement::data, sQ4Data::istr, sQ4Data::NumNodes, sTensor::xx, sTensor::xy, and sTensor::yy.
Referenced by Q4Init().
static void Q4KMatrix | ( | sElement * | elm, | |
double | k[24][24] | |||
) | [static] |
Definition at line 1778 of file q4.c.
References _GPoint, _Q4BMatrix(), _Q4GetCoord(), _Q4Jacobian(), sElement::data, MatConstitutiveMatrix, sQ4Data::matid, and MatList.
Referenced by Q4Init().
static void Q4Load | ( | sElement * | elm, | |
eLoadType | ltype, | |||
int | key, | |||
int | noi, | |||
int | noj, | |||
int | nok, | |||
int * | nol, | |||
double * | q1x, | |||
double * | q1y, | |||
double * | q1z, | |||
double * | q2x, | |||
double * | q2y, | |||
double * | q2z, | |||
double * | q3x, | |||
double * | q3y, | |||
double * | q3z, | |||
double * | q4x, | |||
double * | q4y, | |||
double * | q4z | |||
) | [static] |
Definition at line 646 of file q4.c.
References sNode::coord, sElement::nodes, UNIFORM, sCoord::x, and sCoord::y.
Referenced by Q4Init().
static void Q4MassMatrix | ( | sElement * | elm, | |
double * | mass | |||
) | [static] |
Definition at line 550 of file q4.c.
References _GPoint, _GWeight, _Q4GetCoord(), _Q4Jacobian(), _Q4ShapeFunc(), sElement::data, MatDensity, sQ4Data::matid, and MatList.
Referenced by Q4Init().
static void Q4New | ( | int | label, | |
int | matid, | |||
int | intord, | |||
int | tckid, | |||
sElement ** | elm, | |||
sElement ** | elist, | |||
sNode * | nodes | |||
) | [static] |
Definition at line 394 of file q4.c.
References DSP_NO, sQ4Data::effdef, sQ4Data::istr, sQ4Data::matid, NONE, sQ4Data::NumNodes, sQ4Data::NumTensComp, sQ4Data::prof, Q4, and sQ4Data::tckid.
Referenced by Q4Init().
static void Q4NumNodes | ( | sElement * | elm, | |
int * | nnodes | |||
) | [static] |
Definition at line 724 of file q4.c.
References sElement::data, and sQ4Data::NumNodes.
Referenced by Q4Init().
static void Q4PercForces | ( | sElement * | elm, | |
double * | pforce | |||
) | [static] |
Definition at line 1562 of file q4.c.
References _GPoint, _GWeight, _Q4BMatrix(), _Q4GetCoord(), _Q4Jacobian(), _Q4ShapeFunc(), sElement::data, sNode::dof, sQ4Data::inc, sQ4Data::matid, MatList, sElement::nodes, NumNodes, sDof::psi, sMaterial::Rhof, sTensor::xx, sCoord::y, and sTensor::yy.
Referenced by Q4Init().
static void Q4Read | ( | sElement * | elm | ) | [static] |
Definition at line 468 of file q4.c.
References sElement::data, sQ4Data::inc, and nf.
Referenced by Q4Init().
static int Q4ReadInitStress | ( | sElement * | elm | ) | [static] |
Definition at line 494 of file q4.c.
References sElement::data, sQ4Data::istr, and nf.
Referenced by Q4Init().
static void Q4ReadProfile | ( | sElement * | elm | ) | [static] |
Definition at line 529 of file q4.c.
References sElement::data, nf, and sQ4Data::prof.
Referenced by Q4Init().
static double Q4RigidCoeff | ( | sElement * | elm | ) | [static] |
Definition at line 608 of file q4.c.
References _GPoint, _GWeight, _Q4GetCoord(), _Q4Jacobian(), and _Q4ShapeFunc().
Referenced by Q4Gravity(), and Q4Init().
Definition at line 1658 of file q4.c.
References sElement::data, sQ4Data::istr, sTensor::xx, sTensor::xy, and sTensor::yy.
Referenced by Q4Init().
static void Q4SetPressure | ( | sElement * | elm, | |
double | pot | |||
) | [static] |
Definition at line 1632 of file q4.c.
References _Q4GetCoord(), sElement::data, sNode::dof, sQ4Data::inc, sElement::nodes, sDof::psi, and sCoord::y.
Referenced by Q4Init().
static void Q4StressStrain | ( | sElement * | elm, | |
double | dt, | |||
double * | U, | |||
double * | yield, | |||
sTensor * | stre, | |||
sTensor * | stra | |||
) | [static] |
Definition at line 803 of file q4.c.
References _GPoint, _Q4BMatrix(), _Q4GetCoord(), _Q4GetDisplacement(), _Q4PoroPressure(), sElement::data, sQ4Data::effdef, ElementOffPlaneStress(), sQ4Data::istr, sMaterial::Lambda, MatConstitutiveMatrix, sQ4Data::matid, MatList, MatNuParameter, MatUpdateParameter, MatUpdateStress, sQ4Data::NumNodes, sTensor::rf, sTensor::xx, sTensor::xy, sTensor::xz, sTensor::yy, sTensor::yz, and sTensor::zz.
Referenced by Q4Init(), and Q4WriteStress().
static void Q4TimeStep | ( | sElement * | elm, | |
double * | dt | |||
) | [static] |
Definition at line 1524 of file q4.c.
References _Q4GetCoord(), _Q4MinHeight(), sElement::data, KELVIN, sQ4Data::matid, MatList, MatTimeStep, and sMaterial::type.
Referenced by Q4Init().
Definition at line 1459 of file q4.c.
References _GPoint, _Q4BMatrix(), _Q4GetCoord(), _Q4GetDisplacement(), sElement::data, sTensor::xx, sTensor::xy, and sTensor::yy.
Referenced by Q4Init().
static void Q4ViscoForce | ( | sElement * | elm, | |
double | timeStep, | |||
sTensor * | stress, | |||
double * | vforce | |||
) | [static] |
Definition at line 1680 of file q4.c.
References _GPoint, _GWeight, _Q4BMatrix(), _Q4GetCoord(), _Q4Jacobian(), sElement::data, MatConstitutiveMatrix, MaterialIsVisco(), sQ4Data::matid, MatList, MatViscoStrain, sQ4Data::NumNodes, sTensor::xx, sTensor::xy, and sTensor::yy.
Referenced by Q4Init().
static void Q4WriteGaussResult | ( | sElement * | elm, | |
FILE * | out, | |||
FILE * | tmp | |||
) | [static] |
Definition at line 1219 of file q4.c.
References _Q4PoroPressure(), Config, sElement::data, sPTensor::dir1, sPTensor::dir2, sPTensor::dir3, sConfig::gaussresults, sElement::label, sMaterial::Lambda, sQ4Data::matid, MatList, sConfig::numgaussresults, PrincipalTensor(), sTensor::xx, sTensor::xy, sTensor::yy, and sTensor::zz.
Referenced by Q4Init().
static void Q4WriteGaussVectorResult | ( | sElement * | elm, | |
int | version, | |||
FILE * | out, | |||
FILE * | tmp | |||
) | [static] |
Definition at line 1355 of file q4.c.
References sPTensor::cos1x, sPTensor::cos1y, sPTensor::cos1z, sPTensor::cos2x, sPTensor::cos2y, sPTensor::cos2z, sPTensor::cos3x, sPTensor::cos3y, sPTensor::cos3z, sPTensor::dir1, sPTensor::dir2, sPTensor::dir3, sElement::label, and PrincipalTensor().
Referenced by Q4Init().
static void Q4WriteNodalResult | ( | sElement * | elm, | |
FILE * | out, | |||
FILE * | tmp | |||
) | [static] |
Definition at line 1142 of file q4.c.
References _TRMatrix, sPTensor::dir1, sPTensor::dir2, sPTensor::dir3, sElement::label, PrincipalTensor(), sTensor::xx, sTensor::xy, sTensor::xz, sTensor::yy, sTensor::yz, and sTensor::zz.
Referenced by Q4Init().
static void Q4WriteStress | ( | sElement * | elm, | |
FILE * | out, | |||
double * | U, | |||
double * | V | |||
) | [static] |
Definition at line 1086 of file q4.c.
References DONE, Q4StressStrain(), sElement::rezone, sTensor::xx, sTensor::xy, sTensor::xz, sTensor::yy, sTensor::yz, and sTensor::zz.
Referenced by Q4Init().
int _Edges[4][2] = { { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 0 } } [static] |
double _GPoint[2] = { -0.577350269189626, 0.577350269189626 } [static] |
double _GWeight[2] = { 1.000000000000000, 1.000000000000000 } [static] |
double _TRMatrix[4][4] [static] |