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

QCAD_MultiSolutionObserver.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_MULTISOLUTIONOBSERVER_HPP
00008 #define QCAD_MULTISOLUTIONOBSERVER_HPP
00009 
00010 #include "Epetra_Vector.h"
00011 #include "Teuchos_RCP.hpp"
00012 #include "Teuchos_ParameterList.hpp"
00013 #include "Albany_Application.hpp"
00014 
00015 namespace QCAD {
00016 
00017   // Utility functions
00018   void CopyAllStates(Albany::StateArrays& src, Albany::StateArrays& dest,
00019          const Teuchos::RCP<const Albany::StateInfoStruct>& stateInfo);
00020 
00021   void separateCombinedVector(Teuchos::RCP<const Epetra_Map> disc_map,
00022             int numCopiesOfDiscMap, int numAdditionalElements,
00023             const Teuchos::RCP<const Epetra_Comm>& comm,
00024             const Teuchos::RCP<Epetra_Vector>& combinedVector,
00025             Teuchos::RCP<Epetra_MultiVector>& disc_parts,
00026             Teuchos::RCP<Epetra_Vector>& additional_part);
00027 
00028   Teuchos::RCP<Epetra_Map> CreateCombinedMap(Teuchos::RCP<const Epetra_Map> disc_map,
00029                int numCopiesOfDiscMap, int numAdditionalElements,
00030                const Teuchos::RCP<const Epetra_Comm>& comm);
00031 
00032 
00033 
00034 
00036   //   Albany::Application objects are combined, and also supports outputting eigenvectors as nodal
00037   //    fields in the exodus file.  It is assumed that all apps have the same discretization map,
00038   //    and so state and field data is compatible.
00039 class MultiSolution_Observer
00040 {
00041 public:
00042   MultiSolution_Observer (const Teuchos::RCP<Albany::Application>& app,
00043         const Teuchos::RCP<Teuchos::ParameterList>& params); //single app constructor
00044 
00045   MultiSolution_Observer (const Teuchos::RCP<Albany::Application>& app1, 
00046         const Teuchos::RCP<Albany::Application>& app2,
00047         const Teuchos::RCP<Teuchos::ParameterList>& params); //two-app constructor
00048   // TODO: make more constructors: (three-app, arbitrary app, etc)
00049 
00050   ~MultiSolution_Observer () { };
00051 
00052   void observeSolution( const Epetra_Vector& solution, const std::string& solutionLabel,
00053       Teuchos::RCP<Albany::EigendataStruct> eigenData = Teuchos::null,
00054       double stamp = 0.0);
00055   // TODO: make more observeSolutions: (two-solution, arbitrary solution, etc)
00056 
00057 private:
00058   Teuchos::RCP<Teuchos::ParameterList> rootParams;
00059   std::vector< Teuchos::RCP<Albany::Application> > apps;
00060 };
00061 
00062 
00063 
00064 } // namespace QCAD
00065 
00066 #endif
00067 

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