forked from idaholab/moose
/
MultiAppProjectionTransfer.h
67 lines (50 loc) · 2.42 KB
/
MultiAppProjectionTransfer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/****************************************************************/
/* DO NOT MODIFY THIS HEADER */
/* MOOSE - Multiphysics Object Oriented Simulation Environment */
/* */
/* (c) 2010 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/
#ifndef MULTIAPPPROJECTIONTRANSFER_H
#define MULTIAPPPROJECTIONTRANSFER_H
#include "MultiAppTransfer.h"
#include "libmesh/linear_implicit_system.h"
class MultiAppProjectionTransfer;
template<>
InputParameters validParams<MultiAppProjectionTransfer>();
/**
* Project values from one domain to another
*/
class MultiAppProjectionTransfer : public MultiAppTransfer
{
public:
MultiAppProjectionTransfer(const std::string & name, InputParameters parameters);
virtual ~MultiAppProjectionTransfer();
virtual void initialSetup();
virtual void execute();
protected:
void toMultiApp();
void fromMultiApp();
void assembleL2From(EquationSystems & es, const std::string & system_name);
void assembleL2To(EquationSystems & es, const std::string & system_name);
void projectSolution(FEProblem & fep, unsigned int app);
AuxVariableName _to_var_name;
VariableName _from_var_name;
MooseEnum _proj_type;
/// True, if we need to recompute the projection matrix
bool _compute_matrix;
std::vector<LinearImplicitSystem *> _proj_sys;
/// Having one projection variable number seems weird, but there is always one variable in every system being used for projection,
/// thus is always going to be 0 unless something changes in libMesh or we change the way we project variables
unsigned int _proj_var_num;
friend void assemble_l2_from(EquationSystems & es, const std::string & system_name);
friend void assemble_l2_to(EquationSystems & es, const std::string & system_name);
NumericVector<Number> * _serialized_master_solution;
};
#endif /* MULTIAPPPROJECTIONTRANSFER_H */