OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::Natural2GlobalOrdering Class Reference

Ordering from oofem natural ordering (includes all local and shared eqs) to global ordering. More...

#include <parallelordering.h>

+ Inheritance diagram for oofem::Natural2GlobalOrdering:
+ Collaboration diagram for oofem::Natural2GlobalOrdering:

Public Member Functions

 Natural2GlobalOrdering ()
 
virtual ~Natural2GlobalOrdering ()
 
virtual void init (EngngModel *, int di, const UnknownNumberingScheme &n)
 Initiates the receiver. More...
 
virtual int giveNewEq (int leq)
 Finds the global equation from a local equation. More...
 
virtual int giveOldEq (int eq)
 Finds the local equation number from a global equation. More...
 
virtual void map2New (IntArray &answer, const IntArray &src, int baseOffset=0)
 
virtual void map2Old (IntArray &answer, const IntArray &src, int baseOffset=0)
 
int giveNumberOfLocalEqs ()
 Returns number of local eqs; ie. More...
 
int giveNumberOfGlobalEqs ()
 
IntArraygiveN2Gmap ()
 
- Public Member Functions inherited from oofem::ParallelOrdering
 ParallelOrdering ()
 
virtual ~ParallelOrdering ()
 
bool isLocal (DofManager *dman)
 Returns true if given DofManager is local (ie maintained by the receiver processor). More...
 
bool isShared (DofManager *dman)
 Returns true if given DofManager is shared between partitions. More...
 

Protected Attributes

IntArray locGlobMap
 Old to new mapping; uses 0-based global eq ordering; 1-based local ordering. More...
 
std::map< int, int > globLocMap
 New to old mapping. More...
 
int l_neqs
 Number of local and global eqs. More...
 
int g_neqs
 

Detailed Description

Ordering from oofem natural ordering (includes all local and shared eqs) to global ordering.

Definition at line 100 of file parallelordering.h.

Constructor & Destructor Documentation

oofem::Natural2GlobalOrdering::Natural2GlobalOrdering ( )

Definition at line 70 of file parallelordering.C.

References g_neqs, and l_neqs.

virtual oofem::Natural2GlobalOrdering::~Natural2GlobalOrdering ( )
inlinevirtual

Definition at line 113 of file parallelordering.h.

Member Function Documentation

IntArray* oofem::Natural2GlobalOrdering::giveN2Gmap ( )
inline

Definition at line 126 of file parallelordering.h.

Referenced by oofem::PetscSparseMtrx::buildInternalStructure().

int oofem::Natural2GlobalOrdering::giveNewEq ( int  leq)
virtual

Finds the global equation from a local equation.

Parameters
leqLocal equation number.
Returns
Global equation number.

Implements oofem::ParallelOrdering.

Definition at line 461 of file parallelordering.C.

References oofem::IntArray::at(), and locGlobMap.

Referenced by oofem::PetscSparseMtrx::scatterL2G().

int oofem::Natural2GlobalOrdering::giveNumberOfGlobalEqs ( )
inlinevirtual
Returns
the total number of equations of the problem.

Reimplemented from oofem::ParallelOrdering.

Definition at line 124 of file parallelordering.h.

Referenced by oofem::PetscSparseMtrx::buildInternalStructure(), and oofem::ParallelContext::giveNumberOfGlobalEqs().

int oofem::Natural2GlobalOrdering::giveNumberOfLocalEqs ( )
inlinevirtual

Returns number of local eqs; ie.

those that belong to receiver processor; Note that some eqs may be owned by remote processors (some shared nodes,...). The sum of local eqs for all processors should give total number of eqs.

Returns
Numbering of local equations.

Reimplemented from oofem::ParallelOrdering.

Definition at line 123 of file parallelordering.h.

Referenced by oofem::PetscSparseMtrx::buildInternalStructure(), and oofem::ParallelContext::giveNumberOfLocalEqs().

int oofem::Natural2GlobalOrdering::giveOldEq ( int  eq)
virtual

Finds the local equation number from a global equation.

Parameters
eqGlobal equation number.
Returns
Local equation number.

Implements oofem::ParallelOrdering.

Definition at line 467 of file parallelordering.C.

References globLocMap.

Referenced by map2Old().

void oofem::Natural2GlobalOrdering::map2New ( IntArray answer,
const IntArray src,
int  baseOffset = 0 
)
virtual
void oofem::Natural2GlobalOrdering::map2Old ( IntArray answer,
const IntArray src,
int  baseOffset = 0 
)
virtual

Member Data Documentation

int oofem::Natural2GlobalOrdering::g_neqs
protected

Definition at line 109 of file parallelordering.h.

Referenced by init(), and Natural2GlobalOrdering().

std :: map< int, int > oofem::Natural2GlobalOrdering::globLocMap
protected

New to old mapping.

Definition at line 106 of file parallelordering.h.

Referenced by giveOldEq(), and init().

int oofem::Natural2GlobalOrdering::l_neqs
protected

Number of local and global eqs.

Definition at line 109 of file parallelordering.h.

Referenced by init(), and Natural2GlobalOrdering().

IntArray oofem::Natural2GlobalOrdering::locGlobMap
protected

Old to new mapping; uses 0-based global eq ordering; 1-based local ordering.

Definition at line 104 of file parallelordering.h.

Referenced by giveNewEq(), init(), and map2New().


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:38 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011