https://mooseframework.inl.gov
MultiAppProjectionTransfer.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 #pragma once
11 
13 
14 // Forward declarations
15 namespace libMesh
16 {
17 class LinearImplicitSystem;
18 }
19 
24 {
25 public:
27 
29 
30  virtual void initialSetup() override;
31 
32  virtual void execute() override;
33 
34 protected:
35  void toMultiApp();
36  void fromMultiApp();
37 
38  void assembleL2(libMesh::EquationSystems & es, const std::string & system_name);
39 
40  void projectSolution(unsigned int to_problem);
41 
43 
46  std::vector<libMesh::LinearImplicitSystem *> _proj_sys;
49  unsigned int _proj_var_num;
50 
51  friend void assemble_l2(libMesh::EquationSystems & es, const std::string & system_name);
52 
53  // These variables allow us to cache qps for fixed meshes.
56  std::map<processor_id_type, std::vector<libMesh::Point>> _cached_qps;
57  std::map<processor_id_type, std::map<std::pair<unsigned int, unsigned int>, unsigned int>>
59 
60 private:
61  bool usesMooseAppCoordTransform() const override { return true; }
62 };
std::map< processor_id_type, 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...
bool usesMooseAppCoordTransform() const override
Whether this transfer handles non-translation-based transformations, e.g.
void assembleL2(libMesh::EquationSystems &es, const std::string &system_name)
Project values from one domain to another.
bool _compute_matrix
True, if we need to recompute the projection matrix.
Transfers variables on possibly different meshes while conserving a user defined property (Postproces...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
static InputParameters validParams()
virtual void execute() override
Execute the transfer.
std::map< processor_id_type, std::vector< libMesh::Point > > _cached_qps
MultiAppProjectionTransfer(const InputParameters &parameters)
const InputParameters & parameters() const
Get the parameters of the object.
void projectSolution(unsigned int to_problem)
friend void assemble_l2(libMesh::EquationSystems &es, const std::string &system_name)
virtual void initialSetup() override
Method called at the beginning of the simulation for checking integrity or doing one-time setup...
unsigned int _proj_var_num
Having one projection variable number seems weird, but there is always one variable in every system b...
std::vector< libMesh::LinearImplicitSystem * > _proj_sys