https://mooseframework.inl.gov
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 | List of all members
HexagonalGridPositions Class Reference

Creates positions (points) following an hexagonal grid. More...

#include <HexagonalGridPositions.h>

Inheritance diagram for HexagonalGridPositions:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 HexagonalGridPositions (const InputParameters &parameters)
 
void initialize () override
 
const std::vector< Point > & getPositions (bool initial) const
 
const std::vector< std::vector< Point > > & getPositionsVector2D () const
 
const std::vector< std::vector< std::vector< Point > > > & getPositionsVector3D () const
 
const std::vector< std::vector< std::vector< std::vector< Point > > > > & getPositionsVector4D () const
 
unsigned int getNumPositions (bool initial=false) const
 
const Point & getPosition (unsigned int index, bool initial) const
 
const Point & getNearestPosition (const Point &target, bool initial) const
 
unsigned int getNearestPositionIndex (const Point &target, bool initial) const
 
Real getMinDistanceBetweenPositions () const
 
bool arePositionsCoplanar () const
 
bool initialized (bool initial) const
 
void threadJoin (const UserObject &) final
 
bool shouldStore () const override final
 
SubProblemgetSubProblem () const
 
bool shouldDuplicateInitialExecution () const
 
virtual Real spatialValue (const Point &) const
 
virtual const std::vector< Point > spatialPoints () 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)
 
void setPrimaryThreadCopy (UserObject *primary)
 
UserObjectprimaryThreadCopy ()
 
std::set< UserObjectName > getDependObjects () const
 
virtual bool needThreadedCopy () const
 
const std::set< std::string > & getRequestedItems () override
 
const std::set< std::string > & getSuppliedItems () override
 
unsigned int systemNumber () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (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
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) 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 initialSetup ()
 
virtual void customSetup (const ExecFlagType &)
 
const ExecFlagEnumgetExecuteOnEnum () const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const T & getUserObject (const std::string &param_name, bool is_dependency=true) const
 
const T & getUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBaseByName (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)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (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)
 
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
 
virtual void store (nlohmann::json &json) const
 
virtual void declareLateValues ()
 
void buildOutputHideVariableList (std::set< std::string > variable_names)
 
const std::set< OutputName > & getOutputs ()
 
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 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
 
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
 
T & getSampler (const std::string &name)
 
SamplergetSampler (const std::string &name)
 
T & getSamplerByName (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 T & getDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const T & getDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (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 sort (typename std::vector< T > &vector)
 
static void sortDFS (typename std::vector< T > &vector)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header)
 

Public Attributes

const ConsoleStream _console
 

Static Public Attributes

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

virtual void execute () override
 
virtual void finalize () override
 
virtual void meshChanged () override
 
virtual void timestepSetup () override
 
virtual void residualSetup () override
 
virtual void jacobianSetup () override
 
void clearPositions ()
 
void unrollMultiDPositions ()
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &name) const override
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &name) const override
 
virtual void addUserObjectDependencyHelper (const UserObject &uo) const override
 
void addReporterDependencyHelper (const ReporterName &reporter_name) override
 
const ReporterNamegetReporterName (const std::string &param_name) const
 
T & declareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const T & getRestartableData (const std::string &data_name) const
 
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (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)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 
T & declareUnusedValue (Args &&... args)
 
const T & getReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const T & getReporterValueByName (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)
 
T & declareValue (const std::string &param_name, Args &&... args)
 
T & declareValue (const std::string &param_name, ReporterMode mode, Args &&... args)
 
T & declareValue (const std::string &param_name, Args &&... args)
 
T & declareValue (const std::string &param_name, ReporterMode mode, Args &&... args)
 
T & declareValue (const std::string &param_name, Args &&... args)
 
T & declareValue (const std::string &param_name, ReporterMode mode, Args &&... args)
 
T & declareValue (const std::string &param_name, Args &&... args)
 
T & declareValue (const std::string &param_name, ReporterMode mode, Args &&... args)
 
T & declareValueByName (const ReporterValueName &value_name, Args &&... args)
 
T & declareValueByName (const ReporterValueName &value_name, ReporterMode mode, Args &&... args)
 
T & declareValueByName (const ReporterValueName &value_name, Args &&... args)
 
T & declareValueByName (const ReporterValueName &value_name, ReporterMode mode, Args &&... args)
 
T & declareValueByName (const ReporterValueName &value_name, Args &&... args)
 
T & declareValueByName (const ReporterValueName &value_name, ReporterMode mode, Args &&... args)
 
T & declareValueByName (const ReporterValueName &value_name, Args &&... args)
 
T & declareValueByName (const ReporterValueName &value_name, ReporterMode mode, Args &&... args)
 

Static Protected Member Functions

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

Protected Attributes

const Point _center
 Center of the lattice. More...
 
const Real _lattice_flat_to_flat
 Distance from one side to the one facing it of the lattice. More...
 
const Real _pin_pitch
 Pitch between fuel pins. More...
 
const MooseEnum _z_axis_index
 Axial component for the Z axis. More...
 
const unsigned int _nr
 Number of rings in the radial direction. More...
 
std::vector< std::vector< unsigned int > > _pattern
 2D pattern of the pins to select (if specified) More...
 
std::set< unsigned int_include_in_pattern
 List of the pattern locations to include. Include all if empty. More...
 
std::vector< std::vector< int > > _positions_pattern
 List of positions objects, the positions of which are translated in the parent hexagonal pattern. More...
 
std::map< std::string, unsigned int_positions_pattern_indexing
 Indexing of the positions objects in the pattern. More...
 
std::unique_ptr< HexagonalLatticeUtils_hex_latt
 Hexagonal lattice utility object. More...
 
const std::vector< Point > *const _initial_positions
 
std::vector< Point > & _positions
 
std::vector< std::vector< Point > > _positions_2d
 
std::vector< std::vector< std::vector< Point > > > _positions_3d
 
std::vector< std::vector< std::vector< std::vector< Point > > > > _positions_4d
 
std::unique_ptr< KDTree_initial_positions_kd_tree
 
std::unique_ptr< KDTree_positions_kd_tree
 
bool _need_broadcast
 
const bool _need_sort
 
bool _initialized
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
SystemBase_sys
 
const THREAD_ID _tid
 
Assembly_assembly
 
const Moose::CoordinateSystemType_coord_sys
 
const bool _duplicate_initial_execution
 
std::set< std::string > _depend_uo
 
const bool & _enabled
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
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 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 Parallel::Communicator & _communicator
 

Static Protected Attributes

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

Detailed Description

Creates positions (points) following an hexagonal grid.

Definition at line 19 of file HexagonalGridPositions.h.

Constructor & Destructor Documentation

◆ HexagonalGridPositions()

HexagonalGridPositions::HexagonalGridPositions ( const InputParameters parameters)

Definition at line 60 of file HexagonalGridPositions.C.

62  _center(getParam<Point>("center")),
63  _lattice_flat_to_flat(getParam<Real>("lattice_flat_to_flat")),
64  _pin_pitch(getParam<Real>("pin_pitch")),
65  _z_axis_index(MooseEnum("X Y Z", "Z")),
66  _nr(getParam<unsigned int>("nr")),
67  _pattern(getParam<std::vector<std::vector<unsigned int>>>("pattern")),
69  std::set<unsigned int>(getParam<std::vector<unsigned int>>("include_in_pattern").begin(),
70  getParam<std::vector<unsigned int>>("include_in_pattern").end())),
71  _positions_pattern(getParam<std::vector<std::vector<int>>>("positions_pattern")),
73  getParam<std::map<std::string, unsigned int>>("positions_pattern_indexing"))
74 {
75  // Check dimensions
76  if (_nr == 1)
77  {
79  paramError("lattice_flat_to_flat",
80  "For one ring, the lattice flat to flat must be at least the pin pitch");
81  }
82  else
83  {
86  paramError("lattice_flat_to_flat",
87  "Lattice flat to flat distance is less than the minimum (3 * nr - 1) * pin_pitch "
88  "/ sqrt(3) given nr rings with a pitch of pin_pitch");
89  }
90 
91  // Check pattern and include_in_pattern
92  if ((_include_in_pattern.empty() && _pattern.size()) ||
93  (_include_in_pattern.size() && _pattern.empty()))
94  paramError(
95  "include_in_pattern",
96  "The 'pattern' parameter and the 'include_in_pattern' must be both specified or both not "
97  "specified by the user.");
98  for (const auto include : _include_in_pattern)
99  {
100  bool found = false;
101  for (const auto & row : _pattern)
102  if (std::find(row.begin(), row.end(), include) != row.end())
103  found = true;
104  if (!found)
105  paramError("include_in_pattern",
106  "Pattern item '" + std::to_string(include) +
107  "' to include is not present in the pattern");
108  }
109 
110  // Check positions_pattern and positions_pattern_indexing
111  if ((_positions_pattern.empty() && !_positions_pattern_indexing.empty()) ||
112  (!_positions_pattern.empty() && _positions_pattern_indexing.empty()))
113  paramError("positions_pattern_indexing",
114  "The 'positions_pattern' parameter and the 'positions_pattern_indexing' must be "
115  "both specified or both not specified by the user.");
116  for (const auto & [pos_name, index] : _positions_pattern_indexing)
117  {
118  bool found = false;
119  for (const auto & row : _positions_pattern)
120  if (std::find(row.begin(), row.end(), index) != row.end())
121  found = true;
122  if (!found)
123  paramError("include_in_pattern",
124  "Pattern item '" + pos_name + "' with index '" + std::to_string(index) +
125  "' to include is not present in the pattern");
126  }
127 
128  // Check incompatible parameters
129  if (((_positions_pattern.size() && _positions_pattern[0].size()) ||
130  _positions_pattern_indexing.size()) &&
131  ((_pattern.size() && _pattern[0].size()) || _include_in_pattern.size()))
132  paramError("positions_pattern",
133  "'pattern'/'include_in_pattern' are not supported in combination with "
134  "'positions_pattern/positions_pattern_indexing'. Only one pattern is supported");
135 
136  // Obtain the positions by unrolling the patterns
137  initialize();
138  // Sort if needed (user-specified)
139  finalize();
140 }
const Real _pin_pitch
Pitch between fuel pins.
std::map< std::string, unsigned int > _positions_pattern_indexing
Indexing of the positions objects in the pattern.
const Real _lattice_flat_to_flat
Distance from one side to the one facing it of the lattice.
Positions(const InputParameters &parameters)
std::vector< std::vector< int > > _positions_pattern
List of positions objects, the positions of which are translated in the parent hexagonal pattern...
std::set< unsigned int > _include_in_pattern
List of the pattern locations to include. Include all if empty.
const Point _center
Center of the lattice.
const MooseEnum _z_axis_index
Axial component for the Z axis.
const T & getParam(const std::string &name) const
void paramError(const std::string &param, Args... args) const
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
virtual void finalize() override
const InputParameters & parameters() const
std::vector< std::vector< unsigned int > > _pattern
2D pattern of the pins to select (if specified)
bool absoluteFuzzyGreaterThan(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
const unsigned int _nr
Number of rings in the radial direction.

Member Function Documentation

◆ initialize()

void HexagonalGridPositions::initialize ( )
overridevirtual

Implements Positions.

Definition at line 143 of file HexagonalGridPositions.C.

Referenced by HexagonalGridPositions().

144 {
145  clearPositions();
146 
147  // We make very large pins so they cover the entire position
148  _hex_latt = std::make_unique<HexagonalLatticeUtils>(
150 
151  if (!isParamSetByUser("positions_pattern"))
152  {
153  // Unroll pattern
154  std::vector<int> pattern_unrolled;
155 
156  if (_pattern.size())
157  {
158  // Check number of pins in pattern
159  std::size_t pattern_size = 0;
160  for (const auto & row : _pattern)
161  pattern_size += row.size();
162  if (_pattern.size() != cast_int<std::size_t>(2 * _nr - 1))
163  mooseError("Number of rows in pattern (",
164  _pattern.size(),
165  ") should be equal to twice the number of hexagonal rings minus one");
166  if (pattern_size != _hex_latt->totalPins(_nr))
167  mooseError("Pattern size (",
168  pattern_size,
169  ") does not match the number of pins with ",
170  _nr,
171  " rings: ",
172  _hex_latt->totalPins(_nr));
173 
174  pattern_unrolled.resize(_hex_latt->totalPins(_nr));
175  unsigned int i = 0;
176  for (const auto r_i : make_range(_nr))
177  for (const auto a_i : make_range(_hex_latt->pins(r_i + 1)))
178  {
179  libmesh_ignore(a_i);
180  unsigned int row_i, within_row_i;
181  _hex_latt->get2DInputPatternIndex(i, row_i, within_row_i);
182  pattern_unrolled[i++] = _pattern[row_i][within_row_i];
183  }
184  }
185  // just needs to be the right size
186  else
187  pattern_unrolled.resize(_hex_latt->totalPins(_nr), 0);
188 
189  // Count the number of positions we do not need to include
190  unsigned int n_exclusions = 0;
191  if (_include_in_pattern.size())
192  for (const auto patt : pattern_unrolled)
193  if (_include_in_pattern.count(patt) == 0)
194  n_exclusions++;
195 
196  // Size array, remove the '-1' / not included positions
197  const auto n_positions = cast_int<std::size_t>(_hex_latt->totalPins(_nr) - n_exclusions);
198  _positions.resize(n_positions);
199 
200  // Fill the positions by retrieving the pin centers at indices included in the pattern (if
201  // specified)
202  unsigned int pos_i = 0;
203  for (const auto patt_i : index_range(pattern_unrolled))
204  if (!_pattern.size() || !_include_in_pattern.size() ||
205  _include_in_pattern.count(pattern_unrolled[patt_i]))
206  _positions[pos_i++] = _hex_latt->pinCenters()[patt_i];
207  }
208  else
209  {
210  // Unroll pattern into positions array
211  const bool initial = _fe_problem.getCurrentExecuteOnFlag() == EXEC_INITIAL;
212 
213  // Check number of positions in pattern of nested positions
214  unsigned pattern_size = 0;
215  for (const auto & row : _positions_pattern)
216  pattern_size += row.size();
217  if (_positions_pattern.size() != cast_int<std::size_t>(2 * _nr - 1))
218  mooseError("Number of rows in 'positions_pattern' (",
219  _pattern.size(),
220  ") should be equal to twice the number of hexagonal rings minus one");
221  if (pattern_size != _hex_latt->totalPins(_nr))
222  mooseError("Pattern size ",
223  pattern_size,
224  " does not match the number of pins with ",
225  _nr,
226  " rings: ",
227  _hex_latt->totalPins(_nr));
228 
229  // Check that all the positions names are valid
230  unsigned num_pos = 0;
231  for (const auto & [pos_name, index] : _positions_pattern_indexing)
232  if (_fe_problem.hasUserObject(pos_name))
233  num_pos += _fe_problem.getPositionsObject(pos_name).getNumPositions(initial);
234  _positions.reserve(num_pos);
235 
236  // Invert map from positions to indices
237  std::map<unsigned int, PositionsName> index_to_pos;
238  for (const auto & [pos_name, index] : _positions_pattern_indexing)
239  index_to_pos[index] = pos_name;
240 
241  // Unroll pattern : the positions vector is 1D and should be
242  std::vector<PositionsName> pattern_unrolled;
243  pattern_unrolled.resize(_hex_latt->totalPins(_nr));
244  unsigned int i = 0;
245  for (const auto r_i : make_range(_nr))
246  for (const auto a_i : make_range(_hex_latt->pins(r_i + 1)))
247  {
248  libmesh_ignore(a_i);
249  unsigned int row_i, within_row_i;
250  _hex_latt->get2DInputPatternIndex(i, row_i, within_row_i);
251  const auto pos_index = _positions_pattern[row_i][within_row_i];
252  if (auto it = index_to_pos.find(cast_int<unsigned int>(pos_index));
253  it != index_to_pos.end())
254  pattern_unrolled[i++] = it->second;
255  else if (pos_index != -1)
256  paramError("positions_pattern",
257  "Index '" + std::to_string(pos_index) +
258  "' in pattern is not found in 'positions_pattern_indexing'");
259  else
260  pattern_unrolled[i++] = "-1";
261  }
262 
263  // Now place the positions in the _positions array with the offset from the parent lattice index
264  for (const auto patt_i : index_range(pattern_unrolled))
265  {
266  const auto & pos_name = pattern_unrolled[patt_i];
267  if (pos_name != "-1")
268  for (const auto & pos : _fe_problem.getPositionsObject(pos_name).getPositions(initial))
269  _positions.push_back(_hex_latt->pinCenters()[patt_i] + pos);
270  }
271  }
272 
273  _initialized = true;
274 }
const Real _pin_pitch
Pitch between fuel pins.
std::map< std::string, unsigned int > _positions_pattern_indexing
Indexing of the positions objects in the pattern.
const ExecFlagType & getCurrentExecuteOnFlag() const
void clearPositions()
const Real _lattice_flat_to_flat
Distance from one side to the one facing it of the lattice.
if(subdm)
bool hasUserObject(const std::string &name) const
const Positions & getPositionsObject(const std::string &name) const
std::vector< std::vector< int > > _positions_pattern
List of positions objects, the positions of which are translated in the parent hexagonal pattern...
std::set< unsigned int > _include_in_pattern
List of the pattern locations to include. Include all if empty.
bool _initialized
void libmesh_ignore(const Args &...)
const MooseEnum _z_axis_index
Axial component for the Z axis.
std::unique_ptr< HexagonalLatticeUtils > _hex_latt
Hexagonal lattice utility object.
std::vector< Point > & _positions
unsigned int getNumPositions(bool initial=false) const
void paramError(const std::string &param, Args... args) const
const std::vector< Point > & getPositions(bool initial) const
bool isParamSetByUser(const std::string &nm) const
FEProblemBase & _fe_problem
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
std::vector< std::vector< unsigned int > > _pattern
2D pattern of the pins to select (if specified)
auto index_range(const T &sizable)
const ExecFlagType EXEC_INITIAL
const unsigned int _nr
Number of rings in the radial direction.

◆ validParams()

InputParameters HexagonalGridPositions::validParams ( )
static

Definition at line 16 of file HexagonalGridPositions.C.

17 {
19  params.addClassDescription(
20  "Create positions along a hexagonal grid. Numbering of positions increases first "
21  "counterclockwise, then expanding outwards from the inner ring. "
22  "Inner-numbering is within a radial ring.");
23 
24  params.addRequiredParam<Point>("center", "Center of the hexagonal grid");
26  "lattice_flat_to_flat",
27  "lattice_flat_to_flat>0",
28  "Distance between two (inner) opposite sides of a lattice. Also known as bundle pitch or "
29  "inner flat-to-flat distance");
30  params.addRequiredRangeCheckedParam<Real>("pin_pitch", "pin_pitch>0", "Distance between pins");
31  params.addRequiredRangeCheckedParam<unsigned int>("nr", "nr>0", "Number of hexagonal rings");
32  params.addRangeCheckedParam<std::vector<std::vector<unsigned int>>>(
33  "pattern",
34  {},
35  "pattern>=0",
36  "A double-indexed hexagonal-shaped array starting with the upper-left corner. '-1's are not "
37  "selected as positions.");
38  params.addParam<std::vector<unsigned int>>(
39  "include_in_pattern", {}, "A vector of the numbers in the pattern to include");
40  params.addParam<std::vector<std::vector<int>>>(
41  "positions_pattern",
42  {},
43  "A double-indexed hexagonal-shaped array with the index of other Positions objects starting "
44  "with the upper-left corner. These positions objects will be distributed within the "
45  "hexagonal grid. The indexing is given in 'positions_pattern_indexing'. Use '-1' to discard "
46  "a position in the lattice.");
47  params.addParam<std::map<std::string, unsigned int>>(
48  "positions_pattern_indexing",
49  {},
50  "A map from the name of positions objects to their index in the 'positions_pattern'");
51 
52  // Use user-provided ordering
53  params.set<bool>("auto_sort") = false;
54  // All functors defined on all processes for now
55  params.set<bool>("auto_broadcast") = false;
56 
57  return params;
58 }
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void addRequiredParam(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)

Member Data Documentation

◆ _center

const Point HexagonalGridPositions::_center
protected

Center of the lattice.

Definition at line 30 of file HexagonalGridPositions.h.

◆ _hex_latt

std::unique_ptr<HexagonalLatticeUtils> HexagonalGridPositions::_hex_latt
protected

Hexagonal lattice utility object.

Definition at line 57 of file HexagonalGridPositions.h.

Referenced by initialize().

◆ _include_in_pattern

std::set<unsigned int> HexagonalGridPositions::_include_in_pattern
protected

List of the pattern locations to include. Include all if empty.

Definition at line 48 of file HexagonalGridPositions.h.

Referenced by HexagonalGridPositions(), and initialize().

◆ _lattice_flat_to_flat

const Real HexagonalGridPositions::_lattice_flat_to_flat
protected

Distance from one side to the one facing it of the lattice.

Definition at line 34 of file HexagonalGridPositions.h.

Referenced by HexagonalGridPositions(), and initialize().

◆ _nr

const unsigned int HexagonalGridPositions::_nr
protected

Number of rings in the radial direction.

Definition at line 42 of file HexagonalGridPositions.h.

Referenced by HexagonalGridPositions(), and initialize().

◆ _pattern

std::vector<std::vector<unsigned int> > HexagonalGridPositions::_pattern
protected

2D pattern of the pins to select (if specified)

Definition at line 45 of file HexagonalGridPositions.h.

Referenced by HexagonalGridPositions(), and initialize().

◆ _pin_pitch

const Real HexagonalGridPositions::_pin_pitch
protected

Pitch between fuel pins.

Definition at line 36 of file HexagonalGridPositions.h.

Referenced by HexagonalGridPositions(), and initialize().

◆ _positions_pattern

std::vector<std::vector<int> > HexagonalGridPositions::_positions_pattern
protected

List of positions objects, the positions of which are translated in the parent hexagonal pattern.

Definition at line 51 of file HexagonalGridPositions.h.

Referenced by HexagonalGridPositions(), and initialize().

◆ _positions_pattern_indexing

std::map<std::string, unsigned int> HexagonalGridPositions::_positions_pattern_indexing
protected

Indexing of the positions objects in the pattern.

Definition at line 54 of file HexagonalGridPositions.h.

Referenced by HexagonalGridPositions(), and initialize().

◆ _z_axis_index

const MooseEnum HexagonalGridPositions::_z_axis_index
protected

Axial component for the Z axis.

Definition at line 39 of file HexagonalGridPositions.h.

Referenced by initialize().


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