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;
216 virtual
void RunSolver(
void) ITK_OVERRIDE;
259 void operator=(const Self &);
265 #ifndef ITK_MANUAL_INSTANTIATION
266 #include "itkFEMSolverCrankNicolson.hxx"
269 #endif // #ifndef itkFEMSolverCrankNicolson_h
virtual void SetTimeStep(Float dt) ITK_OVERRIDE
Float GoldenSection(Float tol=0.01, unsigned int MaxIters=25)
Light weight base class for most itk classes.
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
void GenerateData() ITK_OVERRIDE
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
virtual Float GetTimeStep(void) const ITK_OVERRIDE
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)
void PrintMinMaxOfSolution()
virtual void RunSolver(void) ITK_OVERRIDE
void ZeroVector(int which=0)
unsigned int m_DifferenceMatrixIndex
unsigned int m_Iterations
unsigned int m_TotalSolutionIndex
Float GSSign(Float a, Float b)
Float GetCurrentMaxSolution()
unsigned int m_SolutionVectorTMinus1Index