00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkFEMLoadGrav.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003-09-10 14:29:42 $ 00007 Version: $Revision: 1.9 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef __itkFEMLoadGrav_h 00019 #define __itkFEMLoadGrav_h 00020 00021 #include "itkFEMLoadElementBase.h" 00022 #include "vnl/vnl_vector.h" 00023 00024 namespace itk { 00025 namespace fem { 00026 00027 00028 00029 00039 class LoadGrav : public LoadElement 00040 { 00041 FEM_ABSTRACT_CLASS(LoadGrav,LoadElement) 00042 public: 00043 00044 virtual vnl_vector<Float> Fg(vnl_vector<Float>) = 0; 00045 00046 }; 00047 00048 00049 00050 00058 class LoadGravConst : public LoadGrav 00059 { 00060 FEM_CLASS(LoadGravConst,LoadGrav) 00061 public: 00062 vnl_vector<Float> Fg_value; 00063 virtual vnl_vector<Float> Fg(vnl_vector<Float>) { 00064 return Fg_value; 00065 }; 00067 00071 virtual void Read( std::istream& f, void* info ); 00072 00076 virtual void Write( std::ostream& f ) const; 00077 00078 }; 00079 00080 FEM_CLASS_INIT(LoadGravConst) 00081 00082 00083 00084 00085 }} // end namespace itk::fem 00086 00087 #endif // #ifndef __itkFEMLoadGrav_h 00088