SundanceCoordinateSystem.cpp
Go to the documentation of this file.
00001 #include "SundanceCoordinateSystem.hpp"
00002 
00003 using namespace Sundance;
00004 
00005 CoordinateSystem 
00006 CoordinateSystemBuilder::makeCoordinateSystem(const std::string& name)
00007 {
00008   RCP<CoordinateSystemBase> rtn;
00009 
00010   if (name=="Cartesian")
00011   {
00012     rtn = rcp(new CartesianCoordinateSystem());
00013   }
00014   else if (name=="Meridional Cylindrical")
00015   {
00016     rtn = rcp(new MeridionalCylindricalCoordinateSystem());
00017   }
00018   else if (name=="Radial Spherical")
00019   {
00020     rtn = rcp(new RadialSphericalCoordinateSystem());
00021   }
00022   else
00023   {
00024     TEUCHOS_TEST_FOR_EXCEPTION(true, std::runtime_error,
00025       "coordinate system type=[" << name << "] not recognized");
00026   }
00027   
00028   return rtn;
00029 }
00030 
00031 

Site Contact