Back to index

salome-med  6.5.0
Public Member Functions | Public Attributes | Private Attributes | Static Private Attributes
ParaMEDMEM::ComponentTopology Class Reference

#include <ComponentTopology.hxx>

Inheritance diagram for ParaMEDMEM::ComponentTopology:
Inheritance graph
[legend]
Collaboration diagram for ParaMEDMEM::ComponentTopology:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ComponentTopology (int nb_comp, ProcessorGroup *group)
 ComponentTopology (int nb_comp, int nb_blocks)
 ComponentTopology (int nb_comp)
 Constructor for one block of nb_comp components.
 ComponentTopology ()
 Constructor for one component.
virtual ~ComponentTopology ()
int nbComponents () const
 returns the number of MED components in the topology
int nbLocalComponents () const
 returns the number of MED components on local processor
int firstLocalComponent () const
 returns the number of the first MED component on local processor
int nbBlocks () const
 returns the number of blocks in the topology
const std::vector< int > * getBlockIndices () const
 returns the block structure
const ProcessorGroupgetProcGroup () const
def __init__
def nbComponents
def nbLocalComponents
def firstLocalComponent
def nbBlocks
def getBlockIndices
def getProcGroup

Public Attributes

 this

Private Attributes

std::vector< int > _component_array
ProcessorGroup_proc_group

Static Private Attributes

dictionary __swig_setmethods__ = {}
tuple __setattr__ = lambdaself,name,value:_swig_setattr(self, ComponentTopology, name, value)
dictionary __swig_getmethods__ = {}
tuple __getattr__ = lambdaself,name:_swig_getattr(self, ComponentTopology, name)
 __repr__ = _swig_repr
 __swig_destroy__ = _ParaMEDMEM.delete_ComponentTopology
 __del__ = lambdaself:None;

Detailed Description

1

Definition at line 31 of file ComponentTopology.hxx.


Constructor & Destructor Documentation

Definition at line 29 of file ComponentTopology.cxx.

                                                                        :_proc_group(group)
  {
    int nb_blocks=group->size();
  
    if (nb_blocks>nb_comp)
      throw INTERP_KERNEL::Exception("ComponentTopology Number of components must be larger than number of blocks");

    _component_array.resize(nb_blocks+1);
    _component_array[0]=0;
    for (int i=1; i<=nb_blocks; i++)
      {
        _component_array[i]=_component_array[i-1]+nb_comp/nb_blocks;
        if (i<=nb_comp%nb_blocks)
          _component_array[i]++;
      }
  }

Here is the call graph for this function:

ParaMEDMEM::ComponentTopology::ComponentTopology ( int  nb_comp,
int  nb_blocks 
)

Definition at line 49 of file ComponentTopology.cxx.

                                                                :_proc_group(0)
  {
    if (nb_blocks>nb_comp)
      throw INTERP_KERNEL::Exception("ComponentTopology Number of components must be larger than number of blocks");
    
    _component_array.resize(nb_blocks+1);
    _component_array[0]=0;
    for (int i=1; i<=nb_blocks; i++)
      {
        _component_array[i]=_component_array[i-1]+nb_comp/nb_blocks;
        if (i<=nb_comp%nb_blocks)
          _component_array[i]++;
      }
  
  }

Constructor for one block of nb_comp components.

Definition at line 66 of file ComponentTopology.cxx.

                                                 :_proc_group(0)
  {
    
    _component_array.resize(2);
    _component_array[0]=0;
    _component_array[1]=nb_comp;
  
  }

Constructor for one component.

Definition at line 76 of file ComponentTopology.cxx.

Definition at line 84 of file ComponentTopology.cxx.

  {
  }
def ParaMEDMEM.ComponentTopology.__init__ (   self,
  args 
)
__init__(self, int nb_comp, ProcessorGroup group) -> ComponentTopology
__init__(self, int nb_comp, int nb_blocks) -> ComponentTopology
__init__(self, int nb_comp) -> ComponentTopology
__init__(self) -> ComponentTopology

1

Definition at line 15370 of file ParaMEDMEM.py.

15370 
15371     def __init__(self, *args): 
15372         """
15373         __init__(self, int nb_comp, ProcessorGroup group) -> ComponentTopology
15374         __init__(self, int nb_comp, int nb_blocks) -> ComponentTopology
15375         __init__(self, int nb_comp) -> ComponentTopology
15376         __init__(self) -> ComponentTopology
15377 
15378         1
15379         """
15380         this = _ParaMEDMEM.new_ComponentTopology(*args)
15381         try: self.this.append(this)
        except: self.this = this

Member Function Documentation

returns the number of the first MED component on local processor

Definition at line 102 of file ComponentTopology.cxx.

  {
    if (_proc_group==0)
      return 0;
  
    int icomp;
    int myrank = _proc_group->myRank();
    if (myrank!=-1)
      icomp = _component_array[myrank];
    else 
      icomp=-1;
    return icomp;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

firstLocalComponent(self) -> int

1

Definition at line 15400 of file ParaMEDMEM.py.

15400 
15401     def firstLocalComponent(self):
15402         """
15403         firstLocalComponent(self) -> int
15404 
15405         1
15406         """
15407         return _ParaMEDMEM.ComponentTopology_firstLocalComponent(self)

Here is the call graph for this function:

const std::vector<int>* ParaMEDMEM::ComponentTopology::getBlockIndices ( ) const [inline]

returns the block structure

Definition at line 48 of file ComponentTopology.hxx.

{ return &_component_array; }

Here is the caller graph for this function:

getBlockIndices(self) -> ivec

1

Definition at line 15416 of file ParaMEDMEM.py.

15416 
15417     def getBlockIndices(self):
15418         """
15419         getBlockIndices(self) -> ivec
15420 
15421         1
15422         """
15423         return _ParaMEDMEM.ComponentTopology_getBlockIndices(self)

Here is the call graph for this function:

Definition at line 49 of file ComponentTopology.hxx.

{ return _proc_group; } 

Here is the caller graph for this function:

getProcGroup(self) -> ProcessorGroup

1

Definition at line 15424 of file ParaMEDMEM.py.

15424 
15425     def getProcGroup(self):
15426         """
15427         getProcGroup(self) -> ProcessorGroup
15428 
15429         1
15430         """
15431         return _ParaMEDMEM.ComponentTopology_getProcGroup(self)

Here is the call graph for this function:

returns the number of blocks in the topology

Definition at line 46 of file ComponentTopology.hxx.

{return _component_array.size()-1;}

Here is the caller graph for this function:

nbBlocks(self) -> int

1

Definition at line 15408 of file ParaMEDMEM.py.

15408 
15409     def nbBlocks(self):
15410         """
15411         nbBlocks(self) -> int
15412 
15413         1
15414         """
15415         return _ParaMEDMEM.ComponentTopology_nbBlocks(self)

Here is the call graph for this function:

returns the number of MED components in the topology

Definition at line 40 of file ComponentTopology.hxx.

{ return _component_array.back(); }

Here is the caller graph for this function:

nbComponents(self) -> int

1

Definition at line 15384 of file ParaMEDMEM.py.

15384 
15385     def nbComponents(self):
15386         """
15387         nbComponents(self) -> int
15388 
15389         1
15390         """
15391         return _ParaMEDMEM.ComponentTopology_nbComponents(self)

Here is the call graph for this function:

returns the number of MED components on local processor

Definition at line 88 of file ComponentTopology.cxx.

  {
    if (_proc_group==0)
      return nbComponents();
  
    int nbcomp;
    int myrank = _proc_group->myRank();
    if (myrank!=-1)
      nbcomp = _component_array[myrank+1]-_component_array[myrank];
    else 
      nbcomp=0;
    return nbcomp;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

nbLocalComponents(self) -> int

1

Definition at line 15392 of file ParaMEDMEM.py.

15392 
15393     def nbLocalComponents(self):
15394         """
15395         nbLocalComponents(self) -> int
15396 
15397         1
15398         """
15399         return _ParaMEDMEM.ComponentTopology_nbLocalComponents(self)

Here is the call graph for this function:


Member Data Documentation

ParaMEDMEM.ComponentTopology.__del__ = lambdaself:None; [static, private]

Definition at line 15383 of file ParaMEDMEM.py.

tuple ParaMEDMEM.ComponentTopology.__getattr__ = lambdaself,name:_swig_getattr(self, ComponentTopology, name) [static, private]

Definition at line 15368 of file ParaMEDMEM.py.

Definition at line 15369 of file ParaMEDMEM.py.

tuple ParaMEDMEM.ComponentTopology.__setattr__ = lambdaself,name,value:_swig_setattr(self, ComponentTopology, name, value) [static, private]

Definition at line 15366 of file ParaMEDMEM.py.

ParaMEDMEM.ComponentTopology.__swig_destroy__ = _ParaMEDMEM.delete_ComponentTopology [static, private]

Definition at line 15382 of file ParaMEDMEM.py.

dictionary ParaMEDMEM.ComponentTopology.__swig_getmethods__ = {} [static, private]

Definition at line 15367 of file ParaMEDMEM.py.

dictionary ParaMEDMEM.ComponentTopology.__swig_setmethods__ = {} [static, private]

Definition at line 15365 of file ParaMEDMEM.py.

Definition at line 51 of file ComponentTopology.hxx.

Definition at line 52 of file ComponentTopology.hxx.

Definition at line 15381 of file ParaMEDMEM.py.


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