OOFEM 3.0
Loading...
Searching...
No Matches
sloangraph.h
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 - 2025 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#ifndef sloangraph_h
36#define sloangraph_h
37
38#include "oofemenv.h"
39#include "sloangraphnode.h"
40#include "sloanlevelstruct.h"
41#include "dofmanager.h"
42#include "intarray.h"
43
44#include <list>
45
46namespace oofem {
47class TimeStep;
48
49#define SLOAN_TIME_CHUNK 60
55#define MDC
56
57class Domain;
58
78{
79public:
82private:
85
87 std::vector< SloanGraphNode >nodes;
89 std::vector< DofManager* >dmans;
97 std :: list< int >queue;
111
118
119public:
121 SloanGraph(Domain * d);
123 ~SloanGraph();
124
126 Domain *giveDomain() { return this->domain; }
128 void initialize();
131
133 SloanGraphNode &giveNode(int num);
134
136 void findPeripheralNodes();
137
139 int computeTrueDiameter();
140 int findBestRoot();
141 int giveFullProfileSize();
145 double giveOptimalProfileDensity();
146
152 int computeProfileSize();
154 void askNewOptimalNumbering(TimeStep *tStep);
157 void writeRenumberingTable(FILE *file);
158 int writeOptimalRenumberingTable(FILE *file);
159
161 void setWeightDistance(int w) {
162 if ( w >= 0 ) {
163 WeightDistance = w;
164 }
165 }
166
167 void setWeightDegree(int w) {
168 if ( w >= 0 ) {
169 WeightDegree = w;
170 }
171 }
172
174 SpineQuality = q;
175 resetAll();
176 }
177
179 void printParameters();
181 void setParameters(int wdeg, int wdis);
187 void tryParameters(int wdeg, int wdis);
188
189private:
191 int giveNodeWithMinDegree();
197 void extractCandidates(std :: list< int > &candidates, SloanLevelStructure &Spine);
199 void initStatusAndPriority();
201 void evaluateNodeDistances();
203 void assignOldNumbers();
205 void assignNewNumbers();
207 void insertNeigborsOf(int);
209 void modifyPriorityAround(int);
211 int findTopPriorityInQueue();
212#ifdef MDC
214 void numberIsolatedNodes(int &NextNumber, int &labeledNodes);
215#endif
216};
217
219{
221public:
225 int operator() (const int n1, const int n2) {
226 return graph->giveNode(n1).giveDegree() - graph->giveNode(n2).giveDegree();
227 }
228};
229} // end namespace oofem
230#endif // sloangraph_h
int WeightDistance
Integer distance weight.
Definition sloangraph.h:99
int numberOfNodes
number of graph nodes (=numberOfNodes+numberOfElementInternalNodes)
Definition sloangraph.h:91
void resetAll()
Resets the receiver state. Clears the startNode, endNode and nodeDistancesFlag values.
Definition sloangraph.h:130
SpineQualityType SpineQuality
Definition sloangraph.h:102
SloanGraph(Domain *d)
Constructor. Creates the graph associated to given domain.
Definition sloangraph.C:52
int WeightDegree
Integer degree weight.
Definition sloangraph.h:101
Domain * giveDomain()
Returns associated domain.
Definition sloangraph.h:126
std::vector< DofManager * > dmans
List of dof managers corresponding to nodes.
Definition sloangraph.h:89
std::vector< SloanGraphNode > nodes
List of graph nodes.
Definition sloangraph.h:87
std ::list< int > queue
Priority queue of active or preactive nodes.
Definition sloangraph.h:97
Domain * domain
Domain asoociated to graph.
Definition sloangraph.h:84
int OptimalWeightDegree
Optimal degree weight.
Definition sloangraph.h:106
IntArray OptimalRenumberingTable
Definition sloangraph.h:117
SpineQualityType
Quality type definition.
Definition sloangraph.h:81
int OptimalWeightDistance
Optimal distance weight.
Definition sloangraph.h:108
void setWeightDegree(int w)
Sets weight degree to given value.
Definition sloangraph.h:167
int MinimalProfileSize
Minimal profile size obtained.
Definition sloangraph.h:104
void setWeightDistance(int w)
Sets weight distance to given value.
Definition sloangraph.h:161
int nodeDistancesFlag
Flag indicating that node distances from endNode were already computed.
Definition sloangraph.h:110
void setSpineQuality(SpineQualityType q)
Select spine quality generation.
Definition sloangraph.h:173
int endNode
End peripheral node.
Definition sloangraph.h:95
int startNode
Start peripheral node.
Definition sloangraph.h:93
IntArray & giveOptimalRenumberingTable()
Returns the optimal reverse renumbering table.
Definition sloangraph.h:156
int giveOptimalProfileSize()
Returns the optimal profile found.
Definition sloangraph.h:143
SloanNodalDegreeOrderingCrit(SloanGraph *g)
Definition sloangraph.h:222
#define OOFEM_EXPORT
Definition oofemcfg.h:7

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011