Orfeo Toolbox  3.16
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
itk::fem::LoadElement Class Reference

Virtual element load base class. More...

#include <itkFEMLoadElementBase.h>

+ Inheritance diagram for itk::fem::LoadElement:
+ Collaboration diagram for itk::fem::LoadElement:

List of all members.

Public Types

typedef FEMPArray< SelfArrayType
typedef Self Baseclass
typedef const SelfConstPointer
typedef std::vector
< Element::ConstPointer
ElementPointersVectorType
typedef Element::Float Float
typedef SelfPointer
typedef LoadElement Self
typedef Load Superclass

Public Member Functions

 LoadElement ()
virtual int ClassID () const
virtual Baseclass::Pointer Clone () const
virtual Solution::ConstPointer GetSolution ()
virtual void Read (std::istream &f, void *info)
virtual void SetSolution (Solution::ConstPointer)
void Write (std::ostream &f) const

Static Public Member Functions

static FEMLightObject::Pointer CreateFromStream (std::istream &f, void *info)
static Self::Pointer New ()
static void SkipWhiteSpace (std::istream &f)

Public Attributes

ElementPointersVectorType el
int GN

Static Public Attributes

static const int CLID
static const std::string whitespaces = " \t\n\r"

Detailed Description

Virtual element load base class.

This load class defines an external load that acts on elements in a system. The vector with pointers to elements defines, on which elements the load acts. The derived load classes should provide members, that allow the Element's class Fe() member function to uniquely transform the load into nodal loads. No special requirements are enforced on those members.

Ultimately, when assembling the right hand side of the master equation (master force vector) the Element's Fe() member funtion is called with the pointer to the LoadElement class that is prescribed on that element. Fe() function shuld dynamically cast this pointer to specific load class, which it can handle and return the element's force vector.

Definition at line 41 of file itkFEMLoadElementBase.h.


Member Typedef Documentation

Array class that holds special pointers to the load objects

Definition at line 42 of file itkFEMLoadBase.h.

Store the base class typedef for easy access from derived classes. FEM_CLASS macro also expects this for the FEMOF...

Definition at line 62 of file itkFEMLightObject.h.

Type of array of pointers to element objects

Definition at line 53 of file itkFEMLoadElementBase.h.

Float type used in Element and derived classes

Reimplemented in itk::fem::ImageMetricLoad< TMoving, TFixed >, and itk::fem::FiniteDifferenceFunctionLoad< TMoving, TFixed >.

Definition at line 48 of file itkFEMLoadElementBase.h.


Constructor & Destructor Documentation

itk::fem::LoadElement::LoadElement ( )
inline

Definition at line 60 of file itkFEMLoadElementBase.h.


Member Function Documentation

virtual int itk::fem::LoadElement::ClassID ( ) const
inlinevirtual
virtual Baseclass::Pointer itk::fem::LoadElement::Clone ( ) const
virtual
FEMLightObject::Pointer itk::fem::FEMLightObject::CreateFromStream ( std::istream &  f,
void *  info 
)
staticinherited

Read object of any derived type from stream.

This static function creates an object of a class, which is derived from FEMLightObject. The class of object is first determined from the stream, then the object of that class is constructed using the FEMObjectFactory. Finally the data for this object is read from the stream, by calling the Read() member function.

Read and create object of any derived class from stream

 Catch possible exceptions while 
 reading object's data from stream
 Return a pointer to a newly created object if all was OK
 Technically everithing should be fine here (a!=0), but we
 check again, just in case.
 Something went wrong.
 Reset the stream position to where it was before reading the object.

Definition at line 77 of file itkFEMLightObject.cxx.

References itk::fem::FEMObjectFactory< FEMLightObject >::ClassName2ID(), itk::fem::FEMObjectFactory< FEMLightObject >::Create(), itk::fem::FEMLightObject::Read(), itk::fem::FEMLightObject::SkipWhiteSpace(), and itk::fem::FEMLightObject::whitespaces.

Referenced by itk::fem::Solver::Read().

virtual Solution::ConstPointer itk::fem::Load::GetSolution ( )
inlinevirtualinherited
static Self::Pointer itk::fem::LoadElement::New ( void  )
inlinestatic
void itk::fem::LoadElement::Read ( std::istream &  f,
void *  info 
)
virtual

pointers to element objects on which the load acts

Read the LoadElement object from input stream

 Convert the info pointer to a usable objects


first call the parent's read function  
 read and set pointers to element that we're applying the load to
first we read number of pointers in a list  
if this is <= 0, the load applies on all elements in a system  
   otherwise we read all the element numbers.
   there should be n of them

Reimplemented from itk::fem::FEMLightObject.

Reimplemented in itk::fem::LoadLandmark, itk::fem::LoadGravConst, itk::fem::LoadTest< TClass >, and itk::fem::LoadEdge.

Definition at line 31 of file itkFEMLoadElementBase.cxx.

References el, itk::fem::FEMPArray< T >::Find(), itk::fem::FEMExceptionObjectNotFound::m_baseClassName, itk::fem::FEMExceptionObjectNotFound::m_GN, itk::fem::FEMLightObject::Read(), and itk::fem::FEMLightObject::SkipWhiteSpace().

Referenced by itk::fem::LoadEdge::Read(), and itk::fem::LoadTest< TClass >::Read().

virtual void itk::fem::Load::SetSolution ( Solution::ConstPointer  )
inlinevirtualinherited

Sets the pointer to solution vector. This function is automatically called by the Solver class on every load object.

Some types of external Loads may need access to previous values of solution vector. If a derived class needs that, it should implement this function, and store the passed pointer accordingly. If the result vector is not required, the functionn should be left unimplemented, so that only the dummy implementation in base class is called.

Parameters:
ptrPointer to the object of Solution class.

Reimplemented in itk::fem::FiniteDifferenceFunctionLoad< TMoving, TFixed >, itk::fem::ImageMetricLoad< TMoving, TFixed >, and itk::fem::LoadLandmark.

Definition at line 56 of file itkFEMLoadBase.h.

void itk::fem::FEMLightObject::SkipWhiteSpace ( std::istream &  f)
staticinherited
void itk::fem::LoadElement::Write ( std::ostream &  f) const
virtual

Write the LoadElement to the output stream

first call the parent's write function

Write the list of element global numbers

check for errors

Reimplemented from itk::fem::FEMLightObject.

Reimplemented in itk::fem::LoadLandmark, itk::fem::LoadGravConst, itk::fem::LoadTest< TClass >, and itk::fem::LoadEdge.

Definition at line 92 of file itkFEMLoadElementBase.cxx.

References el, and itk::fem::FEMLightObject::Write().

Referenced by itk::fem::LoadEdge::Write(), itk::fem::LoadTest< TClass >::Write(), and itk::fem::LoadLandmark::Write().


Member Data Documentation

const int itk::fem::LoadElement::CLID
static
ElementPointersVectorType itk::fem::LoadElement::el
int itk::fem::FEMLightObject::GN
inherited

Global number of an object (ID of an object) In general the ID's are required to be unique only within a specific type of derived classes (Elements, Nodes, ...) If the GN is not required, it can be ignored. (normally you need the GN when writing or reading objects to/from stream.

Definition at line 163 of file itkFEMLightObject.h.

Referenced by itk::fem::FEMLightObject::FEMLightObject(), itk::fem::Generate2DRectilinearMesh(), itk::fem::Generate3DRectilinearMesh(), itk::fem::FEMLightObject::Read(), itk::fem::LoadNode::Write(), itk::fem::LoadBC::Write(), and itk::fem::FEMLightObject::Write().

const std::string itk::fem::FEMLightObject::whitespaces = " \t\n\r"
staticinherited

Const string of all whitespace characters. This string is used by SkipWhiteSpace function.

Definition at line 133 of file itkFEMLightObject.h.

Referenced by itk::fem::FEMLightObject::CreateFromStream(), and itk::fem::MaterialLinearElasticity::Read().


The documentation for this class was generated from the following files:

Generated at Sun Feb 3 2013 02:59:40 for Orfeo Toolbox with doxygen 1.8.1.1