19 #ifndef __itkFEMSolverCrankNicolson_h
20 #define __itkFEMSolverCrankNicolson_h
28 #include "vnl/vnl_sparse_matrix.h"
29 #include "vnl/vnl_matrix.h"
30 #include "vnl/vnl_vector.h"
31 #include "vnl/algo/vnl_svd.h"
32 #include "vnl/algo/vnl_cholesky.h"
33 #include <vnl/vnl_sparse_matrix_linear_system.h>
71 template <
unsigned int TDimension = 3>
181 return b > 0.0 ? std::fabs(a) : -1. * std::fabs(a);
185 return a > b ? a : b;
265 #ifndef ITK_MANUAL_INSTANTIATION
266 #include "itkFEMSolverCrankNicolson.hxx"
269 #endif // #ifndef __itkFEMSolverCrankNicolson_h
Float GoldenSection(Float tol=0.01, unsigned int MaxIters=25)
virtual Float GetTimeStep(void) const
Light weight base class for most itk classes.
void operator=(const Self &)
Solver< TDimension > Superclass
unsigned int m_SolutionTIndex
Float GSMax(Float a, Float b)
SmartPointer< Self > Pointer
void ResetIterations(void)
unsigned int m_ForceTotalIndex
void SetEnergyToMin(Float xmin)
void InitializeForSolution()
Float m_CurrentMaxSolution
FEM Solver for time dependent problems; uses Crank-Nicolson implicit discretization scheme...
void RecomputeForceVector(unsigned int index)
Float GetDeformationEnergy(Float t=1.0)
Float EvaluateResidual(Float t=1.0)
unsigned int m_ForceTMinus1Index
LinearSystemWrapper * GetLS()
itkGetConstMacro(Iterations, unsigned int)
unsigned int m_ForceTIndex
itkTypeMacro(SolverCrankNicolson, Solver< TDimension >)
SmartPointer< const Self > ConstPointer
unsigned int m_SolutionTMinus1Index
unsigned int m_SumMatrixIndex
void AddToDisplacements(Float optimum=1.0)
LinearSystemWrapper::Pointer m_ls
Defines all functions required by Solver class to allocate, assemble and solve a linear system of equ...
void AssembleFforTimeStep(int dim=0)
void AverageLastTwoDisplacements(Float t=0.5)
itkGetMacro(UseMassMatrix, bool)
void PrintDisplacements()
unsigned int m_DiffMatrixBySolutionTMinus1Index
itkSetMacro(UseMassMatrix, bool)
FEM solver used to generate a solution for a FE formulation.
Float BrentsMethod(Float tol=0.01, unsigned int MaxIters=25)
void FindBracketingTriplet(Float *a, Float *b, Float *c)
virtual void RunSolver(void)
void PrintMinMaxOfSolution()
void ZeroVector(int which=0)
virtual void SetTimeStep(Float dt)
unsigned int m_DifferenceMatrixIndex
unsigned int m_Iterations
unsigned int m_TotalSolutionIndex
Float GSSign(Float a, Float b)
Float GetCurrentMaxSolution()
unsigned int m_SolutionVectorTMinus1Index