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_COLLOCATIONMETRICCRITERION_HPP 00007 #define MOR_COLLOCATIONMETRICCRITERION_HPP 00008 00009 #include "Epetra_SerialSymDenseMatrix.h" 00010 00011 namespace MOR { 00012 00013 class CollocationMetricCriterion { 00014 public: 00015 CollocationMetricCriterion() {} 00016 virtual ~CollocationMetricCriterion() {} 00017 00018 virtual double fitness(const Epetra_SerialSymDenseMatrix &discrepancy) const = 0; 00019 virtual double partialFitness(const Epetra_SerialSymDenseMatrix &discrepancy, int contributionCount) const = 0; 00020 00021 private: 00022 // Disallow copy and assignment 00023 CollocationMetricCriterion(const CollocationMetricCriterion &); 00024 CollocationMetricCriterion &operator=(const CollocationMetricCriterion &); 00025 }; 00026 00027 00028 class FrobeniusNormCriterion : public CollocationMetricCriterion { 00029 public: 00030 virtual double fitness(const Epetra_SerialSymDenseMatrix &discrepancy) const; 00031 virtual double partialFitness(const Epetra_SerialSymDenseMatrix &discrepancy, int contributionCount) const; 00032 00033 private: 00034 static double normalizedFrobeniusNorm(const Epetra_SerialSymDenseMatrix &discrepancy); 00035 }; 00036 00037 00038 class TwoNormCriterion : public CollocationMetricCriterion { 00039 public: 00040 explicit TwoNormCriterion(int eigenRankStride); 00041 00042 virtual double fitness(const Epetra_SerialSymDenseMatrix &discrepancy) const; 00043 virtual double partialFitness(const Epetra_SerialSymDenseMatrix &discrepancy, int contributionCount) const; 00044 00045 private: 00046 int eigenRankStride_; 00047 }; 00048 00049 } // end namespace MOR 00050 00051 #endif /* MOR_COLLOCATIONMETRICCRITERION_HPP */