OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
mixedgradientpressurebc.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 
36 #include "floatarray.h"
37 #include "engngm.h"
38 #include "element.h"
39 #include "feinterpol.h"
40 #include "set.h"
41 
42 namespace oofem {
44 {
45  int nsd = this->domain->giveNumberOfSpatialDimensions();
46  double domain_size = 0.0;
47  // This requires the boundary to be consistent and ordered correctly.
48  Set *set = this->giveDomain()->giveSet(this->set);
49  const IntArray &boundaries = set->giveBoundaryList();
50 
51  for ( int pos = 1; pos <= boundaries.giveSize() / 2; ++pos ) {
52  Element *e = this->giveDomain()->giveElement( boundaries.at(pos * 2 - 1) );
53  int boundary = boundaries.at(pos * 2);
55  domain_size += fei->evalNXIntegral( boundary, FEIElementGeometryWrapper(e) );
56  }
57  return domain_size / nsd;
58 }
59 
60 
62 {
63  IRResultType result;
64 
65  FloatArray devGradient;
66  double pressure;
67 
70 
72  this->setPrescribedPressure(pressure);
73 
75 }
76 } // end namespace oofem
#define _IFT_MixedGradientPressure_devGradient
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
double domainSize()
Computes the size (including pores) by surface integral over the domain.
Abstract base class for all finite elements.
Definition: element.h:145
virtual double evalNXIntegral(int boundary, const FEICellGeometry &cellgeo)
Computes the integral .
Definition: feinterpol.h:420
int giveNumberOfSpatialDimensions()
Returns number of spatial dimensions.
Definition: domain.C:1067
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual FEInterpolation * giveInterpolation() const
Definition: element.h:629
virtual void setPrescribedPressure(double p)=0
Set prescribed pressure.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
Element * giveElement(int n)
Service for accessing particular domain fe element.
Definition: domain.C:160
#define _IFT_MixedGradientPressure_pressure
Set of elements, boundaries, edges and/or nodes.
Definition: set.h:66
Wrapper around element definition to provide FEICellGeometry interface.
Definition: feinterpol.h:95
Set * giveSet(int n)
Service for accessing particular domain set.
Definition: domain.C:363
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing vector of real numbers.
Definition: floatarray.h:82
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Class representing the general Input Record.
Definition: inputrecord.h:101
Domain * giveDomain() const
Definition: femcmpnn.h:100
int giveSize() const
Definition: intarray.h:203
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
virtual void setPrescribedDeviatoricGradientFromVoigt(const FloatArray &ddev)=0
Sets the prescribed tensor from the matrix from given Voigt notation.

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