www.mooseframework.org
CylindricalDuo.C
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 #include "CylindricalDuo.h"
11 #include "Legendre.h"
12 #include "Zernike.h"
13 
14 #include "libmesh/auto_ptr.h"
15 
16 CylindricalDuo::CylindricalDuo(const std::string & who_is_using_me)
17  : CompositeSeriesBasisInterface(who_is_using_me)
18 {
19 }
20 
21 CylindricalDuo::CylindricalDuo(const std::vector<MooseEnum> & domains,
22  const std::vector<std::size_t> & orders,
23  const std::vector<MooseEnum> & series_types,
24  const std::string & who_is_using_me,
25  MooseEnum expansion_type,
26  MooseEnum generation_type)
27  : CompositeSeriesBasisInterface(orders, series_types, who_is_using_me)
28 {
29  // Initialize the pointer to the axial series
30  if (_series_types[0] == "Legendre")
31  {
32  std::vector<MooseEnum> local_domain = {domains[0]};
33  std::vector<std::size_t> local_order = {orders[0]};
34  _series.push_back(
35  libmesh_make_unique<Legendre>(local_domain, local_order, expansion_type, generation_type));
36  }
37  else
38  mooseError("CylindricalDuo: No other linear series implemented except Legendre!");
39 
40  // Initialize the pointer to the disc series
41  if (_series_types[1] == "Zernike")
42  {
43  std::vector<MooseEnum> local_domain = {domains[1], domains[2]};
44  std::vector<std::size_t> local_order = {orders[1]};
45  _series.push_back(
46  libmesh_make_unique<Zernike>(local_domain, local_order, expansion_type, generation_type));
47  }
48  else
49  mooseError("CylindricalDuo: No other disc series implemented except Zernike!");
50 
51  /*
52  * Set the _number_of_terms for the composite series by looping over each of the single series.
53  * This also initializes _basis_evaluation with zero values and the appropriate length.
54  */
56 }
57 
58 void
59 CylindricalDuo::setPhysicalBounds(const std::vector<Real> & bounds)
60 {
61  // The axial direction will have two bounds, the disc three
62  if (bounds.size() != 5)
63  mooseError("CylindricalDuo: Must provide 3 physical bounds: axial_min axial_max disc_center1 "
64  "disc_center2 radius");
65 
66  _series[0]->setPhysicalBounds({bounds[0], bounds[1]});
67  _series[1]->setPhysicalBounds({bounds[2], bounds[3], bounds[4]});
68 }
CompositeSeriesBasisInterface::_series_types
std::vector< MooseEnum > _series_types
The series types in this composite series.
Definition: CompositeSeriesBasisInterface.h:76
CylindricalDuo::setPhysicalBounds
virtual void setPhysicalBounds(const std::vector< Real > &bounds) final
Sets the bounds of the series.
Definition: CylindricalDuo.C:59
CylindricalDuo::CylindricalDuo
CylindricalDuo(const std::string &who_is_using_me)
Definition: CylindricalDuo.C:16
expansion_type
MooseEnum expansion_type
Legendre.h
CompositeSeriesBasisInterface
This class is the basis for constructing a composite—or convolved—functional series by combining mult...
Definition: CompositeSeriesBasisInterface.h:24
CylindricalDuo.h
generation_type
MooseEnum generation_type
CompositeSeriesBasisInterface::setNumberOfTerms
void setNumberOfTerms()
Initialize the number of terms in the composite series by looping over the single series.
Definition: CompositeSeriesBasisInterface.C:248
Zernike.h
CompositeSeriesBasisInterface::_series
std::vector< std::unique_ptr< SingleSeriesBasisInterface > > _series
A pointer to the single series type (one for each entry in _domains)
Definition: CompositeSeriesBasisInterface.h:79