33 #ifndef __H__LIB_GRID__PARALLELL_SUBSET_UTIL_IMPL__
34 #define __H__LIB_GRID__PARALLELL_SUBSET_UTIL_IMPL__
36 #include "../distributed_grid.h"
43 template <
class TElem>
52 throw(
UGError(
" Can't create surface-view. A Multigrid is required.\n"));
60 surfaceViewOut.
clear();
63 for(
size_t level = 0; level < mgsh.
num_levels(); ++level){
67 for(ElemIter iter = mgsh.
begin<TElem>(si, level);
68 iter != mgsh.
end<TElem>(si, level); ++iter)
86 template <
class TSurfaceView>
94 throw(
UGError(
" Can't create surface-view. A Multigrid is required.\n"));
99 CollectSurfaceViewElements<Vertex>(surfaceViewOut, distGridMgr, mgsh,
true);
100 CollectSurfaceViewElements<Edge>(surfaceViewOut, distGridMgr, mgsh,
false);
101 CollectSurfaceViewElements<Face>(surfaceViewOut, distGridMgr, mgsh,
false);
102 CollectSurfaceViewElements<Volume>(surfaceViewOut, distGridMgr, mgsh,
false);
105 bool assignSidesOnly =
true;
107 assignSidesOnly =
false;
109 assignSidesOnly =
false;
111 assignSidesOnly =
false;
114 AssignAssociatedSidesToSubsets<Volume>(surfaceViewOut, mgsh);
115 AssignAssociatedSidesToSubsets<Face>(surfaceViewOut, mgsh);
116 AssignAssociatedSidesToSubsets<Edge>(surfaceViewOut, mgsh);
120 UG_LOG(
"INFO in CreateSurfaceView: Performing AssignAssociatedLowerDimElemsToSubsets ");
121 UG_LOG(
"for all elements (Small Performance drawback).\n");
123 AssignAssociatedLowerDimElemsToSubsets<Volume>(surfaceViewOut, mgsh);
124 AssignAssociatedLowerDimElemsToSubsets<Face>(surfaceViewOut, mgsh);
125 AssignAssociatedLowerDimElemsToSubsets<Edge>(surfaceViewOut, mgsh);
132 surfaceViewOut.subset_required(mgsh.
num_subsets() - 1);
Performs communication between interfaces on different processes.
Definition: pcl_interface_communicator.h:68
bool communicate(int tag=749345)
sends and receives the collected data.
Definition: pcl_interface_communicator_impl.hpp:409
void send_data(int targetProc, const Interface &interface, ICommunicationPolicy< TLayout > &commPol)
collects data that will be send during communicate.
Definition: pcl_interface_communicator_impl.hpp:80
void receive_data(int srcProc, const Interface &interface, ICommunicationPolicy< TLayout > &commPol)
registers a communication-policy to receive data on communicate.
Definition: pcl_interface_communicator_impl.hpp:188
Definition: compol_subset.h:43
manages the layouts and interfaces which are associated with a distributed grid.
Definition: distributed_grid.h:88
bool is_ghost(TElem *elem) const
returns true if the element is a ghost
Definition: distributed_grid_impl.hpp:67
GridLayoutMap & grid_layout_map()
Definition: distributed_grid.h:103
MultiGrid * get_assigned_grid()
Definition: distributed_grid.h:97
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
bool option_is_enabled(uint option) const
see set_options for a description of valid parameters.
Definition: grid.cpp:721
Definition: subset_handler_interface.h:223
void assign_subset(TIterator iterBegin, TIterator iterEnd, int subsetIndex)
Definition: subset_handler_interface_impl.hpp:170
void clear()
Definition: subset_handler_interface.cpp:500
int num_subsets() const
returns the number of subset-infos (return value is int, since SubsetIndices are of type int)
Definition: subset_handler_interface.h:317
Definition: multi_grid.h:72
bool has_children(TElem *elem) const
Definition: multi_grid.h:217
Handles subsets on a per level basis.
Definition: subset_handler_multi_grid.h:60
uint num() const
returns the total number of elements
Definition: subset_handler_multi_grid_impl.hpp:202
geometry_traits< TElem >::iterator end(int subsetIndex, int level)
returns the end-iterator for the elements of type TElem in the given subset.
Definition: subset_handler_multi_grid_impl.hpp:64
uint num_levels() const
returns the number of levels
Definition: subset_handler_multi_grid.h:80
geometry_traits< TElem >::iterator begin(int subsetIndex, int level)
returns the begin-iterator for the elements of type TElem in the given subset.
Definition: subset_handler_multi_grid_impl.hpp:44
Instances of this class or of derived classes are thrown if errors arise.
Definition: error.h:104
Volumes are 3-dimensional objects.
Definition: grid_base_objects.h:754
Definition: grid_base_object_traits.h:68
@ VOLOPT_AUTOGENERATE_EDGES
Definition: grid_constants.h:82
@ VOLOPT_AUTOGENERATE_FACES
Definition: grid_constants.h:83
@ FACEOPT_AUTOGENERATE_EDGES
Definition: grid_constants.h:71
#define UG_LOG(msg)
Definition: log.h:367
void CreateSurfaceView(TSurfaceView &surfaceViewOut, MultiGrid &mg, MGSubsetHandler &mgsh)
Definition: multi_grid_util_impl.hpp:74
@ INT_H_MASTER
horizontal master node
Definition: parallel_grid_layout.h:104
@ INT_H_SLAVE
horizontal slave node
Definition: parallel_grid_layout.h:105
void CollectSurfaceViewElements(ISubsetHandler &surfaceViewOut, MultiGrid &mg, MGSubsetHandler &mgsh, bool clearContainer=true)
Definition: multi_grid_util_impl.hpp:42