www.mooseframework.org
TestSubblockIndexProvider.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 registerMooseObject("TensorMechanicsTestApp", TestSubblockIndexProvider);
13 
15 
16 InputParameters
18 {
19  InputParameters params = SubblockIndexProvider::validParams();
20  params.set<ExecFlagEnum>( "execute_on" ) = EXEC_INITIAL;
21  return params;
22 }
23 
24 TestSubblockIndexProvider::TestSubblockIndexProvider(const InputParameters & parameters)
25 : SubblockIndexProvider(parameters)
26 {
27 }
28 
29 unsigned int
31 {
32  Point p = *elem.node_ptr(0);
33 
34  if (MooseUtils::relativeFuzzyLessThan(p(0), 0.5))
35  return 0;
36  else
37  return 1;
38 }
39 
40 unsigned int
42 {
43  return 1;
44 }
TestSubblockIndexProvider::TestSubblockIndexProvider
TestSubblockIndexProvider(const InputParameters &params)
Definition: TestSubblockIndexProvider.C:24
SubblockIndexProvider
Abstract base class for user objects that provide an index for a given element that is independent of...
Definition: SubblockIndexProvider.h:24
registerMooseObject
registerMooseObject("TensorMechanicsTestApp", TestSubblockIndexProvider)
TestSubblockIndexProvider
A class used to set the subblock index for testing generalized plane strain calculations when more th...
Definition: TestSubblockIndexProvider.h:24
defineLegacyParams
defineLegacyParams(TestSubblockIndexProvider)
TestSubblockIndexProvider.h
SubblockIndexProvider::validParams
static InputParameters validParams()
Definition: SubblockIndexProvider.C:15
TestSubblockIndexProvider::getMaxSubblockIndex
virtual unsigned int getMaxSubblockIndex() const override
The max index of subblock.
Definition: TestSubblockIndexProvider.C:41
TestSubblockIndexProvider::getSubblockIndex
virtual unsigned int getSubblockIndex(const Elem &) const override
The index of subblock this element is on.
Definition: TestSubblockIndexProvider.C:30
TestSubblockIndexProvider::validParams
static InputParameters validParams()
Definition: TestSubblockIndexProvider.C:17