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

QCAD_MaterialDatabase.hpp

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 #ifndef QCAD_MATERIALDATABASE_HPP
00008 #define QCAD_MATERIALDATABASE_HPP
00009 
00010 #include "Teuchos_ParameterList.hpp"
00011 #include "Albany_Utils.hpp"
00012 
00013 namespace QCAD {
00014 
00018   class MaterialDatabase
00019   {
00020   public:
00021   
00023     MaterialDatabase(const std::string& inputFile,
00024          const Teuchos::RCP<const Epetra_Comm>& ecomm);
00025 
00027     ~MaterialDatabase();
00028 
00030     bool isParam(const std::string& paramName);
00031     template<typename T>
00032     T getParam(const std::string& paramName);
00033     template<typename T>
00034     T getParam(const std::string& paramName, T def_val);
00035 
00037     bool isMaterialParam(const std::string& materialName, const std::string& paramName);
00038     template<typename T>
00039     T getMaterialParam(const std::string& materialName, const std::string& paramName);
00040     template<typename T>
00041     T getMaterialParam(const std::string& materialName, const std::string& paramName, T def_val);
00042 
00043 
00045     bool isNodeSetParam(const std::string& materialName, const std::string& paramName);
00046     template<typename T>
00047     T getNodeSetParam(const std::string& materialName, const std::string& paramName);
00048     template<typename T>
00049     T getNodeSetParam(const std::string& materialName, const std::string& paramName, T def_val);
00050 
00052     bool isSideSetParam(const std::string& materialName, const std::string& paramName);
00053     template<typename T>
00054     T getSideSetParam(const std::string& materialName, const std::string& paramName);
00055     template<typename T>
00056     T getSideSetParam(const std::string& materialName, const std::string& paramName, T def_val);
00057 
00059     bool isElementBlockParam(const std::string& ebName, const std::string& paramName);
00060     template<typename T>
00061     T getElementBlockParam(const std::string& ebName, const std::string& paramName);
00062     template<typename T>
00063     T getElementBlockParam(const std::string& ebName, const std::string& paramName, T def_val);
00064 
00066     bool isElementBlockSublist(const std::string& ebName, const std::string& subListName);
00067     Teuchos::ParameterList&
00068     getElementBlockSublist(const std::string& ebName, const std::string& subListName);
00069 
00071     template<typename T> 
00072     std::vector<T> getAllMatchingParams(const std::string& paramName);
00073 
00074   private:
00075     template<typename T> 
00076     void getAllMatchingParams_helper(const std::string& paramName, 
00077              std::vector<T>& results, Teuchos::ParameterList& pList);
00078 
00079     std::string translateDBSublistName(Teuchos::ParameterList*, const std::string&);
00080 
00081     
00082 
00083   private:
00084 
00086     MaterialDatabase(const MaterialDatabase&);
00087     
00089     MaterialDatabase& operator=(const MaterialDatabase&);
00090 
00092     Teuchos::ParameterList data_;
00093     Teuchos::ParameterList* pMaterialsList_;
00094     Teuchos::ParameterList* pEBList_;
00095     Teuchos::ParameterList* pNSList_;
00096     Teuchos::ParameterList* pSSList_;
00097   };
00098 
00099 }
00100 
00101 #endif

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