00001 //*****************************************************************// 00002 // Albany 2.0: Copyright 2012 Sandia Corporation // 00003 // This Software is released under the BSD license detailed // 00004 // in the file "license.txt" in the top-level Albany directory // 00005 //*****************************************************************// 00006 00007 #if !defined(Projection_hpp) 00008 #define Projection_hpp 00009 00010 #include "Albany_Utils.hpp" 00011 00012 namespace LCM { 00013 00014 // 00015 // Class to manage the projection of a variable from quadrature points 00016 // to the element nodes. 00017 // variable may be: scalar, vector, or tensor in 1D, 2D, or 3D. 00018 // 00019 00020 class Projection 00021 { 00022 public: 00023 // Default constructor 00024 Projection(); 00025 00026 // Constructor 00027 Projection( 00028 std::string const & field_name, 00029 int const rank, 00030 int const number_components, 00031 int const number_dimensions); 00032 00033 // Returns whether a projection is required 00034 bool isProjected() 00035 { 00036 return is_projected_; 00037 } 00038 00039 // Return the rank of the variable to be projected 00040 int getProjectedRank() 00041 { 00042 return rank_; 00043 } 00044 00045 // Return the number of components to be projected 00046 int getProjectedComponents(); 00047 00048 // Return the name of the variable to be projected 00049 std::string getProjectionName() 00050 { 00051 return field_name_; 00052 } 00053 00054 private: 00055 00056 // Determines whether a projection is required 00057 bool is_projected_; 00058 00059 // The name of the projected variable 00060 std::string field_name_; 00061 00062 // Rank of the projected variable (e.g. 0=scalar, 1=vector, 2=tensor) 00063 int rank_; 00064 00065 // Number of components in the variable 00066 int number_components_; 00067 00068 // Spatial dimensions of the system 00069 int number_dimensions_; 00070 }; 00071 // Class Projection 00072 00073 }// Namespace LCM 00074 00075 #endif // Projection_hpp