$extrastylesheet
fe_transformation_base.C
Go to the documentation of this file.
00001 // The libMesh Finite Element Library.
00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
00003 
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2.1 of the License, or (at your option) any later version.
00008 
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Lesser General Public License for more details.
00013 
00014 // You should have received a copy of the GNU Lesser General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 
00018 #include "libmesh/fe_transformation_base.h"
00019 #include "libmesh/h1_fe_transformation.h"
00020 #include "libmesh/hcurl_fe_transformation.h"
00021 
00022 namespace libMesh
00023 {
00024 
00025 template< typename OutputShape >
00026 UniquePtr<FETransformationBase<OutputShape> > FETransformationBase<OutputShape>::build( const FEType& fe_type )
00027 {
00028   switch (fe_type.family)
00029     {
00030       // H1 Conforming Elements
00031     case LAGRANGE:
00032     case HIERARCHIC:
00033     case BERNSTEIN:
00034     case SZABAB:
00035     case CLOUGH: // PB: Really H2
00036     case HERMITE: // PB: Really H2
00037     case SUBDIVISION:
00038     case LAGRANGE_VEC:
00039     case MONOMIAL: // PB: Shouldn't this be L2 conforming?
00040     case XYZ: // PB: Shouldn't this be L2 conforming?
00041     case L2_HIERARCHIC: // PB: Shouldn't this be L2 conforming?
00042     case L2_LAGRANGE: // PB: Shouldn't this be L2 conforming?
00043     case JACOBI_20_00: // PB: For infinite elements...
00044     case JACOBI_30_00: // PB: For infinite elements...
00045       return UniquePtr<FETransformationBase<OutputShape> >(new H1FETransformation<OutputShape>);
00046 
00047       // HCurl Conforming Elements
00048     case NEDELEC_ONE:
00049       return UniquePtr<FETransformationBase<OutputShape> >(new HCurlFETransformation<OutputShape>);
00050 
00051       // HDiv Conforming Elements
00052       // L2 Conforming Elements
00053 
00054       // Other...
00055     case SCALAR:
00056       // Should never need this for SCALARs
00057       return UniquePtr<FETransformationBase<OutputShape> >(new H1FETransformation<OutputShape>);
00058 
00059     default:
00060       libmesh_error_msg("Unknown family = " << fe_type.family);
00061     }
00062 
00063   libmesh_error_msg("We'll never get here!");
00064   return UniquePtr<FETransformationBase<OutputShape> >();
00065 }
00066 
00067 template class FETransformationBase<Real>;
00068 template class FETransformationBase<RealGradient>;
00069 
00070 } // namespace libMesh