FEJDMath
Class MathStuff

java.lang.Object
  extended byFEJDMath.MathStuff

public class MathStuff
extends java.lang.Object


Field Summary
private static SimulBCT1Thread bct1Thread
          Thread used to simulate the boundary conditions of type 1
private static CalcBCT2Thread bct2Thread
          Thread used to compute the boundary conditions of type 2
private static CalcBCT3Thread bct3Thread
          Thread used to compute the boundary conditions of type 3
private static double[] lastVector
          The last vector
private static Mesh m
          The mesh we are working with
private static MakeMatThread matThread
          Thread used to assemble the matrix
private static SolutionThread solThread
          Thread used to compute the solution
private static SkyLine stiffnessMatrix
          The stiffnes matrix stored in a skyline format
 
Constructor Summary
MathStuff()
           
 
Method Summary
static void addLVector(int i, double x)
          Adds x to the ith element of the last vector
static void addSMatrix(int i, int j, double x)
          Adds x to the element (i,j) of the stiffness matrix
static void calcBCT2()
          Computes the boundary condition of 2nd type
static void calcBCT3()
          Computes the boundary condition of 3rd type
static void clearAllTemp()
          Sets all the temperatures of the mesh to 0
static double getMatrixValue(int i, int j)
          Retuns the (i,j) element of the stiffness matrix
static Mesh getMesh()
          Returns the mesh
static int getSkylineSize()
          Returns the size of the shape of the matrix
static double getVectorValue(int i)
          Retuns the (i,j) element of the last vector
static boolean isBCT1ThreadAlive()
          Returns true if the thread which is simulating the computation of the boundary conditions of type 1 is alive
static boolean isBCT2ThreadAlive()
          Returns true if the thread which is computing the boundary conditions of type 2 is alive
static boolean isBCT3ThreadAlive()
          Returns true if the thread which is computing the boundary conditions of type 3 is alive
static boolean isMatThreadAlive()
          Returns true if the thread which is making the matrix is alive
static boolean isSolThreadAlive()
          Returns true if the thread which is computing the solution is alive
static void makeMat()
          Creates and assembles the stiffness matrix
static void printDebug()
          Displays the matric ant the last vector, useful for debugging
static void setMesh(Mesh nm)
          Sets the mesh
static void simulBCT1()
          Simulates boundary conditions 1st type, as if they where computed at the end and sets the lastvector to the right value
static void solvePb()
          Solves the problem and sets the node to their final temperature
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

matThread

private static MakeMatThread matThread
Thread used to assemble the matrix


bct1Thread

private static SimulBCT1Thread bct1Thread
Thread used to simulate the boundary conditions of type 1


bct2Thread

private static CalcBCT2Thread bct2Thread
Thread used to compute the boundary conditions of type 2


bct3Thread

private static CalcBCT3Thread bct3Thread
Thread used to compute the boundary conditions of type 3


solThread

private static SolutionThread solThread
Thread used to compute the solution


m

private static Mesh m
The mesh we are working with


stiffnessMatrix

private static SkyLine stiffnessMatrix
The stiffnes matrix stored in a skyline format


lastVector

private static double[] lastVector
The last vector

Constructor Detail

MathStuff

public MathStuff()
Method Detail

makeMat

public static void makeMat()
Creates and assembles the stiffness matrix


isMatThreadAlive

public static boolean isMatThreadAlive()
Returns true if the thread which is making the matrix is alive


isBCT1ThreadAlive

public static boolean isBCT1ThreadAlive()
Returns true if the thread which is simulating the computation of the boundary conditions of type 1 is alive


isBCT2ThreadAlive

public static boolean isBCT2ThreadAlive()
Returns true if the thread which is computing the boundary conditions of type 2 is alive


isBCT3ThreadAlive

public static boolean isBCT3ThreadAlive()
Returns true if the thread which is computing the boundary conditions of type 3 is alive


isSolThreadAlive

public static boolean isSolThreadAlive()
Returns true if the thread which is computing the solution is alive


calcBCT2

public static void calcBCT2()
Computes the boundary condition of 2nd type


calcBCT3

public static void calcBCT3()
Computes the boundary condition of 3rd type


simulBCT1

public static void simulBCT1()
Simulates boundary conditions 1st type, as if they where computed at the end and sets the lastvector to the right value


printDebug

public static void printDebug()
Displays the matric ant the last vector, useful for debugging


solvePb

public static void solvePb()
Solves the problem and sets the node to their final temperature


addSMatrix

public static void addSMatrix(int i,
                              int j,
                              double x)
Adds x to the element (i,j) of the stiffness matrix


getMatrixValue

public static double getMatrixValue(int i,
                                    int j)
Retuns the (i,j) element of the stiffness matrix


getVectorValue

public static double getVectorValue(int i)
Retuns the (i,j) element of the last vector


addLVector

public static void addLVector(int i,
                              double x)
Adds x to the ith element of the last vector


setMesh

public static void setMesh(Mesh nm)
Sets the mesh


getMesh

public static Mesh getMesh()
Returns the mesh


clearAllTemp

public static void clearAllTemp()
Sets all the temperatures of the mesh to 0


getSkylineSize

public static int getSkylineSize()
Returns the size of the shape of the matrix