OOFEM 3.0
Loading...
Searching...
No Matches
oofeggraphiccontext.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
36#ifndef oofeggraphiccontext_h
37#define oofeggraphiccontext_h
38
39#pragma once
40
41#include "oofemenv.h"
42#include "intarray.h"
43#include "internalstatemode.h"
44#include "internalstatetype.h"
45#include "floatmatrix.h"
46#include "timer.h"
47#include "outputmanager.h"
48#include "floatarrayf.h"
49
50#include <iostream>
51#include <list>
52
53//
54// for c++ compiler to be successful on some c files
55//
56
57
58#include <mathfem.h>
59
60extern "C" {
61 /*
62 #define min __min
63 #define max __max
64 #define sgn __sgn
65 #define macbra __macbra
66 #define Status __Status
67 #define Request __Request
68 #define Complex __Complex
69 */
70 #include <Esimple.h>
71 /*
72 #undef min
73 #undef max
74 #undef sgn
75 #undef macbra
76 #undef Status
77 #undef Request
78 #undef PI
79 #undef Complex
80 #undef None
81 */
82};
83
84
85
86// not declared in any *.h Elixir file
87
88extern "C" {
89 void EVFastRedraw(EView *v_p);
90};
91
92namespace oofem {
93// width definition variables
94 #define OOFEG_RAW_GEOMETRY_WIDTH 0
95 #define OOFEG_DEFORMED_GEOMETRY_WIDTH 0
96 #define OOFEG_CRACK_PATTERN_WIDTH 2
97 #define OOFEG_ISO_LINE_WIDTH 4
98 #define OOFEG_SPARSE_PROFILE_WIDTH 0
99
100// layer definition variables
101 #define OOFEG_RAW_GEOMETRY_LAYER 0
102 #define OOFEG_DEFORMED_GEOMETRY_LAYER 1
103 #define OOFEG_NODE_ANNOTATION_LAYER 2
104 #define OOFEG_ELEMENT_ANNOTATION_LAYER 3
105 #define OOFEG_VARPLOT_PATTERN_LAYER 4
106 #define OOFEG_CRACK_PATTERN_LAYER 5
107 #define OOFEG_BCIC_ANNOTATION_LAYER 6
108 #define OOFEG_NATURALBC_LAYER 7
109 #define OOFEG_SPARSE_PROFILE_LAYER 8
110 #define OOFEG_DEBUG_LAYER 9
111 #define OOFEG_RAW_CROSSSECTION_LAYER 10
112 #define OOFEG_LAST_LAYER 11
113class EngngModel;
114class Element;
115class Range;
116
124
125
129
130 #define OOFEG_YIELD_STEPS 3
131
133{
134protected:
135
136 /*
137 * Common members to all contexts
138 */
140 static EFringeTable ft;
141
142 static EPixel meshFillColor;
143 static EPixel remoteMeshFillColor;
144 static EPixel edgeColor;
145 static EPixel remoteEdgeColor;
146
147 static EPixel nodeColor;
148 static EPixel bcicColor;
149 static EPixel bcForceColor;
150 static EPixel deformedElementColor;
151 static EPixel crackPatternColor;
152 static EPixel activeCrackColor;
155 static EPixel geometryColor;
156 static EPixel crossSectionColor;
157
159 static double defScale;
160 static double zprofilescale; // for landscape plots in 2d
161 static int activeEigVal;
162 static int activeYieldStep;
163
164 // Material Model (region) filter
166
167 // element filter
168 static std :: list< Range >element_filter;
169
171 // smoother type
173
174 // deformed geometry internal variables plot flag
175 // nonzero indicate to use deformed shape
177
178 // Sparse matrix profile mode (1=marker mode, 0=grid mode)
180
181 // EFringeTable ft;
182 static int activeProblem;
183 static int activeDomain;
184
185 // scale mode and color scale values
187 static double emin, emax;
188 static int scaleInitFlag;
189
191
192 // mode of value
194
195 /*
196 * Attributes
197 */
198 // current value to display
200 // component of value
202 // plot mode (scalar, vector, tensor plot)
204 // on/off flag
206
207public:
210
211 void init(EngngModel *);
212
213
214 EPixel getElementColor() { return meshFillColor; }
215 EPixel getElementEdgeColor() { return edgeColor; }
218 EPixel getNodeColor() { return nodeColor; }
219 EPixel getBcIcColor() { return bcicColor; }
220 EPixel getBcForceColor() { return bcForceColor; }
224 EPixel getYieldPlotColor(double ratio)
229 EPixel getGeometryColor() { return geometryColor; }
231
232
233 // DrawMode getDrawMode () {return mode;}
234 // EFringeTable getFringeTable () {return ft;}
235 int getActiveStep() { return activeStep; }
237 double getDefScale() { return defScale; }
238 double getLandScale() { return zprofilescale; }
244 EngngModel *getActiveProblem();
245 EFringeTable getFringeTable() { return ft; }
246
247 void setElementColor(EPixel color) { meshFillColor = color; }
248 void setElementEdgeColor(EPixel color) { edgeColor = color; }
249 void setNodeColor(EPixel color) { nodeColor = color; }
250 void setDeformedElementColor(EPixel color) { deformedElementColor = color; }
251 void setCrackPatternColor(EPixel color) { crackPatternColor = color; }
252 void setActiveCrackColor(EPixel color) { activeCrackColor = color; }
253 void setGeometryColor(EPixel color) { geometryColor = color; }
254 void setCrossSectionColor(EPixel color) { crossSectionColor = color; }
255 void setActiveStep(int n) { activeStep = n; }
257 void setDefScale(double n) { defScale = n; }
258 void setLandScale(double n) { zprofilescale = n; }
259 void setActiveEigVal(int n) { activeEigVal = n; }
263 int setActiveDomain(int a) {
264 activeDomain = a;
265 return activeDomain;
266 }
267 int setActiveProblem(int a);
268
269 void setPlotMode(OGC_PlotModeType mode) { plotMode = mode; }
272 void setIntVarIndx(int indx) { component = indx; }
273 InternalStateType giveIntVarType() { return this->varType; }
274 InternalStateMode giveIntVarMode() { return this->varMode; }
275 OGC_PlotModeType giveIntVarPlotMode() { return this->plotMode; }
276 int giveIntVarIndx() { return this->component; }
277
280
282 void setSmootherType(SmootherType type) { this->smootherType = type; }
283
285 void setScaleMode(ScaleMode s) { smode = s; }
286 double getScaleMin() { return emin; }
287 double getScaleMax() { return emax; }
288 void setScaleVals(double smin, double smax) {
289 emin = smin;
290 emax = smax;
291 }
293 if ( smode == SM_Autoscale ) {
294 scaleInitFlag = 1;
295 emin = 1.0;
296 emax = -1.0;
297 }
298 }
299 void updateFringeTableMinMax(double *s, int size);
300
301 // component filters
302 // element filter
307 int testElementGraphicActivity(Element *);
311 int getMaterialModelFilterState(int i);
315 void setMaterialModelFilterState(int i, int state);
320 void setElementFilterState(char *initString);
321
323 bool isActive() { return this->isActiveFlag; }
325 void setActivityFlag(bool flag) { isActiveFlag = flag; }
326
327
328protected:
329 EPixel GR_giveColorFromUserColorTable(EPixel *table, int tableSize, double relVal);
330 // void GR_setupUserColors ();
331 // void GR_deleteUserColorTables();
332};
333} // end namespace oofem
334
335/* these reside in global name space */
336extern oofem :: oofegGraphicContext gc [ OOFEG_LAST_LAYER ];
337extern EView *myview;
338extern void deleteLayerGraphics(int iLayer);
339
340#endif // oofeggraphiccontext_h
void setInternalStateType(InternalStateType type)
EPixel GR_giveColorFromUserColorTable(EPixel *table, int tableSize, double relVal)
void setScalarAlgo(ScalarAlgorithmType a)
EPixel getYieldPlotColor(double ratio)
static EPixel yieldPlotColors[OOFEG_YIELD_STEPS]
static ScalarAlgorithmType scalarAlgo
InternalStateType giveIntVarType()
void setCrossSectionColor(EPixel color)
static std ::list< Range > element_filter
void setInternalStateMode(InternalStateMode mode)
InternalStateMode giveIntVarMode()
void setActiveCrackColor(EPixel color)
void setScaleVals(double smin, double smax)
OGC_PlotModeType giveIntVarPlotMode()
ScalarAlgorithmType getScalarAlgo()
void setDeformedElementColor(EPixel color)
static InternalStateMode varMode
void setGeometryColor(EPixel color)
void setElementEdgeColor(EPixel color)
void setActivityFlag(bool flag)
sets activity flag
void setCrackPatternColor(EPixel color)
void setPlotMode(OGC_PlotModeType mode)
void setSmootherType(SmootherType type)
InternalStateMode
Determines the mode of internal variable.
void EVFastRedraw(EView *v_p)
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define OOFEG_YIELD_STEPS
EView * myview
void deleteLayerGraphics(int iLayer)
#define OOFEG_LAST_LAYER
#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