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

MOR_GreedyAtomicBasisSample.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 #ifndef MOR_GREEDYATOMICBASISSAMPLE_HPP
00007 #define MOR_GREEDYATOMICBASISSAMPLE_HPP
00008 
00009 #include "MOR_AtomicBasisSource.hpp"
00010 #include "MOR_CollocationMetricCriterion.hpp"
00011 
00012 #include "Epetra_SerialSymDenseMatrix.h"
00013 #include "Epetra_Map.h"
00014 
00015 #include "Teuchos_RCP.hpp"
00016 #include "Teuchos_Array.hpp"
00017 #include "Teuchos_ArrayView.hpp"
00018 
00019 namespace MOR {
00020 
00021 class GreedyAtomicBasisSample {
00022 public:
00023   GreedyAtomicBasisSample(
00024       AtomicBasisSource &basisFile,
00025       const Teuchos::RCP<const CollocationMetricCriterion> &criterion);
00026 
00027   int sampleSize() const { return sample_.size(); }
00028   Teuchos::ArrayView<const int> sample() const { return sample_; }
00029   const Epetra_SerialSymDenseMatrix &discrepancy() const { return discrepancy_; }
00030   double sampleFitness() const { return criterion_->fitness(discrepancy_); }
00031 
00032   void sampleSizeInc(int incr);
00033 
00034 private:
00035   Teuchos::RCP<const CollocationMetricCriterion> criterion_;
00036 
00037   Epetra_Map atomMap_;
00038 
00039   Teuchos::Array<Epetra_SerialSymDenseMatrix> contributions_;
00040   Epetra_SerialSymDenseMatrix discrepancy_;
00041 
00042   Teuchos::Array<int> sample_;
00043 };
00044 
00045 } // end namespace MOR
00046 
00047 #endif /* MOR_GREEDYATOMICBASISSAMPLE_HPP */

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