fe_transformation_base.C
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 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 AutoPtr<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 LAGRANGE_VEC: 00038 case MONOMIAL: /* PB: Shouldn't this be L2 conforming? */ 00039 case XYZ: /* PB: Shouldn't this be L2 conforming? */ 00040 case L2_HIERARCHIC: /* PB: Shouldn't this be L2 conforming? */ 00041 case L2_LAGRANGE: /* PB: Shouldn't this be L2 conforming? */ 00042 case JACOBI_20_00: /* PB: For infinite elements... */ 00043 case JACOBI_30_00: /* PB: For infinite elements... */ 00044 { 00045 AutoPtr<FETransformationBase<OutputShape> > ap( new H1FETransformation<OutputShape> ); 00046 return ap; 00047 } 00048 /* HCurl Conforming Elements */ 00049 case NEDELEC_ONE: 00050 { 00051 AutoPtr<FETransformationBase<OutputShape> > ap( new HCurlFETransformation<OutputShape> ); 00052 return ap; 00053 } 00054 00055 /* HDiv Conforming Elements */ 00056 /* L2 Conforming Elements */ 00057 00058 /* Other... */ 00059 case SCALAR: 00060 { 00061 // Should never need this for SCALARs 00062 AutoPtr<FETransformationBase<OutputShape> > ap( new H1FETransformation<OutputShape> ); 00063 return ap; 00064 } 00065 00066 default: 00067 libmesh_error(); 00068 } 00069 00070 // Should never get here... 00071 libmesh_error(); 00072 AutoPtr<FETransformationBase<OutputShape> > ap( NULL ); 00073 return ap; 00074 } 00075 00076 template class FETransformationBase<Real>; 00077 template class FETransformationBase<RealGradient>; 00078 00079 } // namespace libMesh
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: