www.mooseframework.org
MultiAppDTKUserObjectEvaluator.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "libmesh/libmesh_config.h"
13 
14 #ifdef LIBMESH_TRILINOS_HAVE_DTK
15 
16 // Forward declarations
17 class MultiApp;
18 
19 // DTK includes
20 #include "libmesh/ignore_warnings.h"
21 #include <DTK_FieldEvaluator.hpp>
22 #include <DTK_FieldContainer.hpp>
23 #include <DTK_GeometryManager.hpp>
24 #include <DTK_Box.hpp>
25 #include "libmesh/restore_warnings.h"
26 
31  : public DataTransferKit::FieldEvaluator<long unsigned int,
32  DataTransferKit::FieldContainer<double>>
33 {
34 public:
35  MultiAppDTKUserObjectEvaluator(MultiApp & multi_app, const std::string & user_object_name);
36 
38 
39  typedef long unsigned int GlobalOrdinal;
40 
41  DataTransferKit::FieldContainer<double> evaluate(const Teuchos::ArrayRCP<GlobalOrdinal> & bids,
42  const Teuchos::ArrayRCP<double> & coords);
43 
44  Teuchos::RCP<DataTransferKit::GeometryManager<DataTransferKit::Box, GlobalOrdinal>>
45  createSourceGeometry(const Teuchos::RCP<const Teuchos::Comm<int>> & comm);
46 
47 private:
50 
52  std::string _user_object_name;
53 
54  Teuchos::ArrayRCP<DataTransferKit::Box> _boxes;
55  Teuchos::ArrayRCP<GlobalOrdinal> _box_ids;
56 };
57 
58 #endif // LIBMESH_TRILINOS_HAVE_DTK
Teuchos::ArrayRCP< DataTransferKit::Box > _boxes
MultiAppDTKUserObjectEvaluator(MultiApp &multi_app, const std::string &user_object_name)
Teuchos::RCP< DataTransferKit::GeometryManager< DataTransferKit::Box, GlobalOrdinal > > createSourceGeometry(const Teuchos::RCP< const Teuchos::Comm< int >> &comm)
Teuchos::ArrayRCP< GlobalOrdinal > _box_ids
Evaluates the specified UserObject and returns the result in a DTK FieldContainer.
std::string _user_object_name
The name of the UserObject we&#39;re going to be evaluating.
DataTransferKit::FieldContainer< double > evaluate(const Teuchos::ArrayRCP< GlobalOrdinal > &bids, const Teuchos::ArrayRCP< double > &coords)
MPI_Comm comm
MultiApp & _multi_app
The MultiAppUserObject object this object will be evaluating.
A MultiApp represents one or more MOOSE applications that are running simultaneously.
Definition: MultiApp.h:57