https://mooseframework.inl.gov
MultiAppGeometricInterpolationTransfer.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 #include "MooseVariableFieldBase.h"
15 
16 #include "libmesh/mesh_base.h"
17 
19 namespace libMesh
20 {
21 template <unsigned int>
22 class InverseDistanceInterpolation;
23 }
24 
29 {
30 public:
32 
34 
35  virtual void execute() override;
36 
37 protected:
39  FEProblemBase & from_problem,
40  const MooseVariableFieldBase & from_var,
41  const MultiAppCoordTransform & from_app_transform,
43 
45  FEProblemBase & to_problem,
46  MooseVariableFieldBase & to_var,
47  NumericVector<Real> & to_solution,
48  const MultiAppCoordTransform & to_app_transform,
49  const std::unique_ptr<libMesh::InverseDistanceInterpolation<Moose::dim>> & idi);
50 
51  void
52  subdomainIDsNode(MooseMesh & mesh, const Node & node, std::set<subdomain_id_type> & subdomainids);
53 
55  std::unordered_map<dof_id_type, Point> & transformation);
56 
57  unsigned int _num_points;
61  // How much we want to shrink gap
63  // Which mesh we want to shrink
65  // Which gap blocks want to exclude during solution transfers
66  std::vector<SubdomainName> _exclude_gap_blocks;
67  // How small we can consider two points are identical
69 
70 private:
71  bool usesMooseAppCoordTransform() const override { return true; }
72 };
void interpolateTargetPoints(FEProblemBase &to_problem, MooseVariableFieldBase &to_var, NumericVector< Real > &to_solution, const MultiAppCoordTransform &to_app_transform, const std::unique_ptr< libMesh::InverseDistanceInterpolation< Moose::dim >> &idi)
Interpolate variable values using geometry/mesh-based coefficients.
MeshBase & mesh
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...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
bool usesMooseAppCoordTransform() const override
Whether this transfer handles non-translation-based transformations, e.g.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
void computeTransformation(const MooseMesh &mesh, std::unordered_map< dof_id_type, Point > &transformation)
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
void fillSourceInterpolationPoints(FEProblemBase &from_problem, const MooseVariableFieldBase &from_var, const MultiAppCoordTransform &from_app_transform, std::unique_ptr< libMesh::InverseDistanceInterpolation< Moose::dim >> &idi)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MultiAppGeometricInterpolationTransfer(const InputParameters &parameters)
const InputParameters & parameters() const
Get the parameters of the object.
void subdomainIDsNode(MooseMesh &mesh, const Node &node, std::set< subdomain_id_type > &subdomainids)
This class contains transformation information that only exists in a context in which there are multi...
virtual void execute() override
Execute the transfer.