www.mooseframework.org
MultiAppDTKUserObjectTransfer.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 // MOOSE includes
17 #include "MultiAppTransfer.h"
18 #include "MooseVariableInterface.h"
20 
21 #include "libmesh/dtk_adapter.h"
22 
23 // Ignore warnings coming from DTK/Trilinos headers
24 #include "libmesh/ignore_warnings.h"
25 
26 // DTK includes
27 #include <DTK_VolumeSourceMap.hpp>
28 #include <DTK_MeshManager.hpp>
29 #include <DTK_MeshContainer.hpp>
30 #include <DTK_MeshTypes.hpp>
31 #include <DTK_MeshTraitsFieldAdapter.hpp>
32 #include <DTK_FieldEvaluator.hpp>
33 #include <DTK_FieldManager.hpp>
34 #include <DTK_FieldContainer.hpp>
35 #include <DTK_FieldTools.hpp>
36 #include <DTK_CommTools.hpp>
37 #include <DTK_GeometryManager.hpp>
38 #include <DTK_Box.hpp>
39 
40 // Trilinos includes
41 #include <Teuchos_RCP.hpp>
42 #include <Teuchos_ArrayRCP.hpp>
43 #include <Teuchos_CommHelpers.hpp>
44 #include <Teuchos_DefaultComm.hpp>
45 #include <Teuchos_GlobalMPISession.hpp>
46 #include <Teuchos_Ptr.hpp>
47 
48 // Restore the warnings.
49 #include "libmesh/restore_warnings.h"
50 
51 // Forward declarations
54 
55 template <>
57 
62 {
63 public:
65 
66  typedef long unsigned int GlobalOrdinal;
67 
68  virtual void execute() override;
69 
70 protected:
71  std::string _user_object_name;
72 
73  bool _setup;
74 
75  Teuchos::RCP<const Teuchos::MpiComm<int>> _comm_default;
76 
77  Teuchos::RCP<MultiAppDTKUserObjectEvaluator> _multi_app_user_object_evaluator;
78 
79  Teuchos::RCP<
80  DataTransferKit::FieldEvaluator<GlobalOrdinal, DataTransferKit::FieldContainer<double>>>
82 
83  Teuchos::RCP<DataTransferKit::GeometryManager<DataTransferKit::Box, GlobalOrdinal>>
85 
87 
88  DataTransferKit::VolumeSourceMap<DataTransferKit::Box,
90  DataTransferKit::MeshContainer<GlobalOrdinal>> * _src_to_tgt_map;
91 
92  Teuchos::RCP<DataTransferKit::FieldManager<DTKAdapter::FieldContainerType>> _to_values;
93 };
94 
95 #endif // LIBMESH_TRILINOS_HAVE_DTK
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Transfers from spatially varying UserObjects in a MultiApp to the "master" system.
Teuchos::RCP< const Teuchos::MpiComm< int > > _comm_default
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
MultiAppDTKUserObjectTransfer(const InputParameters &parameters)
virtual void execute() override
Execute the transfer.
Teuchos::RCP< DataTransferKit::FieldManager< DTKAdapter::FieldContainerType > > _to_values
DataTransferKit::VolumeSourceMap< DataTransferKit::Box, GlobalOrdinal, DataTransferKit::MeshContainer< GlobalOrdinal > > * _src_to_tgt_map
Teuchos::RCP< MultiAppDTKUserObjectEvaluator > _multi_app_user_object_evaluator
Teuchos::RCP< DataTransferKit::GeometryManager< DataTransferKit::Box, GlobalOrdinal > > _multi_app_geom
Base class for all MultiAppTransfer objects.
Interface for objects that need to get values of MooseVariables.
Teuchos::RCP< DataTransferKit::FieldEvaluator< GlobalOrdinal, DataTransferKit::FieldContainer< double > > > _field_evaluator
InputParameters validParams< MultiAppDTKUserObjectTransfer >()