Line data Source code
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 : // MOOSE includes 11 : #include "Indicator.h" 12 : #include "Assembly.h" 13 : #include "MooseVariableFE.h" 14 : #include "Problem.h" 15 : #include "SubProblem.h" 16 : #include "SystemBase.h" 17 : 18 : #include "libmesh/threads.h" 19 : 20 : InputParameters 21 86921 : Indicator::validParams() 22 : { 23 86921 : InputParameters params = MooseObject::validParams(); 24 86921 : params += BlockRestrictable::validParams(); 25 86921 : params += OutputInterface::validParams(); 26 86921 : params += MaterialPropertyInterface::validParams(); 27 : 28 260763 : params.addParam<bool>("use_displaced_mesh", 29 173842 : false, 30 : "Whether or not this object should use the " 31 : "displaced mesh for computation. Note that " 32 : "in the case this is true but no " 33 : "displacements are provided in the Mesh block " 34 : "the undisplaced mesh will still be used."); 35 86921 : params.addParamNamesToGroup("use_displaced_mesh", "Advanced"); 36 : 37 86921 : params.registerBase("Indicator"); 38 : 39 86921 : return params; 40 0 : } 41 : 42 697 : Indicator::Indicator(const InputParameters & parameters) 43 : : MooseObject(parameters), 44 : BlockRestrictable(this), 45 : SetupInterface(this), 46 : FunctionInterface(this), 47 : UserObjectInterface(this), 48 : MooseVariableDependencyInterface(this), 49 : Restartable(this, "Indicators"), 50 : OutputInterface(parameters), 51 : MaterialPropertyInterface(this, blockIDs(), Moose::EMPTY_BOUNDARY_IDS), 52 697 : _use_displaced_mesh(getParam<bool>("use_displaced_mesh")), 53 697 : _subproblem(*getCheckedPointerParam<SubProblem *>("_subproblem")), 54 697 : _fe_problem(*getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")), 55 697 : _sys(*getCheckedPointerParam<SystemBase *>("_sys")), 56 697 : _solution(_sys.solution()), 57 697 : _tid(parameters.get<THREAD_ID>("_tid")), 58 : // Assembly for system 0 59 697 : _assembly(_subproblem.assembly(_tid, 0)), 60 1394 : _mesh(_subproblem.mesh()) 61 : { 62 697 : }