www.mooseframework.org
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
EBSDMesh Class Reference

Mesh generated from parameters. More...

#include <EBSDMesh.h>

Inheritance diagram for EBSDMesh:
[legend]

Classes

struct  EBSDMeshGeometry
 

Public Types

enum  ParallelType { ParallelType::DEFAULT, ParallelType::REPLICATED, ParallelType::DISTRIBUTED }
 
typedef std::pair< const Node *, BoundaryIDPeriodicNodeInfo
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 EBSDMesh (const InputParameters &parameters)
 
virtual ~EBSDMesh ()
 
virtual void buildMesh ()
 
const EBSDMeshGenerator::GeometrygetEBSDGeometry () const
 
const std::string & getEBSDFilename () const
 
virtual std::unique_ptr< MooseMeshsafeClone () const override
 
virtual Real getMinInDimension (unsigned int component) const override
 
virtual Real getMaxInDimension (unsigned int component) const override
 
virtual void prepared (bool state) override
 
bool prepared () const
 
virtual MooseMeshclone () const
 
void determineUseDistributedMesh ()
 
std::unique_ptr< MeshBase > buildMeshBaseObject (unsigned int dim=libMesh::invalid_uint)
 
std::unique_ptr< T > buildTypedMesh (unsigned int dim=libMesh::invalid_uint)
 
void setMeshBase (std::unique_ptr< MeshBase > mesh_base)
 
virtual void init ()
 
virtual unsigned int dimension () const
 
virtual unsigned int effectiveSpatialDimension () const
 
unsigned int getBlocksMaxDimension (const std::vector< SubdomainName > &blocks) const
 
std::vector< BoundaryIDgetBoundaryIDs (const Elem *const elem, const unsigned short int side) const
 
const std::set< BoundaryID > & getBoundaryIDs () const
 
std::vector< BoundaryIDgetBoundaryIDs (const std::vector< BoundaryName > &boundary_name, bool generate_unknown=false) const
 
const Elem * getLowerDElem (const Elem *, unsigned short int) const
 
unsigned int getHigherDSide (const Elem *elem) const
 
void buildNodeList ()
 
void buildBndElemList ()
 
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToElemMap ()
 
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToActiveSemilocalElemMap ()
 
virtual bnd_node_iterator bndNodesBegin ()
 
virtual bnd_node_iterator bndNodesEnd ()
 
virtual bnd_elem_iterator bndElemsBegin ()
 
virtual bnd_elem_iterator bndElemsEnd ()
 
void buildNodeListFromSideList ()
 
void buildSideList (std::vector< dof_id_type > &el, std::vector< unsigned short int > &sl, std::vector< boundary_id_type > &il)
 
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildSideList ()
 
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildActiveSideList () const
 
unsigned int sideWithBoundaryID (const Elem *const elem, const BoundaryID boundary_id) const
 
MeshBase::node_iterator localNodesBegin ()
 
MeshBase::const_node_iterator localNodesBegin () const
 
MeshBase::node_iterator localNodesEnd ()
 
MeshBase::const_node_iterator localNodesEnd () const
 
MeshBase::element_iterator activeLocalElementsBegin ()
 
MeshBase::const_element_iterator activeLocalElementsBegin () const
 
const MeshBase::element_iterator activeLocalElementsEnd ()
 
const MeshBase::const_element_iterator activeLocalElementsEnd () const
 
virtual dof_id_type nNodes () const
 
virtual dof_id_type nElem () const
 
virtual dof_id_type maxNodeId () const
 
virtual dof_id_type maxElemId () const
 
virtual const Node & node (const dof_id_type i) const
 
virtual Node & node (const dof_id_type i)
 
virtual const Node & nodeRef (const dof_id_type i) const
 
virtual Node & nodeRef (const dof_id_type i)
 
virtual const Node * nodePtr (const dof_id_type i) const
 
virtual Node * nodePtr (const dof_id_type i)
 
virtual const Node * queryNodePtr (const dof_id_type i) const
 
virtual Node * queryNodePtr (const dof_id_type i)
 
virtual Elem * elem (const dof_id_type i)
 
virtual const Elem * elem (const dof_id_type i) const
 
virtual Elem * elemPtr (const dof_id_type i)
 
virtual const Elem * elemPtr (const dof_id_type i) const
 
virtual Elem * queryElemPtr (const dof_id_type i)
 
virtual const Elem * queryElemPtr (const dof_id_type i) const
 
void needsPrepareForUse ()
 
void meshChanged ()
 
virtual void onMeshChanged ()
 
void cacheChangedLists ()
 
ConstElemPointerRangerefinedElementRange () const
 
ConstElemPointerRangecoarsenedElementRange () const
 
const std::vector< const Elem *> & coarsenedElementChildren (const Elem *elem) const
 
void updateActiveSemiLocalNodeRange (std::set< dof_id_type > &ghosted_elems)
 
bool isSemiLocal (Node *const node) const
 
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToElems () const
 
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToActiveSemiLocalElemIds () const
 
std::unordered_set< dof_id_typegetBoundaryActiveSemiLocalElemIds (BoundaryID bid) const
 
std::unordered_set< dof_id_typegetBoundaryActiveNeighborElemIds (BoundaryID bid) const
 
bool isBoundaryFullyExternalToSubdomains (BoundaryID bid, const std::set< SubdomainID > &blk_group) const
 
const std::set< SubdomainID > & meshSubdomains () const
 
const std::set< BoundaryID > & meshBoundaryIds () const
 
const std::set< BoundaryID > & meshSidesetIds () const
 
const std::set< BoundaryID > & meshNodesetIds () const
 
void setBoundaryToNormalMap (std::unique_ptr< std::map< BoundaryID, RealVectorValue >> boundary_map)
 
void setBoundaryToNormalMap (std::map< BoundaryID, RealVectorValue > *boundary_map)
 
void setMeshBoundaryIDs (std::set< BoundaryID > boundary_IDs)
 
const RealVectorValuegetNormalByBoundaryID (BoundaryID id) const
 
bool prepare (const MeshBase *mesh_to_clone)
 
void update ()
 
unsigned int uniformRefineLevel () const
 
void setUniformRefineLevel (unsigned int, bool deletion=true)
 
bool skipDeletionRepartitionAfterRefine () const
 
bool skipRefineWhenUseSplit () const
 
void addGhostedBoundary (BoundaryID boundary_id)
 
void setGhostedBoundaryInflation (const std::vector< Real > &inflation)
 
const std::set< unsigned int > & getGhostedBoundaries () const
 
const std::vector< Real > & getGhostedBoundaryInflation () const
 
void ghostGhostedBoundaries ()
 
void needGhostGhostedBoundaries (bool needghost)
 
unsigned int getPatchSize () const
 
unsigned int getGhostingPatchSize () const
 
unsigned int getMaxLeafSize () const
 
void setPatchUpdateStrategy (Moose::PatchUpdateType patch_update_strategy)
 
const Moose::PatchUpdateTypegetPatchUpdateStrategy () const
 
BoundingBox getInflatedProcessorBoundingBox (Real inflation_multiplier=0.01) const
 
 operator libMesh::MeshBase & ()
 
 operator const libMesh::MeshBase & () const
 
MeshBase & getMesh ()
 
MeshBase & getMesh (const std::string &name)
 
const MeshBase & getMesh () const
 
const MeshBase & getMesh (const std::string &name) const
 
const MeshBase * getMeshPtr () const
 
void printInfo (std::ostream &os=libMesh::out, const unsigned int verbosity=0) const
 
const std::set< SubdomainID > & getNodeBlockIds (const Node &node) const
 
const std::vector< dof_id_type > & getNodeList (boundary_id_type nodeset_id) const
 
const Node * addUniqueNode (const Point &p, Real tol=1e-6)
 
Node * addQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp, BoundaryID bid, const Point &point)
 
Node * getQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp)
 
void clearQuadratureNodes ()
 
BoundaryID getBoundaryID (const BoundaryName &boundary_name) const
 
SubdomainID getSubdomainID (const SubdomainName &subdomain_name) const
 
std::vector< SubdomainIDgetSubdomainIDs (const std::vector< SubdomainName > &subdomain_name) const
 
void setSubdomainName (SubdomainID subdomain_id, const SubdomainName &name)
 
const std::string & getSubdomainName (SubdomainID subdomain_id) const
 
std::vector< SubdomainName > getSubdomainNames (const std::vector< SubdomainID > &subdomain_ids) const
 
void setBoundaryName (BoundaryID boundary_id, BoundaryName name)
 
const std::string & getBoundaryName (BoundaryID boundary_id)
 
void buildPeriodicNodeMap (std::multimap< dof_id_type, dof_id_type > &periodic_node_map, unsigned int var_number, PeriodicBoundaries *pbs) const
 
void buildPeriodicNodeSets (std::map< BoundaryID, std::set< dof_id_type >> &periodic_node_sets, unsigned int var_number, PeriodicBoundaries *pbs) const
 
Real dimensionWidth (unsigned int component) const
 
bool detectOrthogonalDimRanges (Real tol=1e-6)
 
void addPeriodicVariable (unsigned int var_num, BoundaryID primary, BoundaryID secondary)
 
bool isTranslatedPeriodic (unsigned int nonlinear_var_num, unsigned int component) const
 
RealVectorValue minPeriodicVector (unsigned int nonlinear_var_num, Point p, Point q) const
 
Real minPeriodicDistance (unsigned int nonlinear_var_num, Point p, Point q) const
 
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping (unsigned int component)
 
void buildRefinementAndCoarseningMaps (Assembly *assembly)
 
const std::vector< std::vector< QpMap > > & getRefinementMap (const Elem &elem, int parent_side, int child, int child_side)
 
const std::vector< std::pair< unsigned int, QpMap > > & getCoarseningMap (const Elem &elem, int input_side)
 
void changeBoundaryId (const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
 
const std::set< BoundaryID > & getSubdomainBoundaryIds (const SubdomainID subdomain_id) const
 
std::set< BoundaryIDgetSubdomainInterfaceBoundaryIds (const SubdomainID subdomain_id) const
 
std::set< SubdomainIDgetBoundaryConnectedBlocks (const BoundaryID bid) const
 
std::set< SubdomainIDgetBoundaryConnectedSecondaryBlocks (const BoundaryID bid) const
 
std::set< SubdomainIDgetInterfaceConnectedBlocks (const BoundaryID bid) const
 
const std::set< SubdomainID > & getBlockConnectedBlocks (const SubdomainID subdomain_id) const
 
bool isBoundaryNode (dof_id_type node_id) const
 
bool isBoundaryNode (dof_id_type node_id, BoundaryID bnd_id) const
 
bool isBoundaryElem (dof_id_type elem_id) const
 
bool isBoundaryElem (dof_id_type elem_id, BoundaryID bnd_id) const
 
void errorIfDistributedMesh (std::string name) const
 
bool isDistributedMesh () const
 
bool isParallelTypeForced () const
 
void setParallelType (ParallelType parallel_type)
 
void setParallelType (ParallelType parallel_type)
 
const MooseEnumpartitionerName () const
 
bool isPartitionerForced () const
 
void allowRecovery (bool allow)
 
void setCustomPartitioner (Partitioner *partitioner)
 
bool isRegularOrthogonal ()
 
bool hasSecondOrderElements ()
 
virtual std::unique_ptr< PointLocatorBase > getPointLocator () const
 
virtual std::string getFileName () const
 
void needsRemoteElemDeletion (bool need_delete)
 
bool needsRemoteElemDeletion () const
 
void allowRemoteElementRemoval (bool allow_removal)
 
bool allowRemoteElementRemoval () const
 
void deleteRemoteElements ()
 
bool hasMeshBase () const
 
bool hasElementID (const std::string &id_name) const
 
unsigned int getElementIDIndex (const std::string &id_name) const
 
dof_id_type maxElementID (unsigned int elem_id_index) const
 
dof_id_type minElementID (unsigned int elem_id_index) const
 
bool areElemIDsIdentical (const std::string &id_name1, const std::string &id_name2) const
 
std::set< dof_id_typegetAllElemIDs (unsigned int elem_id_index) const
 
std::set< dof_id_typegetElemIDsOnBlocks (unsigned int elem_id_index, const std::set< SubdomainID > &blks) const
 
std::unordered_map< dof_id_type, std::set< dof_id_type > > getElemIDMapping (const std::string &from_id_name, const std::string &to_id_name) const
 
void cacheFaceInfoVariableOwnership () const
 
void cacheFVElementalDoFs () const
 
void computeFiniteVolumeCoords () const
 
void isDisplaced (bool is_displaced)
 
bool isDisplaced () const
 
const std::map< boundary_id_type, std::vector< dof_id_type > > & nodeSetNodes () const
 
Moose::CoordinateSystemType getCoordSystem (SubdomainID sid) const
 
const std::map< SubdomainID, Moose::CoordinateSystemType > & getCoordSystem () const
 
Moose::CoordinateSystemType getUniqueCoordSystem () const
 
void setCoordSystem (const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
 
void setAxisymmetricCoordAxis (const MooseEnum &rz_coord_axis)
 
void setGeneralAxisymmetricCoordAxes (const std::vector< SubdomainName > &blocks, const std::vector< std::pair< Point, RealVectorValue >> &axes)
 
const std::pair< Point, RealVectorValue > & getGeneralAxisymmetricCoordAxis (SubdomainID subdomain_id) const
 
bool usingGeneralAxisymmetricCoordAxes () const
 
unsigned int getAxisymmetricRadialCoord () const
 
void checkCoordinateSystems ()
 
void setCoordData (const MooseMesh &other_mesh)
 
void markFiniteVolumeInfoDirty ()
 
bool isFiniteVolumeInfoDirty () const
 
MooseAppCoordTransformcoordTransform ()
 
const MooseUnitslengthUnit () const
 
const std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem *> & getLowerDElemMap () const
 
bool isSplit () const
 
void buildFiniteVolumeInfo () const
 
void setupFiniteVolumeMeshData () const
 
void doingPRefinement (bool doing_p_refinement)
 
bool doingPRefinement () const
 
const std::vector< QpMap > & getPRefinementMap (const Elem &elem) const
 
const std::vector< QpMap > & getPRefinementSideMap (const Elem &elem) const
 
const std::vector< QpMap > & getPCoarseningMap (const Elem &elem) const
 
const std::vector< QpMap > & getPCoarseningSideMap (const Elem &elem) const
 
void buildPRefinementAndCoarseningMaps (Assembly *assembly)
 
bool isLowerD (const SubdomainID subdomain_id) const
 
bool hasLowerD () 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 & 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 &name, const std::string *param=nullptr) const
 
PerfGraphperfGraph ()
 
ConstElemRangegetActiveLocalElementRange ()
 
ConstElemRangegetActiveLocalElementRange ()
 
NodeRangegetActiveNodeRange ()
 
NodeRangegetActiveNodeRange ()
 
SemiLocalNodeRangegetActiveSemiLocalNodeRange () const
 
SemiLocalNodeRangegetActiveSemiLocalNodeRange () const
 
ConstNodeRangegetLocalNodeRange ()
 
ConstNodeRangegetLocalNodeRange ()
 
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode *> * getBoundaryNodeRange ()
 
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode *> * getBoundaryNodeRange ()
 
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement *> * getBoundaryElementRange ()
 
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement *> * getBoundaryElementRange ()
 
bool isCustomPartitionerRequested () const
 
bool isCustomPartitionerRequested () const
 
void setIsCustomPartitionerRequested (bool cpr)
 
void setIsCustomPartitionerRequested (bool cpr)
 
unsigned int nFace () const
 
unsigned int nFace () const
 
const std::vector< const FaceInfo *> & faceInfo () const
 
const FaceInfofaceInfo (const Elem *elem, unsigned int side) const
 
const std::vector< const FaceInfo *> & faceInfo () const
 
const FaceInfofaceInfo (const Elem *elem, unsigned int side) const
 
face_info_iterator ownedFaceInfoBegin ()
 
face_info_iterator ownedFaceInfoBegin ()
 
face_info_iterator ownedFaceInfoEnd ()
 
face_info_iterator ownedFaceInfoEnd ()
 
elem_info_iterator ownedElemInfoBegin ()
 
elem_info_iterator ownedElemInfoBegin ()
 
elem_info_iterator ownedElemInfoEnd ()
 
elem_info_iterator ownedElemInfoEnd ()
 
const ElemInfoelemInfo (const dof_id_type id) const
 
const ElemInfoelemInfo (const dof_id_type id) const
 
const std::vector< const ElemInfo *> & elemInfoVector () const
 
const std::vector< const ElemInfo *> & elemInfoVector () const
 
const std::vector< FaceInfo > & allFaceInfo () const
 
const std::vector< FaceInfo > & allFaceInfo () 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 setSubdomainName (MeshBase &mesh, SubdomainID subdomain_id, const SubdomainName &name)
 
static void changeBoundaryId (MeshBase &mesh, const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
 
static MooseEnum partitioning ()
 
static MooseEnum elemTypes ()
 
static void setPartitioner (MeshBase &mesh_base, MooseEnum &partitioner, bool use_distributed_mesh, const InputParameters &params, MooseObject &context_obj)
 

Public Attributes

const ConsoleStream _console
 

Protected Types

typedef std::vector< BndNode *>::iterator bnd_node_iterator_imp
 
typedef std::vector< BndNode *>::const_iterator const_bnd_node_iterator_imp
 
typedef std::vector< BndElement *>::iterator bnd_elem_iterator_imp
 
typedef std::vector< BndElement *>::const_iterator const_bnd_elem_iterator_imp
 

Protected Member Functions

void readEBSDHeader ()
 Read the EBSD data file header. More...
 
void cacheInfo ()
 
void freeBndNodes ()
 
void freeBndElems ()
 
void setPartitionerHelper (MeshBase *mesh=nullptr)
 
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
 
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
 

Protected Attributes

std::string _filename
 Name of the file containing the EBSD data. More...
 
EBSDMeshGenerator::Geometry _geometry
 EBSD data file mesh information. More...
 
 X
 
 Y
 
 Z
 
 MIN
 
 MAX
 
MooseEnum _dim
 
unsigned int _nx
 
unsigned int _ny
 
unsigned int _nz
 
Real _xmin
 
Real _xmax
 
Real _ymin
 
Real _ymax
 
Real _zmin
 
Real _zmax
 
bool _gauss_lobatto_grid
 
Real _bias_x
 
Real _bias_y
 
Real _bias_z
 
bool _dims_may_have_changed
 
std::vector< std::unique_ptr< GhostingFunctor > > _ghosting_functors
 
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
 
bool _built_from_other_mesh
 
ParallelType _parallel_type
 
bool _use_distributed_mesh
 
bool _distribution_overridden
 
bool _parallel_type_overridden
 
std::unique_ptr< libMesh::MeshBase_mesh
 
MooseEnum _partitioner_name
 
bool _partitioner_overridden
 
std::unique_ptr< Partitioner > _custom_partitioner
 
bool _custom_partitioner_requested
 
unsigned int _uniform_refine_level
 
bool _skip_refine_when_use_split
 
bool _skip_deletion_repartition_after_refine
 
bool _is_changed
 
bool _is_nemesis
 
bool _moose_mesh_prepared
 
std::unique_ptr< ConstElemPointerRange_refined_elements
 
std::unique_ptr< ConstElemPointerRange_coarsened_elements
 
std::map< const Elem *, std::vector< const Elem *> > _coarsened_element_children
 
std::set< Node *> _semilocal_node_list
 
std::unique_ptr< ConstElemRange_active_local_elem_range
 
std::unique_ptr< SemiLocalNodeRange_active_semilocal_node_range
 
std::unique_ptr< NodeRange_active_node_range
 
std::unique_ptr< ConstNodeRange_local_node_range
 
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode *> > _bnd_node_range
 
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement *> > _bnd_elem_range
 
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
 
bool _node_to_elem_map_built
 
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_active_semilocal_elem_map
 
bool _node_to_active_semilocal_elem_map_built
 
std::set< SubdomainID_mesh_subdomains
 
std::unique_ptr< std::map< BoundaryID, RealVectorValue > > _boundary_to_normal_map
 
std::vector< BndNode *> _bnd_nodes
 
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
 
std::vector< BndElement *> _bnd_elems
 
std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > _bnd_elem_ids
 
std::map< dof_id_type, Node *> _quadrature_nodes
 
std::map< dof_id_type, std::map< unsigned int, std::map< dof_id_type, Node *> > > _elem_to_side_to_qp_to_quadrature_nodes
 
std::vector< BndNode_extra_bnd_nodes
 
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
 
std::map< boundary_id_type, std::vector< dof_id_type > > _node_set_nodes
 
std::set< unsigned int_ghosted_boundaries
 
std::vector< Real_ghosted_boundaries_inflation
 
unsigned int _patch_size
 
unsigned int _ghosting_patch_size
 
unsigned int _max_leaf_size
 
Moose::PatchUpdateType _patch_update_strategy
 
std::vector< Node *> _node_map
 
bool _regular_orthogonal_mesh
 
std::vector< std::vector< Real > > _bounds
 
std::vector< std::pair< BoundaryID, BoundaryID > > _paired_boundary
 
const bool _is_split
 
const bool & _enabled
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
std::set< BoundaryID_mesh_boundary_ids
 
std::set< BoundaryID_mesh_sideset_ids
 
std::set< BoundaryID_mesh_nodeset_ids
 
const Parallel::Communicator & _communicator
 

Detailed Description

Mesh generated from parameters.

Definition at line 20 of file EBSDMesh.h.

Constructor & Destructor Documentation

◆ EBSDMesh()

EBSDMesh::EBSDMesh ( const InputParameters parameters)

Definition at line 42 of file EBSDMesh.C.

43  : GeneratedMesh(parameters), _filename(getParam<FileName>("filename"))
44 {
46  "EBSDMesh is deprecated, please use the EBSDMeshGenerator instead. For example:\n\n[Mesh]\n "
47  "type = EBDSMesh\n filename = my_ebsd_data.dat\n[]\n\nbecomes\n\n[Mesh]\n [ebsd_mesh]\n "
48  "type = EBDSMeshGenerator\n filename = my_ebsd_data.dat\n []\n[]");
49 
50  if (_nx != 1 || _ny != 1 || _nz != 1)
51  mooseWarning("Do not specify mesh geometry information, it is read from the EBSD file.");
52 }
void mooseDeprecated(Args &&... args) const
void mooseWarning(Args &&... args) const
unsigned int _ny
GeneratedMesh(const InputParameters &parameters)
unsigned int _nz
std::string _filename
Name of the file containing the EBSD data.
Definition: EBSDMesh.h:51
const InputParameters & parameters() const
unsigned int _nx

◆ ~EBSDMesh()

EBSDMesh::~EBSDMesh ( )
virtual

Definition at line 54 of file EBSDMesh.C.

54 {}

Member Function Documentation

◆ buildMesh()

void EBSDMesh::buildMesh ( )
virtual

Reimplemented from GeneratedMesh.

Definition at line 137 of file EBSDMesh.C.

138 {
139  readEBSDHeader();
140 
141  unsigned int uniform_refine = getParam<unsigned int>("uniform_refine");
142  _dim = (_geometry.dim == 1 ? "1" : (_geometry.dim == 2 ? "2" : "3"));
143 
144  std::array<unsigned int, 3> nr;
145  nr[0] = _geometry.n[0];
146  nr[1] = _geometry.n[1];
147  nr[2] = _geometry.n[2];
148 
149  // set min/max box length
150  _xmin = _geometry.min[0];
151  _xmax = nr[0] * _geometry.d[0] + _geometry.min[0];
152  _ymin = _geometry.min[1];
153  _ymax = nr[1] * _geometry.d[1] + _geometry.min[1];
154  _zmin = _geometry.min[2];
155  _zmax = nr[2] * _geometry.d[2] + _geometry.min[2];
156 
157  // check if the requested uniform refine level is possible and determine initial grid size
158  for (unsigned int i = 0; i < uniform_refine; ++i)
159  for (unsigned int j = 0; j < _geometry.dim; ++j)
160  {
161  if (nr[j] % 2 != 0)
162  mooseError("EBSDMesh error. Requested uniform_refine levels not possible.");
163  nr[j] /= 2;
164  }
165 
166  _nx = nr[0];
167  _ny = nr[1];
168  _nz = nr[2];
169 
171 }
MooseEnum _dim
void readEBSDHeader()
Read the EBSD data file header.
Definition: EBSDMesh.C:57
virtual void buildMesh() override
std::array< Real, 3 > min
unsigned int _ny
EBSDMeshGenerator::Geometry _geometry
EBSD data file mesh information.
Definition: EBSDMesh.h:54
std::array< Real, 3 > d
unsigned int _nz
void mooseError(Args &&... args) const
unsigned int _nx
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
std::array< unsigned int, 3 > n

◆ getEBSDFilename()

const std::string& EBSDMesh::getEBSDFilename ( ) const
inline

Definition at line 44 of file EBSDMesh.h.

44 { return _filename; }
std::string _filename
Name of the file containing the EBSD data.
Definition: EBSDMesh.h:51

◆ getEBSDGeometry()

const EBSDMeshGenerator::Geometry& EBSDMesh::getEBSDGeometry ( ) const
inline

Definition at line 43 of file EBSDMesh.h.

43 { return _geometry; }
EBSDMeshGenerator::Geometry _geometry
EBSD data file mesh information.
Definition: EBSDMesh.h:54

◆ readEBSDHeader()

void EBSDMesh::readEBSDHeader ( )
protected

Read the EBSD data file header.

Definition at line 57 of file EBSDMesh.C.

Referenced by buildMesh().

58 {
59  std::ifstream stream_in(_filename.c_str());
60 
61  if (!stream_in)
62  paramError("filename", "Can't open EBSD file: ", _filename);
63 
64  // Labels to look for in the header
65  std::vector<std::string> labels = {
66  "x_step", "x_dim", "y_step", "y_dim", "z_step", "z_dim", "x_min", "y_min", "z_min"};
67 
68  // Dimension variables to store once they are found in the header
69  // X_step, X_Dim, Y_step, Y_Dim, Z_step, Z_Dim
70  // We use Reals even though the Dim values should all be integers...
71  std::vector<Real> label_vals(labels.size(), 0.0);
72 
73  std::string line;
74  while (std::getline(stream_in, line))
75  {
76  // We need to process the comment lines that have:
77  // X_step, X_Dim
78  // Y_step, Y_Dim
79  // Z_step, Z_Dim
80  // in them. The labels are case insensitive.
81  if (line.find("#") == 0)
82  {
83  // Process lines that start with a comment character (comments and meta data)
84  std::transform(line.begin(), line.end(), line.begin(), ::tolower);
85 
86  for (unsigned i = 0; i < labels.size(); ++i)
87  if (line.find(labels[i]) != std::string::npos)
88  {
89  std::string dummy;
90  std::istringstream iss(line);
91  iss >> dummy >> dummy >> label_vals[i];
92 
93  // One label per line, break out of for loop over labels
94  break;
95  }
96  }
97  else
98  // first non comment line marks the end of the header
99  break;
100  }
101 
102  // Copy stuff out of the label_vars array into class variables
103  _geometry.d[0] = label_vals[0];
104  _geometry.n[0] = label_vals[1];
105  _geometry.min[0] = label_vals[6];
106 
107  _geometry.d[1] = label_vals[2];
108  _geometry.n[1] = label_vals[3];
109  _geometry.min[1] = label_vals[7];
110 
111  _geometry.d[2] = label_vals[4];
112  _geometry.n[2] = label_vals[5];
113  _geometry.min[2] = label_vals[8];
114 
115  unsigned int dim;
116 
117  // determine mesh dimension
118  for (dim = 3; dim > 0 && _geometry.n[dim - 1] == 0; --dim)
119  ;
120 
121  // check if the data has nonzero stepsizes
122  for (unsigned i = 0; i < dim; ++i)
123  {
124  if (_geometry.n[i] == 0)
125  mooseError("Error reading header, EBSD grid size is zero.");
126  if (_geometry.d[i] == 0.0)
127  mooseError("Error reading header, EBSD data step size is zero.");
128  }
129 
130  if (dim == 0)
131  mooseError("Error reading header, EBSD data is zero dimensional.");
132 
133  _geometry.dim = dim;
134 }
unsigned int dim
std::array< Real, 3 > min
EBSDMeshGenerator::Geometry _geometry
EBSD data file mesh information.
Definition: EBSDMesh.h:54
void paramError(const std::string &param, Args... args) const
std::array< Real, 3 > d
std::string _filename
Name of the file containing the EBSD data.
Definition: EBSDMesh.h:51
void mooseError(Args &&... args) const
std::array< unsigned int, 3 > n

◆ validParams()

InputParameters EBSDMesh::validParams ( )
static

Definition at line 18 of file EBSDMesh.C.

19 {
21  params.addClassDescription("Mesh generated from a specified DREAM.3D EBSD data file.");
22  params.addRequiredParam<FileName>("filename", "The name of the file containing the EBSD data");
23  params.addParam<unsigned int>(
24  "uniform_refine", 0, "Number of coarsening levels available in adaptive mesh refinement.");
25 
26  // suppress parameters
27  params.suppressParameter<MooseEnum>("dim");
28  params.set<MooseEnum>("dim") = MooseEnum("1=1 2 3", "1");
29  params.suppressParameter<unsigned int>("nx");
30  params.suppressParameter<unsigned int>("ny");
31  params.suppressParameter<unsigned int>("nz");
32  params.suppressParameter<Real>("xmin");
33  params.suppressParameter<Real>("ymin");
34  params.suppressParameter<Real>("zmin");
35  params.suppressParameter<Real>("xmax");
36  params.suppressParameter<Real>("ymax");
37  params.suppressParameter<Real>("zmax");
38 
39  return params;
40 }
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)
void suppressParameter(const std::string &name)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()

Member Data Documentation

◆ _filename

std::string EBSDMesh::_filename
protected

Name of the file containing the EBSD data.

Definition at line 51 of file EBSDMesh.h.

Referenced by getEBSDFilename(), and readEBSDHeader().

◆ _geometry

EBSDMeshGenerator::Geometry EBSDMesh::_geometry
protected

EBSD data file mesh information.

Definition at line 54 of file EBSDMesh.h.

Referenced by buildMesh(), getEBSDGeometry(), and readEBSDHeader().


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