$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef DTKEVALUATOR_H 00021 #define DTKEVALUATOR_H 00022 00023 00024 #include "libmesh/libmesh_config.h" 00025 00026 #ifdef LIBMESH_HAVE_DTK 00027 00028 #include "libmesh/equation_systems.h" 00029 #include "libmesh/mesh.h" 00030 #include "libmesh/system.h" 00031 00032 #include <DTK_MeshContainer.hpp> 00033 #include <DTK_FieldEvaluator.hpp> 00034 #include <DTK_FieldContainer.hpp> 00035 00036 #include <Teuchos_RCP.hpp> 00037 #include <Teuchos_ArrayRCP.hpp> 00038 00039 #include <string> 00040 00041 namespace libMesh { 00042 00043 class DTKEvaluator : public DataTransferKit::FieldEvaluator<int,DataTransferKit::FieldContainer<double> > 00044 { 00045 public: 00046 typedef DataTransferKit::MeshContainer<int> MeshContainerType; 00047 typedef DataTransferKit::FieldContainer<Number> FieldContainerType; 00048 00049 DTKEvaluator(System & in_sys, std::string var_name); 00050 00051 FieldContainerType evaluate( const Teuchos::ArrayRCP<int>& elements, 00052 const Teuchos::ArrayRCP<double>& coords ); 00053 00054 protected: 00055 System & sys; 00056 NumericVector<Number> & current_local_solution; 00057 EquationSystems & es; 00058 MeshBase & mesh; 00059 unsigned int dim; 00060 DofMap & dof_map; 00061 unsigned int var_num; 00062 const FEType& fe_type; 00063 }; 00064 00065 } // namespace libMesh 00066 00067 #endif // #ifdef LIBMESH_HAVE_DTK 00068 00069 #endif // #define DTKEVALUATOR_H