util.h File Reference

#include "griddata.h"
Include dependency graph for util.h:

Go to the source code of this file.

Functions

int ascat (int **aindata, int n_items, int s_item, int *newproc, int insize, int send)
int AreaCal (Mat AIpol, PetscReal *p_area)
int AxesRotation (PetscReal *slice_p, PetscReal *slice_n, PetscReal *axes1, int inv, int n_vert, PetscReal *vertxyz, PetscReal *vertxyz2)
int barycent (PetscReal *p, PetscReal *a, PetscReal *b, PetscReal *c, PetscReal *d, PetscReal *bary)
int bbox2 (GridData *gdata, PetscReal *vertxyz2, int n_prop, int *propid, PetscReal *bbox, int *pix)
int calcbbox (int n_ele, int *elevert, int *eleprop, PetscReal *vertxyz2, int n_pids, int *slice_id, PetscReal *bbox)
int Cart2SphereDiff (Vec C, Vec X, Vec S)
int Cart2Sphere (Vec C, Vec S)
int CalAfe2fe (GridData *gdata, PetscReal *shift, int *slice_id, Mat *pAIpol)
int CalAsq2fe (GridData *gdata, PetscReal *vertxyz2, PetscReal *bbox, int *pix, int slice_id, Mat *AIpol)
int CalAfe2sq (GridData *gdata, PetscReal *vertxyz2, PetscReal *bbox, int *pix, int slice_id, Mat *AIpol)
int distint (int from, int to, int a)
int DistortVec (PetscRandom rctx, Vec v, PetscReal distpar)
int DistPointLine (PetscReal *point, PetscReal *linepoint, PetscReal *linevec, PetscReal *dist)
PetscScalar getscalf (PetscReal tfdata[], PetscReal time)
int matcreateseqadj (int nvert, int nele, int *elevert, Mat *mat)
int matviewstruct (MPI_Comm comm, Mat mat)
int Mesh2Dual (int n_ele, int n_vert, int *elevert, int **ia, int **ja)
int Mesh2Dual2 (int n_ele, int n_vert, int *elevert, int **ia, int **ja)
int Mesh2Nodal (int n_ele, int n_vert, int *elevert, int **ia, int **ja)
int Mesh2VertEle (int n_ele, int n_vert, int *elevert, int **ia, int **ja)
int PointFromPlane (PetscReal *x, PetscReal *v1, PetscReal *v2, PetscReal *v3, PetscReal *d)
int PrintMatInfo (Mat A, MatInfoType flag)
int PrintMatInfoAll (Mat A)
int ProgressBar (int cur, int max, int ival)
int readht (FILE *fd, PetscReal **indata, const int col)
int readxy (FILE *fd, const int colx, const int coly, int *n_rows, PetscReal **indata)
PetscReal RenormVec (Vec v, PetscReal normset, PetscReal normtol, int dim)
int PidSharedArea (GridData *gdata, int pid1, int pid2, PetscReal *sharedarea_area, PetscReal *sharedarea_point, PetscReal *sharedarea_norm)
int SolidAngle (PetscScalar *x, PetscScalar *v1, PetscScalar *v2, PetscScalar *v3, PetscScalar *omega)
int Sphere2Cart (Vec S, Vec C)
int SynchronizedFastFPrintf (FILE *fd, int nchars, int nmax, char *wbufs, PetscTruth zip)
int tetnb (int *tet1, int *tet2, int *vshared)
PetscReal tetvol (PetscReal *x1, PetscReal *x2, PetscReal *x3, PetscReal *x4)
PetscReal triarea (PetscReal *v0, PetscReal *v1, PetscReal *v2, PetscReal *n)
int TetSharedVertices (int *v1, int *v2, int *s)
int VecSetVec (Vec vec, PetscScalar *vec3, int dim)

Function Documentation

int AreaCal ( Mat  AIpol,
PetscReal *  p_area 
)

Definition at line 29 of file area.c.

References D_EPS, MagparFunctionLogBegin, and MagparFunctionLogReturn.

Referenced by CalAfe2sq(), and CalAsq2fe().

Here is the caller graph for this function:

int ascat ( int **  aindata,
int  n_items,
int  s_item,
int *  newproc,
int  insize,
int  send 
)

Definition at line 30 of file ascat.c.

References MagparFunctionInfoBegin, and MagparFunctionInfoReturn.

Referenced by DataMoveData(), MetisPartition(), OptimizeBandwidth(), PermuteData(), and TrivialPartitioning().

Here is the caller graph for this function:

int AxesRotation ( PetscReal *  slice_p,
PetscReal *  slice_n,
PetscReal *  axes1,
int  inv,
int  n_vert,
PetscReal *  vertxyz,
PetscReal *  vertxyz2 
)

Definition at line 64 of file axesrot.c.

References checkortho(), D_EPS, douter, MagparFunctionLogBegin, MagparFunctionLogReturn, my_daxpy, my_dcopy, my_ddot, my_dnrm2, my_dscal, and ND.

Referenced by WriteDatInit(), WritePNG2init(), and WritePNGinit().

Here is the call graph for this function:

Here is the caller graph for this function:

int barycent ( PetscReal *  p,
PetscReal *  a,
PetscReal *  b,
PetscReal *  c,
PetscReal *  d,
PetscReal *  bary 
)

Definition at line 90 of file barycent.c.

References gmshtoucd::info(), LAgesv_, my_daxpy, my_dcopy, and ND.

Referenced by CalAfe2fe(), CalAfe2sq(), and WriteDatInit().

Here is the call graph for this function:

Here is the caller graph for this function:

int bbox2 ( GridData gdata,
PetscReal *  vertxyz2,
int  n_prop,
int *  propid,
PetscReal *  bbox,
int *  pix 
)

Definition at line 29 of file bbox2.c.

References calcbbox(), GridData::eleprop, GridData::elevert, GridData::ln_ele, MagparFunctionLogBegin, MagparFunctionLogReturn, and ND.

Referenced by calcbbox(), WritePNG2init(), and WritePNGinit().

Here is the call graph for this function:

Here is the caller graph for this function:

int CalAfe2fe ( GridData gdata,
PetscReal *  shift,
int *  slice_id,
Mat *  pAIpol 
)
int CalAfe2sq ( GridData gdata,
PetscReal *  vertxyz2,
PetscReal *  bbox,
int *  pix,
int  slice_id,
Mat *  AIpol 
)

Definition at line 68 of file calAfe2sq.c.

References AreaCal(), barycent(), GridData::eleprop, GridData::elevert, findeleslice(), GridData::ln_ele, GridData::ln_vert, MagparFunctionLogBegin, MagparFunctionLogReturn, GridData::n_vert, ND, NV, PrintMatInfoAll(), and ProgressBar().

Referenced by WritePNG2init(), and WritePNGinit().

Here is the call graph for this function:

Here is the caller graph for this function:

int CalAsq2fe ( GridData gdata,
PetscReal *  vertxyz2,
PetscReal *  bbox,
int *  pix,
int  slice_id,
Mat *  AIpol 
)
int calcbbox ( int  n_ele,
int *  elevert,
int *  eleprop,
PetscReal *  vertxyz2,
int  n_pids,
int *  slice_id,
PetscReal *  bbox 
)

Definition at line 29 of file calcbbox.c.

References bbox2(), MagparFunctionLogBegin, MagparFunctionLogReturn, ND, and NV.

Referenced by bbox2(), and EleVertVol().

Here is the call graph for this function:

Here is the caller graph for this function:

int Cart2Sphere ( Vec  C,
Vec  S 
)

Definition at line 59 of file cart2sphere.c.

References MagparFunctionInfoBegin, MagparFunctionInfoReturn, and ND.

Referenced by EminiSolve().

Here is the caller graph for this function:

int Cart2SphereDiff ( Vec  C,
Vec  X,
Vec  S 
)

Definition at line 92 of file cart2sphere.c.

References MagparFunctionInfoBegin, MagparFunctionInfoReturn, and ND.

Referenced by TaoEvalEnergyGrad().

Here is the caller graph for this function:

int distint ( int  from,
int  to,
int  a 
)

Definition at line 30 of file distint.c.

Referenced by DataMoveData(), DataPartitionElementsSer(), OptimizeBandwidth(), and TrivialPartitioning().

Here is the caller graph for this function:

int DistortVec ( PetscRandom  rctx,
Vec  v,
PetscReal  distpar 
)

Definition at line 29 of file distortvec.c.

References MagparFunctionInfoBegin, and MagparFunctionInfoReturn.

Referenced by CheckIterationLLG(), and EminiSolve().

Here is the caller graph for this function:

int DistPointLine ( PetscReal *  point,
PetscReal *  linepoint,
PetscReal *  linevec,
PetscReal *  dist 
)

Definition at line 32 of file distpointline.c.

References D_EPS, douter, my_daxpy, my_dcopy, my_dnrm2, and ND.

PetscScalar getscalf ( PetscReal  tfdata[],
PetscReal  time 
)

Definition at line 159 of file ipol.c.

References HTCOL.

Referenced by Hext_ho().

Here is the caller graph for this function:

int matcreateseqadj ( int  nvert,
int  nele,
int *  elevert,
Mat *  mat 
)

Definition at line 30 of file matcreateseqadj.c.

References MagparFunctionInfoBegin, MagparFunctionInfoReturn, Mesh2Nodal(), and NV.

Referenced by CheckPartition(), and OptimizeBandwidth().

Here is the call graph for this function:

Here is the caller graph for this function:

int matviewstruct ( MPI_Comm  comm,
Mat  mat 
)

Definition at line 29 of file matviewstruct.c.

References MagparFunctionLogBegin, and MagparFunctionLogReturn.

Referenced by CheckPartition().

Here is the caller graph for this function:

int Mesh2Dual ( int  n_ele,
int  n_vert,
int *  elevert,
int **  ia,
int **  ja 
)

Definition at line 320 of file mesh2dual.c.

References MagparFunctionLogBegin, MagparFunctionLogReturn, MAXELEELE, Mesh2VertEle(), NF, NV, and tetnb().

Referenced by DataMoveData(), FacNB(), ModifyPropSer(), and PidSharedArea().

Here is the call graph for this function:

Here is the caller graph for this function:

int Mesh2Dual2 ( int  n_ele,
int  n_vert,
int *  elevert,
int **  ia,
int **  ja 
)

Definition at line 531 of file mesh2dual.c.

References MagparFunctionLogBegin, MagparFunctionLogReturn, MAXELEELE, Mesh2VertEle(), NV, and tetnb().

Here is the call graph for this function:

int Mesh2Nodal ( int  n_ele,
int  n_vert,
int *  elevert,
int **  ia,
int **  ja 
)

Definition at line 127 of file mesh2dual.c.

References MagparFunctionLogBegin, MagparFunctionLogReturn, MAXVERTVERT, Mesh2VertEle(), and NV.

Referenced by DataMoveData(), Hdemag_Init(), Hexchani_Init(), matcreateseqadj(), Precond_Init(), and RegularRefinement().

Here is the call graph for this function:

Here is the caller graph for this function:

int Mesh2VertEle ( int  n_ele,
int  n_vert,
int *  elevert,
int **  ia,
int **  ja 
)

Definition at line 40 of file mesh2dual.c.

References MagparFunctionLogBegin, MagparFunctionLogReturn, and NV.

Referenced by Mesh2Dual(), Mesh2Dual2(), and Mesh2Nodal().

Here is the caller graph for this function:

int PidSharedArea ( GridData gdata,
int  pid1,
int  pid2,
PetscReal *  sharedarea_area,
PetscReal *  sharedarea_point,
PetscReal *  sharedarea_norm 
)
int PointFromPlane ( PetscReal *  x,
PetscReal *  v1,
PetscReal *  v2,
PetscReal *  v3,
PetscReal *  d 
)

Definition at line 29 of file solidangle.c.

References douter, my_daxpy, my_dcopy, my_ddot, and ND.

Referenced by Bele(), and SolidAngle().

Here is the caller graph for this function:

int PrintMatInfo ( Mat  A,
MatInfoType  flag 
)

Definition at line 28 of file printmatinfo.c.

References gmshtoucd::info().

Referenced by PrintMatInfoAll().

Here is the call graph for this function:

Here is the caller graph for this function:

int PrintMatInfoAll ( Mat  A  ) 

Definition at line 92 of file printmatinfo.c.

References gmshtoucd::info(), and PrintMatInfo().

Referenced by BMatrix(), CalAfe2fe(), CalAfe2sq(), CalAsq2fe(), Hdemag_Init(), Hexchani_Init(), and WriteDatInit().

Here is the call graph for this function:

Here is the caller graph for this function:

int ProgressBar ( int  cur,
int  max,
int  ival 
)

Definition at line 29 of file progressbar.c.

Referenced by BMatrix(), CalAfe2fe(), CalAfe2sq(), FacNB(), Hdemag_Init(), Hext_py_Init(), and myLLGJacobian().

Here is the caller graph for this function:

int readht ( FILE *  fd,
PetscReal **  indata,
const int  col 
)

Definition at line 55 of file ipol.c.

References HTCOL, MagparFunctionLogBegin, MagparFunctionLogReturn, and MAXLINELEN.

Referenced by Hext_ho_ht_Init().

Here is the caller graph for this function:

int readxy ( FILE *  fd,
const int  colx,
const int  coly,
int *  n_rows,
PetscReal **  indata 
)

Definition at line 173 of file ipol.c.

References MagparFunctionLogBegin, MagparFunctionLogReturn, and MAXLINELEN.

PetscReal RenormVec ( Vec  v,
PetscReal  normset,
PetscReal  normtol,
int  dim 
)

Definition at line 29 of file renormvec.c.

References D_EPS, MagparFunctionInfoBegin, MagparFunctionInfoReturn, my_dnrm2, my_dscal, and ND.

Referenced by CheckIterationLLG(), ConvTest(), EminiSolve(), EquilCheck(), MagSet(), PVodeReInit(), RegularRefinement(), and WriteLogData().

Here is the caller graph for this function:

int SolidAngle ( PetscScalar *  x,
PetscScalar *  v1,
PetscScalar *  v2,
PetscScalar *  v3,
PetscScalar *  omega 
)
int Sphere2Cart ( Vec  S,
Vec  C 
)

Definition at line 29 of file cart2sphere.c.

References MagparFunctionInfoBegin, MagparFunctionInfoReturn, and ND.

Referenced by ConvTest(), and TaoEvalEnergyGrad().

Here is the caller graph for this function:

int SynchronizedFastFPrintf ( FILE *  fd,
int  nchars,
int  nmax,
char *  wbufs,
PetscTruth  zip 
)

Definition at line 35 of file syncffprintf.c.

References MagparFunctionInfoBegin, and MagparFunctionInfoReturn.

Referenced by WriteAVS(), and WriteFEMAVS().

Here is the caller graph for this function:

int tetnb ( int *  tet1,
int *  tet2,
int *  vshared 
)

Definition at line 72 of file tettri.c.

References NV.

Referenced by FacNB(), Mesh2Dual(), and Mesh2Dual2().

Here is the caller graph for this function:

int TetSharedVertices ( int *  v1,
int *  v2,
int *  s 
)

Definition at line 101 of file tettri.c.

References NV.

Referenced by PidSharedArea().

Here is the caller graph for this function:

PetscReal tetvol ( PetscReal *  x1,
PetscReal *  x2,
PetscReal *  x3,
PetscReal *  x4 
)

Definition at line 55 of file tettri.c.

PetscReal triarea ( PetscReal *  v0,
PetscReal *  v1,
PetscReal *  v2,
PetscReal *  n 
)

Definition at line 29 of file tettri.c.

References douter, my_daxpy, my_dcopy, my_dnrm2, my_dscal, and ND.

Referenced by PidSharedArea().

Here is the caller graph for this function:

int VecSetVec ( Vec  vec,
PetscScalar *  vec3,
int  dim 
)

Referenced by Hext_ho().

Here is the caller graph for this function:


magpar - Parallel Finite Element Micromagnetics Package
Copyright (C) 2002-2010 Werner Scholz