https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CylindricalDuo.C
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#include "CylindricalDuo.h"
11#include "Legendre.h"
12#include "Zernike.h"
13
14#include <memory>
15
16CylindricalDuo::CylindricalDuo(const std::string & who_is_using_me)
17 : CompositeSeriesBasisInterface(who_is_using_me)
18{
19}
20
21CylindricalDuo::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,
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 std::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 std::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
58void
59CylindricalDuo::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}
void mooseError(Args &&... args)
MooseEnum expansion_type
MooseEnum generation_type
This class is the basis for constructing a composite—or convolved—functional series by combining mult...
std::vector< std::unique_ptr< SingleSeriesBasisInterface > > _series
A pointer to the single series type (one for each entry in _domains)
std::vector< MooseEnum > _series_types
The series types in this composite series.
void setNumberOfTerms()
Initialize the number of terms in the composite series by looping over the single series.
CylindricalDuo(const std::string &who_is_using_me)
virtual void setPhysicalBounds(const std::vector< Real > &bounds) final
Sets the bounds of the series.