A group of static mathematical functions to support finite element calculations. More...
#include "us_astfem_math.h"
Classes | |
class | AstFemParameters |
Parameters for finite element solution. More... | |
class | ComponentRole |
Component Role. More... | |
class | MfemData |
A data set comprised of scans from one sample taken at constant speed. More... | |
class | MfemInitial |
Initial concentration conditions. More... | |
class | MfemScan |
A scan entry. More... | |
class | ReactionGroup |
Reaction Group. More... | |
Static Public Member Functions | |
static void | interpolate_C0 (MfemInitial &, MfemInitial &) |
Interpolate first onto second. More... | |
static void | interpolate_C0 (MfemInitial &, double *, QVector< double > &) |
Interpolate starting concentration QVector MfemInitial onto C0. More... | |
static void | zero_2d (int, int, double **) |
Initialize a 2d matrix in memory to all zeros. More... | |
static void | initialize_2d (int, int, double ***) |
Create a 2d matrix in memory and initilize to all zeros. More... | |
static void | clear_2d (int, double **) |
Delete a 2d matrix in memory. More... | |
static double | maxval (const QVector< double > &) |
Find the maximum value in a vector. More... | |
static double | minval (const QVector< double > &) |
Find the minimum value in a vector. More... | |
static double | maxval (const QVector< US_Model::SimulationComponent > &) |
Find the maximum s in a vector of SimulationComponent entries. More... | |
static double | minval (const QVector< US_Model::SimulationComponent > &) |
Find the minimum s in a vector of SimulationComponent entries. More... | |
static void | initialize_3d (int, int, int, double ****) |
Create a 3d matrix in memory and initilize to all zeros. More... | |
static void | clear_3d (int, int, double ***) |
Delete a 3d matrix in memory. More... | |
static void | tridiag (double *, double *, double *, double *, double *, int) |
Solve a Ax = b where A is tridiagonal. More... | |
static double | cube_root (double, double, double) |
Find the positive cubic-root of a cubic polynomial with a0 <= 0 and a1, a2 >= 0. More... | |
static int | GaussElim (int, double **, double *) |
Solve Ax = b using Gaussian Elimination. More... | |
static double | find_C1_mono_Nmer (int, double, double) |
Solve f(x) = x + K * x^n - C using Newton's method. This function needs to be renamed! More... | |
static int | interpolate (MfemData &, MfemData &, bool) |
Interpolate one dataset onto another using time or omega^2t. More... | |
static int | interpolate (MfemData &, MfemData &, bool, int, int) |
Interpolate one dataset onto another using time or omega^2t. More... | |
static void | QuadSolver (double *, double *, double *, double *, double *, double *, int) |
Solve Quad-diagonal system. More... | |
static void | IntQT1 (double *, double, double, double **, double) |
Integration on test function seperately on left Q, right T. More... | |
static void | IntQTm (double *, double, double, double **, double) |
Integration on test function. More... | |
static void | IntQTn2 (double *, double, double, double **, double) |
Integration on test function. More... | |
static void | IntQTn1 (double *, double, double, double **, double) |
Integration on test function. More... | |
static void | DefineFkp (int, double **) |
Define Lamm equation values. More... | |
static double | AreaT (double *, double *) |
Compute the area of a triangle (v1, v2, v3) More... | |
static void | BasisTS (double, double, double *, double *, double *) |
Computer basis on standard element (TS) More... | |
static void | BasisQS (double, double, double *, double *, double *) |
Computer basis on standard element (QS) More... | |
static void | BasisTR (double *, double *, double, double, double *, double *, double *) |
Computer basis on real element T at given(xs,ts) point. More... | |
static void | BasisQR (double *, double, double, double *, double *, double *, double) |
Computer basis on real element Q at given(xs,ts) point. More... | |
static double | Integrand (double, double, double, double, double, double, double, double) |
Integrand for Lamm equation. More... | |
static void | DefineGaussian (int, double **) |
Define Gaussian. More... | |
static void | initSimData (US_DataIO::RawData &, US_DataIO::EditedData &, double) |
Initialize simulation data from experimental. More... | |
static double | variance (US_DataIO::RawData &, US_DataIO::EditedData &) |
Calculate variance for Simulation-Experimental difference. More... | |
static double | variance (US_DataIO::RawData &, US_DataIO::EditedData &, QList< int >) |
Calculate variance for Simulation-Experimental difference. More... | |
static double | calc_bottom (double, double, double *) |
Calculate bottom radius from channel bottom and rotor coefficients. More... | |
A group of static mathematical functions to support finite element calculations.
Definition at line 13 of file us_astfem_math.h.
|
static |
Compute the area of a triangle (v1, v2, v3)
xv | The XV vector |
yv | The YV vector |
Definition at line 1684 of file us_astfem_math.cpp.
|
static |
Computer basis on real element Q at given(xs,ts) point.
vx | The VX vector |
xs | The start X coordinate |
ts | The start Y coordinate |
phi | The Phi vector to fill |
phix | The PhiX vector to fill |
phiy | The PhiY vector to fill |
dt | The d-t constant |
Definition at line 1790 of file us_astfem_math.cpp.
|
static |
Computer basis on standard element (QS)
xi | The XI constant |
et | The ET constant |
phi | The Phi vector to fill |
phi1 | The Phi1 vector to fill |
phi2 | The Phi2 vector to fill |
Definition at line 1712 of file us_astfem_math.cpp.
|
static |
Computer basis on real element T at given(xs,ts) point.
vx | The Vx vector |
vy | The Vy vector |
xs | The start X coordinate |
ys | The start Y coordinate |
phi | The Phi vector to fill |
phix | The PhiX vector to fill |
phiy | The PhiY vector to fill |
Definition at line 1737 of file us_astfem_math.cpp.
|
static |
Computer basis on standard element (TS)
xi | The XI constant |
et | The ET constant |
phi | The Phi vector to fill |
phi1 | The Phi1 vector to fill |
phi2 | The Phi2 vector to fill |
Definition at line 1692 of file us_astfem_math.cpp.
|
static |
Calculate bottom radius from channel bottom and rotor coefficients.
rpm | Rotor revolutions per minute. |
bottom_chan | Initial bottom for centerpiece channel |
rotorcoefs | Array of 2 rotor coefficients |
Definition at line 2015 of file us_astfem_math.cpp.
|
static |
Delete a 2d matrix in memory.
val1 | First dimension |
matrix | val1 x n matrix to be deleted |
Definition at line 109 of file us_astfem_math.cpp.
|
static |
Delete a 3d matrix in memory.
val1 | First dimension |
val2 | Second dimension |
matrix | Deleted val1 x val2 x n matrix |
Definition at line 179 of file us_astfem_math.cpp.
|
static |
Find the positive cubic-root of a cubic polynomial
with a0 <= 0 and
a1, a2 >= 0.
a0 | The a0 value |
a1 | The a0 value |
a2 | The a0 value |
Definition at line 240 of file us_astfem_math.cpp.
|
static |
Define Lamm equation values.
npts | Order of the equation |
Lam | Matrix of Lamm values to fill |
Definition at line 1407 of file us_astfem_math.cpp.
|
static |
Define Gaussian.
nGauss | Order of the matrix |
Gs2 | Matrix to be filled |
Definition at line 1840 of file us_astfem_math.cpp.
|
static |
Solve f(x) = x + K * x^n - C using Newton's method.
This function needs to be renamed!
n | The power exponent |
K | The scalar constant |
CT | The test C value |
Definition at line 285 of file us_astfem_math.cpp.
|
static |
Solve Ax = b using Gaussian Elimination.
n | The order of the square matrix |
a | The n x n matrix |
b | The b vector |
Definition at line 326 of file us_astfem_math.cpp.
|
static |
Create a 2d matrix in memory and initilize to all zeros.
val1 | First dimension |
val2 | Second dimension |
matrix | Initialized val1 x val2 matrix |
Definition at line 95 of file us_astfem_math.cpp.
|
static |
Create a 3d matrix in memory and initilize to all zeros.
val1 | First dimension |
val2 | Second dimension |
val3 | Third dimension |
matrix | Initialized val1 x val2 x val3 matrix |
Definition at line 158 of file us_astfem_math.cpp.
|
static |
Initialize simulation data from experimental.
simdata | Reference to simulation Raw Data to initialize. |
editdata | Reference to experimental Edited Data to mirror. |
concval1 | Optional constant concentration value for first scan. |
Definition at line 1913 of file us_astfem_math.cpp.
|
static |
Integrand for Lamm equation.
x_gauss | The X-gaussian constant |
D | The D constant |
sw2 | The SW2 constant |
u | The U constant |
ux | The Ux constant |
ut | The Ut constant |
v | The V constant |
vx | The Vx constant |
Definition at line 1831 of file us_astfem_math.cpp.
Interpolate one dataset onto another using time or omega^2t.
expdata | Experimental data to create, sized on input |
simdata | Simulation from which to create modeled experiment |
use_time | Flag of whether to use time interpolation |
Definition at line 390 of file us_astfem_math.cpp.
|
static |
Interpolate one dataset onto another using time or omega^2t.
expdata | Experimental data to create, sized on input |
simdata | Simulation from which to create modeled experiment |
use_time | Flag of whether to use time correction |
fscan | First update expdata scan index |
lscan | Last update expdata scan index plus one |
Definition at line 466 of file us_astfem_math.cpp.
|
static |
Interpolate first onto second.
C0 | Input MfemInitial |
C1 | MfemInitial with interpolated concentrations |
Definition at line 48 of file us_astfem_math.cpp.
|
static |
Interpolate starting concentration QVector MfemInitial onto C0.
C0 | Input MfemInitial |
C1 | First scan with interpolated concentrations |
xvec | Start x (radius) values for each scan |
Definition at line 6 of file us_astfem_math.cpp.
|
static |
Integration on test function seperately on left Q, right T.
vx | The vx vector |
D | The D value |
sw2 | The sw2 value |
Stif | The Stif matrix |
dt | The dt value |
Definition at line 846 of file us_astfem_math.cpp.
|
static |
Integration on test function.
vx | The vx vector |
D | The D value |
sw2 | The sw2 value |
Stif | The Stif matrix |
dt | The dt value |
Definition at line 990 of file us_astfem_math.cpp.
|
static |
Integration on test function.
vx | The vx vector |
D | The D value |
sw2 | The sw2 value |
Stif | The Stif matrix |
dt | The dt value |
Definition at line 1332 of file us_astfem_math.cpp.
|
static |
Integration on test function.
vx | The vx vector |
D | The D value |
sw2 | The sw2 value |
Stif | The Stif matrix |
dt | The dt value |
Definition at line 1161 of file us_astfem_math.cpp.
|
static |
Find the maximum value in a vector.
value | Vector whose maximum is found |
Definition at line 137 of file us_astfem_math.cpp.
|
static |
Find the maximum s in a vector of SimulationComponent entries.
value | Vector of components whose maximum s value is found |
Definition at line 148 of file us_astfem_math.cpp.
|
static |
Find the minimum value in a vector.
value | Vector whose minimum is found |
Definition at line 116 of file us_astfem_math.cpp.
|
static |
Find the minimum s in a vector of SimulationComponent entries.
value | Vector of components whose minimum s value is found |
Definition at line 127 of file us_astfem_math.cpp.
|
static |
Solve Quad-diagonal system.
ai | The initial a vector |
bi | The initial b vector |
ci | The initial c vector |
di | The initial d vector |
cr | The Cr vector |
solu | The calculated solution vector |
N | The length of vectors |
Definition at line 780 of file us_astfem_math.cpp.
|
static |
Solve a Ax = b where A is tridiagonal.
a | Array of a values |
b | Array of b values |
c | Array of c values |
r | Array of r values |
u | Array of u values |
N | Length of vectors |
Definition at line 194 of file us_astfem_math.cpp.
|
static |
Calculate variance for Simulation-Experimental difference.
simdata | Reference to simulation Raw Data. |
editdata | Reference to experimental Edited Data. |
Definition at line 1962 of file us_astfem_math.cpp.
|
static |
Calculate variance for Simulation-Experimental difference.
simdata | Reference to simulation Raw Data. |
editdata | Reference to experimental Edited Data. |
exclScans | List of excluded scans. |
Definition at line 1972 of file us_astfem_math.cpp.
|
static |
Initialize a 2d matrix in memory to all zeros.
val1 | First dimension |
val2 | Second dimension |
matrix | Initialized val1 x val2 matrix |
Definition at line 88 of file us_astfem_math.cpp.