Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::fem::SolverCrankNicolson Class Reference

FEM Solver for time dependent problems; uses Crank-Nicolson implicit discretization scheme. More...

#include <itkFEMSolverCrankNicolson.h>

Inheritance diagram for itk::fem::SolverCrankNicolson:

Inheritance graph
[legend]
Collaboration diagram for itk::fem::SolverCrankNicolson:

Collaboration graph
[legend]
List of all members.

Public Methods

void InitializeForSolution ()
void AssembleKandM ()
void AssembleFforTimeStep (int dim=0)
void Solve ()
void SetAlpha (Float a=0.5)
void SetDeltatT (Float T)
void SetRho (Float rho)
void RecomputeForceVector (unsigned int index)
void FindBracketingTriplet (Float *a, Float *b, Float *c)
void SetEnergyToMin (Float xmin)
LinearSystemWrapperGetLS ()
void PrintMinMaxOfSolution ()
 SolverCrankNicolson ()
 ~SolverCrankNicolson ()
void AddToDisplacements (Float optimum=1.0)
void AverageLastTwoDisplacements (Float t=0.5)
void ZeroVector (int which=0)
void PrintDisplacements ()
void PrintForce ()
Float GoldenSection (Float tol=0.01, unsigned int MaxIters=25)
Float BrentsMethod (Float tol=0.01, unsigned int MaxIters=25)
Float EvaluateResidual (Float t=1.0)
Float GetDeformationEnergy (Float t=1.0)
Float GSSign (Float a, Float b)
Float GSMax (Float a, Float b)

Public Attributes

Float m_deltaT
Float m_rho
Float m_alpha
unsigned int ForceTIndex
unsigned int ForceTotalIndex
unsigned int ForceTMinus1Index
unsigned int SolutionTIndex
unsigned int SolutionTMinus1Index
unsigned int SolutionVectorTMinus1Index
unsigned int TotalSolutionIndex
unsigned int DifferenceMatrixIndex
unsigned int SumMatrixIndex
unsigned int DiffMatrixBySolutionTMinus1Index

Detailed Description

FEM Solver for time dependent problems; uses Crank-Nicolson implicit discretization scheme.

This is the main class used for solving FEM time-dependent problems. It solves the following problem:

( M + alpha*dt* K )*U_t=(M - (1.- alpha)*dt* K)* U_{t-1} + dt*(alpha*f_{n+1} + (1-alpha)*f_n)

which is the Crank-Nicolson formulation of the static problem if alpha=0.5. The static solution is gained if : rho = 0.0; alpha = 1.0; dt = 1.0; Practically, it is good to set rho to something small (for the itpack solver). The advantage of choosing alpha=0.5 is that the solution is then stable for any choice of time step, dt. This class inherits and uses most of the Solver class functionality. One must call AssembleKandM instead of AssembleK and AssembleFforTimeStep instead of AssembleF. FIXMEs: 1) Members should be privatized, etc. 2) We should also account for the contribution to the force from essential BCs. Basically there are terms involving M * (\dot g_b) and K * g_b where g_b is the essential BC vector.

Definition at line 63 of file itkFEMSolverCrankNicolson.h.


Constructor & Destructor Documentation

itk::fem::SolverCrankNicolson::SolverCrankNicolson   [inline]
 

Default constructor which sets the indices for the matrix and vector storage. Time step and other parameters are also initialized.

Definition at line 141 of file itkFEMSolverCrankNicolson.h.

References DifferenceMatrixIndex, DiffMatrixBySolutionTMinus1Index, ForceTIndex, ForceTMinus1Index, ForceTotalIndex, m_alpha, SolutionTIndex, SolutionTMinus1Index, SolutionVectorTMinus1Index, SumMatrixIndex, and TotalSolutionIndex.

itk::fem::SolverCrankNicolson::~SolverCrankNicolson   [inline]
 

Definition at line 160 of file itkFEMSolverCrankNicolson.h.

References itk::fem::Solver::Float, and m_alpha.


Member Function Documentation

void itk::fem::SolverCrankNicolson::AddToDisplacements Float    optimum = 1.0
 

add solution vector u to the corresponding nodal values, which are stored in node objects). This is standard post processing of the solution

void itk::fem::SolverCrankNicolson::AssembleFforTimeStep int    dim = 0
 

Assemble the master force vector at a given time.

Parameters:
dim  This is a parameter that can be passed to the function and is normally used with isotropic elements to specify the dimension for which the master force vector should be assembled.

void itk::fem::SolverCrankNicolson::AssembleKandM  
 

Assemble the master stiffness and mass matrix. We actually assemble the right hand side and left hand side of the implicit scheme equation.

void itk::fem::SolverCrankNicolson::AverageLastTwoDisplacements Float    t = 0.5
 

add solution vector u to the corresponding nodal values, which are stored in node objects). This is standard post processing of the solution

Float itk::fem::SolverCrankNicolson::BrentsMethod Float    tol = 0.01,
unsigned int    MaxIters = 25
 

Finds the optimum value between the last two solutions and sets the current solution to that value. Uses Evaluate Residual;

Float itk::fem::SolverCrankNicolson::EvaluateResidual Float    t = 1.0
 

Finds the optimum value between the last two solutions and sets the current solution to that value. Uses Evaluate Residual;

void itk::fem::SolverCrankNicolson::FindBracketingTriplet Float   a,
Float   b,
Float   c
 

Float itk::fem::SolverCrankNicolson::GetDeformationEnergy Float    t = 1.0
 

Finds the optimum value between the last two solutions and sets the current solution to that value. Uses Evaluate Residual;

LinearSystemWrapper* itk::fem::SolverCrankNicolson::GetLS   [inline]
 

Definition at line 132 of file itkFEMSolverCrankNicolson.h.

References m_deltaT, and m_rho.

Float itk::fem::SolverCrankNicolson::GoldenSection Float    tol = 0.01,
unsigned int    MaxIters = 25
 

Finds the optimum value between the last two solutions and sets the current solution to that value. Uses Evaluate Residual;

Float itk::fem::SolverCrankNicolson::GSMax Float    a,
Float    b
[inline]
 

Finds the optimum value between the last two solutions and sets the current solution to that value. Uses Evaluate Residual;

Definition at line 128 of file itkFEMSolverCrankNicolson.h.

References itk::fem::Solver::Float, and itk::fem::Solver::m_ls.

Float itk::fem::SolverCrankNicolson::GSSign Float    a,
Float    b
[inline]
 

Finds the optimum value between the last two solutions and sets the current solution to that value. Uses Evaluate Residual;

Definition at line 127 of file itkFEMSolverCrankNicolson.h.

void itk::fem::SolverCrankNicolson::InitializeForSolution  
 

void itk::fem::SolverCrankNicolson::PrintDisplacements  
 

add solution vector u to the corresponding nodal values, which are stored in node objects). This is standard post processing of the solution

void itk::fem::SolverCrankNicolson::PrintForce  
 

add solution vector u to the corresponding nodal values, which are stored in node objects). This is standard post processing of the solution

void itk::fem::SolverCrankNicolson::PrintMinMaxOfSolution  
 

Compute and print the minimum and maximum of the total solution and the last solution.

void itk::fem::SolverCrankNicolson::RecomputeForceVector unsigned int    index
 

compute the current state of the right hand side and store the current force for the next iteration.

void itk::fem::SolverCrankNicolson::SetAlpha Float    a = 0.5 [inline]
 

Set stability step for the solution.

Definition at line 104 of file itkFEMSolverCrankNicolson.h.

void itk::fem::SolverCrankNicolson::SetDeltatT Float    T [inline]
 

Set time step for the solution. Should be 1/2.

Definition at line 107 of file itkFEMSolverCrankNicolson.h.

void itk::fem::SolverCrankNicolson::SetEnergyToMin Float    xmin
 

void itk::fem::SolverCrankNicolson::SetRho Float    rho [inline]
 

Set density constant.

Definition at line 110 of file itkFEMSolverCrankNicolson.h.

void itk::fem::SolverCrankNicolson::Solve   [virtual]
 

Solve for the displacement vector u at a given time. Update the total solution as well.

Reimplemented from itk::fem::Solver.

void itk::fem::SolverCrankNicolson::ZeroVector int    which = 0
 

add solution vector u to the corresponding nodal values, which are stored in node objects). This is standard post processing of the solution


Member Data Documentation

unsigned int itk::fem::SolverCrankNicolson::DifferenceMatrixIndex
 

Definition at line 173 of file itkFEMSolverCrankNicolson.h.

Referenced by SolverCrankNicolson().

unsigned int itk::fem::SolverCrankNicolson::DiffMatrixBySolutionTMinus1Index
 

Definition at line 175 of file itkFEMSolverCrankNicolson.h.

Referenced by SolverCrankNicolson().

unsigned int itk::fem::SolverCrankNicolson::ForceTIndex
 

Definition at line 166 of file itkFEMSolverCrankNicolson.h.

Referenced by SolverCrankNicolson().

unsigned int itk::fem::SolverCrankNicolson::ForceTMinus1Index
 

Definition at line 168 of file itkFEMSolverCrankNicolson.h.

Referenced by SolverCrankNicolson().

unsigned int itk::fem::SolverCrankNicolson::ForceTotalIndex
 

Definition at line 167 of file itkFEMSolverCrankNicolson.h.

Referenced by SolverCrankNicolson().

Float itk::fem::SolverCrankNicolson::m_alpha
 

Definition at line 164 of file itkFEMSolverCrankNicolson.h.

Referenced by SolverCrankNicolson(), and ~SolverCrankNicolson().

Float itk::fem::SolverCrankNicolson::m_deltaT
 

Definition at line 162 of file itkFEMSolverCrankNicolson.h.

Referenced by GetLS().

Float itk::fem::SolverCrankNicolson::m_rho
 

Definition at line 163 of file itkFEMSolverCrankNicolson.h.

Referenced by GetLS().

unsigned int itk::fem::SolverCrankNicolson::SolutionTIndex
 

Definition at line 169 of file itkFEMSolverCrankNicolson.h.

Referenced by SolverCrankNicolson().

unsigned int itk::fem::SolverCrankNicolson::SolutionTMinus1Index
 

Definition at line 170 of file itkFEMSolverCrankNicolson.h.

Referenced by SolverCrankNicolson().

unsigned int itk::fem::SolverCrankNicolson::SolutionVectorTMinus1Index
 

Definition at line 171 of file itkFEMSolverCrankNicolson.h.

Referenced by SolverCrankNicolson().

unsigned int itk::fem::SolverCrankNicolson::SumMatrixIndex
 

Definition at line 174 of file itkFEMSolverCrankNicolson.h.

Referenced by SolverCrankNicolson().

unsigned int itk::fem::SolverCrankNicolson::TotalSolutionIndex
 

Definition at line 172 of file itkFEMSolverCrankNicolson.h.

Referenced by SolverCrankNicolson().


The documentation for this class was generated from the following file:
Generated at Fri May 21 01:51:52 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000