OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
sloangraph.C
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 /* Modified and optimized by: Borek Patzak */
36 /* Author: Milan Jirasek */
37 
38 #include "sloangraph.h"
39 #include "domain.h"
40 #include "element.h"
41 #include "dof.h"
42 #include "dofmanager.h"
43 #include "simpleslavedof.h"
44 #include "intarray.h"
46 
47 #include <memory>
48 #include <ctime>
49 #include <set>
50 
51 namespace oofem {
52 SloanGraph :: SloanGraph(Domain *d) : nodes(), queue(), OptimalRenumberingTable()
53 {
54  domain = d;
55  WeightDistance = 1;
56  WeightDegree = 2;
61  startNode = endNode = 0;
63 }
64 
66 {
67 }
68 
70 {
71  int nnodes = domain->giveNumberOfDofManagers();
72 
73  this->nodes.reserve(nnodes);
74  this->dmans.reserve(nnodes);
75  std :: map< DofManager*, int > dman2map;
76 
77  // Add dof managers.
78  int count = 0;
79  for ( auto &dman : domain->giveDofManagers() ) {
80  nodes.emplace_back(this, ++count);
81  dmans.push_back(dman.get());
82  dman2map.insert({dman.get(), count});
83  }
84  // Add element internal dof managers
85  for ( auto &elem : domain->giveElements() ) {
86  this->nodes.reserve( nodes.size() + elem->giveNumberOfInternalDofManagers() );
87  this->dmans.reserve( dmans.size() + elem->giveNumberOfInternalDofManagers() );
88  for ( int j = 1; j <= elem->giveNumberOfInternalDofManagers(); ++j ) {
89  nodes.emplace_back(this, ++count);
90  dmans.push_back( elem->giveInternalDofManager(j) );
91  dman2map.insert({elem->giveInternalDofManager(j), count});
92  }
93  }
94  // Add boundary condition internal dof managers
95  for ( auto &bc : domain->giveBcs() ) {
96  this->nodes.reserve( nodes.size() + bc->giveNumberOfInternalDofManagers() );
97  this->dmans.reserve( dmans.size() + bc->giveNumberOfInternalDofManagers() );
98  for ( int j = 1; j <= bc->giveNumberOfInternalDofManagers(); ++j ) {
99  nodes.emplace_back(this, ++count);
100  dmans.push_back( bc->giveInternalDofManager(j) );
101  dman2map.insert({bc->giveInternalDofManager(j), count});
102  }
103  }
104 
105  IntArray connections;
106  for ( auto &elem : domain->giveElements() ) {
107  int ielemnodes = elem->giveNumberOfDofManagers();
108  int ielemintdmans = elem->giveNumberOfInternalDofManagers();
109  int ndofmans = ielemnodes + ielemintdmans;
110  connections.resize(ndofmans);
111  for ( int j = 1; j <= ielemnodes; j++ ) {
112  connections.at(j) = dman2map[ elem->giveDofManager(j) ];
113  }
114  for ( int j = 1; j <= ielemintdmans; j++ ) {
115  connections.at(ielemnodes + j) = dman2map[ elem->giveInternalDofManager(j) ];
116  }
117  for ( int j = 1; j <= ndofmans; j++ ) {
118  for ( int k = j + 1; k <= ndofmans; k++ ) {
119  // Connect both ways
120  this->giveNode( connections.at(j) ).addNeighbor( connections.at(k) );
121  this->giveNode( connections.at(k) ).addNeighbor( connections.at(j) );
122  }
123  }
124  }
126 
127  IntArray dofMasters;
128  for ( auto &dman : dmans ) {
129  // according to forum discussion Peter & Mikael
130  count = 0;
131  ++count;
132  if ( dman->hasAnySlaveDofs() ) {
133  std :: set< int >masters;
134  // slave dofs are present in dofManager
135  // first - ask for masters, these may be different for each dof
136  for ( Dof *dof: *dman ) {
137  if ( !dof->isPrimaryDof() ) {
140  dof->giveMasterDofManArray(dofMasters);
141  for ( int m : dofMasters ) {
142  masters.insert( m );
143  }
144  }
145  }
146 
147  for ( int connection: masters ) {
148  this->giveNode(count).addNeighbor(connection);
149  this->giveNode(connection).addNeighbor(count);
150  }
151  }
152  } // end dof man loop
153 }
154 
155 
158 {
159  return nodes[num-1];
160 }
161 
162 int
164 {
165  int nnodes = (int)nodes.size();
166  int node_min = 0;
167  int min = nnodes + 1;
168 
169  for ( int i = 1; i <= nnodes; i++ ) {
170  int deg = this->giveNode(i).giveDegree();
171  if ( deg < min && deg > 0 && ( this->giveNode(i).giveNewNumber() == 0 ) ) {
172  min = deg;
173  node_min = i;
174  }
175  }
176 
177  return node_min;
178 }
179 
180 void
182 {
183  //if (startNode && endNode) return;
184 
185  int InitialRoot;
186  std :: unique_ptr< SloanLevelStructure > Spine;
187 
188  // clock_t time_0 = ::clock();
189  if ( SpineQuality == Best ) {
190  InitialRoot = findBestRoot();
191  } else if ( SpineQuality == Good ) {
192  InitialRoot = giveNodeWithMinDegree();
193  } else {
194  OOFEM_WARNING("Unsupported value of SpineQuality, using (Good)");
195  InitialRoot = giveNodeWithMinDegree();
196  }
197 
198  // initial spine
199  Spine.reset( new SloanLevelStructure(this, InitialRoot) );
200  this->startNode = InitialRoot;
201 
202  int CurrentDiameter = Spine->giveDepth();
203  int TrialDepth, TrialWidth;
204  std :: list< int >candidates;
205  int newStartNode = 1;
206 
207  while ( newStartNode ) {
208  newStartNode = 0;
209 
210  this->extractCandidates(candidates, *Spine);
211  int MinimumWidth = domain->giveNumberOfDofManagers();
212 
213  for ( int Root: candidates ) {
214  std :: unique_ptr< SloanLevelStructure > TrialSpine( new SloanLevelStructure(this, Root) );
215  // abort level struc assembly if TrialWidth>MinimumWidth.
216  if ( TrialSpine->formYourself(MinimumWidth) == 0 ) {
217  continue;
218  }
219 
220  TrialDepth = TrialSpine->giveDepth();
221  TrialWidth = TrialSpine->giveWidth();
222  if ( TrialWidth < MinimumWidth && TrialDepth > CurrentDiameter ) {
223  Spine = std :: move( TrialSpine );
224  this->startNode = Root;
225  CurrentDiameter = Spine->giveDepth();
226  newStartNode = 1;
227  break; // exit for loop
228  }
229 
230  if ( TrialWidth < MinimumWidth ) {
231  MinimumWidth = TrialWidth;
232  this->endNode = Root;
233  }
234  } // end loop over candidates
235  }
236 
237  //clock_t time_1 = ::clock();
238 
239  //printf("Time needed to select the starting node %10lds\n",(time_1-time_0)/ CLOCKS_PER_SEC);
240 }
241 
242 
243 void
244 SloanGraph :: extractCandidates(std :: list< int > &candidates, SloanLevelStructure &Spine)
245 {
246  int NumberOfLevels = Spine.giveDepth();
247  IntArray LastLevel = Spine.giveLevel(NumberOfLevels);
248  sort( LastLevel, SloanNodalDegreeOrderingCrit(this) );
249 
250  candidates.clear();
251  // shrink candidates to contain only one node of each degree
252  int lastDegree = 0;
253  for ( int node: LastLevel ) {
254  if ( lastDegree != this->giveNode( node ).giveDegree() ) {
255  lastDegree = this->giveNode( node ).giveDegree();
256  candidates.push_back( node );
257  }
258  }
259 }
260 
261 
262 int
264 {
265  SloanLevelStructure LSC( this, findBestRoot() );
266  return LSC.giveDepth();
267 }
268 
269 int
271 /* this is a very expensive method */
272 {
273  int BestRoot = 0;
274  int Diameter = 0;
275  int nnodes = (int)nodes.size();
276  clock_t time_1, time_0 = :: clock();
277  for ( int i = 1; i <= nnodes; i++ ) {
278  SloanLevelStructure LSC(this, i);
279  int Depth = LSC.giveDepth();
280  if ( Depth > Diameter ) {
281  Diameter = Depth;
282  BestRoot = i;
283  }
284 
286  time_1 = :: clock();
287  if ( ( time_1 - time_0 ) / CLOCKS_PER_SEC > SLOAN_TIME_CHUNK ) {
288  OOFEM_LOG_INFO("%d roots (%5.1f per cent) checked: largest pseudo-diameter = %d\n", i, float ( 100 * i ) / nnodes, Diameter);
289  //fflush(stdout);
290  //if (get_yes_or_no() == NO) break;
291  time_0 = time_1;
292  }
293  }
294 
295  return BestRoot;
296 }
297 
298 
299 double
301 {
302  int nnodes = (int)nodes.size();
303  double d = 0;
304  if ( nnodes > 0 ) {
305  d = 100.0 * MinimalProfileSize;
306  d /= ( nnodes * ( nnodes + 1 ) );
307  }
308 
309  return d;
310 }
311 
312 void
314 {
315  this->findPeripheralNodes();
316 #ifndef MDC
317  this->evaluateNodeDistances();
318  int nnodes = domain->giveNumberOfDofManagers();
319 
320  for ( auto &node: nodes ) {
321  int Distance = node->giveDistance();
322  int Degree = node->giveDegree();
323  int Priority = WeightDistance * Distance - WeightDegree * ( Degree + 1 );
324  node->setPriority(Priority);
325  node->setStatus(SloanGraphNode :: Inactive);
326  }
327 
328 #else
329  int NumLevels;
330  int End = endNode;
331 
332  int Distance, Degree, Priority;
333 
334  SloanLevelStructure BackSpine(this, End);
335  NumLevels = BackSpine.giveDepth();
336 
337  for ( int i = 1; i <= NumLevels; i++ ) {
338  for ( int nodeNum: BackSpine.giveLevel(i) ) {
339  Distance = i - 1;
340  this->giveNode(nodeNum).setDistance(Distance);
341  Degree = this->giveNode(nodeNum).giveDegree();
342  Priority = WeightDistance * Distance - WeightDegree * ( Degree + 1 );
343  this->giveNode(nodeNum).setPriority(Priority);
345  }
346  }
347 
348 #endif
349 }
350 
351 
352 void
354 {
355  int NumLevels;
356 
357  if ( this->nodeDistancesFlag ) {
358  return;
359  }
360 
361  int End = endNode;
362  SloanLevelStructure BackSpine(this, End);
363  NumLevels = BackSpine.giveDepth();
364 
365  for ( int i = 1; i <= NumLevels; i++ ) {
366  for ( int nodeNum: BackSpine.giveLevel(i) ) {
367  this->giveNode(nodeNum).setDistance(i - 1);
368  }
369  }
370 
371  this->nodeDistancesFlag = 1;
372 }
373 
374 void
376 {
377  for ( auto &node: nodes ) {
378  node.assignOldNumber();
379  }
380 }
381 
382 #ifdef MDC
383 void
384 SloanGraph :: numberIsolatedNodes(int &NextNumber, int &labeledNodes)
385 {
386  for ( auto &node: nodes ) {
387  if ( node.giveDegree() == 0 ) {
388  node.setNewNumber(++NextNumber);
389  labeledNodes++;
390  }
391  }
392 }
393 #endif
394 
395 void
397 {
398  int Start, inext, NextNumber = 0;
399  int labeledNodes = 0;
400 
401  for ( auto &node: nodes ) {
402  node.setNewNumber(0);
403  }
404 
405 #ifdef MDC
406  this->numberIsolatedNodes(NextNumber, labeledNodes);
407 #endif
408 
409  this->initStatusAndPriority();
410  //std::list<int>::iterator next;
411 
412  Start = this->startNode;
413  this->queue.clear();
414  this->queue.push_back(Start);
416 
417 #ifdef MDC
418  for ( ; ; ) {
419 #endif
420  while ( !this->queue.empty() ) {
421  // finds top priority, returns the corresponding node and deletes the entry
422  inext = findTopPriorityInQueue();
423  // this->queue.erase(next); - done by findTopPriority
424  SloanGraphNode &nextNode = this->giveNode(inext);
425  if ( nextNode.giveStatus() == SloanGraphNode :: Preactive ) {
426  this->insertNeigborsOf(inext);
427  }
428 
429  nextNode.setNewNumber(++NextNumber);
431  modifyPriorityAround(inext);
432  labeledNodes++;
433  }
434 
435 #ifdef MDC
436  if ( labeledNodes == domain->giveNumberOfDofManagers() ) {
437  break;
438  }
439 
440  // proceed next subdomain
441  this->initStatusAndPriority();
442  Start = this->startNode;
443  this->queue.clear();
444  this->queue.push_back(Start);
446 }
447 #else
448  if ( labeledNodes != domain->giveNumberOfDofManagers() ) {
449  OOFEM_ERROR("Internal error:\n%s", "Isolated nodes or separated sub-domains exist");
450  }
451 
452 #endif
453 }
454 
455 
456 void
458 {
459  SloanGraphNode &node = this->giveNode(next);
460 
461  for ( int nodeNum: node.giveNeighborList() ) {
462  if ( this->giveNode(nodeNum).giveStatus() == SloanGraphNode :: Inactive ) {
464  this->queue.push_front(nodeNum);
465  }
466  }
467 }
468 
469 void
471 {
473  SloanGraphNode &nextNode = this->giveNode(next);
474 
475  for ( int nodeNum: nextNode.giveNeighborList() ) {
476  SloanGraphNode &neighborNode = this->giveNode(nodeNum);
477  if ( neighborNode.giveStatus() == SloanGraphNode :: Preactive ) {
478  neighborNode.increasePriorityBy(WeightDegree);
479  neighborNode.setStatus(SloanGraphNode :: Active);
480  for ( int nnodeNum: neighborNode.giveNeighborList() ) {
481  SloanGraphNode &neighborOfNeighbor = this->giveNode(nnodeNum);
482  status = neighborOfNeighbor.giveStatus();
483  if ( status == SloanGraphNode :: Active || status == SloanGraphNode :: Preactive ) {
484  neighborOfNeighbor.increasePriorityBy(WeightDegree);
485  } else if ( status == SloanGraphNode :: Inactive ) {
486  neighborOfNeighbor.increasePriorityBy(WeightDegree);
487  this->queue.push_front(nnodeNum);
488  neighborOfNeighbor.setStatus(SloanGraphNode :: Preactive);
489  }
490  }
491  }
492  }
493 }
494 
495 int
497 {
498  int candidate = 0, priority, pmax = -WeightDegree * ( domain->giveNumberOfDofManagers() + 1 );
499  std :: list< int > :: iterator toDel;
500 
501  for ( auto pos = queue.begin(); pos != queue.end(); ++pos ) {
502  priority = this->giveNode(* pos).givePriority();
503  if ( pmax < priority ) {
504  pmax = priority;
505  toDel = pos;
506  candidate = * pos;
507  }
508  }
509 
510  if ( candidate ) {
511  this->queue.erase(toDel);
512  }
513 
514  return candidate;
515 }
516 
517 
518 int
520 {
521  int ProfSize = 0;
522  //clock_t time_1, time_0 = ::clock();
523 
524  if ( WeightDistance || WeightDegree ) {
526  } else {
528  }
529 
530  for ( auto &node: nodes ) {
531  ProfSize += node.computeProfileHeight();
532  }
533 
534  //time_1 = ::clock();
535  //printf("Time needed to renumber the nodes %10lds\n",(time_1-time_0)/CLOCKS_PER_SEC);
536 
537  return ProfSize;
538 }
539 
540 
541 void
543 {
544  for ( int dmanNum: OptimalRenumberingTable ) {
545  dmans[ dmanNum - 1 ]->askNewEquationNumbers(tStep);
546  }
547 }
548 
549 
550 void
552 {
553  int nnodes = (int)nodes.size();
554 
555  for ( int i = 1; i <= nnodes; i++ ) {
556  int inew = this->giveNode(i).giveNewNumber();
557  fprintf(file, "%8i %8i\n", i, inew);
558  }
559 }
560 
561 int
563 {
565  return 0;
566  }
567 
568  int nnodes = OptimalRenumberingTable.giveSize();
569  for ( int i = 1; i <= nnodes; i++ ) {
570  fprintf( OutputFile, "%8i %8i\n", i, OptimalRenumberingTable.at(i) );
571  }
572 
573  //fclose(OutputFile);
574  return 1;
575 }
576 
577 void
579 {
580  printf("\nCurrent parameter values:\n");
581  printf(" 1) weight of degree = %d\n", WeightDegree);
582  printf(" 2) weight of distance = %d\n", WeightDistance);
583  printf(" 3) diameter quality = %d\n", SpineQuality);
584 }
585 
586 void
587 SloanGraph :: setParameters(int wdeg, int wdis)
588 {
589  if ( wdeg >= 0 ) {
590  setWeightDegree(wdeg);
591  }
592 
593  if ( wdis >= 0 ) {
594  setWeightDistance(wdis);
595  }
596 }
597 
598 void
599 SloanGraph :: tryParameters(int wdeg, int wdis)
600 {
601 
602  setParameters(wdeg, wdis);
603  int psize = computeProfileSize();
604 #ifndef SILENT
605  // if (wdeg || wdis)
606  // printf("\nRenumbering with weights %2d / %2d",wdeg,wdis);
607  // else
608  // printf("\nExisting node numbering ");
609  // printf(" profile size %d",psize);
610 #endif
611  if ( psize < MinimalProfileSize || MinimalProfileSize == 0 ) {
612  int nnodes = (int)nodes.size();
613  MinimalProfileSize = psize;
614  OptimalWeightDegree = wdeg;
615  OptimalWeightDistance = wdis;
617  for ( int i = 1; i <= nnodes; i++ ) {
618  OptimalRenumberingTable.at( this->giveNode(i).giveNewNumber() ) = i;
619  }
620  }
621 }
622 
623 
624 int
626 {
627  int n = (int)nodes.size();
628  return n * ( n + 1 );
629 }
630 } // end namespace oofem
double giveOptimalProfileDensity()
Returns the optimal density of mesh.
Definition: sloangraph.C:300
void setPriority(int p)
Sets the receiver priority to given value.
void initialize()
Initialize graph from domain description.
Definition: sloangraph.C:69
void setParameters(int wdeg, int wdis)
Sets weight degee and weight dist to given values.
Definition: sloangraph.C:587
int giveDepth()
Returns the depth of receiver.
void askNewOptimalNumbering(TimeStep *tStep)
Numbers all the DOFs according to the optimal renumbering found.
Definition: sloangraph.C:542
Class and object Domain.
Definition: domain.h:115
int startNode
Start peripheral node.
Definition: sloangraph.h:91
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.
Definition: domain.h:432
bool isEmpty() const
Checks if receiver is empty (i.e., zero sized).
Definition: intarray.h:208
void numberIsolatedNodes(int &NextNumber, int &labeledNodes)
Numbers isolated nodes (those with degree equal to 0).
Definition: sloangraph.C:384
int giveNewNumber()
Returns new number of receiver.
void setWeightDegree(int w)
Sets weight degree to given value.
Definition: sloangraph.h:164
Class representing level structure for Sloan profile optimizer.
int giveDegree()
Return the receiver&#39;s degree.
int giveNodeWithMinDegree()
Returns graph node number with minimal degree.
Definition: sloangraph.C:163
Class representing node in undirected graph, used by Sloan profile optimizer.
int givePriority()
Returns priority of receiver.
std::vector< std::unique_ptr< DofManager > > & giveDofManagers()
Definition: domain.h:400
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
void printParameters()
Prints actual parameters.
Definition: sloangraph.C:578
void sort(IntArray &arry, operation op)
Sorts the receiver using quicksort algorithm.
Definition: intarray.h:416
int nodeDistancesFlag
Flag indicating that node distances from endNode were already computed.
Definition: sloangraph.h:108
int endNode
End peripheral node.
Definition: sloangraph.h:93
int MinimalProfileSize
Minimal profile size obtained.
Definition: sloangraph.h:102
void extractCandidates(std::list< int > &candidates, SloanLevelStructure &Spine)
Extract candidates from given level structure.
Definition: sloangraph.C:244
std::vector< std::unique_ptr< GeneralBoundaryCondition > > & giveBcs()
Definition: domain.h:322
SloanGraphNode_StatusType giveStatus()
Returns receiver status.
void findPeripheralNodes()
Finds the peripheral nodes (rooted in optimal start node) according to receiver quality and current w...
Definition: sloangraph.C:181
Domain * domain
Domain asoociated to graph.
Definition: sloangraph.h:84
#define OOFEM_LOG_INFO(...)
Definition: logger.h:127
int WeightDistance
Integer distance weight.
Definition: sloangraph.h:97
void setStatus(SloanGraphNode_StatusType s)
Sets the status of receiver to given value.
#define OOFEM_ERROR(...)
Definition: error.h:61
~SloanGraph()
Destructor.
Definition: sloangraph.C:65
int computeTrueDiameter()
Definition: sloangraph.C:263
IntArray OptimalRenumberingTable
Inverse renumbering table.
Definition: sloangraph.h:115
std::list< int > queue
Priority queue of active or preactive nodes.
Definition: sloangraph.h:95
int WeightDegree
Integer degree weight.
Definition: sloangraph.h:99
void modifyPriorityAround(int)
Modifies the priority around node with max priority.
Definition: sloangraph.C:470
SpineQualityType SpineQuality
Definition: sloangraph.h:100
std::vector< DofManager * > dmans
List of dof managers corresponding to nodes.
Definition: sloangraph.h:89
void resize(int n)
Checks size of receiver towards requested bounds.
Definition: intarray.C:124
std::vector< SloanGraphNode > nodes
List of graph nodes.
Definition: sloangraph.h:87
void setWeightDistance(int w)
Sets weight distance to given value.
Definition: sloangraph.h:158
void evaluateNodeDistances()
Evaluates the nodal distances from backSpine. The backSpine is generated if not available.
Definition: sloangraph.C:353
void addNeighbor(int neighbor)
Add neighbouring node to corresponding list.
void insertNeigborsOf(int)
Inserts inactive neighbours of given node as preactive ones.
Definition: sloangraph.C:457
void assignNewNumbers()
Implementation of node labeling algorithm.
Definition: sloangraph.C:396
void writeRenumberingTable(FILE *file)
Definition: sloangraph.C:551
IntArray & giveLevel(int num)
Returns the i-th level of receiver.
int OptimalWeightDistance
Optimal distance weight.
Definition: sloangraph.h:106
void setDistance(int d)
Sets the receiver distance to given number.
std::list< int > & giveNeighborList()
Returns the neighbor list of receiver.
int findTopPriorityInQueue()
Finds node with highest priority in queue, removes its entry and returns its number.
Definition: sloangraph.C:496
int OptimalWeightDegree
Optimal degree weight.
Definition: sloangraph.h:104
int writeOptimalRenumberingTable(FILE *file)
Definition: sloangraph.C:562
SloanGraphNode_StatusType
Status type definition.
int min(int i, int j)
Returns smaller value from two given decimals.
Definition: mathfem.h:59
std::vector< std::unique_ptr< Element > > & giveElements()
Definition: domain.h:279
SloanGraph(Domain *d)
Constructor. Creates the graph associated to given domain.
Definition: sloangraph.C:52
int giveSize() const
Definition: intarray.h:203
void increasePriorityBy(int p)
Increases the priority of receiver by given value.
void setNewNumber(int n)
Sets the new number of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
#define SLOAN_TIME_CHUNK
Definition: sloangraph.h:49
int giveFullProfileSize()
Definition: sloangraph.C:625
int computeProfileSize()
Assigns the New numbers by node labeling algorithm (old numbers are used when both weights are zero) ...
Definition: sloangraph.C:519
SloanGraphNode & giveNode(int num)
Return graph node.
Definition: sloangraph.C:157
#define OOFEM_WARNING(...)
Definition: error.h:62
void assignOldNumbers()
Assigns old node numbers as new ones. Used to compute the profile of existing old numbering...
Definition: sloangraph.C:375
Class representing solution step.
Definition: timestep.h:80
void tryParameters(int wdeg, int wdis)
Generates the new nodal numbering based on given parameters.
Definition: sloangraph.C:599
void initStatusAndPriority()
Initializes statuses and priority of nodes of receiver.
Definition: sloangraph.C:313

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