ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkFEMSolver.h>
FEM solver used to generate a solution for a FE formulation.
This class will solve the FE formulation provided in an FEMObject. The FEMObject containes the Elements, Material properties, Loads, and boundary conditions for the FE problem. The user can define properties of the solver including the time step using the SetTimeStep() method and the numerical solver via the SetLinearSystemWrapper() method. The output of the filter is the deformed FEMObject that also includes all of the loads and boundary conditions.
typedef itk::fem::FEMObject<3> FEMObjectType; FEMObjectObjectType::Pointer fem = FEMObjectObjectType::New(); ... typedef itk::fem::Solver<3> FEMSolverType; FEMSolverType::Pointer solver = FEMSolverType::New(); solver->SetInput( fem ); solver->Update( ); FEMSolverType::Pointer defem = solver->GetOutput( ); ...
The solution generated by the SOlver can also be acquired using the GetSolution() method. The FEM can be saved in a file using the spatial objects and the Meta I/O library.
Definition at line 69 of file itkFEMSolver.h.
typedef SmartPointer<const Self> itk::fem::Solver< VDimension >::ConstPointer |
Reimplemented from itk::ProcessObject.
Reimplemented in itk::fem::SolverCrankNicolson< TDimension >, and itk::fem::SolverHyperbolic< TDimension >.
Definition at line 77 of file itkFEMSolver.h.
typedef DataObject::Pointer itk::fem::Solver< VDimension >::DataObjectPointer |
Smart Pointer type to a DataObject.
Reimplemented from itk::ProcessObject.
Definition at line 92 of file itkFEMSolver.h.
typedef ProcessObject::DataObjectPointerArraySizeType itk::fem::Solver< VDimension >::DataObjectPointerArraySizeType |
Make a DataObject of the correct type to be used as the specified output.
Reimplemented from itk::ProcessObject.
Definition at line 260 of file itkFEMSolver.h.
typedef Element::ArrayType itk::fem::Solver< VDimension >::ElementArray |
Definition at line 98 of file itkFEMSolver.h.
typedef FEMObjectType::ConstPointer itk::fem::Solver< VDimension >::FEMObjectConstPointer |
Definition at line 91 of file itkFEMSolver.h.
typedef FEMObjectType::Pointer itk::fem::Solver< VDimension >::FEMObjectPointer |
Definition at line 90 of file itkFEMSolver.h.
typedef itk::fem::FEMObject<VDimension> itk::fem::Solver< VDimension >::FEMObjectType |
Smart Pointer type to a DataObject.
Definition at line 89 of file itkFEMSolver.h.
typedef Element::Float itk::fem::Solver< VDimension >::Float |
Some convenient typedefs.
Reimplemented in itk::fem::SolverCrankNicolson< TDimension >, and itk::fem::SolverHyperbolic< TDimension >.
Definition at line 95 of file itkFEMSolver.h.
typedef InterpolationGridType::DirectionType itk::fem::Solver< VDimension >::InterpolationGridDirectionType |
Definition at line 112 of file itkFEMSolver.h.
typedef InterpolationGridType::IndexType itk::fem::Solver< VDimension >::InterpolationGridIndexType |
Definition at line 111 of file itkFEMSolver.h.
typedef InterpolationGridType::Pointer itk::fem::Solver< VDimension >::InterpolationGridPointerType |
Definition at line 106 of file itkFEMSolver.h.
typedef InterpolationGridType::PointType itk::fem::Solver< VDimension >::InterpolationGridPointType |
Definition at line 109 of file itkFEMSolver.h.
typedef InterpolationGridType::RegionType itk::fem::Solver< VDimension >::InterpolationGridRegionType |
Definition at line 108 of file itkFEMSolver.h.
typedef InterpolationGridType::SizeType itk::fem::Solver< VDimension >::InterpolationGridSizeType |
Definition at line 107 of file itkFEMSolver.h.
typedef InterpolationGridType::SpacingType itk::fem::Solver< VDimension >::InterpolationGridSpacingType |
Definition at line 110 of file itkFEMSolver.h.
typedef itk::Image<Element::ConstPointer, VDimension> itk::fem::Solver< VDimension >::InterpolationGridType |
Type used to store interpolation grid
Definition at line 105 of file itkFEMSolver.h.
typedef Load::ArrayType itk::fem::Solver< VDimension >::LoadArray |
Definition at line 99 of file itkFEMSolver.h.
typedef Material::ArrayType itk::fem::Solver< VDimension >::MaterialArray |
Definition at line 100 of file itkFEMSolver.h.
typedef Element::Node::ArrayType itk::fem::Solver< VDimension >::NodeArray |
Definition at line 97 of file itkFEMSolver.h.
typedef SmartPointer<Self> itk::fem::Solver< VDimension >::Pointer |
Reimplemented from itk::ProcessObject.
Reimplemented in itk::fem::SolverCrankNicolson< TDimension >, and itk::fem::SolverHyperbolic< TDimension >.
Definition at line 76 of file itkFEMSolver.h.
typedef Solver itk::fem::Solver< VDimension >::Self |
Standard class typedefs.
Reimplemented from itk::ProcessObject.
Reimplemented in itk::fem::SolverCrankNicolson< TDimension >, and itk::fem::SolverHyperbolic< TDimension >.
Definition at line 74 of file itkFEMSolver.h.
typedef ProcessObject itk::fem::Solver< VDimension >::Superclass |
Reimplemented from itk::ProcessObject.
Reimplemented in itk::fem::SolverCrankNicolson< TDimension >, and itk::fem::SolverHyperbolic< TDimension >.
Definition at line 75 of file itkFEMSolver.h.
typedef Element::VectorType itk::fem::Solver< VDimension >::VectorType |
Definition at line 96 of file itkFEMSolver.h.
itk::fem::Solver< VDimension >::Solver | ( | ) | [protected] |
Make a DataObject of the correct type to be used as the specified output.
virtual itk::fem::Solver< VDimension >::~Solver | ( | ) | [protected, virtual] |
Make a DataObject of the correct type to be used as the specified output.
itk::fem::Solver< VDimension >::Solver | ( | const Self & | ) | [private] |
Make a DataObject of the correct type to be used as the specified output.
void itk::fem::Solver< VDimension >::ApplyBC | ( | int | dim = 0 , |
unsigned int | matrix = 0 |
||
) | [protected] |
Apply the boundary conditions to the system.
matrix | Index of a matrix, to which the BCs should be applied (master stiffness matrix). Normally this is zero, but in derived classes many matrices may be used and this index must be specified. |
dim | This is a parameter that can be passed to the function and is normally used with isotropic elements to specify the dimension in which the DOF is fixed. |
virtual void itk::fem::Solver< VDimension >::AssembleElementMatrix | ( | Element::Pointer | e | ) | [protected, virtual] |
Copy the element stiffness matrix into the correct position in the master stiffess matrix. Since more complex Solver classes may need to assemble many matrices and may also do some funky stuff to them, this function is virtual and can be overriden in a derived solver class.
Reimplemented in itk::fem::SolverHyperbolic< TDimension >.
void itk::fem::Solver< VDimension >::AssembleF | ( | int | dim = 0 | ) | [protected] |
Assemble the master force vector.
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::Solver< VDimension >::AssembleK | ( | ) | [protected] |
System solver functions. Call all six functions below (in listed order) to solve system. Assign a global freedom numbers to each DOF in a system. This must be done before any other solve function can be called. Assemble the master stiffness matrix (also apply the MFCs to K)
virtual void itk::fem::Solver< VDimension >::AssembleLandmarkContribution | ( | Element::ConstPointer | e, |
float | |||
) | [protected, virtual] |
Add the contribution of the landmark-containing elements to the correct position in the master stiffess matrix. Since more complex Solver classes may need to assemble many matrices and may also do some funky stuff to them, this function is virtual and can be overriden in a derived solver class.
virtual::itk::LightObject::Pointer itk::fem::Solver< VDimension >::CreateAnother | ( | void | ) | const [virtual] |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
Reimplemented in itk::fem::SolverHyperbolic< TDimension >.
void itk::fem::Solver< VDimension >::DecomposeK | ( | void | ) | [protected] |
Decompose matrix using svd, qr, whatever ... if needed
void itk::fem::Solver< VDimension >::FillInterpolationGrid | ( | void | ) | [protected] |
Fill the interpolation grid based on the current deformed grid
virtual void itk::fem::Solver< VDimension >::FinalizeMatrixAfterAssembly | ( | void | ) | [inline, protected, virtual] |
This function is called after the assebly has been completed. In this class it is only used to apply the BCs. You may however use it to perform other stuff in derived solver classes.
Reimplemented in itk::fem::SolverHyperbolic< TDimension >.
Definition at line 319 of file itkFEMSolver.h.
void itk::fem::Solver< VDimension >::GenerateData | ( | ) | [protected, virtual] |
Method invoked by the pipeline in order to trigger the computation of the registration.
Reimplemented from itk::ProcessObject.
Reimplemented in itk::fem::SolverCrankNicolson< TDimension >, and itk::fem::SolverHyperbolic< TDimension >.
Float itk::fem::Solver< VDimension >::GetDeformationEnergy | ( | unsigned int | SolutionIndex = 0 | ) |
Get the total deformation energy using the chosen solution
virtual InterpolationGridDirectionType itk::fem::Solver< VDimension >::GetDirection | ( | ) | [virtual] |
const Element* itk::fem::Solver< VDimension >::GetElementAtPoint | ( | const VectorType & | pt | ) | const |
Returns the pointer to the element which contains global point pt.
pt | Point in global coordinate system. |
FEMObjectType* itk::fem::Solver< VDimension >::GetInput | ( | void | ) |
FEMObjectType* itk::fem::Solver< VDimension >::GetInput | ( | unsigned int | idx | ) |
const InterpolationGridType* itk::fem::Solver< VDimension >::GetInterpolationGrid | ( | void | ) | const [inline] |
Returns pointer to interpolation grid, which is an itk::Image of pointers to Element objects. Normally you would use physical coordinates to get specific points (pointers to elements) from the image. You can then use the Elemenet::InterpolateSolution member function on the returned element to obtain the solution at this point.
Definition at line 252 of file itkFEMSolver.h.
LinearSystemWrapper::Pointer itk::fem::Solver< VDimension >::GetLinearSystemWrapper | ( | ) | [inline] |
Gets the LinearSystemWrapper object.
Definition at line 196 of file itkFEMSolver.h.
virtual const char* itk::fem::Solver< VDimension >::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::ProcessObject.
Reimplemented in itk::fem::SolverHyperbolic< TDimension >.
virtual InterpolationGridPointType itk::fem::Solver< VDimension >::GetOrigin | ( | ) | [virtual] |
FEMObjectType* itk::fem::Solver< VDimension >::GetOutput | ( | void | ) |
Get the output data of this process object. The output of this function is not valid until an appropriate Update() method has been called, either explicitly or implicitly. Both the filter itself and the data object have Update() methods, and both methods update the data.
For Filters which have multiple outputs of different types, the GetOutput() method assumes the output is of OutputImageType. For the GetOutput(unsigned int) method, a dynamic_cast is performed incase the filter has outputs of different types or image types. Derived classes should have names get methods for these outputs.
FEMObjectType* itk::fem::Solver< VDimension >::GetOutput | ( | unsigned int | idx | ) |
Make a DataObject of the correct type to be used as the specified output.
virtual InterpolationGridRegionType itk::fem::Solver< VDimension >::GetRegion | ( | ) | [virtual] |
Float itk::fem::Solver< VDimension >::GetSolution | ( | unsigned int | i, |
unsigned int | which = 0 |
||
) |
Returns the Solution for the specified nodal point.
virtual InterpolationGridSpacingType itk::fem::Solver< VDimension >::GetSpacing | ( | ) | [virtual] |
virtual Float itk::fem::Solver< VDimension >::GetTimeStep | ( | void | ) | const [virtual] |
Returns the time step used for dynamic problems.
Reimplemented in itk::fem::SolverCrankNicolson< TDimension >, and itk::fem::SolverHyperbolic< TDimension >.
void itk::fem::Solver< VDimension >::InitializeInterpolationGrid | ( | const InterpolationGridSizeType & | size, |
const InterpolationGridPointType & | bb1, | ||
const InterpolationGridPointType & | bb2 | ||
) |
Initialize the interpolation grid. The interpolation grid is used to find elements that containg specific points in a mesh. The interpolation grid stores pointers to elements for each point on a grid thereby providing a fast way (lookup table) to perform interpolation of results.
size | Vector that represents number of points on a grid in each dimension. |
bb1 | Lower limit of a bounding box of a grid. |
bb2 | Upper limit of a bounding box of a grid. |
void itk::fem::Solver< VDimension >::InitializeInterpolationGrid | ( | const InterpolationGridSizeType & | size | ) | [inline] |
Same as InitializeInterpolationGrid(size, {0,0...}, size);
Definition at line 219 of file itkFEMSolver.h.
void itk::fem::Solver< VDimension >::InitializeInterpolationGrid | ( | const InterpolationGridRegionType & | region, |
const InterpolationGridPointType & | origin, | ||
const InterpolationGridSpacingType & | spacing, | ||
const InterpolationGridDirectionType & | direction | ||
) |
Initialize the interpolation grid, over the domain specified by the user
virtual void itk::fem::Solver< VDimension >::InitializeLinearSystemWrapper | ( | void | ) | [protected, virtual] |
Performs any initialization needed for LinearSystemWrapper object i.e. sets the maximum number of matrices and vectors.
Reimplemented in itk::fem::SolverHyperbolic< TDimension >.
virtual void itk::fem::Solver< VDimension >::InitializeMatrixForAssembly | ( | unsigned int | N | ) | [protected, virtual] |
This function is called before assembling the matrices. You can override it in a derived class to account for special needs.
N | Size of the matrix. |
Reimplemented in itk::fem::SolverHyperbolic< TDimension >.
virtual DataObjectPointer itk::fem::Solver< VDimension >::MakeOutput | ( | DataObjectPointerArraySizeType | ) | [virtual] |
Make a DataObject of the correct type to be used as the specified output.
Reimplemented from itk::ProcessObject.
static Pointer itk::fem::Solver< VDimension >::New | ( | ) | [static] |
Method for creation through the object factory.
Reimplemented from itk::Object.
Reimplemented in itk::fem::SolverHyperbolic< TDimension >.
void itk::fem::Solver< VDimension >::operator= | ( | const Self & | ) | [private] |
Make a DataObject of the correct type to be used as the specified output.
Reimplemented from itk::ProcessObject.
Reimplemented in itk::fem::SolverCrankNicolson< TDimension >, and itk::fem::SolverHyperbolic< TDimension >.
void itk::fem::Solver< VDimension >::PrintSelf | ( | std::ostream & | os, |
Indent | indent | ||
) | const [protected, virtual] |
Make a DataObject of the correct type to be used as the specified output.
Reimplemented from itk::ProcessObject.
Reimplemented in itk::fem::SolverHyperbolic< TDimension >.
virtual void itk::fem::Solver< VDimension >::RunSolver | ( | void | ) | [protected, virtual] |
Solve for the displacement vector u. May be overriden in derived classes.
Reimplemented in itk::fem::SolverCrankNicolson< TDimension >, and itk::fem::SolverHyperbolic< TDimension >.
virtual void itk::fem::Solver< VDimension >::SetDirection | ( | InterpolationGridDirectionType | _arg | ) | [virtual] |
virtual void itk::fem::Solver< VDimension >::SetInput | ( | FEMObjectType * | fem | ) | [virtual] |
virtual void itk::fem::Solver< VDimension >::SetInput | ( | unsigned | int, |
FEMObjectType * | fem | ||
) | [virtual] |
void itk::fem::Solver< VDimension >::SetLinearSystemWrapper | ( | LinearSystemWrapper::Pointer | ls | ) |
Sets the LinearSystemWrapper object that will be used when solving the master equation. If this function is not called, a default VNL linear system representation will be used (class LinearSystemWrapperVNL).
ls | Pointer to an object of class which is derived from LinearSystemWrapper. |
virtual void itk::fem::Solver< VDimension >::SetOrigin | ( | InterpolationGridPointType | _arg | ) | [virtual] |
virtual void itk::fem::Solver< VDimension >::SetRegion | ( | InterpolationGridRegionType | _arg | ) | [virtual] |
virtual void itk::fem::Solver< VDimension >::SetSpacing | ( | InterpolationGridSpacingType | _arg | ) | [virtual] |
virtual void itk::fem::Solver< VDimension >::SetTimeStep | ( | Float | dt | ) | [virtual] |
Sets the time step used for dynamic problems.
dt | New time step. |
Reimplemented in itk::fem::SolverCrankNicolson< TDimension >, and itk::fem::SolverHyperbolic< TDimension >.
void itk::fem::Solver< VDimension >::UpdateDisplacements | ( | void | ) | [protected] |
Copy solution vector u to the corresponding nodal values, which are stored in node objects). This is standard post processing of the solution.
const unsigned int itk::fem::Solver< VDimension >::FEMDimension = VDimension [static] |
Definition at line 85 of file itkFEMSolver.h.
InterpolationGridDirectionType itk::fem::Solver< VDimension >::m_Direction [private] |
Make a DataObject of the correct type to be used as the specified output.
Definition at line 430 of file itkFEMSolver.h.
FEMObjectPointer itk::fem::Solver< VDimension >::m_FEMObject [protected] |
Make a DataObject of the correct type to be used as the specified output.
Definition at line 419 of file itkFEMSolver.h.
InterpolationGridPointerType itk::fem::Solver< VDimension >::m_InterpolationGrid [protected] |
An Image of pointers to Element objects that represents a grid used for interpolation of solution. Each Pixel in an image is a pointer to an Element object in which that pixel is located.
Definition at line 417 of file itkFEMSolver.h.
LinearSystemWrapper::Pointer itk::fem::Solver< VDimension >::m_ls [protected] |
Pointer to LinearSystemWrapper object.
Definition at line 405 of file itkFEMSolver.h.
LinearSystemWrapperVNL itk::fem::Solver< VDimension >::m_lsVNL [protected] |
LinearSystemWrapperVNL object that is used by default in Solver class.
Definition at line 410 of file itkFEMSolver.h.
unsigned int itk::fem::Solver< VDimension >::m_NGFN [protected] |
Number of global degrees of freedom in a system
Definition at line 396 of file itkFEMSolver.h.
unsigned int itk::fem::Solver< VDimension >::m_NMFC [protected] |
Number of multi freedom constraints in a system. This member is set in a AssembleK function.
Definition at line 402 of file itkFEMSolver.h.
InterpolationGridPointType itk::fem::Solver< VDimension >::m_Origin [private] |
Make a DataObject of the correct type to be used as the specified output.
Definition at line 428 of file itkFEMSolver.h.
InterpolationGridRegionType itk::fem::Solver< VDimension >::m_Region [private] |
Make a DataObject of the correct type to be used as the specified output.
Definition at line 427 of file itkFEMSolver.h.
InterpolationGridSpacingType itk::fem::Solver< VDimension >::m_Spacing [private] |
Make a DataObject of the correct type to be used as the specified output.
Definition at line 429 of file itkFEMSolver.h.
const unsigned int itk::fem::Solver< VDimension >::MaxDimensions = 3 [static] |
Definition at line 86 of file itkFEMSolver.h.