https://mooseframework.inl.gov
MultiAppUserObjectTransfer.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 
12 // MOOSE includes
14 
29 {
30 public:
32 
34 
35  virtual void execute() override;
36 
37 protected:
41  bool blockRestricted() const;
42 
46  bool boundaryRestricted() const;
47 
51  bool hasBlocks(const Elem * elem) const;
52 
59  bool hasBlocks(const MooseMesh * mesh, const Node * node) const;
60 
69  bool isBoundaryNode(const MooseMesh * mesh, const Node * node) const;
70 
79  bool isBoundaryElem(const MooseMesh * mesh, const Elem * elem) const;
80 
86  unsigned int findSubAppToTransferFrom(const Point & p);
87 
88  std::string _user_object_name;
89 
95 
97  const bool _skip_bbox_check;
98 
100  const bool & _nearest_sub_app;
101 
102 private:
103  bool usesMooseAppCoordTransform() const override { return true; }
104 
106  std::set<SubdomainID> _blk_ids;
107 
109  std::set<BoundaryID> _bnd_ids;
110 };
bool hasBlocks(const Elem *elem) const
Check that element &#39;elem&#39; is part of the domain this transfer is restricted to.
bool isBoundaryElem(const MooseMesh *mesh, const Elem *elem) const
Check that the element belongs to boundary this transfer is restricted to.
static InputParameters validParams()
const bool _all_parent_nodes_contained_in_sub_app
Boolean variable to generate error if every parent app node cannot be mapped to a subApp during from_...
bool isBoundaryNode(const MooseMesh *mesh, const Node *node) const
Check that the node belongs to boundary this transfer is restricted to.
virtual void execute() override
Execute the transfer.
MeshBase & mesh
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const bool _skip_bbox_check
whether to check the bounding box check or not
bool usesMooseAppCoordTransform() const override
Whether this transfer handles non-translation-based transformations, e.g.
std::set< SubdomainID > _blk_ids
Set of block ids this transfer is restricted to.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
std::set< BoundaryID > _bnd_ids
Set of the boundary ids.
Transfers variables on possibly different meshes while conserving a user defined property (Postproces...
Loops over a target mesh and uses either node or element centroid location (based on the target varia...
const bool & _nearest_sub_app
Whether to utilize the nearest sub-app to transfer from.
unsigned int findSubAppToTransferFrom(const Point &p)
Gets the UserObject to transfer from when transferring from_multiapp.
const InputParameters & parameters() const
Get the parameters of the object.
MultiAppUserObjectTransfer(const InputParameters &parameters)