www.mooseframework.org
MultiAppDTKUserObjectEvaluator.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef MULTIAPPDTKUSEROBJECTEVALUATOR_H
16 #define MULTIAPPDTKUSEROBJECTEVALUATOR_H
17 
18 #include "libmesh/libmesh_config.h"
19 
20 #ifdef LIBMESH_TRILINOS_HAVE_DTK
21 
22 // Forward declarations
23 class MultiApp;
24 
25 // DTK includes
26 #include "libmesh/ignore_warnings.h"
27 #include <DTK_FieldEvaluator.hpp>
28 #include <DTK_FieldContainer.hpp>
29 #include <DTK_GeometryManager.hpp>
30 #include <DTK_Box.hpp>
31 #include "libmesh/restore_warnings.h"
32 
37  : public DataTransferKit::FieldEvaluator<long unsigned int,
38  DataTransferKit::FieldContainer<double>>
39 {
40 public:
41  MultiAppDTKUserObjectEvaluator(MultiApp & multi_app, const std::string & user_object_name);
42 
44 
45  typedef long unsigned int GlobalOrdinal;
46 
47  DataTransferKit::FieldContainer<double> evaluate(const Teuchos::ArrayRCP<GlobalOrdinal> & bids,
48  const Teuchos::ArrayRCP<double> & coords);
49 
50  Teuchos::RCP<DataTransferKit::GeometryManager<DataTransferKit::Box, GlobalOrdinal>>
51  createSourceGeometry(const Teuchos::RCP<const Teuchos::Comm<int>> & comm);
52 
53 private:
56 
58  std::string _user_object_name;
59 
60  Teuchos::ArrayRCP<DataTransferKit::Box> _boxes;
61  Teuchos::ArrayRCP<GlobalOrdinal> _box_ids;
62 };
63 
64 #endif // LIBMESH_TRILINOS_HAVE_DTK
65 #endif // MULTIAPPDTKUSEROBJECTEVALUATOR_H
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:59