SundanceHNDoFMapBase.hpp
Go to the documentation of this file.
00001 /*
00002  * SundanceHNMapBase.hpp
00003  *
00004  *  Created on: Mar 18, 2010
00005  *      Author: benk
00006  */
00007 
00008 #ifndef SUNDANCEHNMAPBASE_HPP_
00009 #define SUNDANCEHNMAPBASE_HPP_
00010 
00011 #include "SundanceDefs.hpp"
00012 #include "SundanceMesh.hpp"
00013 
00014 namespace Sundance
00015 {
00016 using namespace Teuchos;
00017 
00018 /**
00019  * The abstract class which extends the functionalities of the DOF map <br>
00020  * The only additional functionality is that we have a restriction on the DOFs
00021  * , with the pre-fill transformations these constraints can be build in into the matrix
00022  *
00023  */
00024 class HNDoFMapBase
00025 {
00026 public:
00027 
00028   /** Empty Ctor */
00029   HNDoFMapBase(const Mesh& mesh, int nFuncs, int setupVerb) : mesh_(mesh){;}
00030 
00031   virtual ~HNDoFMapBase() {;}
00032 
00033   /**
00034    * @param cellLID [in] the maxCell LID input
00035    * @param funcID  [in] the function ID
00036    * @param trafoMatrixSize [in/out]
00037    * @param doTransform [out]
00038    * @param transfMatrix [out] (we assume that the array is already pre-sized )*/
00039     virtual void getTrafoMatrixForCell(
00040         int cellLID,
00041         int funcID,
00042         int& trafoMatrixSize,
00043         bool& doTransform,
00044         Array<double>& transfMatrix ) const=0;
00045 
00046   /** Function to apply transformation for facets
00047    * @param cellDim , the facet dimension
00048    * @param cellLID , facet LID
00049    * @param facetIndex , facet index in the maxCofacet
00050    * @param funcID  [in] the function ID
00051    * @param trafoMatrixSize [in/out]
00052    * @param doTransform [out]
00053    * @param transfMatrix [out] (we assume that the array is already pre-sized )*/
00054     virtual void getTrafoMatrixForFacet(
00055         int cellDim,
00056         int cellLID,
00057         int facetIndex,
00058         int funcID,
00059         int& trafoMatrixSize,
00060         bool& doTransform,
00061         Array<double>& transfMatrix ) const = 0;
00062 
00063 
00064 
00065     /** Function used for plotting for hanging node DOFMaps
00066      *  Returns for one hanging node (element) the global DoFs which contribute to that hanging local DoF
00067      * @param cellDim [in] the dimension
00068      * @param cellLID [in] the LID of the cell
00069      * @param funcID  [in] the function ID, (to wchich the DOFs belong)
00070      * @param dofs    [out] the global DoF s
00071      * @param coefs   [out] the coefficient of each global DoF */
00072     virtual void getDOFsForHNCell(
00073       int cellDim,
00074       int cellLID,
00075           int funcID,
00076           Array<int>& dofs ,
00077           Array<double>& coefs ) const=0;
00078 
00079     /** Returns the dimension where the DoF map is defined
00080      *  For HN we do transformation only for the maxCell type */
00081     int getSpacialMeshDim() const { return mesh_.spatialDim();}
00082 
00083 protected:
00084 
00085 private:
00086 
00087     const Mesh mesh_;
00088 
00089 };
00090 
00091 }
00092 
00093 
00094 #endif /* SUNDANCEHNMAPBASE_HPP_ */

Site Contact