OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
nonlocalmaterialext.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 nonlocalmaterialext_h
36 #define nonlocalmaterialext_h
37 
38 #include "matstatus.h"
39 #include "interface.h"
40 #include "intarray.h"
41 #include "grid.h"
42 #include "mathfem.h"
43 
44 #include <list>
45 
47 
48 #define _IFT_NonlocalMaterialExtensionInterface_regionmap "regionmap"
49 #define _IFT_NonlocalMaterialExtensionInterface_permanentNonlocTableFlag "permanentnonloctableflag"
50 #define _IFT_NonlocalMaterialExtensionInterface_r "r"
51 #define _IFT_NonlocalMaterialExtensionInterface_wft "wft"
52 #define _IFT_NonlocalMaterialExtensionInterface_averagingtype "averagingtype"
53 #define _IFT_NonlocalMaterialExtensionInterface_m "m"
54 #define _IFT_NonlocalMaterialExtensionInterface_scalingtype "scaling"
55 #define _IFT_NonlocalMaterialExtensionInterface_averagedquantity "averagedvar"
56 #define _IFT_NonlocalMaterialExtensionInterface_nonlocalvariation "nlvariation"
57 #define _IFT_NonlocalMaterialExtensionInterface_beta "beta"
58 #define _IFT_NonlocalMaterialExtensionInterface_zeta "zeta"
59 #define _IFT_NonlocalMaterialExtensionInterface_px "px"
60 #define _IFT_NonlocalMaterialExtensionInterface_averagingtype "averagingtype"
61 #define _IFT_NonlocalMaterialExtensionInterface_exp "exp"
62 #define _IFT_NonlocalMaterialExtensionInterface_rf "rf"
63 #define _IFT_NonlocalMaterialExtensionInterface_gridsize "gridsize"
64 #define _IFT_NonlocalMaterialExtensionInterface_initdiag "initdiag"
65 #define _IFT_NonlocalMaterialExtensionInterface_order "order"
66 #define _IFT_NonlocalMaterialExtensionInterface_centdiff "centdiff"
67 
68 
69 namespace oofem {
80  double weight;
81 };
82 
99 {
100 protected:
102  std :: vector< localIntegrationRecord >integrationDomainList;
106  double volumeAround;
107 
108 public:
113 
116 
122  std :: vector< localIntegrationRecord > *giveIntegrationDomainList() { return & integrationDomainList; }
124  double giveIntegrationScale() { return integrationScale; }
126  void setIntegrationScale(double val) { integrationScale = val; }
128  double giveVolumeAround() { return volumeAround; }
130  void setVolumeAround(double val) { volumeAround = val; }
132  void clear() { integrationDomainList.clear(); }
133 };
134 
135 
151 {
152 protected:
153  /*
154  * It is necessary, mainly due to resulting efficiency, to compute variable(s)
155  * which are nonlocally averaged in advance, before average process begins.
156  * The loop over all integration points is typically made to compute these variables.
157  * To prevent doing this multiple times at the same solution state,
158  * the modification time mark is kept.
159  * In the present implementation, there is one common stateCounter for the whole domain.
160  * This implies, that all variables (which undergo averaging) for all material models of the domain
161  * should be prepared at the same time in updateDomainBeforeNonlocAverage method.
162  * It is believed that this is general enough and can somehow handle even the case of multiple models
163  * with different parameters being averaged (but is this realistic?).
164  * If this scheme will not be enough general, then the state counter
165  * can be kept as attribute of NonlocalMaterialExtensionInterface, so independently for
166  * each material model. Each model will be then updated in separate call. But in the case of
167  * several material models of the same type (with different parameters) this will lead to
168  * multiple update, which can not be avoided, although it is redundant.
169  *
170  * StateCounterType lastUpdatedStateCounter;
171  */
178  enum WeightFunctionType { WFT_Unknown, WFT_Bell, WFT_Gauss, WFT_Green, WFT_Uniform, WFT_UniformOverElement, WFT_Green_21 };
182  int gridSize;
187  double initDiag;
188  int order;
189  int centDiff;
190 
195  double cl;
196 
198  double suprad;
199 
201  double mm;
202 
204  enum ScalingType { ST_Unknown, ST_Standard, ST_Noscaling, ST_Borino };
207 
209  enum AveragedVarType { AVT_Unknown, AVT_EqStrain, AVT_Compliance, AVT_Damage };
212 
219  double cl0;
221  enum NlVariationType { NLVT_Standard, NLVT_DistanceBasedLinear, NLVT_StressBased, NLVT_DistanceBasedExponential };
229  double beta;
237  double zeta;
238 
246  double px;
247 
248  // Parameters used by models with evolving characteristic length.
249 
251  double Rf;
253  double exponent;
255  int averType;
256 
257 public:
264  virtual ~NonlocalMaterialExtensionInterface() { delete grid; delete minDist2; }
265 
266 
282  void updateDomainBeforeNonlocAverage(TimeStep *tStep);
283 
292  void buildNonlocalPointTable(GaussPoint *gp);
293 
301  void rebuildNonlocalPointTable(GaussPoint *gp, IntArray *contributingElems);
302 
307  void modifyNonlocalWeightFunctionAround(GaussPoint *gp);
308  void modifyNonlocalWeightFunction_1D_Around(GaussPoint *gp);
309 
314  virtual double giveNonlocalMetricModifierAt(GaussPoint *gp) { return 1.; }
315 
321  double computeDistanceModifier(double damage);
322 
327  double computeModifiedLength(double length, double dam1, double dam2);
328 
336  std :: vector< localIntegrationRecord > *giveIPIntegrationList(GaussPoint *gp);
337 
345  virtual double computeWeightFunction(double distance);
346 
355  virtual double computeWeightFunction(const FloatArray &src, const FloatArray &coord);
356 
361  double giveIntegralOfWeightFunction(const int spatial_dimension);
362 
363 
365  virtual double maxValueOfWeightFunction();
366 
371  int giveNumberOfRegions();
372  /*
373  * Returns the region id of given element
374  * @param element pointer to element which region id is requested.
375  * @return Region id (number) for this element.
376  */
377  //int giveElementRegion (Element* element);
382  virtual int hasBoundedSupport() { return 1; }
387  virtual double evaluateSupportRadius();
388 
390  Domain *giveDomain() { return this->domain; }
391 
392  IRResultType initializeFrom(InputRecord *ir);
397  void giveInputRecord(DynamicInputRecord &input);
398  /*
399  * Creates new copy of associated status and inserts it into given integration point.
400  * @param gp Integration point where newly created status will be stored.
401  * @return reference to new status.
402  */
403  //MaterialStatus* CreateStatus (GaussPoint* gp)
404  // {return new NonlocalMaterialStatus (1,this->giveDomain(), gp);;}
411  void endIPNonlocalAverage(GaussPoint *gp);
412 
413 protected:
414  /*
415  * Returns true if the barrier is activated
416  * by interaction of two given points. In this case the nonlocal influence
417  * is not considered.
418  * @param gpCoords Coordinates of first point.
419  * @param jGpCoords Coordinates of second point.
420  * @param weight Set to zero if the GP are across the barrier.
421  */
422  //bool isBarrierActivated (const FloatArray& c1, const FloatArray& c2) const;
423 
424  void applyBarrierConstraints(const FloatArray &gpCoords, const FloatArray &jGpCoords, double &weight);
425 
434  void manipulateWeight(double &weight, GaussPoint *gp, GaussPoint *jGp);
435 
444  double giveDistanceBasedInteractionRadius(const FloatArray &gpCoords);
445 
446  int mapToGridPoint(double x, double x0) { return 1 + gridSize + ( int ) ceil(gridSize * ( x - x0 ) / suprad - 0.5); }
447  double mapToGridCoord(double x, double x0) { return 1. + gridSize + gridSize * ( x - x0 ) / suprad; }
448  double dist2FromGridNode(double x, double y, int j, int i) { return ( ( x - j ) * ( x - j ) + ( y - i ) * ( y - i ) ); }
449 };
450 } // end namespace oofem
451 #endif // nonlocalmaterialext_h
WeightFunctionType
Type characterizing the nonlocal weight function.
double beta
Parameter which multiplied with the interaction radius cl0 gives its minimum allowed value...
Class and object Domain.
Definition: domain.h:115
double exponent
Parameter used as an exponent by models with evolving characteristic length.
ScalingType
Type characterizing the scaling approach.
Abstract base class for all nonlocal materials.
AveragedVarType averagedVar
Parameter specifying the type of averaged (nonlocal) variable.
NlVariationType
Type characterizing the Nonlocal variation.
Domain * giveDomain()
Returns reference to domain.
virtual double giveNonlocalMetricModifierAt(GaussPoint *gp)
Provide the current value of the variable that affects nonlocal interaction (e.g., of damage) This method is used e.g.
NlVariationType nlvar
Parameter specifying the type of nonlocal variation.
bool permanentNonlocTableFlag
Flag indicating whether to keep nonlocal interaction tables of integration points cached...
Abstract base class for all nonlocal constitutive model statuses.
ScalingType scaling
Parameter specifying the type of scaling of nonlocal weight function.
std::vector< localIntegrationRecord > * giveIntegrationDomainList()
Returns integration list of receiver.
virtual ~NonlocalMaterialExtensionInterface()
Destructor.
Class implementing an array of integers.
Definition: intarray.h:61
double weight
Corresponding integration weight.
AveragedVarType
Type characterizing the averaged (nonlocal) variable.
virtual int hasBoundedSupport()
Determines, whether receiver has bounded weighting function (limited support).
WeightFunctionType weightFun
Parameter specifying the type of nonlocal weight function.
double zeta
Parameter used when Distance-based nonlocal variation is applied When it is multiplied with the inter...
int averType
Parameter specifying how the weight function should be adjusted due to damage.
FloatMatrix * minDist2
Auxiliary matrix to store minimum distances of grid points from Gauss points.
int gridSize
Grid on which the eikonal equation will be solved (used by eikonal nonlocal models) ...
double cl0
Initial(user defined) characteristic length of the nonlocal model (its interpretation depends on the ...
double px
Parameter specifying the periodic shift in x-direction.
GaussPoint * nearGp
Reference to influencing integration point.
void clear()
clears the integration list of receiver
Class that solves certain problems on a regular 2D grid, consisting of n x m nodes.
Definition: grid.h:32
std::vector< localIntegrationRecord > integrationDomainList
List containing localIntegrationRecord values.
double dist2FromGridNode(double x, double y, int j, int i)
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
void setIntegrationScale(double val)
Sets associated integration scale.
double mm
For "undernonlocal" or "overnonlocal" formulation.
Class representing the general Input Record.
Definition: inputrecord.h:101
double initDiag
Optional parameters setting details of the fast marching method.
IntArray regionMap
Map indicating regions to skip (region - cross section model).
Class Interface.
Definition: interface.h:82
Class representing the a dynamic Input Record.
double integrationScale
Nonlocal volume around the corresponding integration point.
double giveIntegrationScale()
Returns associated integration scale.
double volumeAround
Local volume around the corresponding integration point.
the oofem namespace is to define a context or scope in which all oofem names are defined.
void setVolumeAround(double val)
Sets associated integration scale.
double cl
Characteristic length of the nonlocal model (its interpretation depends on the type of weight functio...
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
double Rf
Final value of interaction radius, for a model with evolving characteristic length.
double giveVolumeAround()
Returns associated volume.
Structure containing reference to integration point and its corresponding nonlocal integration weight...

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