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

Albany_AbstractDiscretization.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 ALBANY_ABSTRACTDISCRETIZATION_HPP
00008 #define ALBANY_ABSTRACTDISCRETIZATION_HPP
00009 
00010 #include <vector>
00011 #include <string>
00012 
00013 #include "Teuchos_RCP.hpp"
00014 #include "Teuchos_ArrayRCP.hpp"
00015 
00016 #include "Epetra_Map.h"
00017 #include "Epetra_Vector.h"
00018 #include "Epetra_CrsGraph.h"
00019 
00020 #include "Shards_CellTopologyData.h"
00021 #include "Shards_Array.hpp"
00022 #include "Albany_AbstractMeshStruct.hpp"
00023 #include "Albany_StateInfoStruct.hpp"
00024 //#include "Adapt_NodalDataBlock.hpp"
00025 
00026 namespace Albany {
00027 
00028 typedef std::map<std::string, std::vector<std::vector<int> > > NodeSetList;
00029 typedef std::map<std::string, std::vector<double*> > NodeSetCoordList;
00030 
00031 class SideStruct {
00032 
00033   public:
00034 
00035     int elem_GID; // the global id of the element containing the side
00036     int elem_LID; // the local id of the element containing the side
00037     int elem_ebIndex; // The index of the element block that contains the element
00038     unsigned side_local_id; // The local id of the side relative to the owning element
00039 
00040 };
00041 
00042 typedef std::map<std::string, std::vector<SideStruct> > SideSetList;
00043 
00044 class wsLid {
00045 
00046   public:
00047 
00048     int ws; // the workset of the element containing the side
00049     int LID; // the local id of the element containing the side
00050 
00051 };
00052 
00053 typedef std::map<int, wsLid > WsLIDList;
00054 
00055 template <typename T>
00056 struct WorksetArray {
00057    typedef Teuchos::ArrayRCP<T> type;
00058 };
00059 
00060 class AbstractDiscretization {
00061   public:
00062 
00064     AbstractDiscretization() {};
00065 
00067     virtual ~AbstractDiscretization() {};
00068 
00070     virtual Teuchos::RCP<const Epetra_Map>
00071     getMap() const = 0;
00072 
00074     virtual Teuchos::RCP<const Epetra_Map>
00075     getOverlapMap() const = 0;
00076 
00078     virtual Teuchos::RCP<const Epetra_CrsGraph>
00079     getJacobianGraph() const = 0;
00080 
00082     virtual Teuchos::RCP<const Epetra_CrsGraph>
00083     getOverlapJacobianGraph() const = 0;
00084 
00086     virtual Teuchos::RCP<const Epetra_Map>
00087     getNodeMap() const = 0;
00088 
00090 //    virtual Teuchos::RCP<Adapt::NodalDataBlock> getNodalDataBlock() = 0;
00091 
00093     virtual const NodeSetList& getNodeSets() const = 0;
00094     virtual const NodeSetCoordList& getNodeSetCoords() const = 0;
00095 
00097     virtual const SideSetList& getSideSets(const int ws) const = 0;
00098 
00100     virtual const WorksetArray<Teuchos::ArrayRCP<Teuchos::ArrayRCP<Teuchos::ArrayRCP<int> > > >::type&
00101        getWsElNodeEqID() const = 0;
00102 
00103     virtual const WorksetArray<Teuchos::ArrayRCP<Teuchos::ArrayRCP<int> > >::type&
00104        getWsElNodeID() const = 0;
00105 
00107     virtual Teuchos::ArrayRCP<double>&  getCoordinates() const = 0;
00108     virtual const WorksetArray<Teuchos::ArrayRCP<Teuchos::ArrayRCP<double*> > >::type& getCoords() const = 0;
00109     virtual const WorksetArray<Teuchos::ArrayRCP<Teuchos::ArrayRCP<double> > >::type& getSurfaceHeight() const = 0;
00110     virtual const WorksetArray<Teuchos::ArrayRCP<double> >::type& getTemperature() const = 0;
00111     virtual const WorksetArray<Teuchos::ArrayRCP<Teuchos::ArrayRCP<double> > >::type& getBasalFriction() const = 0;
00112     virtual const WorksetArray<Teuchos::ArrayRCP<Teuchos::ArrayRCP<double> > >::type& getThickness() const = 0;
00113     virtual const WorksetArray<Teuchos::ArrayRCP<double> >::type& getFlowFactor() const = 0;
00114     virtual const WorksetArray<Teuchos::ArrayRCP<Teuchos::ArrayRCP<double*> > >::type& getSurfaceVelocity() const = 0;
00115     virtual const WorksetArray<Teuchos::ArrayRCP<Teuchos::ArrayRCP<double*> > >::type& getVelocityRMS() const = 0;
00116 
00118     virtual void printCoords() const = 0;
00119 
00120     virtual Teuchos::RCP<Albany::AbstractMeshStruct> getMeshStruct() const = 0;
00121 
00122     virtual Albany::StateArrays& getStateArrays() = 0;
00123 
00125     virtual const WorksetArray<std::string>::type&  getWsEBNames() const = 0;
00126 
00128     virtual const WorksetArray<int>::type&  getWsPhysIndex() const = 0;
00129 
00131     virtual WsLIDList&  getElemGIDws() = 0;
00132 
00134     virtual Teuchos::RCP<Epetra_Vector> getSolutionField() const = 0;
00135 
00137     virtual bool hasRestartSolution() const = 0;
00138 
00140     virtual bool supportsMOR() const = 0;
00141 
00143     virtual double restartDataTime() const = 0;
00144 
00146     virtual int getNumDim() const = 0;
00147 
00149     virtual int getNumEq() const = 0;
00150 
00151     virtual void setSolutionField(const Epetra_Vector& soln){};
00152 
00154     virtual void setResidualField(const Epetra_Vector& residual) = 0;
00155 
00157     virtual void writeSolution(const Epetra_Vector& solution, const double time, const bool overlapped = false) = 0;
00158 
00159 
00160   private:
00161 
00163     AbstractDiscretization(const AbstractDiscretization&);
00164 
00166     AbstractDiscretization& operator=(const AbstractDiscretization&);
00167 
00168 };
00169 
00170 }
00171 
00172 #endif // ALBANY_ABSTRACTDISCRETIZATION_HPP

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