fluidf.h

Go to the documentation of this file.
00001 /* -------------------------------------------------------------------------- */
00002 /* 
00003    $Id: fluidf.h 620 2007-03-22 07:31:27Z svacek $
00004    $Author: svacek $
00005 */
00006 /* -------------------------------------------------------------------------- */
00007 #ifndef _FLUIDF_SVH
00008 #define _FLUIDF_SVH
00009 /*
00010   functions fakt/power()
00011     funkce pro vypocet faktorialu nebo n-te mocniny, kde n - prirozene cislo
00012 */
00013 double fakt(int k);
00014 double power(double x,int k);
00015 /*
00016   function maxside()
00017   function minside()
00018   computes the maximal length of sides in triangulations
00019  */
00020 double maxside();
00021 double minside();
00022 long nodedegree(long i);
00023 /*
00024   functions triangle_volume()
00025            element_volume()
00026            edge_volume()
00027 
00028   computes the volume of triangle/element (i-th)
00029  */
00030 double triangle_volume(long i);
00031 double element_volume(long i);  /* << FE volume at time level n   */
00032 double element_volume1(long i); /* << FE volume at time level n-1 */
00033 double element_volume2(long i); /* << FE volume at time level n-2 */
00034 double element_volume_original(long i);
00035 double edge_volume(long i);
00036 /*
00037  functions load_node/edge/ele/triang()
00038 
00039  loads NODE/ELE/EDGE or whole triangulations
00040 */
00041 void load_node(const char *FileName);
00042 void load_ele(const char *FileName);
00043 void load_edge(const char *FileName);
00044 void load_triang();
00045 /* angener */
00046 long check_side(long IA,long IB,long nsid);
00047 void load_angener(const char fname[]);
00048 void load_triang_angener();
00049 void write_angener(char fname[]);
00050 
00051 /*
00052   function AddEdge2Bndr()
00053            BoundaryStructure()
00054            BoundaryEdges()
00055 
00056   pomocne funkce pro vytrideni hranicnich stran 
00057      ( naplnuji BndrTypes,BndrId[] a BndrEdges[] )
00058      
00059   AddEdge2Bndr -> hleda, zda dany typ hranice je uz registrovan, pripadne ho registruje, a zvysi pocet stran na danem typu hranice
00060 
00061   BoundaryStructure -> vypise vsechny typy hranice a take kolik hran obsahuji
00062 
00063   BoundaryEdges -> pocet hran na hranici
00064 
00065  */
00066 int AddEdge2Bndr(int BM);
00067 void BoundaryStructure();
00068 long BoundaryEdges();
00069 /*
00070   function edge_number()
00071    - najde hranu ZK v seznamu a vrati jeji index
00072  */
00073 long edge_number(long Z,long K);
00074 /*
00075   function destruct_all()
00076   dealokuje vsechny promenne
00077  */
00078 void destruct_all();
00079 /*
00080   function fill_elements_edges()
00081    naplnuje ELEMENT_BOUNDARY_SIDES[][]
00082  */
00083 void fill_elements_edges();
00084 void CheckNeighbours();
00085 /*
00086   function SortBoundarySides()
00087    naplni BSIDE_INDEX[]
00088  */
00089 void SortBoundarySides();
00090 /*
00091   functions node/side/bubble() a derivace ...
00092    vraci hodnoty bazovych funkci v barycentrickych souradnicich
00093  */
00094 double node(double L1);
00095 double side(double L1,double L2,int idx);
00096 double bubble(double L1,double L2,double L3,int idx);
00097 double Dnode(double L1);
00098 double D2node(double L1);
00099 void Dside(vector grad,double L1,double L2,int idx,int iL1,int iL2);
00100 void D2side(matrix hes,double L1,double L2,int idx,int iL1,int iL2);
00101 void Dbubble(vector grad,double L1,double L2,double L3,int idx);
00102 void D2bubble(matrix hes,double L1,double L2,double L3,int idx);
00103 /*
00104   functions LegendreP,fcefi() a derivace.
00105    vraci hodnoty Legendrova polynomu nebo funkce fi 
00106    (fce fi je 
00107         fi(j,x)=\int_{-1}^1 LegendreP(j+1,x) dx  /  (1-x^2) 
00108  */
00109 double LegendreP(int j,double x);
00110 double DLegendreP(int j,double x);
00111 double D2LegendreP(int j,double x);
00112 double fcefi(int j,double x);
00113 double Dfcefi(int j,double x);
00114 double D2fcefi(int j,double x);
00115 
00116 long unique_ijklm(long *_II,long *_JJ,long *_KK,long *_LL,short *_MM,const long _nz);
00117 void quicksort_ijklm(long *_II,long *_JJ,long *_KK,long *_LL,short *_MM, long _lo, long _hi);
00118 
00119 /* ----------------------------------------------------------------------------------------- */
00120 void ComputesNormal2Solid(); /**< Computes approximation of normal to solid (SOLID means airfoil in this stage ) */
00121 void NegativePartMatrix(const double *A,double *Anegative);
00122 void PositivePartMatrix(const double *A,double *Anegative);
00123 
00124 double HeavysideFunction(double _arg);
00125 double HeavysideFunctionR(double _arg);
00126 long NeighbouringElement(long i,short k);
00127 double SegmentDistance(double pointx,double pointy,double *SEGX,double *SEGY);
00128 
00129 
00130 #endif
00131 
00132 

Generated on Sun May 27 11:59:43 2007 for FEMFLUID by  doxygen 1.4.6