ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkFEMLoadGrav.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 itkFEMLoadGrav_h
20 #define itkFEMLoadGrav_h
21 
22 #include "itkFEMLoadElementBase.h"
23 #include "ITKFEMExport.h"
24 #include "vnl/vnl_vector.h"
25 
26 namespace itk
27 {
28 namespace fem
29 {
40 class ITKFEM_EXPORT LoadGrav : public LoadElement
41 {
42 public:
43 
45  typedef LoadGrav Self;
49 
51  itkTypeMacro(LoadGrav, LoadElement);
52 
53  virtual vnl_vector<Float> GetGravitationalForceAtPoint(vnl_vector<Float> ) = 0;
54 
55 protected:
56  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
57 
58 };
59 
68 class ITKFEM_EXPORT LoadGravConst : public LoadGrav
69 {
70 public:
71 
77 
79  itkSimpleNewMacro(Self);
80 
82  itkTypeMacro(LoadGravConst, LoadGrav);
83 
86  virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE;
87 
88  virtual vnl_vector<Float> GetGravitationalForceAtPoint(vnl_vector<Float> ) ITK_OVERRIDE;
89 
93  void SetForce(const vnl_vector<itk::fem::Element::Float> force);
94 
98  vnl_vector<itk::fem::Element::Float> & GetForce();
99  const vnl_vector<itk::fem::Element::Float> & GetForce() const;
101 
103  virtual void ApplyLoad(Element::ConstPointer element, Element::VectorType & Fe) ITK_OVERRIDE;
104 
105 protected:
106  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
107 
108  vnl_vector<Float> m_GravityForce;
109 };
110 
111 }
112 } // end namespace itk::fem
113 
114 #endif // #ifndef itkFEMLoadGrav_h
Light weight base class for most itk classes.
Abstract gravity load class.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
Constant gravity load class.
SmartPointer< const Self > ConstPointer
Virtual element load base class.
SmartPointer< Self > Pointer
LoadElement Superclass
Abstract base element class.
Control indentation during Print() invocation.
Definition: itkIndent.h:49