#include <stdlib.h>
#include <math.h>
#include "constrain.h"
#include "rio.h"
#include "geo.h"
#include "pfs.h"
Go to the source code of this file.
Data Structures | |
struct | sCSurfaceData |
Defines | |
#define | ZERO(v) ((fabs(v)<Tolerance)?1:0) |
Functions | |
static void | Inverse (double m[3][3], double d[3][3]) |
static double | VecLen (sCoord *vec) |
static double | Dist (sCoord *in0, sCoord *in1) |
static void | EvaluateTolerance (sConstrain *c) |
static int | _surfaceCurrElemTransfMtx (double transf[3][3]) |
static int | _surfaceToLocal (sConstrain *c, sCoord *p, void **elm, double transf[3][3]) |
static void | _invertMtx (double m[3][3], double i[3][3]) |
static int | _surfaceToGlobal (sConstrain *c, sCoord *p, void **elm, double itransf[3][3]) |
static void | _surfaceLocalT3Coord (int inc[3], sCoord coord[3], double jac[3][3]) |
static int | _surfaceLocalTri2PFS (sCoord coord[3], double u1, double v1, double u2, double v2, double u3, double v3, double jacinv[2][2]) |
static int | _surfaceSlide (sConstrain *c, sCoord *p, void **elm, sCoord *d, double ijac[3][3], sCoord *pl) |
static void | ConstSurfaceNew (int, int, int, sConstrain **, sConstrain **) |
static void | ConstSurfaceFree (sConstrain *) |
static void | ConstSurfaceRead (sConstrain *) |
static void | ConstSurfaceBuild (sConstrain *) |
static int | ConstSurfaceLocal (sConstrain *c, sCoord *p, void **elm, double *g, double *l) |
static int | ConstSurfaceGlobal (sConstrain *c, sCoord *p, void **elm, double *l, double *g) |
static int | ConstSurfaceSlide (sConstrain *c, sCoord *p, void **elm, sCoord *d, double *l, double *g, sCoord *pl) |
void | ConstSurfaceInit (void) |
Variables | |
static double | Tolerance = 1.0e+10 |
Created: 25-Jan-2006 Alexandre A. Del Savio Criada a restrição de superfície.
Modified: 10-Fev-2006 Alexandre A. Del Savio Na função ConstSurfaceBuild passou-se a criar a superfície PFS (Parametrized Faceted Surface).
Modified: 13-Apr-2006 Alexandre A. Del Savio Modificada a funcões SurfaceToLocal, ConstSurfaceLocal, SurfaceToGlobal, SurfaceToGlobalParametric, ConstSurfaceGlobalParametric, ConstSurfaceGlobal, que passam a retornar 0 ou 1 em caso de falha ou sucesso respectivamente.
Modified: 21-Jun-06 Alexandre A. Del Savio Modified the ConstSurfaceNew function when it was removed the first parameter "int i" and it started to use the ContNumConstrainRead variable.
Definition in file constsurface.c.
#define ZERO | ( | v | ) | ((fabs(v)<Tolerance)?1:0) |
Definition at line 64 of file constsurface.c.
static void _invertMtx | ( | double | m[3][3], | |
double | i[3][3] | |||
) | [static] |
Definition at line 260 of file constsurface.c.
Referenced by _surfaceToGlobal().
static int _surfaceCurrElemTransfMtx | ( | double | transf[3][3] | ) | [static] |
Evaluate and get the transformation matrix of an element. Evaluate the coordinates defined in the local system of the current element. It is not the Jacobian matrix used by PFS.
Definition at line 178 of file constsurface.c.
References PFSGeoCrossProd(), PFSGeoDiffVec(), PFSGeoVecNormalize(), pfsRItrElemNode(), pfsRItrElemNormal(), pfsRItrNodeCoords(), PFSGeoPoint::x, PFSGeoPoint::y, and PFSGeoPoint::z.
Referenced by _surfaceToGlobal(), and _surfaceToLocal().
static void _surfaceLocalT3Coord | ( | int | inc[3], | |
sCoord | coord[3], | |||
double | jac[3][3] | |||
) | [static] |
Definition at line 321 of file constsurface.c.
References PFSGeoCrossProd(), PFSGeoDiffVec(), PFSGeoDotProd(), PFSGeoVecLen(), PFSGeoVecNormalize(), pfsRItrElemNormal(), pfsRItrNodeCoords(), PFSGeoPoint::x, sCoord::x, PFSGeoPoint::y, sCoord::y, PFSGeoPoint::z, and sCoord::z.
Referenced by _surfaceSlide().
static int _surfaceLocalTri2PFS | ( | sCoord | coord[3], | |
double | u1, | |||
double | v1, | |||
double | u2, | |||
double | v2, | |||
double | u3, | |||
double | v3, | |||
double | jacinv[2][2] | |||
) | [static] |
Definition at line 380 of file constsurface.c.
References sCoord::x, and sCoord::y.
Referenced by _surfaceSlide().
static int _surfaceSlide | ( | sConstrain * | c, | |
sCoord * | p, | |||
void ** | elm, | |||
sCoord * | d, | |||
double | ijac[3][3], | |||
sCoord * | pl | |||
) | [static] |
Definition at line 415 of file constsurface.c.
References _surfaceLocalT3Coord(), _surfaceLocalTri2PFS(), sConstrain::data, Inverse(), pfsRActivateSurf(), pfsRGetElem(), pfsRGetLoopElem(), pfsRItrElemNode(), pfsRItrNodeParVals(), pfsRSetCurrElem(), pfsRShot(), sCSurfaceData::pfsSurface, sCoord::x, sCoord::y, and sCoord::z.
Referenced by ConstSurfaceSlide().
static int _surfaceToGlobal | ( | sConstrain * | c, | |
sCoord * | p, | |||
void ** | elm, | |||
double | itransf[3][3] | |||
) | [static] |
Definition at line 278 of file constsurface.c.
References _invertMtx(), _surfaceCurrElemTransfMtx(), sConstrain::data, pfsRActivateSurf(), pfsRGetElem(), pfsRGetLoopElem(), pfsRSetCurrElem(), sCSurfaceData::pfsSurface, sCoord::x, sCoord::y, and sCoord::z.
Referenced by ConstSurfaceGlobal().
static int _surfaceToLocal | ( | sConstrain * | c, | |
sCoord * | p, | |||
void ** | elm, | |||
double | transf[3][3] | |||
) | [static] |
Definition at line 221 of file constsurface.c.
References _surfaceCurrElemTransfMtx(), sConstrain::data, pfsRActivateSurf(), pfsRGetElem(), pfsRGetLoopElem(), pfsRSetCurrElem(), sCSurfaceData::pfsSurface, sCoord::x, sCoord::y, and sCoord::z.
Referenced by ConstSurfaceLocal().
static void ConstSurfaceBuild | ( | sConstrain * | c | ) | [static] |
This function creates the PFS (Parametrized Faceted Surface) associated to this constraint surface.
Definition at line 607 of file constsurface.c.
References sNode::coord, sConstrain::data, sConstrain::elems, ElmConnect, sConstrain::nodes, sConstrain::numElems, sConstrain::numNodes, pfsCompleteParSpace(), pfsRActivateSurf(), pfsRAddElem(), pfsRAddNode(), pfsRCompleteSurf(), pfsRInitSurf(), pfsRSolveSurfPar(), sCSurfaceData::pfsSurface, sCoord::x, sCoord::y, and sCoord::z.
Referenced by ConstSurfaceInit().
static void ConstSurfaceFree | ( | sConstrain * | c | ) | [static] |
Definition at line 535 of file constsurface.c.
References sConstrain::data, sConstrain::elems, ElmFree, sConstrain::nodes, sConstrain::numElems, and sConstrain::numNodes.
Referenced by ConstSurfaceInit().
static int ConstSurfaceGlobal | ( | sConstrain * | c, | |
sCoord * | p, | |||
void ** | elm, | |||
double * | l, | |||
double * | g | |||
) | [static] |
Definition at line 689 of file constsurface.c.
References _surfaceToGlobal(), and NDof.
Referenced by ConstSurfaceInit().
void ConstSurfaceInit | ( | void | ) |
static int ConstSurfaceLocal | ( | sConstrain * | c, | |
sCoord * | p, | |||
void ** | elm, | |||
double * | g, | |||
double * | l | |||
) | [static] |
Definition at line 662 of file constsurface.c.
References _surfaceToLocal(), and NDof.
Referenced by ConstSurfaceInit().
static void ConstSurfaceNew | ( | int | label, | |
int | num_nodes, | |||
int | num_elems, | |||
sConstrain ** | c, | |||
sConstrain ** | clst | |||
) | [static] |
Definition at line 508 of file constsurface.c.
References ContNumConstrainRead, and SURFACE.
Referenced by ConstSurfaceInit().
static void ConstSurfaceRead | ( | sConstrain * | c | ) | [static] |
Definition at line 564 of file constsurface.c.
References sNode::coord, sNode::curve, sNode::dof, DSP_NO, sNode::dspIteration, sNode::dspTime, sConstrain::elems, ElmNew, ElmRead, EvaluateTolerance(), FORCE, sNode::id, nf, sConstrain::nodes, NONE, sConstrain::numElems, sConstrain::numNodes, sDof::psi, sNode::rezone, T3, sDof::x, sCoord::x, sDof::y, sCoord::y, sDof::z, and sCoord::z.
Referenced by ConstSurfaceInit().
static int ConstSurfaceSlide | ( | sConstrain * | c, | |
sCoord * | p, | |||
void ** | elm, | |||
sCoord * | d, | |||
double * | l, | |||
double * | g, | |||
sCoord * | pl | |||
) | [static] |
Definition at line 714 of file constsurface.c.
References _surfaceSlide(), and NDof.
Referenced by ConstSurfaceInit().
static void EvaluateTolerance | ( | sConstrain * | c | ) | [static] |
Calcula a tolerância usada pelas funções de check geométrico deste pacote em função de cada curva lida.
Definition at line 134 of file constsurface.c.
References sNode::coord, sConstrain::data, Dist(), sConstrain::elems, ElmConnect, sConstrain::nodes, and Tolerance.
static void Inverse | ( | double | m[3][3], | |
double | d[3][3] | |||
) | [static] |
Definition at line 90 of file constsurface.c.
Referenced by _surfaceSlide().
static double VecLen | ( | sCoord * | vec | ) | [static] |
Calcula o comprimento de um vetor.
Definition at line 111 of file constsurface.c.
double Tolerance = 1.0e+10 [static] |
Definition at line 58 of file constsurface.c.