33 #ifndef __H__UG__LIB_DISC__DOMAIN__
34 #define __H__UG__LIB_DISC__DOMAIN__
61 typedef unsigned long long int_t;
93 const std::vector<int_t>& numElems,
94 const std::vector<int_t>& numLocalElems,
95 const std::vector<int_t>& minNumLocalElems,
96 const std::vector<int_t>& maxNumLocalElems,
97 const std::vector<int_t>& numLocalGhosts,
98 const std::vector<int_t>& subsetDims,
137 template <
typename TGr
id = MultiGr
id,
typename TSubsetHandler = MGSubsetHandler>
153 IDomain(
bool isAdaptive =
true);
275 template <
class TElem>
276 void count_ghosts(std::vector<DomainInfo::int_t>& numGhostsOnLvlOut);
280 template <
class TElem>
285 template <
int d,
typename TGr
id = MultiGr
id,
typename TSubsetHandler = MGSubsetHandler>
320 Domain(
bool isAdaptive =
true);
location name
Definition: checkpoint_util.lua:128
Definition: smart_pointer.h:296
Definition: smart_pointer.h:108
Definition: pcl_process_communicator.h:70
A Buffer for binary data.
Definition: binary_buffer.h:56
manages the layouts and interfaces which are associated with a distributed grid.
Definition: distributed_grid.h:88
Describes the contents of a domain.
Definition: domain.h:59
A message sent along with "GridRefinement" messages.
Definition: lib_grid_messages.h:91
Definition: lib_grid_messages.h:195
Definition: lib_grid_messages.h:166
describes a physical domain
Definition: domain.h:139
Grid::VertexAttachmentAccessor< position_attachment_type > position_accessor_type
Type of Accessor to the Position Data Attachment.
Definition: domain.h:304
const position_attachment_type & position_attachment() const
const access to Position Attachment
Definition: domain.h:330
virtual ~IDomain()
Destructor.
Definition: domain_impl.h:89
Domain< 3, MultiGrid, MGSubsetHandler > Domain3d
Definition: domain.h:348
MathVector< dim > position_type
Type of position coordinates.
Definition: domain.h:297
void set_refinement_projector(SPRefinementProjector proj)
sets the ug::RefinementProjector which can be used by refiners during refinement
Definition: domain_impl.h:384
void grid_distribution_callback(const GridMessage_Distribution &msg)
Definition: domain_impl.h:201
SmartPtr< TSubsetHandler > subset_handler()
returns Subset Handler
Definition: domain.h:168
TSubsetHandler subset_handler_type
Subset Handler type.
Definition: domain.h:145
size_t min_num_local_elements_on_level(size_t lvl) const
returns the minimum number of elements a process has on a given leven (excluding ghosts)
Definition: domain.h:72
std::vector< int_t > m_minNumLocalElems
Definition: domain.h:116
std::vector< int_t > m_subsetDims
Definition: domain.h:119
base_type::grid_type grid_type
Grid type.
Definition: domain.h:308
size_t num_elements_on_level(size_t lvl) const
returns the global number of elements on the given level (excluding ghosts...)
Definition: domain.h:66
virtual int get_dim() const =0
World Dimension.
DistributedGridManager * distributed_grid_manager()
returns Distributed Grid Manager
Definition: domain.h:201
Domain(bool isAdaptive=true)
Default constructor.
Definition: domain_impl.h:659
std::vector< int_t > m_numElems
Definition: domain.h:114
GridBaseObjectId m_elementType
Definition: domain.h:113
virtual int get_dim() const
World Dimension.
Definition: domain.h:324
SPRefinementProjector refinement_projector() const
returns the domain's ug::RefinementProjector. The pointer may be invalid.
Definition: domain_impl.h:393
void grid_creation_callback(const GridMessage_Creation &msg)
Called when a domain has been loaded and during domain distribution.
Definition: domain_impl.h:189
SmartPtr< TGrid > grid()
returns Grid
Definition: domain.h:162
Attachment< position_type > position_attachment_type
Type of Position Attachment.
Definition: domain.h:300
const ConstSmartPtr< TSubsetHandler > subset_handler() const
const access to Subset Handler
Definition: domain.h:171
void update_subset_infos(int rootProc)
updates and broadcasts subset names and dimensions from the given rootProc to all other processes.
Definition: domain_impl.h:96
std::vector< int_t > m_maxNumLocalElems
Definition: domain.h:117
virtual SPIGeometry3d geometry3d() const =0
returns the geometry of the domain
bool is_parallel()
returns whether the domain can be used for parallel computations
Definition: domain.h:198
MessageHub::SPCallbackId m_spGridDistributionCallbackID
Definition: domain.h:252
std::string to_string() const
Definition: domain.cpp:42
SmartPtr< TGrid > m_spGrid
Grid.
Definition: domain.h:244
IDomain(bool isAdaptive=true)
Default constructor.
Definition: domain_impl.h:61
SmartPtr< TSubsetHandler > additional_subset_handler(std::string name)
returns an additional subset handler Subset Handler
Definition: domain_impl.h:360
IDomain< TGrid, TSubsetHandler > base_type
base type
Definition: domain.h:290
size_t max_num_local_elements_on_level(size_t lvl) const
returns the maximum number of elements a process has on a given leven (excluding ghosts)
Definition: domain.h:74
void serialize_projector(BinaryBuffer &bufOut, SPRefinementProjector proj)
Definition: domain_impl.h:403
bool m_isAdaptive
Definition: domain.h:256
void grid_adaption_callback(const GridMessage_Adaption &msg)
Definition: domain_impl.h:163
std::vector< std::string > additional_subset_handler_names() const
returns a list with the names of additional subset handlers
Definition: domain_impl.h:347
size_t num_local_elements_on_level(size_t lvl) const
returns the local number of elements on the given level (excluding ghosts...)
Definition: domain.h:70
const DomainInfo & domain_info() const
returns information on the current domain
Definition: domain.h:189
SPRefinementProjector deserialize_projector(BinaryBuffer &buf)
Definition: domain_impl.h:429
position_attachment_type & position_attachment()
returns Position Attachment
Definition: domain.h:327
Domain< 1, MultiGrid, MGSubsetHandler > Domain1d
Definition: domain.h:346
Domain< 2, MultiGrid, MGSubsetHandler > Domain2d
Definition: domain.h:347
MessageHub::SPCallbackId m_spGridAdaptionCallbackID
Definition: domain.h:250
unsigned long long int_t
Definition: domain.h:61
size_t count_local_unique_surface_elements()
counts local surface elements which are not ghosts or h-slaves
Definition: domain_impl.h:625
size_t num_local_ghosts_on_level(size_t lvl) const
returns the local number of ghosts on the given level
Definition: domain.h:76
MessageHub::SPCallbackId m_spGridCreationCallbackID
Definition: domain.h:251
virtual SPIGeometry3d geometry3d() const
returns the geometry of the domain
Definition: domain.h:338
std::vector< int_t > m_numLocalGhosts
Definition: domain.h:118
int element_type() const
Definition: domain.h:63
position_accessor_type & position_accessor()
get Position Accessor
Definition: domain.h:333
const position_accessor_type & position_accessor() const
const access to Position Accessor
Definition: domain.h:336
std::map< std::string, SmartPtr< TSubsetHandler > > m_additionalSH
additional subset handlers
Definition: domain.h:246
void count_ghosts(std::vector< DomainInfo::int_t > &numGhostsOnLvlOut)
Definition: domain_impl.h:587
SPMessageHub message_hub()
returns the message hub of the grid
Definition: domain.h:174
DomainInfo m_domainInfo
Definition: domain.h:254
SmartPtr< TSubsetHandler > m_spSH
Subset Handler.
Definition: domain.h:245
static const int dim
World dimension.
Definition: domain.h:294
bool create_additional_subset_handler(std::string name)
creates an additional subset-handler with the given name
Definition: domain_impl.h:336
const ConstSmartPtr< TGrid > grid() const
const access to Grid
Definition: domain.h:165
size_t num_surface_elements() const
returns the global number of surface elements (elements without children)
Definition: domain.h:68
virtual ~Domain()
Definition: domain.h:321
int_t m_numSurfElems
Definition: domain.h:120
SPRefinementProjector m_refinementProjector
Definition: domain.h:248
SPRefinementProjector broadcast_refinement_projector(int rootProc, pcl::ProcessCommunicator &procCom, SPIGeometry3d geometry, SPRefinementProjector projector=SPNULL)
helper method to broadcast ug::RefinementProjectors to different processes
Definition: domain_impl.h:457
size_t num_elements() const
Definition: domain.h:83
SPIGeometry3d m_geometry3d
Definition: domain.h:343
void set_info(GridBaseObjectId elemType, const std::vector< int_t > &numElems, const std::vector< int_t > &numLocalElems, const std::vector< int_t > &minNumLocalElems, const std::vector< int_t > &maxNumLocalElems, const std::vector< int_t > &numLocalGhosts, const std::vector< int_t > &subsetDims, int_t numSurfElems)
Definition: domain.h:92
base_type::subset_handler_type subset_handler_type
Subset Handler type.
Definition: domain.h:311
void update_domain_info()
updates the internal domain-info object.
Definition: domain_impl.h:212
TGrid grid_type
Grid type.
Definition: domain.h:142
position_attachment_type m_aPos
Position Attachment.
Definition: domain.h:341
bool m_adaptionIsActive
Definition: domain.h:257
size_t num_subsets() const
Definition: domain.h:78
position_accessor_type m_aaPos
Accessor.
Definition: domain.h:342
bool is_adaptive() const
returns whether the domain may be used for adaptive refinement
Definition: domain.h:177
size_t subset_dim(int si) const
Definition: domain.h:80
std::vector< int_t > m_numLocalElems
local number of elements excluding ghosts.
Definition: domain.h:115
bool empty() const
returns whether the associated grid is empty
Definition: domain.h:181
size_t num_levels() const
Definition: domain.h:64
const NullSmartPtr SPNULL
The equivalent to NULL for smart pointers.
Definition: smart_pointer.h:90
GridBaseObjectId
enumeration of the GridBaseObjects that make up a grid.
Definition: grid_base_objects.h:59