ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkFEMLoadElementBase.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef itkFEMLoadElementBase_h
20 #define itkFEMLoadElementBase_h
21 
22 #include "itkFEMLoadBase.h"
23 #include "ITKFEMExport.h"
24 
25 namespace itk
26 {
27 namespace fem
28 {
45 class ITKFEM_EXPORT LoadElement : public Load
46 {
47 public:
48 
50  typedef LoadElement Self;
51  typedef Load Superclass;
54 
56  itkSimpleNewMacro(Self);
57 
59  itkTypeMacro(LoadElement, Load);
60 
63  virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE;
64 
68  typedef Element::Float Float;
69 
73  typedef std::vector<const Element *> ElementPointersVectorType;
74 
75  // FIXME: should clear vector, not zero it
76  LoadElement() : m_Element(0)
77  {
78  }
80  {
81  this->AddNextElementInternal(e.GetPointer());
82  }
84  {
85  this->AddNextElementInternal(e.GetPointer());
86  }
87 
88  Element::ConstPointer GetElement(int i);
89 
90  unsigned int GetNumberOfElements();
91 
93  {
94  return this->m_Element;
95  }
96 
98  {
99  return this->m_Element;
100  }
101 
103  virtual void ApplyLoad(Element::ConstPointer , Element::VectorType & ) { /* HACK: This should probably through an execption if it is not intended to be used. */ }
104 
105 protected:
106  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
107  void AddNextElementInternal(const Element *e);
110 };
111 
112 }
113 } // end namespace itk::fem
114 
115 #endif // #ifndef itkFEMLoadElementBase_h
Light weight base class for most itk classes.
virtual void ApplyLoad(Element::ConstPointer, Element::VectorType &)
ObjectType * GetPointer() const
static const double e
The base of the natural logarithm or Euler&#39;s number
Definition: itkMath.h:47
SmartPointer< Self > Pointer
ElementPointersVectorType & GetElementArray()
void AddNextElement(Element::ConstPointer e)
vnl_vector< Float > VectorType
void AddNextElement(Element::Pointer e)
Virtual element load base class.
std::vector< const Element * > ElementPointersVectorType
const ElementPointersVectorType & GetElementArray() const
Abstract base element class.
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
General abstract load base class.