OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
zzerrorestimator.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 - 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 #ifndef zzerrorestimator_h
36 #define zzerrorestimator_h
37 
38 #include "errorestimator.h"
39 #include "interface.h"
40 #include "internalstatetype.h"
41 #include "floatarray.h"
42 #include "statecountertype.h"
43 #include "element.h"
44 #include "integrationrule.h"
45 #include "remeshingcrit.h"
46 
48 
49 #define _IFT_ZZErrorEstimator_Name "zz"
50 #define _IFT_ZZErrorEstimator_normtype "normtype"
51 #define _IFT_ZZErrorEstimator_recoverytype "recoverytype"
52 
53 
55 
56 #define _IFT_ZZRemeshingCriteria_requirederror "requirederror"
57 #define _IFT_ZZRemeshingCriteria_minelemsize "minelemsize"
58 
59 
60 namespace oofem {
61 #define ZZErrorEstimator_ElementResultCashed
62 
63 class Element;
64 class GaussPoint;
65 
83 {
84 public:
89 
90 protected:
92  double globalENorm;
94  double globalSNorm;
97 #ifdef ZZErrorEstimator_ElementResultCashed
100 #endif
105 
108 
109 public:
111  ZZErrorEstimator(int n, Domain * d) : ErrorEstimator(n, d) {
112  eeType = EET_ZZEE;
113  stateCounter = 0;
114  normType = L2Norm;
115  nodalRecoveryType = ZZRecovery;
116  }
118  virtual ~ZZErrorEstimator() { }
119 
120  virtual double giveElementError(EE_ErrorType type, Element *elem, TimeStep *tStep);
121  virtual double giveValue(EE_ValueType type, TimeStep *tStep);
122 
123  virtual int estimateError(EE_ErrorMode mode, TimeStep *tStep);
125 
127  virtual const char *giveClassName() const { return "ZZErrorEstimator"; }
128 };
129 
130 
136 {
137 private:
139 
140 public:
142  ZZErrorEstimatorInterface(Element *element): element(element) { }
143 
152  virtual void ZZErrorEstimatorI_computeElementContributions(double &eNorm, double &sNorm, ZZErrorEstimator :: NormType norm,
153  InternalStateType type, TimeStep *tStep);
159  return this->element->giveDefaultIntegrationRulePtr();
160  }
161 
167  answer = sig;
168  }
169 };
170 
171 
183 {
184 public:
186  enum ZZRemeshingCriteriaModeType { stressBased };
187 
188 protected:
200  double minElemSize;
201 
202 public:
206  virtual ~ZZRemeshingCriteria() { }
207 
208 
209  virtual double giveRequiredDofManDensity(int num, TimeStep *tStep, int relative = 0);
210  virtual double giveDofManDensity(int num);
211  virtual RemeshingStrategy giveRemeshingStrategy(TimeStep *tStep);
212  virtual int estimateMeshDensities(TimeStep *tStep);
214 
215  virtual const char *giveInputRecordName() const { return NULL; }
216  virtual const char *giveClassName() const { return "ZZErrorEstimator"; }
217 };
218 
219 } // end namespace oofem
220 #endif // zzerrorestimator_h
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
The base class for all remeshing criteria.
Definition: remeshingcrit.h:61
virtual const char * giveClassName() const
virtual void ZZErrorEstimatorI_computeLocalStress(FloatArray &answer, FloatArray &sig)
Returns stress vector in global c.s.
ZZErrorEstimator(int n, Domain *d)
Constructor.
Class and object Domain.
Definition: domain.h:115
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
Access method for default integration rule.
Definition: element.h:822
virtual const char * giveClassName() const
double globalErrorEstimate
Global error estimate (relative)
virtual RemeshingCriteria * giveRemeshingCrit()
Returns reference to associated remeshing criteria.
The implementation of Zienkiewicz Zhu Error Estimator (Zienkiewicz and Zhu: A simple error estimator ...
double globalENorm
Global error norm.
virtual ~ZZErrorEstimator()
Destructor.
ZZRemeshingCriteriaModeType
Mode of receiver, allows to use it in more general situations.
long StateCounterType
StateCounterType type used to indicate solution state.
Abstract base class for all finite elements.
Definition: element.h:145
EE_ErrorType
Type characterizing different type of element errors.
ZZErrorEstimatorInterface(Element *element)
Constructor.
Abstract base class representing integration rule.
NodalRecoveryType
Nodal recovery type.
virtual double giveElementError(EE_ErrorType type, Element *elem, TimeStep *tStep)
Returns the element error.
virtual double giveValue(EE_ValueType type, TimeStep *tStep)
Returns the characteristic value of given type.
The element interface corresponding to ZZErrorEstimator.
RemeshingStrategy remeshingStrategy
Remeshing strategy proposed.
The class representing Zienkiewicz-Zhu remeshing criteria.
virtual IntegrationRule * ZZErrorEstimatorI_giveIntegrationRule()
Returns element integration rule used to evaluate error.
NodalRecoveryType nodalRecoveryType
Nodal recovery type.
ZZRemeshingCriteriaModeType mode
Mode of receiver.
NormType
Type of norm used.
double requiredError
Required error to obtain.
FloatArray eNorms
Cache storing element norms.
The base class for all error estimation or error indicator algorithms.
Class representing vector of real numbers.
Definition: floatarray.h:82
RemeshingStrategy
Type representing the remeshing strategy.
Definition: remeshingcrit.h:50
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
EE_ErrorMode
Type determining whether temporary or equilibrated variables are used for error evaluation.
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual const char * giveInputRecordName() const
StateCounterType stateCounter
Actual state counter.
virtual ~ZZRemeshingCriteria()
Destructor.
ErrorEstimatorType eeType
double norm(const FloatArray &x)
Definition: floatarray.C:985
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual int estimateError(EE_ErrorMode mode, TimeStep *tStep)
Estimates the error on associated domain at given time step.
Class Interface.
Definition: interface.h:82
Zienkiewicz-Zhu EE.
FloatArray nodalDensities
Array of nodal mesh densities.
StateCounterType stateCounter
Actual values (densities) state counter.
EE_ValueType
Type characterizing different type of errors.
double globalSNorm
Global norm of quantity which error is evaluated.
NormType normType
Type of norm used.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class representing solution step.
Definition: timestep.h:80
double minElemSize
Minimum element size allowed.

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