www.mooseframework.org
MultiAppVariableValueSamplePostprocessorTransfer.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 "MultiAppTransfer.h"
13 #include "MeshChangedInterface.h"
14 
21 {
22 public:
24 
26 
27  virtual void initialSetup() override;
28 
29  virtual void execute() override;
30 
31  void meshChanged() override;
32 
33 protected:
39 
45 
52  unsigned int getVariableComponent(unsigned int index) const
53  {
54  return _map_comp_to_child ? index / _apps_per_component : _comp;
55  }
56 
58  PostprocessorName _postprocessor_name;
60  AuxVariableName _var_name;
62  unsigned int _comp;
66  const bool _map_comp_to_child;
68  unsigned int _apps_per_component;
72  std::vector<unsigned int> _cached_multiapp_pos_ids;
73 
76  std::vector<processor_id_type> _postprocessor_to_processor_id;
77 
79  std::unordered_set<unsigned int> _needed_postprocessors;
80 };
unsigned int _comp
the component number of the variable for transferring
void meshChanged() override
Called on this object when the mesh changes.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This class provides an interface for common operations on field variables of both FE and FV types wit...
virtual void initialSetup() override
Method called at the beginning of the simulation for checking integrity or doing one-time setup...
std::vector< processor_id_type > _postprocessor_to_processor_id
Entries in this vector correspond to the processor ID that owns the application/postprocessor corresp...
Samples a variable&#39;s value in the parent application domain at the point where the MultiApp (for each...
const bool _map_comp_to_child
Whether or not to map groups of child applications to each component of an array variable.
std::vector< unsigned int > _cached_multiapp_pos_ids
Sub-application ids of all local active elements in the main-application When _map_comp_to_child == t...
Interface for notifications that the mesh has changed.
std::unordered_set< unsigned int > _needed_postprocessors
The postprocessors that this process needs for its active local elements.
PostprocessorName _postprocessor_name
the name of the postprocessor on the sub-applications
AuxVariableName _var_name
the name of the variable on the main-application
void setupPostprocessorCommunication()
Sets up the postprocessor to processor ID communication pattern data member _postprocessor_to_process...
unsigned int getVariableComponent(unsigned int index) const
Maps the child application index to the parent application variable component.
void cacheElemToPostprocessorData()
Method that caches data regarding the element to postprocess relationship.
Base class for all MultiAppTransfer objects.
const InputParameters & parameters() const
Get the parameters of the object.
unsigned int _apps_per_component
The number of applications associated with a component of the variable when doing array variable samp...