www.mooseframework.org
MultiAppProjectionTransfer.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 #ifndef MULTIAPPPROJECTIONTRANSFER_H
15 #define MULTIAPPPROJECTIONTRANSFER_H
16 
17 #include "MultiAppTransfer.h"
18 
19 // Forward declarations
20 namespace libMesh
21 {
22 class LinearImplicitSystem;
23 }
24 
26 
27 template <>
29 
34 {
35 public:
36  MultiAppProjectionTransfer(const InputParameters & parameters);
37 
38  virtual void initialSetup() override;
39 
40  virtual void execute() override;
41 
42 protected:
43  void toMultiApp();
44  void fromMultiApp();
45 
46  void assembleL2(EquationSystems & es, const std::string & system_name);
47 
48  void projectSolution(unsigned int to_problem);
49 
50  AuxVariableName _to_var_name;
51  VariableName _from_var_name;
52 
54 
57  std::vector<LinearImplicitSystem *> _proj_sys;
60  unsigned int _proj_var_num;
61 
62  friend void assemble_l2(EquationSystems & es, const std::string & system_name);
63 
64  // These variables allow us to cache qps for fixed meshes.
67  std::vector<std::vector<Point>> _cached_qps;
68  std::vector<std::map<std::pair<unsigned int, unsigned int>, unsigned int>> _cached_index_map;
69 };
70 
71 #endif /* MULTIAPPPROJECTIONTRANSFER_H */
void assemble_l2(EquationSystems &es, const std::string &system_name)
std::vector< std::map< std::pair< unsigned int, unsigned int >, unsigned int > > _cached_index_map
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Project values from one domain to another.
bool _compute_matrix
True, if we need to recompute the projection matrix.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
InputParameters validParams< MultiAppProjectionTransfer >()
Base class for all MultiAppTransfer objects.
std::vector< LinearImplicitSystem * > _proj_sys
unsigned int _proj_var_num
Having one projection variable number seems weird, but there is always one variable in every system b...
std::vector< std::vector< Point > > _cached_qps