next up previous contents
Next: File cahnhill.h Up: Functions Previous: Local Function ch_residual_2d()   Contents


Local Function ch_residual_3d()

This function computes the residual from indices to points in the concentration array. ``Front refers to the positive $z$-direction, ``back'' to negative $z$, ``up'' to positive $y$, ``down'' to negative $y$, ``left'' to negative $x$ and ``right'' to positive $x$.

static inline PetscScalar ch_residual_3d ( PetscScalar* conc, PetscScalar alpha, PetscScalar beta, PetscScalar mparam, PetscScalar hx, PetscScalar hy, PetscScalar hz, int frontfront, int frontup, int frontleft, int front, int frontright, int frontdown, int upup, int upleft, int up, int upright, int leftleft, int left, int current, int right, int rightright, int downleft, int down, int downright, int downdown, int backup, int backleft, int back, int backright, int backdown, int backback )



inline PetscScalar ch_residual_3d Returns the residual itself

This calculates the $\beta$-term, $\kappa\beta$ times the Laplacian of $\Psi'(C)$,

then subtracts the $\alpha$-term, $\kappa\alpha\nabla^2\nabla^2C$.



root 2002-06-18