• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

Projection.cpp

Go to the documentation of this file.
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 #include "Projection.hpp"
00008 
00009 namespace LCM {
00010 
00011 Projection::Projection() :
00012     is_projected_(false),
00013     rank_(0),
00014     number_components_(0),
00015     number_dimensions_(0)
00016 {
00017   return;
00018 }
00019 
00020 Projection::Projection(
00021     std::string const & field_name,
00022     int const rank,
00023     int const number_components,
00024     int const number_dimensions) :
00025     is_projected_(true),
00026     rank_(rank),
00027     number_components_(number_components),
00028     number_dimensions_(number_dimensions),
00029     field_name_(field_name)
00030 {
00031   is_projected_ = !(field_name.empty());
00032   return;
00033 }
00034 
00035 // Return the number of components to be projected
00036 int Projection::getProjectedComponents()
00037 {
00038 
00039   //
00040   // The number of components is not necessarily determined solely
00041   // by the variable rank and spatial dimension of the problem.
00042   // For now, assume that the number of components is passed to the class
00043   // from the input file
00044   //
00045 
00046   /*
00047    int projectedComp;
00048 
00049    if (rank_!=0){
00050    projectedComp = rank_*numDim_;
00051    }
00052    else
00053    projectedComp = 1;
00054 
00055    return projectedComp;
00056    */
00057 
00058   return number_components_;
00059 }
00060 
00061 } // namspace LCM
00062 

Generated on Wed Mar 26 2014 18:36:43 for Albany: a Trilinos-based PDE code by  doxygen 1.7.1