https://mooseframework.inl.gov
Protected Member Functions | List of all members
AnalysisStepUOInterface Class Reference

Interface class for step user object. More...

#include <AnalysisStepUOInterface.h>

Inheritance diagram for AnalysisStepUOInterface:
[legend]

Protected Member Functions

virtual void getAnalysisStepUserObject (const FEProblemBase &fe_problem, const AnalysisStepUserObject *&step_user_object, const std::string &name)
 

Detailed Description

Interface class for step user object.

It meets the requirement of getting one step user object among all existing system user objects.

Definition at line 22 of file AnalysisStepUOInterface.h.

Member Function Documentation

◆ getAnalysisStepUserObject()

void AnalysisStepUOInterface::getAnalysisStepUserObject ( const FEProblemBase fe_problem,
const AnalysisStepUserObject *&  step_user_object,
const std::string &  name 
)
protectedvirtual

Definition at line 15 of file AnalysisStepUOInterface.C.

Referenced by AbaqusUExternalDB::initialSetup(), AbaqusUMATStress::initialSetup(), and AnalysisStepPeriod::initialSetup().

18 {
19  std::vector<const UserObject *> uos;
20  fe_problem.theWarehouse().query().condition<AttribSystem>("UserObject").queryIntoUnsorted(uos);
21 
22  std::vector<const AnalysisStepUserObject *> step_uos;
23  for (const auto & uo : uos)
24  {
25  const AnalysisStepUserObject * possible_step_uo =
26  dynamic_cast<const AnalysisStepUserObject *>(uo);
27  if (possible_step_uo)
28  step_uos.push_back(possible_step_uo);
29  }
30 
31  if (step_uos.size() > 1)
32  mooseError("Your input file has multiple AnalysisStepUserObjects. MOOSE currently only support "
33  "one in ",
34  name,
35  ". \n");
36  else if (step_uos.size() == 1)
37  mooseInfo("A AnalysisStepUserObject, has been identified and will be used to drive stepping "
38  "behavior in ",
39  name,
40  ".");
41 
42  step_user_object = step_uos.size() == 1 ? step_uos[0] : nullptr;
43 }
void mooseError(Args &&... args)
void mooseInfo(Args &&... args)
TheWarehouse & theWarehouse() const
const std::string name
Definition: Setup.h:20
Query query()
User object that provides analysis steps given user input.

The documentation for this class was generated from the following files: