https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
AverageSectionValueSampler Class Reference

#include <AverageSectionValueSampler.h>

Inheritance diagram for AverageSectionValueSampler:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 AverageSectionValueSampler (const InputParameters &parameters)
 
virtual void initialSetup () override
 
virtual void meshChanged () override
 
virtual void initialize () override
 
virtual void execute () override
 
virtual void finalize () override
 
virtual Real spatialValue (const Point &) const
 
virtual const std::vector< Point > spatialPoints () const
 
void setPrimaryThreadCopy (UserObject *primary)
 
UserObjectprimaryThreadCopy ()
 
SubProblemgetSubProblem () const
 
bool shouldDuplicateInitialExecution () const
 
void gatherSum (T &value)
 
void gatherMax (T &value)
 
void gatherMin (T &value)
 
void gatherProxyValueMax (T1 &proxy, T2 &value)
 
void gatherProxyValueMin (T1 &proxy, T2 &value)
 
std::set< UserObjectName > getDependObjects () const
 
const std::set< std::string > & getRequestedItems () override
 
const std::set< std::string > & getSuppliedItems () override
 
unsigned int systemNumber () const
 
virtual bool needThreadedCopy () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
bool isKokkosObject () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const TgetParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const TqueryParam (const std::string &name) const
 
const TgetRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
virtual void timestepSetup ()
 
virtual void jacobianSetup ()
 
virtual void residualSetup ()
 
virtual void customSetup (const ExecFlagType &)
 
const ExecFlagEnumgetExecuteOnEnum () const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const TgetUserObject (const std::string &param_name, bool is_dependency=true) const
 
const TgetUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyByName (const std::string &prop_name_in)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOldByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlderByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialProperty (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOld (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlder (const std::string &name)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 
std::pair< Moose::Kokkos::MaterialProperty< T, dimension >, std::set< SubdomainID > > getKokkosBlockMaterialProperty (const MaterialPropertyName &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 
void checkBlockAndBoundaryCompatibility (std::shared_ptr< MaterialBase > discrete)
 
std::unordered_map< SubdomainID, std::vector< MaterialBase * > > buildRequiredMaterials (bool allow_stateful=true)
 
void statefulPropertiesAllowed (bool)
 
virtual bool getMaterialPropertyCalled () const
 
virtual const std::unordered_set< unsigned int > & getMatPropDependencies () const
 
virtual void resolveOptionalProperties ()
 
const GenericMaterialProperty< T, is_ad > & getPossiblyConstantGenericMaterialPropertyByName (const MaterialPropertyName &prop_name, MaterialData &material_data, const unsigned int state)
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
std::string PPName () const
 
bool containsCompleteHistory () const
 
bool isDistributed () const
 
const std::set< std::string > & getVectorNames () const
 
void buildOutputHideVariableList (std::set< std::string > variable_names)
 
const std::set< OutputName > & getOutputs ()
 
const Moose::Functor< Real > * defaultFunctor (const std::string &name)
 
const Moose::Functor< ADReal > * defaultFunctor (const std::string &name)
 
virtual void threadJoin (const UserObject &) override
 
virtual void threadJoin (const UserObject &) override
 
virtual void subdomainSetup () override
 
virtual void subdomainSetup () override
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
const FunctiongetFunction (const std::string &name) const
 
const FunctiongetFunctionByName (const FunctionName &name) const
 
bool hasFunction (const std::string &param_name) const
 
bool hasFunctionByName (const FunctionName &name) const
 
Moose::Kokkos::Function getKokkosFunction (const std::string &name) const
 
const TgetKokkosFunction (const std::string &name) const
 
Moose::Kokkos::Function getKokkosFunctionByName (const FunctionName &name) const
 
const TgetKokkosFunctionByName (const FunctionName &name) const
 
bool hasKokkosFunction (const std::string &param_name) const
 
bool hasKokkosFunctionByName (const FunctionName &name) const
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 
const VectorPostprocessorName & getVectorPostprocessorName (const std::string &param_name) const
 
TgetSampler (const std::string &name)
 
SamplergetSampler (const std::string &name)
 
TgetSamplerByName (const SamplerName &name)
 
SamplergetSamplerByName (const SamplerName &name)
 
virtual void meshDisplaced ()
 
PerfGraphperfGraph ()
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (const std::string &name) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 
static void sort (typename std::vector< T > &vector)
 
static void sortDFS (typename std::vector< T > &vector)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header, NameFunc &&name_func)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header)
 
static std::string deduceFunctorName (const std::string &name, const InputParameters &params)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 
static constexpr PropertyValue::id_type default_property_id
 
static constexpr PropertyValue::id_type zero_property_id
 
static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

std::string deduceFunctorName (const std::string &name) const
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &name) const override
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &name) const override
 
virtual void addUserObjectDependencyHelper (const UserObjectBase &uo) const override
 
void addReporterDependencyHelper (const ReporterName &reporter_name) override
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
const ReporterContextBasegetReporterContextBaseByName (const ReporterName &reporter_name) const
 
const ReporterNamegetReporterName (const std::string &param_name) const
 
TdeclareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< TdeclareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const TgetRestartableData (const std::string &data_name) const
 
TdeclareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
TdeclareRecoverableData (const std::string &data_name, Args &&... args)
 
TdeclareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
TdeclareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
const TgetMeshProperty (const std::string &data_name, const std::string &prefix)
 
const TgetMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 
libMesh::Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 
virtual void checkMaterialProperty (const std::string &name, const unsigned int state)
 
virtual void getKokkosMaterialPropertyHook (const std::string &, const unsigned int)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 
VectorPostprocessorValuedeclareVector (const std::string &vector_name)
 
const Moose::Functor< T > & getFunctor (const std::string &name)
 
const Moose::Functor< T > & getFunctor (const std::string &name, THREAD_ID tid)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem)
 
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem, THREAD_ID tid)
 
bool isFunctor (const std::string &name) const
 
bool isFunctor (const std::string &name, const SubProblem &subproblem) const
 
Moose::ElemArg makeElemArg (const Elem *elem, bool correct_skewnewss=false) const
 
void checkFunctorSupportsSideIntegration (const std::string &name, bool qp_integration)
 
const Moose::Functor< T > & getFunctorByName (const std::string &name)
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 

Static Protected Member Functions

static std::string meshPropertyName (const std::string &data_name, const std::string &prefix)
 

Protected Attributes

const std::shared_ptr< MooseMesh > & _mesh
 Reference to the mesh.
 
std::vector< VariableName > _variables
 Variables to output.
 
std::vector< unsigned int_var_numbers
 Indices of the variables in their systems.
 
std::vector< VectorPostprocessorValue * > _output_vector
 Vector of outputs, where each entry is the vector of average values for single variable at the selected points along the axis.
 
std::vector< SubdomainID_block_ids
 
const Point _direction
 Axis direction of the structural component.
 
const Point _reference_point
 Starting or reference point of the structural component to locate nodes on the cross section.
 
std::vector< Real > _positions
 Axial positions along the component at which average values are computed.
 
const bool _have_symmetry_plane
 Whether a symmetry plane has been defined by the user.
 
RealVectorValue _symmetry_plane
 Vector normal to a symmetry plane, optionally defined if the section has a symmetry plane.
 
const bool _automatically_locate_positions
 Whether to automatically locate positions along section for averaging field values.
 
const Real _tolerance
 Tolerance to identify nodes on the user-prescribed cross section.
 
std::vector< unsigned int_number_of_nodes
 Number of nodes for computing output (local and global).
 
const Real _cross_section_maximum_radius
 Tolerance to disambiguate cross section locations in different components within the same block.
 
const bool _require_equal_node_counts
 Whether to require the number of nodes at each axial location to be equal.
 
bool _need_mesh_initializations
 Whether node locations need to be identified and nodes at positions need to be counted.
 
const Moose::CoordinateSystemType_coord_sys
 
const THREAD_ID _tid
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
SystemBase_sys
 
Assembly_assembly
 
const bool _duplicate_initial_execution
 
std::set< std::string > _depend_uo
 
const bool & _enabled
 
MooseApp_app
 
Factory_factory
 
ActionFactory_action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters_pars
 
const ExecFlagEnum_execute_enum
 
const ExecFlagType_current_execute_flag
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase_mci_feproblem
 
FEProblemBase_mdi_feproblem
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real & _real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
const InputParameters_mi_params
 
const std::string _mi_name
 
const MooseObjectName _mi_moose_object_name
 
FEProblemBase_mi_feproblem
 
SubProblem_mi_subproblem
 
const THREAD_ID _mi_tid
 
const bool _is_kokkos_object
 
const Moose::MaterialDataType _material_data_type
 
MaterialData_material_data
 
bool _stateful_allowed
 
bool _get_material_property_called
 
std::vector< std::unique_ptr< PropertyValue > > _default_properties
 
std::unordered_set< unsigned int_material_property_dependencies
 
const MaterialPropertyName _get_suffix
 
const bool _use_interpolated_state
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 
Real & _t
 
const Real & _t_old
 
int_t_step
 
Real & _dt
 
Real & _dt_old
 
bool _is_transient
 
const std::string _vpp_name
 
FEProblemBase_vpp_fe_problem
 
const MooseEnum_parallel_type
 
const Parallel::Communicator & _communicator
 

Static Protected Attributes

static const std::string _interpolated_old
 
static const std::string _interpolated_older
 

Private Member Functions

Real axialPosition (const Node &node) const
 Determine axial distance of the point from the component's reference point.
 
void automaticallyLocatePositions ()
 Automatically identify all axial positions of nodes within the component and store their unique values (within tolerance) in _lengths.
 
const Moose::Functor< T > * defaultFunctor (const std::string &name)
 
const Moose::Functor< Real > * defaultFunctor (const std::string &name)
 
const Moose::Functor< ADReal > * defaultFunctor (const std::string &name)
 
const Moose::Functor< T > & getFunctorByName (const std::string &name, SubProblem &subproblem, THREAD_ID tid)
 
const Moose::FunctionBasegetKokkosFunctionByNameHelper (const FunctionName &name) const
 
const UserObjectBasegetUserObjectFromFEProblem (const UserObjectName &object_name, const THREAD_ID tid=0) const
 
const TcastUserObject (const UserObjectBase &uo_base, const std::string &param_name="") const
 
void mooseObjectError (const std::string &param_name, std::stringstream &oss) const
 
const std::string & userObjectType (const UserObjectBase &uo) const
 
const std::string & userObjectName (const UserObjectBase &uo) const
 
const PostprocessorName & getPostprocessorNameInternal (const std::string &param_name, const unsigned int index, const bool allow_default_value=true) const
 
bool isDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
PostprocessorValue getDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
void checkParam (const std::string &param_name, const unsigned int index=std::numeric_limits< unsigned int >::max()) const
 
bool postprocessorsAdded () const
 
const VectorPostprocessorValuegetVectorPostprocessorByNameHelper (const VectorPostprocessorName &name, const std::string &vector_name, bool broadcast, std::size_t t_index) const
 
const VectorPostprocessorContext< VectorPostprocessorValue > & getVectorPostprocessorContextByNameHelper (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool vectorPostprocessorsAdded () const
 
bool reportersAdded () const
 
void possiblyCheckHasReporter (const ReporterName &reporter_name, const std::string &param_name="") const
 
RestartableDataValueregisterRestartableDataOnApp (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
 
void registerRestartableNameWithFilterOnApp (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 
RestartableData< T > & declareRestartableDataHelper (const std::string &data_name, void *context, Args &&... args) const
 
virtual std::string meshPropertyPrefix (const std::string &data_name) const
 
const RestartableDataValuegetMeshPropertyInternal (const std::string &data_name, const std::string &prefix) const
 
void mooseErrorInternal (Args &&... args) const
 
const VariableValuegetDefaultValue (const std::string &var_name) const
 
const ADVariableValuegetADDefaultValue (const std::string &var_name) const
 
void checkVar (const std::string &var_name) const
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 
Moose::MaterialDataType getMaterialDataType (const std::set< BoundaryID > &boundary_ids) const
 
unsigned int getMaxQps () const
 
void addConsumedPropertyName (const MooseObjectName &obj_name, const std::string &prop_name)
 
virtual bool isADObject () const override
 
const PostprocessorValuegetPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
void possiblyCheckHasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 

Private Attributes

UserObject_primary_thread_copy
 
std::set< std::string > _supplied_uo
 
const ParallelParamObject_parent
 
const MooseBase_si_moose_base
 
const FEProblemBase_si_problem
 
ExecFlagEnum _empty_execute_enum
 
const MooseObject_fni_object
 
const InputParameters_fni_params
 
FEProblemBase_fni_feproblem
 
const THREAD_ID _fni_tid
 
const MooseObject_uoi_moose_object
 
const FEProblemBase_uoi_feproblem
 
const THREAD_ID _uoi_tid
 
const MooseObject_ppi_moose_object
 
const InputParameters_ppi_params
 
const FEProblemBase_ppi_feproblem
 
std::map< PostprocessorName, std::unique_ptr< PostprocessorValue > > _default_values
 
const bool _broadcast_by_default
 
const MooseObject_vpi_moose_object
 
const FEProblemBase_vpi_feproblem
 
const THREAD_ID _vpi_tid
 
const InputParameters_ri_params
 
FEProblemBase_ri_fe_problem_base
 
const ReporterData_ri_reporter_data
 
const MooseObject_ri_moose_object
 
const InputParameters_dni_params
 
FEProblemBase_dni_feproblem
 
const MooseObject *const _dni_moose_object_ptr
 
const InputParameters_si_params
 
FEProblemBase_si_feproblem
 
THREAD_ID _si_tid
 
const RestartableDataMapName _metaname
 
std::string _restartable_name
 
MooseApp_meta_data_app
 
const MooseObject *const _meta_data_object
 
const InputParameters_sc_parameters
 
const std::string & _sc_name
 
const bool _sc_is_implicit
 
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
 
std::unordered_map< std::string, std::unique_ptr< VariableValue > > _default_value
 
std::unordered_map< std::string, std::unique_ptr< ADVariableValue > > _dual_default_value
 
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _sc_coupled_vars
 
std::set< TagID_sc_coupleable_vector_tags
 
std::set< TagID_sc_coupleable_matrix_tags
 
const MooseObject_mi_moose_object
 
const bool _mi_boundary_restricted
 
const std::set< SubdomainID > & _mi_block_ids
 
const std::set< BoundaryID > & _mi_boundary_ids
 
std::vector< std::unique_ptr< OptionalMaterialPropertyProxyBase< MaterialPropertyInterface > > > _optional_property_proxies
 
const std::string _ti_name
 
const MooseObject_vpp_moose_object
 
const THREAD_ID _vpp_tid
 
const bool _contains_complete_history
 
const bool _is_distributed
 
const bool _is_broadcast
 
std::map< std::string, VectorPostprocessorValue_thread_local_vectors
 
std::set< std::string > _vector_names
 
MooseApp_oi_moose_app
 
OutputWarehouse_oi_output_warehouse
 
std::set< OutputName > _oi_outputs
 
const InputParameters_fi_params
 
const std::string _fi_name
 
SubProblem *const _fi_subproblem
 
const THREAD_ID _fi_tid
 
std::vector< std::unique_ptr< Moose::Functor< Real > > > _default_real_functors
 
std::vector< std::unique_ptr< Moose::Functor< ADReal > > > _default_ad_real_functors
 

Detailed Description

Definition at line 15 of file AverageSectionValueSampler.h.

Constructor & Destructor Documentation

◆ AverageSectionValueSampler()

AverageSectionValueSampler::AverageSectionValueSampler ( const InputParameters parameters)

Definition at line 67 of file AverageSectionValueSampler.C.

70 _variables(getParam<std::vector<VariableName>>("variables")),
71 _direction(getParam<Point>("axis_direction")),
72 _reference_point(getParam<Point>("reference_point")),
73 _positions(isParamSetByUser("lengths") ? getParam<std::vector<Real>>("lengths")
74 : getParam<std::vector<Real>>("positions")),
75 _have_symmetry_plane(isParamSetByUser("symmetry_plane")),
76 _symmetry_plane(getParam<RealVectorValue>("symmetry_plane")),
78 _tolerance(getParam<Real>("tolerance")),
80 _cross_section_maximum_radius(getParam<Real>("cross_section_maximum_radius")),
81 _require_equal_node_counts(getParam<bool>("require_equal_node_counts")),
83{
84 if (parameters.isParamSetByUser("lengths") && parameters.isParamSetByUser("positions"))
85 paramError("lengths", "The 'lengths' and 'positions' parameters cannot both be set.");
86
87 if (parameters.isParamSetByUser("lengths") && _positions.size() == 0)
88 paramError("lengths", "If 'lengths' is specified, at least one value must be provided");
89
90 if (parameters.isParamSetByUser("positions") && _positions.size() == 0)
91 paramError("positions", "If 'positions' is specified, at least one value must be provided");
92
93 if (_mesh->dimension() != 3)
94 mooseError("The AverageSectionValueSampler postprocessor can only be used with three "
95 "dimensional meshes.");
96
97 if (!MooseUtils::absoluteFuzzyEqual(_direction.norm_sq(), 1.0))
98 paramError("axis_direction", "Axis direction must be a unit vector.");
99
100 _output_vector.resize(_variables.size() + 2);
101 for (const auto j : make_range(_variables.size()))
103 const auto pos_idx = _variables.size();
104 _output_vector[pos_idx] = &declareVector("axial_position");
105 _output_vector[pos_idx + 1] = &declareVector("node_count");
106
107 for (const auto j : make_range(_variables.size()))
108 {
109 if (!_sys.hasVariable(_variables[j]))
110 paramError("variables",
111 "One or more of the specified variables do not exist in this system.");
112 const MooseVariable & variable = _sys.getFieldVariable<Real>(_tid, _variables[j]);
113 if (!variable.isNodal())
114 paramError("variables",
115 "One or more of the specified variables are not defined at the nodes.");
116 _var_numbers.push_back(variable.number());
117 }
118
120 {
121 const auto symm_plane_norm = _symmetry_plane.norm();
122 if (MooseUtils::absoluteFuzzyEqual(symm_plane_norm, 0.0))
123 mooseError("Vector defined in 'symmetry_plane' cannot have a norm of zero");
125 if (_variables.size() != 3)
126 paramError("variables",
127 "If 'symmetry_plane' is prescribed, three variables must be provided (for the x, "
128 "y, z vector components, in that order)");
129 mooseInfo("In AverageSectionValueSampler " + name() +
130 ": \nTreating the variables as vector components (" + _variables[0] + ", " +
131 _variables[1] + ", " + _variables[2] +
132 ") and zeroing out the component normal to the prescribed 'symmetry_plane'\n");
133 }
134}
std::shared_ptr< MooseMesh > & mesh()
const Real _cross_section_maximum_radius
Tolerance to disambiguate cross section locations in different components within the same block.
std::vector< unsigned int > _var_numbers
Indices of the variables in their systems.
const std::shared_ptr< MooseMesh > & _mesh
Reference to the mesh.
const Point _reference_point
Starting or reference point of the structural component to locate nodes on the cross section.
const Point _direction
Axis direction of the structural component.
const Real _tolerance
Tolerance to identify nodes on the user-prescribed cross section.
RealVectorValue _symmetry_plane
Vector normal to a symmetry plane, optionally defined if the section has a symmetry plane.
std::vector< VectorPostprocessorValue * > _output_vector
Vector of outputs, where each entry is the vector of average values for single variable at the select...
const bool _have_symmetry_plane
Whether a symmetry plane has been defined by the user.
std::vector< Real > _positions
Axial positions along the component at which average values are computed.
std::vector< unsigned int > _number_of_nodes
Number of nodes for computing output (local and global).
std::vector< VariableName > _variables
Variables to output.
const bool _require_equal_node_counts
Whether to require the number of nodes at each axial location to be equal.
const bool _automatically_locate_positions
Whether to automatically locate positions along section for averaging field values.
bool _need_mesh_initializations
Whether node locations need to be identified and nodes at positions need to be counted.
bool isParamSetByUser(const std::string &name) const
ActionWarehouse & actionWarehouse()
const InputParameters & parameters() const
const std::string & name() const
void paramError(const std::string &param, Args... args) const
bool isParamSetByUser(const std::string &name) const
void mooseError(Args &&... args) const
const T & getParam(const std::string &name) const
void mooseInfo(Args &&... args) const
unsigned int number() const
bool isNodal() const override
MooseVariableFE< T > & getFieldVariable(THREAD_ID tid, const std::string &var_name)
virtual bool hasVariable(const std::string &var_name) const
VectorPostprocessorValue & declareVector(const std::string &vector_name)
VectorValue< Real > RealVectorValue
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)

Member Function Documentation

◆ automaticallyLocatePositions()

void AverageSectionValueSampler::automaticallyLocatePositions ( )
private

Automatically identify all axial positions of nodes within the component and store their unique values (within tolerance) in _lengths.

Definition at line 285 of file AverageSectionValueSampler.C.

286{
287 _positions.clear();
288
289 // Data structure used to collect the locations with nodes on each processor,
290 // and gather in parallel.
291 std::vector<Real> pos_vec;
292
293 // Data structure used to store parallel-gathered locations
294 std::set<Real> pos_set;
295
296 _block_ids = _mesh->getSubdomainIDs(getParam<std::vector<SubdomainName>>("block"));
297 auto * nodes = _mesh->getLocalNodeRange();
298
299 for (const auto node : *nodes)
300 {
301 const std::set<SubdomainID> & node_blk_ids = _mesh->getNodeBlockIds(*node);
302
303 for (const auto i : _block_ids)
304 {
305 if (node_blk_ids.find(i) != node_blk_ids.end())
306 {
307 bool found_match = false;
308 Real axial_position = axialPosition(*node);
309 if (axial_position == std::numeric_limits<Real>::max()) // Node not in this component
310 continue;
311 for (auto & pos : pos_vec)
312 {
313 const Real dist_to_plane = std::abs(axial_position - pos);
314 if (dist_to_plane <= _tolerance)
315 {
316 found_match = true;
317 break;
318 }
319 }
320 if (!found_match)
321 pos_vec.emplace_back(axial_position);
322 }
323 }
324 }
325
326 _communicator.allgather(pos_vec);
327
328 for (const auto & posv : pos_vec)
329 {
330 bool found_match = false;
331 for (auto & poss : pos_set)
332 {
333 if (std::abs(posv - poss) < _tolerance)
334 {
335 found_match = true;
336 break;
337 }
338 }
339 if (!found_match)
340 pos_set.insert(posv);
341 }
342 for (const auto & poss : pos_set)
343 _positions.emplace_back(poss);
344}
std::vector< SubdomainID > _block_ids
Real axialPosition(const Node &node) const
Determine axial distance of the point from the component's reference point.
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
const Parallel::Communicator & _communicator

Referenced by initialize().

◆ axialPosition()

Real AverageSectionValueSampler::axialPosition ( const Node &  node) const
private

Determine axial distance of the point from the component's reference point.

If the in-plane distance is greater than the input parameter cross section maximum radius, return the maximum value for a Real.

Parameters
nodeThe node whose distance from a plane is to be considered

Definition at line 266 of file AverageSectionValueSampler.C.

267{
268 // Compute node location w.r.t. structural component length
269 const Point relative_distance{
270 node(0) - _reference_point(0), node(1) - _reference_point(1), node(2) - _reference_point(2)};
271
272 const Real axial_position = _direction * relative_distance;
273 const Real in_plane_distance =
274 (relative_distance - relative_distance * _direction * _direction).norm();
275
276 // If the in-plane distance is greater than the specified cross-section radius, the point is not
277 // in this component
278 if (in_plane_distance > _cross_section_maximum_radius)
279 return std::numeric_limits<Real>::max();
280
281 return axial_position;
282}
auto norm(const T &a)

Referenced by automaticallyLocatePositions(), and execute().

◆ execute()

void AverageSectionValueSampler::execute ( )
overridevirtual

Implements GeneralVectorPostprocessor.

Definition at line 209 of file AverageSectionValueSampler.C.

210{
211 _block_ids = _mesh->getSubdomainIDs(getParam<std::vector<SubdomainName>>("block"));
212
213 auto * active_nodes = _mesh->getActiveSemiLocalNodeRange();
214
215 std::vector<std::vector<Real>> output_vector_partial(_variables.size(),
216 std::vector<Real>(_positions.size()));
217
218 const NumericVector<Number> & _sol = *_sys.currentSolution();
219
220 for (const auto & node : *active_nodes)
221 {
222 const std::set<SubdomainID> & node_blk_ids = _mesh->getNodeBlockIds(*node);
223
224 for (const auto li : index_range(_positions))
225 {
226 for (const auto i : _block_ids)
227 {
228 if (node_blk_ids.find(i) != node_blk_ids.end())
229 {
230 // Check if node is within tolerance of user-prescribed plane
231 if (std::abs(axialPosition(*node) - _positions[li]) > _tolerance)
232 continue;
233 if ((*node).processor_id() != processor_id())
234 continue;
235
236 // Retrieve nodal variables
237 std::vector<Real> this_node_vars(_var_numbers.size());
238 for (const auto j : make_range(_var_numbers.size()))
239 this_node_vars[j] = _sol(node->dof_number(_sys.number(), _var_numbers[j], 0));
240
242 {
243 RealVectorValue this_node_vec_var(
244 this_node_vars[0], this_node_vars[1], this_node_vars[2]);
245 this_node_vec_var -= _symmetry_plane * this_node_vec_var * _symmetry_plane;
246 this_node_vars[0] = this_node_vec_var(0);
247 this_node_vars[1] = this_node_vec_var(1);
248 this_node_vars[2] = this_node_vec_var(2);
249 }
250
251 for (const auto j : make_range(_var_numbers.size()))
252 output_vector_partial[j][li] += this_node_vars[j];
253
254 _number_of_nodes[li]++;
255 break;
256 }
257 }
258 }
259 }
260
261 for (const auto j : make_range(_variables.size()))
262 *_output_vector[j] = output_vector_partial[j];
263}
virtual const NumericVector< Number > *const & currentSolution() const=0
processor_id_type processor_id() const
auto index_range(const T &sizable)

◆ finalize()

void AverageSectionValueSampler::finalize ( )
overridevirtual

Reimplemented from GeneralVectorPostprocessor.

Definition at line 168 of file AverageSectionValueSampler.C.

169{
170 for (const auto j : make_range(_variables.size()))
171 _communicator.sum(*(_output_vector[j]));
172
174
175 for (const auto li : index_range(_positions))
176 if (_number_of_nodes[li] < 1)
177 mooseError("No nodes were found in AverageSectionValueSampler postprocessor.");
178
179 for (const auto li : index_range(_positions))
180 for (const auto j : make_range(_variables.size()))
181 (*_output_vector[j])[li] /= _number_of_nodes[li];
182
183 const auto pos_idx = _variables.size();
184 (*_output_vector[pos_idx]) = _positions;
185 std::vector<Real> num_nodes_real(_number_of_nodes.begin(), _number_of_nodes.end());
186 (*_output_vector[pos_idx + 1]) = num_nodes_real;
187
189 {
190 for (const auto li : index_range(_number_of_nodes))
191 {
193 {
194 std::ostringstream pos_out;
195 for (const auto li2 : index_range(_number_of_nodes))
196 pos_out << std::setw(10) << _positions[li2] << std::setw(10) << _number_of_nodes[li2]
197 << "\n";
199 "Node counts do not match for all axial positions. If this behavior "
200 "is desired to accommodate nonuniform meshes, set "
201 "'require_equal_node_counts=false'\n Axial Node\n Position Count\n" +
202 pos_out.str());
203 }
204 }
205 }
206}
for(PetscInt i=0;i< nvars;++i)
if(subdm)

◆ initialize()

void AverageSectionValueSampler::initialize ( )
overridevirtual

Implements GeneralVectorPostprocessor.

Definition at line 148 of file AverageSectionValueSampler.C.

149{
151 {
152 // Option 1: locate positions first, then check counts
156 }
157
158 for (const auto j : make_range(_variables.size() + 2))
159 {
160 _output_vector[j]->clear();
161 _output_vector[j]->resize(_positions.size());
162 }
163 _number_of_nodes.clear();
164 _number_of_nodes.resize(_positions.size());
165}
void automaticallyLocatePositions()
Automatically identify all axial positions of nodes within the component and store their unique value...

◆ initialSetup()

void AverageSectionValueSampler::initialSetup ( )
overridevirtual

Reimplemented from GeneralVectorPostprocessor.

Definition at line 137 of file AverageSectionValueSampler.C.

138{
139}

◆ meshChanged()

void AverageSectionValueSampler::meshChanged ( )
overridevirtual

Reimplemented from GeneralVectorPostprocessor.

Definition at line 142 of file AverageSectionValueSampler.C.

143{
145}

◆ validParams()

InputParameters AverageSectionValueSampler::validParams ( )
static

Definition at line 19 of file AverageSectionValueSampler.C.

20{
22 params.addClassDescription("Compute the section's variable average in three-dimensions "
23 "given a user-defined definition of the cross section.");
24 params.addParam<std::vector<SubdomainName>>(
25 "block",
26 "The list of blocks in which to search for cross sectional nodes to compute the variable "
27 "average.");
28 params.addRequiredParam<Point>("axis_direction", "Direction of the structural component's axis");
29 params.addRequiredParam<Point>("reference_point",
30 "Structural component reference starting point from which the "
31 "input parameter 'lengths' applies.");
32 params.addParam<Real>("cross_section_maximum_radius",
33 std::numeric_limits<Real>::max(),
34 "Radial distance with respect to the body axis within which nodes are "
35 "considered to belong to this "
36 "structural component. Used to disambiguate multiple components that share "
37 "the same mesh block.");
38 params.addRequiredParam<std::vector<VariableName>>(
39 "variables", "Variables for the cross section output. These variables must be nodal.");
40 params.addDeprecatedParam<std::vector<Real>>(
41 "lengths",
42 {},
43 "Positions along axis from reference_point at which to compute average values.",
44 "Use the 'positions' parameter instead");
45 params.addParam<std::vector<Real>>(
46 "positions",
47 {},
48 "Positions along axis from reference_point at which to compute average values.");
50 "symmetry_plane",
51 RealVectorValue(0, 0, 0),
52 "Vector normal to a symmetry plane, used if the section has a symmetry plane through it. "
53 "Causes the variables to be treated as components of a vector and zeros out the compomnent "
54 "in the direction normal to symmetry_plane. Three variables must be defined in 'variables' "
55 "to use this option.");
56 params.addParam<Real>("tolerance",
57 1.0e-6,
58 "Maximum axial distance of nodes from the specified axial lengths to "
59 "consider them in the cross-section average");
60 params.addParam<bool>(
61 "require_equal_node_counts",
62 true,
63 "Whether to require the number of nodes at each axial location to be equal");
64 return params;
65}
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addDeprecatedParam(const std::string &name, const T &value, const std::string &doc_string, const std::string &deprecation_message)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _automatically_locate_positions

const bool AverageSectionValueSampler::_automatically_locate_positions
protected

Whether to automatically locate positions along section for averaging field values.

Definition at line 60 of file AverageSectionValueSampler.h.

Referenced by initialize().

◆ _block_ids

std::vector<SubdomainID> AverageSectionValueSampler::_block_ids
protected

Definition at line 42 of file AverageSectionValueSampler.h.

Referenced by automaticallyLocatePositions(), and execute().

◆ _cross_section_maximum_radius

const Real AverageSectionValueSampler::_cross_section_maximum_radius
protected

Tolerance to disambiguate cross section locations in different components within the same block.

Definition at line 70 of file AverageSectionValueSampler.h.

Referenced by axialPosition().

◆ _direction

const Point AverageSectionValueSampler::_direction
protected

Axis direction of the structural component.

Definition at line 45 of file AverageSectionValueSampler.h.

Referenced by AverageSectionValueSampler(), and axialPosition().

◆ _have_symmetry_plane

const bool AverageSectionValueSampler::_have_symmetry_plane
protected

Whether a symmetry plane has been defined by the user.

Definition at line 54 of file AverageSectionValueSampler.h.

Referenced by AverageSectionValueSampler(), and execute().

◆ _mesh

const std::shared_ptr<MooseMesh>& AverageSectionValueSampler::_mesh
protected

Reference to the mesh.

Definition at line 30 of file AverageSectionValueSampler.h.

Referenced by automaticallyLocatePositions(), AverageSectionValueSampler(), and execute().

◆ _need_mesh_initializations

bool AverageSectionValueSampler::_need_mesh_initializations
protected

Whether node locations need to be identified and nodes at positions need to be counted.

Definition at line 76 of file AverageSectionValueSampler.h.

Referenced by initialize(), and meshChanged().

◆ _number_of_nodes

std::vector<unsigned int> AverageSectionValueSampler::_number_of_nodes
protected

Number of nodes for computing output (local and global).

We allow each section to have different numbers of nodes (this would allow local, regular refinement in the mesh)

Definition at line 67 of file AverageSectionValueSampler.h.

Referenced by execute(), finalize(), and initialize().

◆ _output_vector

std::vector<VectorPostprocessorValue *> AverageSectionValueSampler::_output_vector
protected

Vector of outputs, where each entry is the vector of average values for single variable at the selected points along the axis.

Definition at line 39 of file AverageSectionValueSampler.h.

Referenced by AverageSectionValueSampler(), execute(), finalize(), and initialize().

◆ _positions

std::vector<Real> AverageSectionValueSampler::_positions
protected

Axial positions along the component at which average values are computed.

Definition at line 51 of file AverageSectionValueSampler.h.

Referenced by automaticallyLocatePositions(), AverageSectionValueSampler(), execute(), finalize(), and initialize().

◆ _reference_point

const Point AverageSectionValueSampler::_reference_point
protected

Starting or reference point of the structural component to locate nodes on the cross section.

Definition at line 48 of file AverageSectionValueSampler.h.

Referenced by axialPosition().

◆ _require_equal_node_counts

const bool AverageSectionValueSampler::_require_equal_node_counts
protected

Whether to require the number of nodes at each axial location to be equal.

Definition at line 73 of file AverageSectionValueSampler.h.

Referenced by finalize().

◆ _symmetry_plane

RealVectorValue AverageSectionValueSampler::_symmetry_plane
protected

Vector normal to a symmetry plane, optionally defined if the section has a symmetry plane.

Definition at line 57 of file AverageSectionValueSampler.h.

Referenced by AverageSectionValueSampler(), and execute().

◆ _tolerance

const Real AverageSectionValueSampler::_tolerance
protected

Tolerance to identify nodes on the user-prescribed cross section.

Definition at line 63 of file AverageSectionValueSampler.h.

Referenced by automaticallyLocatePositions(), and execute().

◆ _var_numbers

std::vector<unsigned int> AverageSectionValueSampler::_var_numbers
protected

Indices of the variables in their systems.

Definition at line 36 of file AverageSectionValueSampler.h.

Referenced by AverageSectionValueSampler(), and execute().

◆ _variables

std::vector<VariableName> AverageSectionValueSampler::_variables
protected

Variables to output.

Definition at line 33 of file AverageSectionValueSampler.h.

Referenced by AverageSectionValueSampler(), execute(), finalize(), and initialize().


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