https://mooseframework.inl.gov
MultiAppMFEMCopyTransfer.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 #ifdef MFEM_ENABLED
11 
12 #pragma once
13 #include <vector>
14 
15 #include "MultiAppTransfer.h"
16 #include "MultiApp.h"
17 #include "MooseAppCoordTransform.h"
18 #include "MFEMProblem.h"
19 
20 class MooseMesh;
21 
22 //*
23 // Copy MFEMVariables between multiapps
24 // The variables must be of the same type and dimension
25 // and the MFEMMesh must be identical in both multiapps
26 // */
27 
29 {
30 public:
33  void execute() override;
34  auto const & getFromVarName(int i) { return _from_var_names.at(i); };
35  auto const & getToVarName(int i) { return _to_var_names.at(i); };
36  auto numFromVar() { return _from_var_names.size(); }
37  auto numToVar() { return _to_var_names.size(); }
38 
39 protected:
40  std::vector<VariableName> _from_var_names;
41  std::vector<AuxVariableName> _to_var_names;
42 
43  void transfer(MFEMProblem & to_problem, MFEMProblem & from_problem);
44 
45  void checkSiblingsTransferSupported() const override;
46 };
47 
48 #endif
std::vector< AuxVariableName > _to_var_names
void execute() override
Execute the transfer.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::vector< VariableName > _from_var_names
void transfer(MFEMProblem &to_problem, MFEMProblem &from_problem)
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
MultiAppMFEMCopyTransfer(InputParameters const &params)
void checkSiblingsTransferSupported() const override
Whether the transfer supports siblings transfer.
auto const & getFromVarName(int i)
Base class for all MultiAppTransfer objects.
static InputParameters validParams()