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

Class representing level structure for Sloan profile optimizer. More...

#include <sloanlevelstruct.h>

+ Collaboration diagram for oofem::SloanLevelStructure:

Public Member Functions

 SloanLevelStructure (SloanGraph *graph, int root)
 Creates new level structure assignment to graph, with root being the root node. More...
 
 ~SloanLevelStructure ()
 Destructor. More...
 
void destroyLevels ()
 Destroys all levels. More...
 
int formYourself (int limitWidth=-1)
 Builds the level structure. More...
 
int giveDepth ()
 Returns the depth of receiver. More...
 
int giveWidth ()
 Returns the width of receiver. More...
 
IntArraygiveLevel (int num)
 Returns the i-th level of receiver. More...
 
void setEnd (int end)
 Sets the end node of receiver. More...
 
int giveEnd ()
 Returns the end node of receiver. More...
 
int giveRoot ()
 Return root node of receiver. More...
 

Private Member Functions

void computeDepth ()
 Computes depth of receiver. More...
 
void computeWidth ()
 Computes the Width of receiver. More...
 

Private Attributes

SloanGraphGraph
 Reference to corresponding graph. More...
 
int Root
 Root node of level structure. More...
 
int End
 End node of root structure. More...
 
std::vector< IntArrayStructure
 Data representation of structure: List of arrays, one array for each level. More...
 
int Depth
 Depth of structure defined as number of levels. More...
 
int Width
 Width of structure defined as max number of nodes in all levels. More...
 

Detailed Description

Class representing level structure for Sloan profile optimizer.

This is partitioning of the nodes such that each node is assigned to one of the levels in accordance with its distance from a specified root node.

Author
Milan Jirasek
Borek Patzak

Definition at line 51 of file sloanlevelstruct.h.

Constructor & Destructor Documentation

oofem::SloanLevelStructure::SloanLevelStructure ( SloanGraph graph,
int  root 
)
inline

Creates new level structure assignment to graph, with root being the root node.

Definition at line 69 of file sloanlevelstruct.h.

oofem::SloanLevelStructure::~SloanLevelStructure ( )

Destructor.

Definition at line 47 of file sloanlevelstruct.C.

References destroyLevels().

Member Function Documentation

void oofem::SloanLevelStructure::computeDepth ( )
private

Computes depth of receiver.

Definition at line 96 of file sloanlevelstruct.C.

References Depth, formYourself(), and Structure.

void oofem::SloanLevelStructure::computeWidth ( )
private

Computes the Width of receiver.

Definition at line 103 of file sloanlevelstruct.C.

References giveDepth(), giveLevel(), oofem::IntArray::giveSize(), and Width.

void oofem::SloanLevelStructure::destroyLevels ( )

Destroys all levels.

Definition at line 53 of file sloanlevelstruct.C.

References Structure.

Referenced by formYourself(), and ~SloanLevelStructure().

int oofem::SloanLevelStructure::formYourself ( int  limitWidth = -1)

Builds the level structure.

The limitWidth parameter allows receiver build-up phase to be aborted during the assembly, when width of some level is greater than given value. Default value for limitWidth is -1 meaning no width limit. If assembly aborted, the destroyLevels() method is called.

Returns
Zero if assembly aborted due to width limit, positive value otherwise.

Definition at line 59 of file sloanlevelstruct.C.

References oofem::IntArray::at(), destroyLevels(), oofem::IntArray::followedBy(), oofem::IntArray::isEmpty(), LEVEL_LIST_GROW_CHUNK, oofem::IntArray::resize(), Root, and Structure.

Referenced by computeDepth(), and giveLevel().

int oofem::SloanLevelStructure::giveEnd ( )
inline

Returns the end node of receiver.

Definition at line 111 of file sloanlevelstruct.h.

IntArray & oofem::SloanLevelStructure::giveLevel ( int  num)
int oofem::SloanLevelStructure::giveRoot ( )
inline

Return root node of receiver.

Definition at line 113 of file sloanlevelstruct.h.

int oofem::SloanLevelStructure::giveWidth ( )
inline

Returns the width of receiver.

Definition at line 99 of file sloanlevelstruct.h.

void oofem::SloanLevelStructure::setEnd ( int  end)
inline

Sets the end node of receiver.

Definition at line 109 of file sloanlevelstruct.h.

Member Data Documentation

int oofem::SloanLevelStructure::Depth
private

Depth of structure defined as number of levels.

Definition at line 63 of file sloanlevelstruct.h.

Referenced by computeDepth().

int oofem::SloanLevelStructure::End
private

End node of root structure.

Definition at line 59 of file sloanlevelstruct.h.

SloanGraph* oofem::SloanLevelStructure::Graph
private

Reference to corresponding graph.

Definition at line 55 of file sloanlevelstruct.h.

int oofem::SloanLevelStructure::Root
private

Root node of level structure.

Definition at line 57 of file sloanlevelstruct.h.

Referenced by formYourself().

std::vector< IntArray > oofem::SloanLevelStructure::Structure
private

Data representation of structure: List of arrays, one array for each level.

Definition at line 61 of file sloanlevelstruct.h.

Referenced by computeDepth(), destroyLevels(), formYourself(), and giveLevel().

int oofem::SloanLevelStructure::Width
private

Width of structure defined as max number of nodes in all levels.

Definition at line 65 of file sloanlevelstruct.h.

Referenced by computeWidth().


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:41 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011