# Created by Octave 3.2.4, Tue Nov 23 12:53:26 2010 EST <mockbuild@jetta.math.Princeton.EDU.private>
# name: cache
# type: cell
# rows: 3
# columns: 21
# name: <cell-element>
# type: string
# elements: 1
# length: 12
BIM1Aadvdiff
# name: <cell-element>
# type: string
# elements: 1
# length: 728
 -- Function File: A = BIM1Aadvdiff (MESH, ALPHA, GAMMA, ETA, BETA)
     Builds the Scharfetter-Gummel matrix for the discretization of the
     LHS of the equation - (ALPHA * GAMMA (ETA u' - BETA u ))' = f

     where:
        - ALPHA: element-wise constant scalar function

        - ETA, GAMMA: piecewise linear conforming scalar functions

        - BETA: element-wise constant vector function

     Instead of passing the vector field BETA directly one can pass a
     piecewise linear conforming scalar function PHI as the last input.
     In such case BETA = grad PHI is assumed.  If PHI is a single
     scalar value BETA is assumed to be 0 in the whole domain.

     See also: BIM1Arhs, BIM21reaction, BIM1Alaplacian



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Builds the Scharfetter-Gummel matrix for the discretization of the LHS
of the eq

# name: <cell-element>
# type: string
# elements: 1
# length: 14
BIM1Alaplacian
# name: <cell-element>
# type: string
# elements: 1
# length: 297
 -- Function File: A = BIM1Alaplacian (MESH, EPSILON)
     Builds the finite-element matrix for the discretization of the LHS
     of the equation - (EPSILON ( u' ))' = f

     where:
        - EPSILON: elemental values of an piece-wise constant function

     See also: BIM1Arhs, BIM1Areaction



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Builds the finite-element matrix for the discretization of the LHS of
the equati

# name: <cell-element>
# type: string
# elements: 1
# length: 13
BIM1Areaction
# name: <cell-element>
# type: string
# elements: 1
# length: 402
 -- Function File: [C] = BIM2Areaction(MESH, DELTA, ZETA)
     Builds the matrix for the discretization of the LHS of the equation
     DELTA * ZETA * u = f

     Input:
        - MESH: list of mesh nodes coordinates

        - DELTA: elemental values of a piece-wise constant function.

        - ZETA: nodal values of a piece-wise linear conforming function.

     See also: BIM1Arhs, BIM1Aadvdiff



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Builds the matrix for the discretization of the LHS of the equation
DELTA * ZETA

# name: <cell-element>
# type: string
# elements: 1
# length: 8
BIM1Arhs
# name: <cell-element>
# type: string
# elements: 1
# length: 366
 -- Function File: [B] = BIM2Arhs(MESH, F, G)
     Constructs the RHS for the DAR problem - ( epsilon ( u' ))' =  F*G

     Input:
        - MESH: list of mesh nodes coordinates

        - G: elemental values of a piecewise-wise constant function.

        - F: nodal values of a piecewise linear conforming function.

     See also: BIM1Areaction, BIM1Alaplacian



# name: <cell-element>
# type: string
# elements: 1
# length: 67
Constructs the RHS for the DAR problem - ( epsilon ( u' ))' =  F*G


# name: <cell-element>
# type: string
# elements: 1
# length: 12
BIM2Aadvdiff
# name: <cell-element>
# type: string
# elements: 1
# length: 1496
 -- Function File: A = BIM2Aadvdiff (MESH, ALPHA, GAMMA, ETA, BETA)
     Builds the Scharfetter-Gummel matrix for the discretization of the
     LHS of the equation -div (ALPHA * GAMMA (ETA grad u - BETA u )) = f

     where:
        - ALPHA: element-wise constant scalar function

        - ETA, GAMMA: piecewise linear conforming scalar functions

        - BETA: element-wise constant vector function

     Instead of passing the vector field BETA directly one can pass a
     piecewise linear conforming scalar function PHI as the last input.
     In such case BETA = grad PHI is assumed.  If PHI is a single
     scalar value BETA is assumed to be 0 in the whole domain.

     Example:
          mesh = MSH2Mstructmesh([0:1/3:1],[0:1/3:1],1,1:4);
          mesh = BIM2Cmeshproperties(mesh);
          x = mesh.p(1,:)';
          Dnodes = BIM2Cunknownsonside(mesh,[2,4]);
          Nnodes = columns(mesh.p); Nelements = columns(mesh.t);
          Varnodes = setdiff(1:Nnodes,Dnodes);
          alpha  = ones(Nelements,1); eta = .1*ones(Nnodes,1);
          beta   = [ones(1,Nelements);zeros(1,Nelements)];
          gamma  = ones(Nnodes,1);
          f      = BIM2Arhs(mesh,ones(Nnodes,1),ones(Nelements,1));
          S = BIM2Aadvdiff(mesh,alpha,gamma,eta,beta);
          u = zeros(Nnodes,1);
          u(Varnodes) = S(Varnodes,Varnodes)\f(Varnodes);
          uex = x - (exp(10*x)-1)/(exp(10)-1);
          assert(u,uex,1e-7)

     See also: BIM2Arhs, BIM2Areaction, BIM2Cmeshproperties



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Builds the Scharfetter-Gummel matrix for the discretization of the LHS
of the eq

# name: <cell-element>
# type: string
# elements: 1
# length: 17
BIM2Aboundarymass
# name: <cell-element>
# type: string
# elements: 1
# length: 393
 -- Function File: [M] = BIM2Aboundarymass( MESH, SIDELIST, NODELIST)
     Builds the boundary mass-matrix needed to apply flux boundary
     conditions.

     Input:
        - MESH: PDEtool-like mesh with required field "p", "e", "t".

        - SIDELIST: list of the sides of the geometrical border.

        - NODELIST: (optional) list of the degrees of freedom on the
          boundary



# name: <cell-element>
# type: string
# elements: 1
# length: 73
Builds the boundary mass-matrix needed to apply flux boundary
conditions.

# name: <cell-element>
# type: string
# elements: 1
# length: 14
BIM2Alaplacian
# name: <cell-element>
# type: string
# elements: 1
# length: 304
 -- Function File: A = BIM2Alaplacian (MESH, EPSILON)
     Builds the finite-element matrix for the discretization of the LHS
     of the equation - div (EPSILON grad ( u )) = f

     where:
        - EPSILON: elemental values of an piece-wise constant function

     See also: BIM2Arhs, BIM2Areaction



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Builds the finite-element matrix for the discretization of the LHS of
the equati

# name: <cell-element>
# type: string
# elements: 1
# length: 13
BIM2Areaction
# name: <cell-element>
# type: string
# elements: 1
# length: 441
 -- Function File: [C] = BIM2Areaction(MESH, DELTA, ZETA)
     Builds the matrix for the discretization of the LHS of the equation
     DELTA * ZETA * u = f

     Input:
        - MESH: PDEtool-like mesh structure with required fields "p",
          "e", "t".

        - DELTA: element-wise constant scalar function.

        - ZETA: piecewise linear conforming scalar function.

     See also: BIM2Arhs, BIM2Aadvdiff, BIM2Cmeshproperties



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Builds the matrix for the discretization of the LHS of the equation
DELTA * ZETA

# name: <cell-element>
# type: string
# elements: 1
# length: 8
BIM2Arhs
# name: <cell-element>
# type: string
# elements: 1
# length: 423
 -- Function File: [B] = BIM2Arhs(MESH, F, G)
     Constructs the RHS for the DAR problem -div (ALPHA * GAMMA (ETA
     grad u - BETA u )) + DELTA * ZETA u = F*G

     Input:
        - MESH: PDEtool-like mesh with required field "p", "e", "t".

        - G: element-wise constant scalar function.

        - F: piecewise linear conforming scalar function.

     See also: BIM2Areaction, BIM2Aadvdiff, BIM2Cmeshproperties



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Constructs the RHS for the DAR problem -div (ALPHA * GAMMA (ETA grad u
- BETA u 

# name: <cell-element>
# type: string
# elements: 1
# length: 15
BIM2Cglobalflux
# name: <cell-element>
# type: string
# elements: 1
# length: 773
 -- Function File: [JX,JY] =
          BIM2Cglobalflux(MESH,U,ALPHA,GAMMA,ETA,BETA)
     Builds the Scharfetter-Gummel approximation of the vector field
     J(U) = ALPHA* GAMMA * (ETA * grad U - BETA * U))

     where:
        - ALPHA: element-wise constant scalar function

        - ETA, U, GAMMA: piecewise linear conforming scalar functions

        - BETA: element-wise constant vector function

     J(U) is an element-wise constant vector function

     Instead of passing the vector field BETA directly one can pass a
     piecewise linear conforming scalar function PHI as the last input.
     In such case BETA = grad PHI is assumed.  If PHI is a single
     scalar value BETA is assumed to be 0 in the whole domain.

     See also: BIM2Cpdegrad, BIM2Aadvdiff



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Builds the Scharfetter-Gummel approximation of the vector field J(U) =
ALPHA* GA

# name: <cell-element>
# type: string
# elements: 1
# length: 19
BIM2Cmeshproperties
# name: <cell-element>
# type: string
# elements: 1
# length: 425
 -- Function File: [OMESH] = BIM2Cmeshproperties(IMESH)
     Compute mesh properties needed by the operator assembly routines
     and add them as fields to the mesh structure.

     Input:
        - IMESH: PDEtool-like mesh with required field "p", "e", "t".

     Output:
        - OMESH: PDEtool-like mesh structure with added fields needed
          by BIM method.

     See also: BIM2Areaction, BIM2Aadvdiff, BIM2Crhs



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Compute mesh properties needed by the operator assembly routines and
add them as

# name: <cell-element>
# type: string
# elements: 1
# length: 12
BIM2Cpdegrad
# name: <cell-element>
# type: string
# elements: 1
# length: 297
 -- Function File: [GX,GY] = BIM2Cpdegrad(MESH,U)
     Build the P1 approximation to the gradient of a computed solution.

     Input:
        - MESH: PDEtool-like mesh with required field "p", "e", "t".

        - U: piecewise linear conforming scalar function.

     See also: BIM2Cglobalflux



# name: <cell-element>
# type: string
# elements: 1
# length: 66
Build the P1 approximation to the gradient of a computed solution.

# name: <cell-element>
# type: string
# elements: 1
# length: 17
BIM2Cunknowncoord
# name: <cell-element>
# type: string
# elements: 1
# length: 360
 -- Function File: [X, Y] = BIM2Cunknowncoord(MESH)
     Return as output the coordinates at which the unknown is evaluated
     by BIM method (nodes of the mesh).

     Input:
        - MESH: PDEtool-like mesh with required field "p", "e", "t".

     Output:
        - X, Y: x and y coordinates of the evaluation points.

     See also: BIM2Cunknownsonside



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Return as output the coordinates at which the unknown is evaluated by
BIM method

# name: <cell-element>
# type: string
# elements: 1
# length: 19
BIM2Cunknownsonside
# name: <cell-element>
# type: string
# elements: 1
# length: 406
 -- Function File: [NODELIST] = BIM2Cunknownsonside(MESH,SIDELIST)
     List the mesh nodes that lie on the specified geometrical sides.

     Input:
        - MESH: PDEtool-like mesh with required field "p", "e", "t".

        - SIDELIST: list of the sides of the geometrical border.

     Output:
        - NODELIST: list of the nodes that lie on the specified sides.

     See also: BIM2Cunknowncoord



# name: <cell-element>
# type: string
# elements: 1
# length: 64
List the mesh nodes that lie on the specified geometrical sides.

# name: <cell-element>
# type: string
# elements: 1
# length: 14
BIM3Alaplacian
# name: <cell-element>
# type: string
# elements: 1
# length: 367
 -- Function File: A = BIM3Alaplacian (MESH, ALPHA, ETA)
     Builds the Laplacian matrix for the discretization of the LHS of
     the equation -div (ALPHA (ETA grad u ) = f

     where:
        - ALPHA: element-wise constant scalar function

        - ETA: piecewise linear conforming scalar functions

     See also: BIM3Arhs, BIM3Areaction, BIM3Cmeshproperties



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Builds the Laplacian matrix for the discretization of the LHS of the
equation -d

# name: <cell-element>
# type: string
# elements: 1
# length: 13
BIM3Areaction
# name: <cell-element>
# type: string
# elements: 1
# length: 447
 -- Function File: C = BIM3Areaction (MESH, DELTA, ZETA)
     Builds the mass matrix for the discretization of the LHS of the
     equation DELTA * ZETA * U = f

     Input:
        - MESH: PDEtool-like mesh structure with required fields "p",
          "e", "t".

        - DELTA: element-wise constant scalar function.

        - ZETA: piecewise linear conforming scalar function.

     See also: BIM3Arhs, BIM3Alaplacian, BIM3Cmeshproperties



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Builds the mass matrix for the discretization of the LHS of the equation
DELTA *

# name: <cell-element>
# type: string
# elements: 1
# length: 8
BIM3Arhs
# name: <cell-element>
# type: string
# elements: 1
# length: 425
 -- Function File: [B] = BIM3Arhs(MESH, F, G)
     Constructs the RHS for the DAR problem -div (ALPHA * GAMMA (ETA
     grad u - BETA u )) + DELTA * ZETA u = F*G

     Input:
        - MESH: PDEtool-like mesh with required field "p", "e", "t".

        - G: element-wise constant scalar function.

        - F: piecewise linear conforming scalar function.

     See also: BIM3Areaction, BIM3Alaplacian, BIM3Cmeshproperties



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Constructs the RHS for the DAR problem -div (ALPHA * GAMMA (ETA grad u
- BETA u 

# name: <cell-element>
# type: string
# elements: 1
# length: 19
BIM3Cmeshproperties
# name: <cell-element>
# type: string
# elements: 1
# length: 427
 -- Function File: [OMESH] = BIM3Cmeshproperties(IMESH)
     Compute mesh properties needed by the operator assembly routines
     and add them as fields to the mesh structure.

     Input:
        - IMESH: PDEtool-like mesh with required field "p", "e", "t".

     Output:
        - OMESH: PDEtool-like mesh structure with added fields needed
          by BIM method.

     See also: BIM3Areaction, BIM3Alaplacian, BIM3Arhs



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Compute mesh properties needed by the operator assembly routines and
add them as

# name: <cell-element>
# type: string
# elements: 1
# length: 19
BIM3Cunknownsonside
# name: <cell-element>
# type: string
# elements: 1
# length: 372
 -- Function File: [NODELIST] = BIM3Cunknownsonside(MESH,SIDELIST)
     List the mesh nodes that lie on the specified geometrical sides.

     Input:
        - MESH: PDEtool-like mesh with required field "p", "e", "t".

        - SIDELIST: list of the sides of the geometrical border.

     Output:
        - NODELIST: list of the nodes that lie on the specified sides.



# name: <cell-element>
# type: string
# elements: 1
# length: 64
List the mesh nodes that lie on the specified geometrical sides.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
BIMUbern
# name: <cell-element>
# type: string
# elements: 1
# length: 415
 -- Function File: [BP, BN] = BIMUbern (X)
     Computes the values of the Bernoulli function corresponding to x
     and -x arguments.

     Input:
        - X: argument for the Bernoulli function. Could be a matrix of
          every size.

     Output:
        - BP: Bernoulli function for x argument. Same size as X.

        - BN: Bernoulli function for -x argument. Same size as X.

     See also: BIMUlogm



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Computes the values of the Bernoulli function corresponding to x and -x
argument

# name: <cell-element>
# type: string
# elements: 1
# length: 8
BIMUlogm
# name: <cell-element>
# type: string
# elements: 1
# length: 137
 -- Function File: [T] = BIMUlogm (T1,T2)
     Input:
        - T1:

        - T2:

     Output:
        - T:

     See also: BIMUbern



# name: <cell-element>
# type: string
# elements: 1
# length: 16
Input:
   - T1:


