https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ParsedSubdomainGeneratorBase.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 "MeshGenerator.h"
13#include "FunctionParserUtils.h"
14
19{
20public:
22
24
25 std::unique_ptr<MeshBase> generate() override;
26
27protected:
29 std::unique_ptr<MeshBase> & _input;
30
32 const std::string _function;
33
35 std::vector<subdomain_id_type> _excluded_ids;
36
38 const std::vector<ExtraElementIDName> _eeid_names;
39
41 std::vector<unsigned int> _eeid_indices;
42
45
47
52 void functionInitialize(const std::string & function_expression);
53
54 virtual void assignElemSubdomainID(Elem * elem) = 0;
55
56 virtual void setBlockName(std::unique_ptr<MeshBase> &) {}
57};
std::shared_ptr< SymFunction > SymFunctionPtr
Shorthand for an smart pointer to an autodiff function parser object.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
MeshGenerators are objects that can modify or add to an existing mesh.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
A base class for mesh generators that Use a parsed expression to assign new subdomain id(s)
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
std::unique_ptr< MeshBase > & _input
mesh to set the subdomains on
const std::string _function
function expression
virtual void setBlockName(std::unique_ptr< MeshBase > &)
std::vector< unsigned int > _eeid_indices
Indices of the extra element ids used in the parsed expression.
const std::vector< ExtraElementIDName > _eeid_names
Names of the extra element ids used in the parsed expression.
void functionInitialize(const std::string &function_expression)
Initialize the function parser object.
std::vector< subdomain_id_type > _excluded_ids
A list of excluded subdomain ids that will not be changed even if they are in the combinatorial geome...
virtual void assignElemSubdomainID(Elem *elem)=0
SymFunctionPtr _func_F
function parser object describing the combinatorial geometry