dtk_evaluator.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef DTKEVALUATOR_H
21 #define DTKEVALUATOR_H
22 
23 
24 #include "libmesh/libmesh_config.h"
25 
26 #ifdef LIBMESH_TRILINOS_HAVE_DTK
27 
28 #include "libmesh/mesh.h"
29 
31 #include <DTK_MeshContainer.hpp>
32 #include <DTK_FieldEvaluator.hpp>
33 #include <DTK_FieldContainer.hpp>
34 
35 #include <Teuchos_RCP.hpp>
36 #include <Teuchos_ArrayRCP.hpp>
38 
39 #include <string>
40 
41 namespace libMesh
42 {
43 
44 // Forward declarations
45 class EquationSystems;
46 class System;
47 class DofMap;
48 class MeshBase;
49 class FEType;
50 
51 template <typename T> class NumericVector;
52 
60 class DTKEvaluator : public DataTransferKit::FieldEvaluator<int,DataTransferKit::FieldContainer<double>>
61 {
62 public:
63  typedef DataTransferKit::MeshContainer<int> MeshContainerType;
64  typedef DataTransferKit::FieldContainer<Number> FieldContainerType;
65 
66  DTKEvaluator(System & in_sys, std::string var_name);
67 
68  virtual FieldContainerType evaluate(const Teuchos::ArrayRCP<int> & elements,
69  const Teuchos::ArrayRCP<double> & coords) override;
70 
71 protected:
76  unsigned int dim;
78  unsigned int var_num;
79  const FEType & fe_type;
80 };
81 
82 } // namespace libMesh
83 
84 #endif // #ifdef LIBMESH_TRILINOS_HAVE_DTK
85 
86 #endif // #define DTKEVALUATOR_H
Manages the family, order, etc. parameters for a given FE.
Definition: fe_type.h:179
Manages multiples systems of equations.
virtual FieldContainerType evaluate(const Teuchos::ArrayRCP< int > &elements, const Teuchos::ArrayRCP< double > &coords) override
DTKEvaluator(System &in_sys, std::string var_name)
NumericVector< Number > & current_local_solution
Definition: dtk_evaluator.h:73
DataTransferKit::FieldContainer< Number > FieldContainerType
Definition: dtk_evaluator.h:64
const FEType & fe_type
Definition: dtk_evaluator.h:79
Base class for Mesh.
Definition: mesh_base.h:77
Manages the degrees of freedom (DOFs) in a simulation.
Definition: dof_map.h:176
unsigned int var_num
Definition: dtk_evaluator.h:78
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:92
DataTransferKit::MeshContainer< int > MeshContainerType
Definition: dtk_evaluator.h:63
EquationSystems & es
Definition: dtk_evaluator.h:74