Diffpack Documentation

(Functionality not available, requires installation of an additional Diffpack Toolbox)


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

GridPartAdm Class Reference

a collection of functions used for subgrid preparation administration, communication pattern determination and inter-processor communication. More...

#include <GridPartAdm.h>

Inheritance diagram for GridPartAdm::

SubdCommAdm HandleId List of all members.

Public Methods

 GridPartAdm ()
virtual ~GridPartAdm ()
virtual void define (MenuSystem &menu, int level=MAIN)
virtual void scan (MenuSystem &menu)
void attachGridPartPrm (const GridPart_prm &prm)
void attachPartitioner (const GridPart &part)
const GridPart_prmgetGridPartPrm () const
const GridPartgetPartitioner () const
virtual int getNoGlobalSubds ()
virtual bool overlappingSubgrids ()
void copy (const GridPartAdm &adm)
virtual bool copyMatrixWithEssIBC (const LinEqMatrix &A_orig, LinEqMatrix &A_new)
virtual void prepareSubgrids ()
virtual void prepareSubgrids (const GridFE &global_grid)
virtual GridFEgetSubgrid (int i=1)
virtual VecSimplest(Handle(GridFE))& getAllSubgrids ()
virtual void prepareCommunication ()
virtual void prepareCommunication (const DegFreeFE &dof)
virtual void prepareCommunication (const VecSimplest(Handle(DegFreeFE)) &dof_list)
virtual void updateGlobalValues (VecSimple(real) &vec)
virtual void updateGlobalValues (LinEqVector &lvec)
virtual void updateGlobalValues (VecSimplest(Handle(Vec(real))) &vecs)
virtual void updateInteriorBoundaryNodes (VecSimple(real) &vec)
virtual void updateInteriorBoundaryNodes (LinEqVector &lvec)
virtual void updateInteriorBoundaryNodes (VecSimplest(Handle(Vec(real))) &vecs)
virtual void matvec (const LinEqMatrix &Amat, const LinEqVector &c, LinEqVector &d, TransposeMode tpmode=NOT_TRANSPOSED, bool add_to_yb=false)
virtual real innerProd (Vec(real) &c_vec, Vec(real) &d_vec)
virtual real innerProd (LinEqVector &x, LinEqVector &y)
virtual real innerProd (VecSimplest(Handle(Vec(real))) &c_vecs, VecSimplest(Handle(Vec(real))) &d_vecs)
virtual real norm (Vec(real) &c_vec, Norm_type lp=l2)
virtual real norm (LinEqVector &lvec, Norm_type lp=l2)
virtual real norm (VecSimplest(Handle(Vec(real))) &c_vecs, Norm_type lp=l2)
virtual real normDiff (Vec(real) &c_vec, Vec(real) &d_vec, Norm_type lp=l2)
virtual real normDiff (LinEqVector &x, LinEqVector &y, Norm_type lp=l2)
virtual real normDiff (VecSimplest(Handle(Vec(real))) &c_vecs, VecSimplest(Handle(Vec(real))) &d_vecs, Norm_type lp=l2)

Static Public Methods

void defineStatic (MenuSystem &menu, int level=MAIN)

Protected Methods

void findOverlappingDofs (VecSimplest(VecSimple(int)) &dof_gorder, VecSimplest(VecSimple(int)) &overlaps, VecSimplest(VecSimplest(VecSimple(int))) &overlap_neighbor_ids, VecSimplest(VecSimple(int)) &counters, const VecSimplest(VecSimple(int)) &comm_gpt_info, const VecSimplest(VecSimple(int)) &offsets, const VecSimplest(VecSimple(int)) &nnos_on_processor)
virtual void setupCommunicationInfo ()
virtual void setupCommInfo4MatchingGrids ()
virtual void setupCommInfo4NonMatchingGrids ()
virtual void findOverlappingElms ()
virtual void findInternalBoundaryNodes (const GridFE &subd_grid, int &num_ib_node, VecSimple(int) &ib_ids, VecSimple(int) &tmp_vec)
virtual void sendoutProcessorData ()
virtual void receiveProcessorData ()
virtual void finishSend ()
virtual void outputData (int local_subd_nr, const VecSimple(real) &source)
virtual void updateOverlapPts (int local_subd_nr, VecSimple(real) &source)

Protected Attributes

Handle(GridPart_prmparam
Handle(GridPartpartitioner
VecSimplest(Handle(DegFreeFE)) subd_dofs
VecSimple(int) proc_id4subd
VecSimple(int) local_id4subd
bool has_neighbor
int num_related_procs
VecSimple(int) proc_id_l2g
VecSimple(int) proc_id_g2l
VecSimple(int) in_buffer_sizes
VecSimple(int) out_buffer_sizes
VecSimplest(Handle(Vec(real))) in_buffers
VecSimplest(Handle(Vec(real))) out_buffers
VecSimple(int) recv_order
VecSimple(int) num_ib_nodes
VecSimplest(VecSimple(int)) ib_node_ids
VecSimple(int) num_neighbors
VecSimplest(VecSimple(int)) neighbor_ids
VecSimplest(VecSimplest(Handle(Vec(real)))) in_messages
VecSimplest(VecSimplest(Handle(Vec(real)))) out_messages
VecSimplest(VecSimple(int)) in_msg_offsets
VecSimplest(VecSimple(int)) out_msg_offsets
VecSimplest(VecSimplest(VecSimple(int))) msg_ids4lpt
VecSimple(int) num_overlap_pts
VecSimplest(VecSimple(int)) overlap_lpt_ids
VecSimplest(VecSimple(int)) overlaps4lpt
VecSimplest(VecSimple(int)) real_overlaps4lpt
VecSimplest(VecSimple(real)) weights1
VecSimplest(VecSimple(int)) counters
bool overlapping_subgrids
VecSimplest(VecSimplest(VecSimple(int))) lpt_ids4messages
VecSimplest(VecSimplest(Handle(SparseDS))) subd_maps
VecSimplest(VecSimplest(VecSimple(real))) map_weights
VecSimplest(VecSimple(int)) gn_olpt_grid_ids
VecSimplest(VecSimple(int)) gn_ib_node_ids
VecSimple(int) num_overlap_elms
VecSimplest(VecSimple(int)) overlap_elm_ids
VecSimplest(VecSimple(int)) overlaps4elm
int num_real_related_procs
VecSimplest(Handle(Vec(real))) inbn_in_buffers
VecSimplest(Handle(Vec(real))) inbn_out_buffers
VecSimplest(VecSimplest(Handle(Vec(real)))) inbn_in_messages
VecSimplest(VecSimplest(Handle(Vec(real)))) inbn_out_messages
VecSimplest(VecSimple(int)) inbn_real_overlaps
VecSimplest(VecSimplest(VecSimple(int))) inbn_msg_ids
VecSimplest(VecSimple(int)) inbn_in_msg_offsets
VecSimple(int) inbn_in_buffer_sizes
VecSimplest(VecSimplest(VecSimple(int))) inbn_out_pt_ids
VecSimplest(VecSimple(int)) inbn_out_num_pts
VecSimplest(VecSimple(int)) inbn_out_msg_offsets
VecSimple(int) inbn_out_buffer_sizes
VecSimple(real) local_norms

Detailed Description

a collection of functions used for subgrid preparation administration, communication pattern determination and inter-processor communication.

NAME: GridPartAdm - a collection of functions used for subgrid preparation administration, communication pattern determination and inter-processor communication

DESCRIPTION:

This class implements all the pure virtual member functions of "SubdCommAdm". These functions will be used in parallel computing related inter-processor communication. In addition, the class also administrates the subgrid preparation process in which a subclass of "GridPart" is instantiated according to the "MenuSystem" input to the internal "GridPart_prm" object. The class also has implemented functionalities for communication pattern determination, which must be carried out before any inter-processor communication can be invoked.


Constructor & Destructor Documentation

GridPartAdm::GridPartAdm ( )
 

There is only one constructor that takes no input parameter.

GridPartAdm::~GridPartAdm ( ) [virtual]
 


Member Function Documentation

void GridPartAdm::attachGridPartPrm ( const GridPart_prm & prm ) [inline]
 

void GridPartAdm::attachPartitioner ( const GridPart & part ) [inline]
 

void GridPartAdm::copy ( const GridPartAdm & adm )
 

makes a copy of the input "GridPartAdm" object.

bool GridPartAdm::copyMatrixWithEssIBC ( const LinEqMatrix & A_orig,
LinEqMatrix & A_new ) [virtual]
 

makes an almost identical copy of a stiffness matrix, which has been assembled on the subgrid using the homogeneous natural boundary condition on the internal boundaries. The new matrix is different form the original stiffness matrix in that all the nodes lying on the internal boundaries are decoupled from the other nodes. For such nodes lying on the internal boundaries, it is as if an essential boundary condition has been applied.

Reimplemented from SubdCommAdm.

void GridPartAdm::define ( MenuSystem & menu,
int level = MAIN ) [inline, virtual]
 

void GridPartAdm::defineStatic ( MenuSystem & menu,
int level = MAIN ) [static]
 

void GridPartAdm::findInternalBoundaryNodes ( const GridFE & subd_grid,
int & num_ib_node,
VecSimple(int) & ib_ids,
VecSimple(int) & tmp_vec ) [protected, virtual]
 

void GridPartAdm::findOverlappingDofs ( VecSimplest(VecSimple(int)) & dof_gorder,
VecSimplest(VecSimple(int)) & overlaps,
VecSimplest(VecSimplest(VecSimple(int))) & overlap_neighbor_ids,
VecSimplest(VecSimple(int)) & counters,
const VecSimplest(VecSimple(int)) & comm_gpt_info,
const VecSimplest(VecSimple(int)) & offsets,
const VecSimplest(VecSimple(int)) & nnos_on_processor ) [protected]
 

void GridPartAdm::findOverlappingElms ( ) [protected, virtual]
 

void GridPartAdm::finishSend ( ) [protected, virtual]
 

VecSimplest(Handle(GridFE)) & GridPartAdm::getAllSubgrids ( ) [inline, virtual]
 

invokes the corresponding member function in "GridPart" with the same name.

const GridPart_prm & GridPartAdm::getGridPartPrm ( ) const [inline]
 

int GridPartAdm::getNoGlobalSubds ( ) [inline, virtual]
 

returns the total number of global subgrids.

Reimplemented from SubdCommAdm.

const GridPart & GridPartAdm::getPartitioner ( ) const [inline]
 

GridFE & GridPartAdm::getSubgrid ( int i = 1 ) [inline, virtual]
 

invokes the corresponding member function in "GridPart" with the same name.

real GridPartAdm::innerProd ( VecSimplest(Handle(Vec(real))) & c_vecs,
VecSimplest(Handle(Vec(real))) & d_vecs ) [virtual]
 

See documentation of one of the overloaded functions.

real GridPartAdm::innerProd ( LinEqVector & x,
LinEqVector & y ) [virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from SubdCommAdm.

real GridPartAdm::innerProd ( Vec(real) & c_vec,
Vec(real) & d_vec ) [virtual]
 

gives a parallel implementation of a standard inner product between two vectors.

void GridPartAdm::matvec ( const LinEqMatrix & Amat,
const LinEqVector & c,
LinEqVector & d,
TransposeMode tpmode = NOT_TRANSPOSED,
bool add_to_yb = false ) [virtual]
 

gives a parallel implementation of a standard matrix-vector product.

Reimplemented from SubdCommAdm.

real GridPartAdm::norm ( VecSimplest(Handle(Vec(real))) & c_vecs,
Norm_type lp = l2 ) [virtual]
 

See documentation of one of the overloaded functions.

real GridPartAdm::norm ( LinEqVector & lvec,
Norm_type lp = l2 ) [virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from SubdCommAdm.

real GridPartAdm::norm ( Vec(real) & c_vec,
Norm_type lp = l2 ) [virtual]
 

calculates the norm of a vector distributed among multiple processors.

real GridPartAdm::normDiff ( VecSimplest(Handle(Vec(real))) & c_vecs,
VecSimplest(Handle(Vec(real))) & d_vecs,
Norm_type lp = l2 ) [virtual]
 

See documentation of one of the overloaded functions.

real GridPartAdm::normDiff ( LinEqVector & x,
LinEqVector & y,
Norm_type lp = l2 ) [virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from SubdCommAdm.

real GridPartAdm::normDiff ( Vec(real) & c_vec,
Vec(real) & d_vec,
Norm_type lp = l2 ) [virtual]
 

calculates the norm of the difference between two vectors distributed among multiple processors.

void GridPartAdm::outputData ( int local_subd_nr,
const VecSimple(real) & source ) [protected, virtual]
 

bool GridPartAdm::overlappingSubgrids ( ) [inline, virtual]
 

tells whether the neighboring subgrids overlap or not.

Reimplemented from SubdCommAdm.

void GridPartAdm::prepareCommunication ( const VecSimplest(Handle(DegFreeFE)) & dof_list ) [virtual]
 

See documentation of one of the overloaded functions.

void GridPartAdm::prepareCommunication ( const DegFreeFE & dof ) [virtual]
 

See documentation of one of the overloaded functions.

void GridPartAdm::prepareCommunication ( ) [virtual]
 

determines the communication pattern and prepares internal storage that will be used in later inter-processor communication. The information on the number of degrees of freedom per node contained in "DegFreeFE" object(s) is used. If no "DegFreeFE" object is given, a default "DegFreeFE" object will be created internally, where each node is assumed to have one degree of freedom.

void GridPartAdm::prepareSubgrids ( const GridFE & global_grid ) [virtual]
 

See documentation of one of the overloaded functions.

void GridPartAdm::prepareSubgrids ( ) [virtual]
 

invokes the corresponding member function in "GridPart" with the same name.

void GridPartAdm::receiveProcessorData ( ) [protected, virtual]
 

void GridPartAdm::scan ( MenuSystem & menu ) [virtual]
 

void GridPartAdm::sendoutProcessorData ( ) [protected, virtual]
 

void GridPartAdm::setupCommInfo4MatchingGrids ( ) [protected, virtual]
 

void GridPartAdm::setupCommInfo4NonMatchingGrids ( ) [protected, virtual]
 

void GridPartAdm::setupCommunicationInfo ( ) [protected, virtual]
 

void GridPartAdm::updateGlobalValues ( VecSimplest(Handle(Vec(real))) & vecs ) [virtual]
 

See documentation of one of the overloaded functions.

void GridPartAdm::updateGlobalValues ( LinEqVector & lvec ) [virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from SubdCommAdm.

void GridPartAdm::updateGlobalValues ( VecSimple(real) & vec ) [virtual]
 

enforces that all the overlapping nodes within every subgrid have correctly duplicated values. (An overlapping node is a point that is located in more than one subgrid.) More specifically, an arithmetic average of all the values from different subgrids is used to produce a globally agreeing value. Treatment of the nodes on the internal boundaries is a little special, see the description of the following member function.

void GridPartAdm::updateInteriorBoundaryNodes ( VecSimplest(Handle(Vec(real))) & vecs ) [virtual]
 

See documentation of one of the overloaded functions.

void GridPartAdm::updateInteriorBoundaryNodes ( LinEqVector & lvec ) [virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from SubdCommAdm.

void GridPartAdm::updateInteriorBoundaryNodes ( VecSimple(real) & vec ) [virtual]
 

allows the nodes lying on the internal boundaries to update their values according to the nodal values of the "neighbors". For non-overlapping grid partition, neighboring subgrids only share nodes lying exactly on the internal boundaries. In this case, the new value of a node lying on the internal boundaries is simply the summation of all the values associated with different subgrids. For overlapping grid partition, any node lying on the internal boundary of one particular subgrid must lie in the interior of at least one another subgrid. Its new value is then determined by the value of the node(s) lying in the interior of neighboring subgrid(s).

void GridPartAdm::updateOverlapPts ( int local_subd_nr,
VecSimple(real) & source ) [protected, virtual]
 


Friends And Related Function Documentation

class DistrErrorNorms [friend]
 


Member Data Documentation

VecSimplest(VecSimple(int)) GridPartAdm::counters [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::gn_ib_node_ids [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::gn_olpt_grid_ids [protected]
 

bool GridPartAdm::has_neighbor [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::ib_node_ids [protected]
 

VecSimple(int) GridPartAdm::in_buffer_sizes [protected]
 

VecSimplest(Handle(Vec(real))) GridPartAdm::in_buffers [protected]
 

VecSimplest(VecSimplest(Handle(Vec(real)))) GridPartAdm::in_messages [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::in_msg_offsets [protected]
 

VecSimple(int) GridPartAdm::inbn_in_buffer_sizes [protected]
 

VecSimplest(Handle(Vec(real))) GridPartAdm::inbn_in_buffers [protected]
 

VecSimplest(VecSimplest(Handle(Vec(real)))) GridPartAdm::inbn_in_messages [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::inbn_in_msg_offsets [protected]
 

VecSimplest(VecSimplest(VecSimple(int))) GridPartAdm::inbn_msg_ids [protected]
 

VecSimple(int) GridPartAdm::inbn_out_buffer_sizes [protected]
 

VecSimplest(Handle(Vec(real))) GridPartAdm::inbn_out_buffers [protected]
 

VecSimplest(VecSimplest(Handle(Vec(real)))) GridPartAdm::inbn_out_messages [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::inbn_out_msg_offsets [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::inbn_out_num_pts [protected]
 

VecSimplest(VecSimplest(VecSimple(int))) GridPartAdm::inbn_out_pt_ids [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::inbn_real_overlaps [protected]
 

VecSimple(int) GridPartAdm::local_id4subd [protected]
 

VecSimple(real) GridPartAdm::local_norms [protected]
 

VecSimplest(VecSimplest(VecSimple(int))) GridPartAdm::lpt_ids4messages [protected]
 

VecSimplest(VecSimplest(VecSimple(real))) GridPartAdm::map_weights [protected]
 

VecSimplest(VecSimplest(VecSimple(int))) GridPartAdm::msg_ids4lpt [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::neighbor_ids [protected]
 

VecSimple(int) GridPartAdm::num_ib_nodes [protected]
 

VecSimple(int) GridPartAdm::num_neighbors [protected]
 

VecSimple(int) GridPartAdm::num_overlap_elms [protected]
 

VecSimple(int) GridPartAdm::num_overlap_pts [protected]
 

int GridPartAdm::num_real_related_procs [protected]
 

int GridPartAdm::num_related_procs [protected]
 

VecSimple(int) GridPartAdm::out_buffer_sizes [protected]
 

VecSimplest(Handle(Vec(real))) GridPartAdm::out_buffers [protected]
 

VecSimplest(VecSimplest(Handle(Vec(real)))) GridPartAdm::out_messages [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::out_msg_offsets [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::overlap_elm_ids [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::overlap_lpt_ids [protected]
 

bool GridPartAdm::overlapping_subgrids [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::overlaps4elm [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::overlaps4lpt [protected]
 

Handle(GridPart_prm) GridPartAdm::param [protected]
 

Handle(GridPart) GridPartAdm::partitioner [protected]
 

VecSimple(int) GridPartAdm::proc_id4subd [protected]
 

VecSimple(int) GridPartAdm::proc_id_g2l [protected]
 

VecSimple(int) GridPartAdm::proc_id_l2g [protected]
 

VecSimplest(VecSimple(int)) GridPartAdm::real_overlaps4lpt [protected]
 

VecSimple(int) GridPartAdm::recv_order [protected]
 

VecSimplest(Handle(DegFreeFE)) GridPartAdm::subd_dofs [protected]
 

VecSimplest(VecSimplest(Handle(SparseDS))) GridPartAdm::subd_maps [protected]
 

VecSimplest(VecSimple(real)) GridPartAdm::weights1 [protected]
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.