C# Class SharpFE.Solvers.LinearSolver

Carries out a simple, linear analysis to solve a static, implicit finite element problem.
Inheritance: IFiniteElementSolver
ファイルを表示 Open project: iainsproat/SharpFE

Protected Properties

Property Type Description
matrixBuilder SharpFE.Stiffness.GlobalModelStiffnessMatrixBuilder
model FiniteElementModel

Public Methods

Method Description
LinearSolver ( FiniteElementModel modelToSolve ) : System

Initializes a new instance of the LinearSolver class.

LinearSolver ( FiniteElementModel modelToSolve, GlobalModelStiffnessMatrixBuilder stiffnessMatrixBuilder ) : System

Initializes a new instance of the LinearSolver class.

Solve ( ) : FiniteElementResults

Solves the model containing the finite element problem

Protected Methods

Method Description
CalculateUnknownDisplacements ( ) : KeyedVector

Calculates part of the problem for unknown displacements

CalculateUnknownReactions ( KeyedVector unknownDisplacements ) : KeyedVector

Calculates part of the stiffness equations for the unknown reactions.

CombineExternalForcesOnReactionNodesWithReactions ( KeyedVector reactions ) : KeyedVector

The user may have placed reactions directly on to fixed supports. These are ignored during the calculation, but the correct answer for the total reaction must include them

CreateResults ( KeyedVector displacements, KeyedVector reactions ) : FiniteElementResults

Puts the data into the results data structure.

Solve ( StiffnessMatrix stiffnessMatrix, KeyedVector forceVector ) : KeyedVector

Solves AX=B for X.

ThrowIfNotAValidModel ( ) : void

Checks as to whether the model is valid for solving.

Method Details

CalculateUnknownDisplacements() protected method

Calculates part of the problem for unknown displacements
protected CalculateUnknownDisplacements ( ) : KeyedVector
return KeyedVector

CalculateUnknownReactions() protected method

Calculates part of the stiffness equations for the unknown reactions.
protected CalculateUnknownReactions ( KeyedVector unknownDisplacements ) : KeyedVector
unknownDisplacements KeyedVector A vector of the displacements which were previously unknown
return KeyedVector

CombineExternalForcesOnReactionNodesWithReactions() protected method

The user may have placed reactions directly on to fixed supports. These are ignored during the calculation, but the correct answer for the total reaction must include them
protected CombineExternalForcesOnReactionNodesWithReactions ( KeyedVector reactions ) : KeyedVector
reactions KeyedVector The calculated values of the reactions
return KeyedVector

CreateResults() protected method

Puts the data into the results data structure.
protected CreateResults ( KeyedVector displacements, KeyedVector reactions ) : FiniteElementResults
displacements KeyedVector The calculated displacements. The index of the values in the vector matches the index of the displacement identifiers.
reactions KeyedVector The calculated reactions. The index of the values in the vector matches the index of the reaction identifiers.
return FiniteElementResults

LinearSolver() public method

Initializes a new instance of the LinearSolver class.
public LinearSolver ( FiniteElementModel modelToSolve ) : System
modelToSolve FiniteElementModel The model on which to run the analysis
return System

LinearSolver() public method

Initializes a new instance of the LinearSolver class.
public LinearSolver ( FiniteElementModel modelToSolve, GlobalModelStiffnessMatrixBuilder stiffnessMatrixBuilder ) : System
modelToSolve FiniteElementModel The model on which to run the analysis
stiffnessMatrixBuilder SharpFE.Stiffness.GlobalModelStiffnessMatrixBuilder The class which generates the stiffness matrices for solving.
return System

Solve() public method

Solves the model containing the finite element problem
public Solve ( ) : FiniteElementResults
return FiniteElementResults

Solve() protected abstract method

Solves AX=B for X.
protected abstract Solve ( StiffnessMatrix stiffnessMatrix, KeyedVector forceVector ) : KeyedVector
stiffnessMatrix StiffnessMatrix The stiffness matrix
forceVector KeyedVector The forces
return KeyedVector

ThrowIfNotAValidModel() protected method

Checks as to whether the model is valid for solving.
Thrown if the model is invalid for solving.
protected ThrowIfNotAValidModel ( ) : void
return void

Property Details

matrixBuilder protected_oe property

A helper class to build the stiffness matrices from the model
protected GlobalModelStiffnessMatrixBuilder,SharpFE.Stiffness matrixBuilder
return SharpFE.Stiffness.GlobalModelStiffnessMatrixBuilder

model protected_oe property

The model with the data to solve
protected FiniteElementModel model
return FiniteElementModel