https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SBMElementSubdomainModifierBase.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
11
14{
16
17 params.addRangeCheckedParam<Real>(
18 "lambda",
19 0.5,
20 "lambda >= 0 & lambda <= 1",
21 "Threshold applied to the inactive fraction of a partially active element.");
22
23 params.addRangeCheckedParam<int>("qrule_order",
24 9,
25 "qrule_order >= 0 & qrule_order <= 10",
26 "Quadrature order used to estimate the active fraction.");
27
28 params.addParam<bool>(
29 "mark_intercepted", false, "Whether to assign a dedicated subdomain ID when intercepted.");
30 params.addParam<SubdomainID>(
31 "subdomain_id_intercepted",
33 "Whether to assign a dedicated subdomain ID to intercepted elements.");
34
35 return params;
36}
37
39 : ElementSubdomainModifier(parameters),
40 _lambda(getParam<Real>("lambda")),
41 _qrule_order(static_cast<Order>(getParam<int>("qrule_order"))),
42 _mark_intercepted(getParam<bool>("mark_intercepted")),
43 _subdomain_id_intercepted(getParam<SubdomainID>("subdomain_id_intercepted"))
44{
46 paramError("subdomain_id_intercepted",
47 "This parameter must be specified when 'mark_intercepted' is true.");
48}
subdomain_id_type SubdomainID
void ErrorVector unsigned int
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
void paramError(const std::string &param, Args... args) const
SBMElementSubdomainModifierBase(const InputParameters &parameters)
const SubdomainID _subdomain_id_intercepted
Subdomain ID assigned to intercepted elements.
const bool _mark_intercepted
Whether to assign a dedicated subdomain ID to intercepted elements.
const SubdomainID INVALID_BLOCK_ID