C:/cmcintos/defOrgs/source/physical/abc/Physics.cxx

00001 #ifndef _PHYSICS_TXX
00002 #define _PHYSICS_TXX
00003 
00004 #include "Physics.h"
00005 
00006 namespace mial
00007 {
00008         // constructor:
00009         template<class Type, int nDims, class MType, class VType> 
00010                 Physics<Type, nDims, MType, VType >
00011                 ::Physics()
00012         {
00013                 numDeformations = 0;
00014                 time =0;
00015         }
00016 
00017         // destructor:
00018         template<class Type, int nDims, class MType, class VType>
00019                 Physics<Type,nDims,MType, VType>
00020 		::~Physics()
00021         {
00022                 
00023         }
00024         template<class Type, int nDims, class MType, class VType>
00025                 bool 
00026                 Physics<Type,nDims,MType, VType>
00027 		::addDeformation(Deformation<Type,nDims>* b)
00028         {
00029                 if(b!=NULL)
00030                 {
00031                         typename Deformation<Type,nDims>::Pointer dp = b;
00032                         deformationsList.push_back(dp); //Copy by value
00033                         numDeformations++;
00034                         return true;
00035                 }
00036                 else
00037                 {
00038                         Error e;
00039                         e.deformationNumber = numDeformations;
00040                         e.msg = "Cannot add null deformation.";
00041                         return false;
00042                 }
00043         }
00044 
00045 } // end namespace mial
00046 
00047 #endif

Generated on Wed Jul 19 13:05:18 2006 for IDO by  doxygen 1.4.7