https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SBMElementClassificationInterface.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
12#include "MooseObject.h"
13
16{
18
19 params.addRangeCheckedParam<Real>(
20 "lambda",
21 0.5,
22 "lambda >= 0 & lambda <= 1",
23 "Threshold applied to the fraction outside the retained domain for a partial element. This "
24 "parameter cannot be set when 'mark_intercepted' is true.");
25
26 params.addRangeCheckedParam<int>(
27 "qrule_order",
28 9,
29 "qrule_order >= 0 & qrule_order <= 10",
30 "Quadrature order used to estimate the retained-domain fraction.");
31
32 params.addParam<bool>(
33 "mark_intercepted", false, "Whether to assign a dedicated subdomain ID when intercepted.");
34 params.addParam<SubdomainID>("subdomain_id_intercepted",
36 "Subdomain ID assigned to intercepted elements.");
37
38 return params;
39}
40
42 const MooseObject * moose_object)
43 : _lambda(moose_object->getParam<Real>("lambda")),
44 _qrule_order(static_cast<Order>(moose_object->getParam<int>("qrule_order"))),
45 _intercepted_subdomain_policy{moose_object->getParam<bool>("mark_intercepted"),
46 moose_object->getParam<SubdomainID>("subdomain_id_intercepted")}
47{
50 moose_object->paramError("subdomain_id_intercepted",
51 "This parameter must be specified when 'mark_intercepted' is true.");
52
54 moose_object->paramError("lambda",
55 "This parameter cannot be set when 'mark_intercepted' is true.");
56}
InputParameters emptyInputParameters()
void ErrorVector unsigned int
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
bool isParamSetByUser(const std::string &name) const
const SBMUtils::InterceptedSubdomainPolicy _intercepted_subdomain_policy
Policy for assigning partial elements to a dedicated intercepted subdomain.
SBMElementClassificationInterface(const MooseObject *moose_object)
const SubdomainID INVALID_BLOCK_ID