Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #include "Albany_ProblemUtils.hpp"
00007
00008 #include "Intrepid_HGRAD_LINE_Cn_FEM.hpp"
00009
00010
00011
00012 Teuchos::RCP<Intrepid::Basis<RealType, Intrepid::FieldContainer<RealType> > >
00013 Albany::getIntrepidBasis(const CellTopologyData& ctd, bool compositeTet)
00014 {
00015 using Teuchos::rcp;
00016 using std::cout;
00017 using std::endl;
00018 using Intrepid::FieldContainer;
00019 Teuchos::RCP<Intrepid::Basis<RealType, FieldContainer<RealType> > > intrepidBasis;
00020 const int& numNodes = ctd.node_count;
00021 const int& numDim = ctd.dimension;
00022 std::string name = ctd.name;
00023
00024 #ifdef ALBANY_VERBOSE
00025 cout << "CellTopology is " << name << " with nodes " << numNodes << " dim " << numDim << endl;
00026 #endif
00027 if (name == "Line_2" )
00028 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_LINE_C1_FEM<RealType, FieldContainer<RealType> >() );
00029
00030 else if (name == "Line_3" )
00031 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_LINE_Cn_FEM<RealType, FieldContainer<RealType> >(2, Intrepid::POINTTYPE_EQUISPACED) );
00032 else if (name == "Triangle_3" )
00033 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_TRI_C1_FEM<RealType, FieldContainer<RealType> >() );
00034 else if (name == "Triangle_6" )
00035 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_TRI_C2_FEM<RealType, FieldContainer<RealType> >() );
00036 else if (name == "Quadrilateral_4" || name == "ShellQuadrilateral_4" )
00037 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_QUAD_C1_FEM<RealType, FieldContainer<RealType> >() );
00038 else if (name == "Quadrilateral_9" || name == "ShellQuadrilateral_9")
00039 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_QUAD_C2_FEM<RealType, FieldContainer<RealType> >() );
00040 else if (name == "Hexahedron_8" )
00041 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_HEX_C1_FEM<RealType, FieldContainer<RealType> >() );
00042 else if (name == "Hexahedron_27" )
00043 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_HEX_C2_FEM<RealType, FieldContainer<RealType> >() );
00044 else if (name == "Tetrahedron_4" )
00045 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_TET_C1_FEM<RealType, FieldContainer<RealType> >() );
00046 else if (name == "Tetrahedron_10" && !compositeTet )
00047 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_TET_C2_FEM<RealType, FieldContainer<RealType> >() );
00048 else if (name == "Tetrahedron_10" && compositeTet )
00049 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_TET_COMP12_FEM<RealType, FieldContainer<RealType> >() );
00050 else if (name == "Wedge_6")
00051 intrepidBasis = rcp(new Intrepid::Basis_HGRAD_WEDGE_C1_FEM<RealType, FieldContainer<RealType> >() );
00052 else
00053 TEUCHOS_TEST_FOR_EXCEPTION(
00054 true,
00055 Teuchos::Exceptions::InvalidParameter,
00056 "Albany::ProblemUtils::getIntrepidBasis did not recognize element name: "
00057 << ctd.name);
00058
00059 return intrepidBasis;
00060 }
00061