OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
graddpmaterialextensioninterface.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 #include "domain.h"
36 #include "nonlocalbarrier.h"
38 #include "inputrecord.h"
39 
40 #include <list>
41 
42 
43 namespace oofem {
44 // flag forcing the inclusion of all elements with volume inside support of weight function.
45 // This forces inclusion of all integration points of these elements, even if weight is zero
46 // If not defined (default) only integration points with nonzero weight are included.
47 // #define NMEI_USE_ALL_ELEMENTS_IN_SUPPORT
48 
49 
50 // constructor
52 {
53  dom = d;
54 
55  cl = 0.;
56  cl0 = 0.;
57  averType = 0;
58  beta = 0.;
59  zeta = 0.;
60 }
61 
62 
63 
64 
67 {
68  IRResultType result; // Required by IR_GIVE_FIELD macro
69 
70 
71  // read the characteristic length
73  if ( cl < 0.0 ) {
74  cl = 0.0;
75  }
76 
77  cl0 = cl;
78  // special averaging
79  // averType = 0 ... classical
80  // averType = 1 ... distance-based
81  // averType = 1 ... stress-based
82  averType = 0;
83 
85  if ( averType == 1 ) {
88  } else if ( averType == 2 ) {
90  }
91 
92  return IRRT_OK;
93 }
94 
95 
96 
97 
98 
99 void
101 {
102  double distance = 1.e20; // Initially distance from the boundary is set to the maximum value
103  double temp;
104  int ib, nbarrier = dom->giveNumberOfNonlocalBarriers();
105  for ( ib = 1; ib <= nbarrier; ib++ ) { //Loop over all the nonlocal barriers to find minimum distance from the boundary
107  if ( distance > temp ) { //Check to find minimum distance from boundary from all nonlocal boundaries
108  distance = temp;
109  }
110  }
111 
112  //Calculate interaction radius based on the minimum distance from the nonlocal boundaries
113  if ( distance < zeta * cl0 ) {
114  cl = ( ( 1 - beta ) / ( zeta * cl0 ) * distance + beta ) * cl0;
115  } else {
116  cl = cl0;
117  }
118 }
120 } // end namespace oofem
double beta
Parameter which multiplied with the interaction radius cl0 gives its minimum allowed value...
Class and object Domain.
Definition: domain.h:115
#define _IFT_GradDpMaterialExtensionInterface_zeta
double cl0
Initial(user defined) characteristic length of the nonlocal model (its interpretation depends on the ...
virtual double calculateMinimumDistanceFromBoundary(const FloatArray &coords)=0
Abstract method calculating the minimum distance of the Gauss Point from the nonlocal boundaries...
NonlocalBarrier * giveNonlocalBarrier(int n)
Service for accessing particular domain nonlocal barrier representation.
Definition: domain.C:351
double cl
Characteristic length of the nonlocal model (its interpretation depends on the type of weight functio...
double zeta
Parameter used when Distance-based nonlocal variation is applied When it is multiplied with the inter...
int averType
Parameter which defines the averaging type When averType is equal to zereo classical approach is used...
virtual IRResultType initializeFrom(InputRecord *ir)
void giveDistanceBasedCharacteristicLength(const FloatArray &gpCoords)
Provides the distance based interaction radius This function is called when averType is set to 1...
Class representing vector of real numbers.
Definition: floatarray.h:82
#define _IFT_GradDpMaterialExtensionInterface_beta
#define _IFT_GradDpMaterialExtensionInterface_averagingtype
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Class representing the general Input Record.
Definition: inputrecord.h:101
Class Interface.
Definition: interface.h:82
int giveNumberOfNonlocalBarriers() const
Returns number of nonlocal integration barriers.
Definition: domain.h:448
#define _IFT_GradDpMaterialExtensionInterface_cl
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
the oofem namespace is to define a context or scope in which all oofem names are defined.
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69

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