https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ReportingIDGeneratorUtils.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "MooseTypes.h"
13#include "libmesh/elem.h"
14#include "libmesh/replicated_mesh.h"
15#include "libmesh/dof_object.h"
16
18{
22enum class AssignType
23{
25 cell,
27 pattern,
29 manual
30};
31
40std::vector<dof_id_type>
41getCellwiseIntegerIDs(const std::vector<std::unique_ptr<libMesh::ReplicatedMesh>> & meshes,
42 const std::vector<std::vector<unsigned int>> & pattern,
43 const bool use_exclude_id,
44 const std::vector<bool> & exclude_ids);
45
52std::vector<dof_id_type>
53getPatternIntegerIDs(const std::vector<std::unique_ptr<libMesh::ReplicatedMesh>> & meshes,
54 const std::vector<std::vector<unsigned int>> & pattern);
55
63std::vector<dof_id_type>
64getManualIntegerIDs(const std::vector<std::unique_ptr<libMesh::ReplicatedMesh>> & meshes,
65 const std::vector<std::vector<unsigned int>> & pattern,
66 const std::vector<std::vector<dof_id_type>> & id_pattern);
67
74std::set<SubdomainID>
75getCellBlockIDs(const std::vector<std::unique_ptr<libMesh::ReplicatedMesh>> & meshes,
76 const std::vector<std::vector<unsigned int>> & pattern);
77
87std::map<SubdomainID, unsigned int>
88getDuckBlockIDs(const MeshBase & mesh,
89 const bool has_assembly_boundary,
90 const std::set<subdomain_id_type> background_blk_ids,
91 const std::set<SubdomainID> & blks);
92
108void assignReportingIDs(MeshBase & mesh,
109 const unsigned int extra_id_index,
111 const bool use_exclude_id,
112 const std::vector<bool> & exclude_ids,
113 const bool has_assembly_boundary,
114 const std::set<subdomain_id_type> background_block_ids,
115 const std::vector<std::unique_ptr<libMesh::ReplicatedMesh>> & input_meshes,
116 const std::vector<std::vector<unsigned int>> & pattern,
117 const std::vector<std::vector<dof_id_type>> & id_pattern);
118}
std::vector< dof_id_type > getCellwiseIntegerIDs(const std::vector< std::unique_ptr< libMesh::ReplicatedMesh > > &meshes, const std::vector< std::vector< unsigned int > > &pattern, const bool use_exclude_id, const std::vector< bool > &exclude_ids)
assign IDs for each component in pattern in sequential order
std::map< SubdomainID, unsigned int > getDuckBlockIDs(const MeshBase &mesh, const bool has_assembly_boundary, const std::set< subdomain_id_type > background_blk_ids, const std::set< SubdomainID > &blks)
get list of block IDs for the assembly duck regions
std::set< SubdomainID > getCellBlockIDs(const std::vector< std::unique_ptr< libMesh::ReplicatedMesh > > &meshes, const std::vector< std::vector< unsigned int > > &pattern)
get list of block IDs in input mesh cells
std::vector< dof_id_type > getManualIntegerIDs(const std::vector< std::unique_ptr< libMesh::ReplicatedMesh > > &meshes, const std::vector< std::vector< unsigned int > > &pattern, const std::vector< std::vector< dof_id_type > > &id_pattern)
assign IDs based on user-defined mapping defined in id_pattern
AssignType
Enum item for reporting id assign types.
@ pattern
assign the same reporting IDs for all tiles in the pattern with same input
@ manual
assign IDs based on user-defined mapping
@ cell
assign unique IDs for each tile in the lattice in sequential order
std::vector< dof_id_type > getPatternIntegerIDs(const std::vector< std::unique_ptr< libMesh::ReplicatedMesh > > &meshes, const std::vector< std::vector< unsigned int > > &pattern)
assign IDs for each input component type
void assignReportingIDs(MeshBase &mesh, const unsigned int extra_id_index, const ReportingIDGeneratorUtils::AssignType assign_type, const bool use_exclude_id, const std::vector< bool > &exclude_ids, const bool has_assembly_boundary, const std::set< subdomain_id_type > background_block_ids, const std::vector< std::unique_ptr< libMesh::ReplicatedMesh > > &input_meshes, const std::vector< std::vector< unsigned int > > &pattern, const std::vector< std::vector< dof_id_type > > &id_pattern)
assign the reporting IDs to the output mesh from the cartesian or hexagonal patterned mesh generator