OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
"
37
#include "
graddpmaterialextensioninterface.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
51
GradDpMaterialExtensionInterface :: GradDpMaterialExtensionInterface
(
Domain
*d) :
Interface
()
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
65
IRResultType
66
GradDpMaterialExtensionInterface :: initializeFrom
(
InputRecord
*ir)
67
{
68
IRResultType
result;
// Required by IR_GIVE_FIELD macro
69
70
71
// read the characteristic length
72
IR_GIVE_FIELD
(ir,
cl
,
_IFT_GradDpMaterialExtensionInterface_cl
);
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
84
IR_GIVE_OPTIONAL_FIELD
(ir,
averType
,
_IFT_GradDpMaterialExtensionInterface_averagingtype
);
85
if
(
averType
== 1 ) {
86
IR_GIVE_FIELD
(ir,
beta
,
_IFT_GradDpMaterialExtensionInterface_beta
);
87
IR_GIVE_FIELD
(ir,
zeta
,
_IFT_GradDpMaterialExtensionInterface_zeta
);
88
}
else
if
(
averType
== 2 ) {
89
IR_GIVE_FIELD
(ir,
beta
,
_IFT_GradDpMaterialExtensionInterface_beta
);
90
}
91
92
return
IRRT_OK
;
93
}
94
95
96
97
98
99
void
100
GradDpMaterialExtensionInterface :: giveDistanceBasedCharacteristicLength
(
const
FloatArray
&gpCoords)
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
106
temp =
dom
->
giveNonlocalBarrier
(ib)->
calculateMinimumDistanceFromBoundary
(gpCoords);
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
oofem::GradDpMaterialExtensionInterface::beta
double beta
Parameter which multiplied with the interaction radius cl0 gives its minimum allowed value...
Definition:
graddpmaterialextensioninterface.h:86
oofem::Domain
Class and object Domain.
Definition:
domain.h:115
_IFT_GradDpMaterialExtensionInterface_zeta
#define _IFT_GradDpMaterialExtensionInterface_zeta
Definition:
graddpmaterialextensioninterface.h:46
graddpmaterialextensioninterface.h
oofem::GradDpMaterialExtensionInterface::cl0
double cl0
Initial(user defined) characteristic length of the nonlocal model (its interpretation depends on the ...
Definition:
graddpmaterialextensioninterface.h:70
oofem::NonlocalBarrier::calculateMinimumDistanceFromBoundary
virtual double calculateMinimumDistanceFromBoundary(const FloatArray &coords)=0
Abstract method calculating the minimum distance of the Gauss Point from the nonlocal boundaries...
oofem::Domain::giveNonlocalBarrier
NonlocalBarrier * giveNonlocalBarrier(int n)
Service for accessing particular domain nonlocal barrier representation.
Definition:
domain.C:351
oofem::GradDpMaterialExtensionInterface::cl
double cl
Characteristic length of the nonlocal model (its interpretation depends on the type of weight functio...
Definition:
graddpmaterialextensioninterface.h:100
oofem::GradDpMaterialExtensionInterface::dom
Domain * dom
Definition:
graddpmaterialextensioninterface.h:62
oofem::GradDpMaterialExtensionInterface::GradDpMaterialExtensionInterface
GradDpMaterialExtensionInterface(Domain *d)
Constructor.
Definition:
graddpmaterialextensioninterface.C:51
oofem::GradDpMaterialExtensionInterface::zeta
double zeta
Parameter used when Distance-based nonlocal variation is applied When it is multiplied with the inter...
Definition:
graddpmaterialextensioninterface.h:94
nonlocalbarrier.h
oofem::GradDpMaterialExtensionInterface::averType
int averType
Parameter which defines the averaging type When averType is equal to zereo classical approach is used...
Definition:
graddpmaterialextensioninterface.h:79
oofem::GradDpMaterialExtensionInterface::initializeFrom
virtual IRResultType initializeFrom(InputRecord *ir)
Definition:
graddpmaterialextensioninterface.C:66
inputrecord.h
oofem::GradDpMaterialExtensionInterface::giveDistanceBasedCharacteristicLength
void giveDistanceBasedCharacteristicLength(const FloatArray &gpCoords)
Provides the distance based interaction radius This function is called when averType is set to 1...
Definition:
graddpmaterialextensioninterface.C:100
oofem::IRRT_OK
Definition:
irresulttype.h:47
oofem::FloatArray
Class representing vector of real numbers.
Definition:
floatarray.h:82
_IFT_GradDpMaterialExtensionInterface_beta
#define _IFT_GradDpMaterialExtensionInterface_beta
Definition:
graddpmaterialextensioninterface.h:45
_IFT_GradDpMaterialExtensionInterface_averagingtype
#define _IFT_GradDpMaterialExtensionInterface_averagingtype
Definition:
graddpmaterialextensioninterface.h:43
oofem::IRResultType
IRResultType
Type defining the return values of InputRecord reading operations.
Definition:
irresulttype.h:47
oofem::InputRecord
Class representing the general Input Record.
Definition:
inputrecord.h:101
oofem::Interface
Class Interface.
Definition:
interface.h:82
domain.h
oofem::Domain::giveNumberOfNonlocalBarriers
int giveNumberOfNonlocalBarriers() const
Returns number of nonlocal integration barriers.
Definition:
domain.h:448
_IFT_GradDpMaterialExtensionInterface_cl
#define _IFT_GradDpMaterialExtensionInterface_cl
Definition:
graddpmaterialextensioninterface.h:44
IR_GIVE_OPTIONAL_FIELD
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition:
inputrecord.h:78
oofem
the oofem namespace is to define a context or scope in which all oofem names are defined.
IR_GIVE_FIELD
#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