versor
3.0
C++11 library for Geometric algebra
|
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>
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) | |
Field & | resize (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. | |
T | operator[] (int i) const |
Get Data by Index. | |
T & | at (int w=0, int h=0, int d=0) |
Set Data by Coordinate. | |
T | 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 > | |
T | euler2d (const V &v) |
template<class V > | |
T | euler3d (const V &v) const |
T | surf (VSR_PRECISION u, VSR_PRECISION v) |
Get BILINEAR Interpolated Data at eval u,v [0-1.0]. | |
T | vol (VSR_PRECISION u, VSR_PRECISION v, VSR_PRECISION w) const |
template<class A > | |
T | vol (const A &a) |
template<class V > | |
vector< V > | contour (const V &v, int num, double force) |
T | sumNbrs (int idx) const |
Get QUADRIC Interpolated Data at eval u,v [0-1]. | |
T | diffNbrs (int idx) const |
T | diffXNbrs (int ix) const |
T | diffYNbrs (int ix) const |
T | diffZNbrs (int ix) const |
T | dx (int ix) const |
T | dy (int ix) const |
T | 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 > | |
Field & | div (const Field< B > &f) |
Field & | swap (Field &f) |
template<class N > | |
Field & | operator* (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 () |
CubicLattice & | resize (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 |
Vxl & | vxl (int ix) |
Nbr | nbr (int ix) const |
Nbr & | nbr (int ix) |
Nbr | nbrVxl (int ix) const |
Nbr & | nbrVxl (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. | |
V | bound (const V &p) const |
V | range2D (const V &v) const |
V | 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 |
Vxl * | mVxl |
Nbr * | mNbr |
Nbr * | mNbrVxl |
vector< int > | mFace |
vector< int > | mEdge |
vector< int > | mCorner |
vector< int > | mFaceVxl |
vector< int > | mEdgeVxl |
vector< int > | mCornerVxl |
A Basic 3D Field (slowly porting this over from the now defunct vsr_lattice class) Use to Evaluate Neighbors, Tensors, etc.