https://mooseframework.inl.gov
ParsedDownSelectionPositions.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
13 #include "Positions.h"
14 #include "FunctorInterface.h"
15 #include "BlockRestrictable.h"
16 #include "FunctionParserUtils.h"
17 
22  public NonADFunctorInterface,
23  public BlockRestrictable,
24  public FunctionParserUtils<false>
25 {
26 public:
29  virtual ~ParsedDownSelectionPositions() = default;
30 
31  void initialize() override;
32 
33 private:
35  std::string _expression;
36 
38  const std::vector<std::string> _xyzt;
39 
42 
44 
46  const std::vector<MooseFunctorName> & _functor_names;
47 
49  const unsigned int _n_functors;
50 
52  const std::vector<std::string> _functor_symbols;
53 
55  std::vector<const Moose::Functor<Real> *> _functors;
56 
58  std::vector<const Positions *> _positions_ptrs;
59 
60  enum PositionSelection : short
61  {
62  Error = 0,
63  Discard = 1,
64  Keep = 2
65  };
66 };
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
std::shared_ptr< SymFunction > SymFunctionPtr
Shorthand for an smart pointer to an autodiff function parser object.
std::vector< const Positions * > _positions_ptrs
Vector of pointers to positions objects.
const std::vector< MooseFunctorName > & _functor_names
Functors to use in the parsed expression.
Positions objects are under the hood Reporters.
Definition: Positions.h:20
const std::vector< std::string > _functor_symbols
Symbolic name to use for each functor.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::string _expression
function expression
ParsedDownSelectionPositions(const InputParameters &parameters)
std::vector< const Moose::Functor< Real > * > _functors
Vector of pointers to functors.
const unsigned int _n_functors
Number of functors.
virtual ~ParsedDownSelectionPositions()=default
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
void initialize() override
In charge of computing / loading the positions.
const InputParameters & parameters() const
Get the parameters of the object.
SymFunctionPtr _func_F
function parser object for the local value of the expression
Positions of the centroids of all elements meeting the parsed expression criterion.
const std::vector< std::string > _xyzt
coordinate and time variable names