libMesh
Loading...
Searching...
No Matches
dtk_evaluator.h
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 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
30#include "libmesh/ignore_warnings.h"
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>
37#include "libmesh/restore_warnings.h"
38
39#include <string>
40
41namespace libMesh
42{
43
44// Forward declarations
45class EquationSystems;
46class System;
47class DofMap;
48class MeshBase;
49class FEType;
50
51template <typename T> class NumericVector;
52
60class DTKEvaluator : public DataTransferKit::FieldEvaluator<int,DataTransferKit::FieldContainer<double>>
61{
62public:
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
71protected:
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
Implements the evaluate() function to compute FE solution values at points requested by DTK.
DataTransferKit::FieldContainer< Number > FieldContainerType
DataTransferKit::MeshContainer< int > MeshContainerType
virtual FieldContainerType evaluate(const Teuchos::ArrayRCP< int > &elements, const Teuchos::ArrayRCP< double > &coords) override
EquationSystems & es
const FEType & fe_type
NumericVector< Number > & current_local_solution
This class handles the numbering of degrees of freedom on a mesh.
Definition dof_map.h:181
This is the EquationSystems class.
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Definition fe_type.h:197
This is the MeshBase class.
Definition mesh_base.h:81
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition system.h:100
The libMesh namespace provides an interface to certain functionality in the library.