https://mooseframework.inl.gov
FunctionPeriodicBoundary.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 #include "Moose.h"
13 
14 #include "libmesh/point.h"
15 #include "libmesh/periodic_boundary_base.h"
16 
17 #include <array>
18 #include <vector>
19 
20 class FEProblemBase;
21 class Function;
22 
28 {
29 public:
35  const std::vector<std::string> & fn_names,
36  const std::vector<std::string> & inv_fn_names);
37 
45 
51  virtual libMesh::Point get_corresponding_pos(const libMesh::Point & pt) const override;
52 
53  virtual std::unique_ptr<libMesh::PeriodicBoundaryBase> clone(TransformationType t) const override;
54 
55 private:
56  static std::array<const Function *, 3> getFunctions(FEProblemBase & problem,
57  const std::vector<std::string> & names);
58 
60  const unsigned int _dim;
61 
63  const std::array<const Function *, 3> _tr;
65  const std::array<const Function *, 3> _inv_tr;
66 };
Base class for function objects.
Definition: Function.h:29
virtual std::unique_ptr< libMesh::PeriodicBoundaryBase > clone(TransformationType t) const override
const std::array< const Function *, 3 > _tr
Pointers to translation functions in each dimension.
Periodic boundary for calculation periodic BC on domains where the translation is given by Function o...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const unsigned int _dim
The dimension of the problem (says which of _tr and _inv_tr are active)
static std::array< const Function *, 3 > getFunctions(FEProblemBase &problem, const std::vector< std::string > &names)
virtual libMesh::Point get_corresponding_pos(const libMesh::Point &pt) const override
Get the translation based on point &#39;pt&#39;.
FunctionPeriodicBoundary(FEProblemBase &subproblem, const std::vector< std::string > &fn_names, const std::vector< std::string > &inv_fn_names)
Initialize the periodic with the functions and inverse functions, one for each dimension needed...
const std::array< const Function *, 3 > _inv_tr
Pointers to inverse translation functions in each dimension.