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 AADAPT_UNIFREFSIZEFIELD_HPP 00008 #define AADAPT_UNIFREFSIZEFIELD_HPP 00009 00010 #include "AlbPUMI_AbstractPUMIDiscretization.hpp" 00011 #include "Epetra_Vector.h" 00012 #include <ma.h> 00013 #include "Albany_StateManager.hpp" 00014 00015 namespace AAdapt { 00016 00017 class UnifRefSizeField : public ma::IsotropicFunction { 00018 00019 public: 00020 UnifRefSizeField(const Teuchos::RCP<AlbPUMI::AbstractPUMIDiscretization>& disc); 00021 00022 ~UnifRefSizeField(); 00023 00024 double getValue(ma::Entity* v); 00025 00026 void setParams(const Epetra_Vector* sol, const Epetra_Vector* ovlp_sol, 00027 double element_size, double err_bound, 00028 const std::string state_var_name); 00029 00030 void computeError(); 00031 00032 00033 private: 00034 00035 Teuchos::RCP<const Epetra_Comm> comm; 00036 const Epetra_Vector* solution; 00037 const Epetra_Vector* ovlp_solution; 00038 00039 double elem_size; 00040 double initialAverageEdgeLength; 00041 apf::Mesh2* mesh; 00042 00043 }; 00044 00045 } 00046 00047 #endif 00048