versor  3.0
C++11 library for Geometric algebra
Public Member Functions | Protected Types | Protected Attributes | List of all members
vsr::Field< T > Class Template Reference

A Basic 3D Field (slowly porting this over from the now defunct vsr_lattice class) Use to Evaluate Neighbors, Tensors, etc. More...

#include <vsr_field.h>

Inheritance diagram for vsr::Field< T >:
vsr::CubicLattice< T::space::point >

Public Member Functions

T * dataPtr () const
 
void dataPtr (T *d)
 
void zero ()
 Zero Out All Data.
 
 Field (int w=1, int h=1, int d=1, double spacingX=1.0, double spacingY=1.0, double spacingZ=1.0)
 
Fieldresize (int w, int h, int d, double spacingX=1.0, double spacingY=1.0, double spacingZ=1.0)
 
void onDestroy ()
 
void alloc ()
 Allocate Memory.
 
T & operator[] (int i)
 Set Data by Index.
 
operator[] (int i) const
 Get Data by Index.
 
T & at (int w=0, int h=0, int d=0)
 Set Data by Coordinate.
 
at (int w=0, int h=0, int d=0) const
 Get Data by Coordinate.
 
void basicInit ()
 
void init ()
 
void reset ()
 
template<class B >
T & dataAt (const B &p)
 Random Vector in Field.
 
template<class V >
euler2d (const V &v)
 
template<class V >
euler3d (const V &v) const
 
surf (VSR_PRECISION u, VSR_PRECISION v)
 Get BILINEAR Interpolated Data at eval u,v [0-1.0].
 
vol (VSR_PRECISION u, VSR_PRECISION v, VSR_PRECISION w) const
 
template<class A >
vol (const A &a)
 
template<class V >
vector< V > contour (const V &v, int num, double force)
 
sumNbrs (int idx) const
 Get QUADRIC Interpolated Data at eval u,v [0-1].
 
diffNbrs (int idx) const
 
diffXNbrs (int ix) const
 
diffYNbrs (int ix) const
 
diffZNbrs (int ix) const
 
dx (int ix) const
 
dy (int ix) const
 
dz (int ix) const
 
double tensNbrs (int idx) const
 
double tensNbrsWt (int idx) const
 
double tensNbrsRwt (int idx) const
 
void gsSolver (const Field &prev)
 Guass Siedel Relaxation Solver Using a Previous Field State.
 
void diffuse (const Field &prev, double diffRate, bool bounded, bool ref)
 Backwards Diffusion Using a Previous Field State.
 
template<class B >
void advect (const Field &prev, const Field< B > &f, double dt, bool ref)
 Backwards Advection Using a Previous Field State prev and Based on a Velocity Frame f.
 
template<class B >
Fielddiv (const Field< B > &f)
 
Fieldswap (Field &f)
 
template<class N >
Fieldoperator* (N val)
 
void boundaryConditions (bool ref)
 
- Public Member Functions inherited from vsr::CubicLattice< T::space::point >
 CubicLattice (int _w=1, int _h=1, int _d=1, double _sx=1.0, double _sy=1.0, double _sz=1.0)
 
void onDestroy ()
 
CubicLatticeresize (int _w, int _h, int _d, double _sx=1.0, double _sy=1.0, double _sz=1.0)
 
int w () const
 
int h () const
 
int d () const
 
int num () const
 
int numVxl () const
 
int idx (int i, int j, int k=0) const
 Get Index In Array.
 
Vxl vxl (int ix) const
 
Vxlvxl (int ix)
 
Nbr nbr (int ix) const
 
Nbrnbr (int ix)
 
Nbr nbrVxl (int ix) const
 
NbrnbrVxl (int ix)
 
double tw () const
 Total Width.
 
double ow () const
 Offset Width.
 
double th () const
 Total Height.
 
double oh () const
 Offset Height.
 
double td () const
 Total Depth.
 
double od () const
 Offset Depth.
 
double px (int i) const
 Spatial Positions of ith element in x direction.
 
double py (int j) const
 Spatial Positions of jth element in y direction.
 
double pz (int k) const
 Spatial Positions of kth element in z direction.
 
void alloc ()
 
void initPoints ()
 
void init ()
 
Vxl vxlAt (const V &tv) const
 Voxel of Vector v.
 
bound (const V &p) const
 
range2D (const V &v) const
 
range (const V &v) const
 
void FE (Nbr nb)
 Routines to Find Face and Edge Boundary.
 
void vxlFE (Nbr nb)
 
Patch surfIdx (double u, double v)
 Indicex of surface at u, v [0, 1].
 
VPatch vidx (double u, double v, double w) const
 Volume Index at u,v,w [0-1].
 
Patch idxU (double t)
 Indices of Line at T.
 
T::space::point & gridAt (int w=0, int h=0, int d=0)
 Set grid data by Coordinate.
 
T::space::point gridAt (int w=0, int h=0, int d=0) const
 Get grid data by Coordinate.
 
T::space::point & grid (int i)
 Set Grid (position) Data.
 
T::space::point grid (int i) const
 Get Grid (position) Data.
 
T::space::point surf (double u, double v)
 
T::space::point surfGrid (double u, double v)
 
T::space::point surfPnt (double u, double v)
 
vector< int > & face ()
 
int face (int ix) const
 
vector< int > & faceVxl ()
 
Vxl faceVxl (int ix)
 
T::space::point * gridPtr () const
 
void gridPtr (T::space::point *lp)
 

Protected Types

using GridType = typename T::space::point
 

Protected Attributes

T * mData
 
- Protected Attributes inherited from vsr::CubicLattice< T::space::point >
int mWidth
 
int mHeight
 
int mDepth
 
int mNum
 
int mNumVxl
 
double mSpacingX
 
double mSpacingY
 
double mSpacingZ
 
T::space::point * mPoint
 
VxlmVxl
 
NbrmNbr
 
NbrmNbrVxl
 
vector< int > mFace
 
vector< int > mEdge
 
vector< int > mCorner
 
vector< int > mFaceVxl
 
vector< int > mEdgeVxl
 
vector< int > mCornerVxl
 

Detailed Description

template<class T>
class vsr::Field< T >

A Basic 3D Field (slowly porting this over from the now defunct vsr_lattice class) Use to Evaluate Neighbors, Tensors, etc.


The documentation for this class was generated from the following file: