OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
fluidcrosssection.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 "fluidcrosssection.h"
36 #include "fluiddynamicmaterial.h"
37 #include "dynamicinputrecord.h"
38 #include "domain.h"
39 #include "classfactory.h"
40 
41 namespace oofem {
42 REGISTER_CrossSection(FluidCrossSection);
43 
44 FluidCrossSection :: FluidCrossSection(int n, Domain *d) : CrossSection(n, d), matNumber(0) { }
45 
47 
48 
51 {
52  IRResultType result; // Required by IR_GIVE_FIELD macro
53 
55 
57 }
58 
59 
60 void
62 {
64 
66 }
67 
68 
69 int
71 {
73  return dynamic_cast< FluidDynamicMaterial * >( this->domain->giveMaterial(this->matNumber) ) != NULL;
74 }
75 
76 
77 double
79 {
80  return this->domain->giveMaterial(this->matNumber)->give('d', gp);
81 }
82 
83 
84 int
86 {
87  return this->domain->giveMaterial(this->matNumber)->giveIPValue(answer, ip, type, tStep);
88 }
89 
90 
91 bool
93 {
94  return this->domain->giveMaterial(this->matNumber)->isCharacteristicMtrxSymmetric(rMode);
95 }
96 
97 
100 {
101  return static_cast< FluidDynamicMaterial * >( this->domain->giveMaterial(this->matNumber) );
102 }
103 
104 Material*
106 {
107  if ( this->matNumber ) {
108  return this->giveDomain()->giveMaterial( this->matNumber );
109  } else {
110  return ip->giveElement()->giveMaterial();
111  }
112 }
113 
114 
115 int
117 {
118  return this->domain->giveMaterial(this->matNumber)->packUnknowns(buff, tStep, gp);
119 }
120 
121 int
123 {
124  return this->domain->giveMaterial(this->matNumber)->unpackAndUpdateUnknowns(buff, tStep, gp);
125 }
126 
127 int
129 {
130  return this->domain->giveMaterial(this->matNumber)->estimatePackSize(buff, gp);
131 }
132 
133 } // end namespace oofem
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
void setField(int item, InputFieldType id)
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: crosssection.C:67
virtual int estimatePackSize(DataStream &buff, GaussPoint *gp)
Estimates the necessary pack size to hold all packed data of receiver.
Class and object Domain.
Definition: domain.h:115
#define _IFT_FluidCrossSection_material
Abstract base class for all fluid materials.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
Material * giveMaterial(IntegrationPoint *ip)
Returns the material associated with the GP.
virtual int packUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Pack all necessary data of integration point (according to element parallel_mode) into given communic...
Definition: material.h:285
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
REGISTER_CrossSection(EmptyCS)
virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode)
Check for symmetry of stiffness matrix.
Element * giveElement()
Returns corresponding element to receiver.
Definition: gausspoint.h:188
FluidCrossSection(int n, Domain *d)
Constructor.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: crosssection.C:82
virtual ~FluidCrossSection()
Destructor.
MatResponseMode
Describes the character of characteristic material matrix.
virtual double giveDensity(GaussPoint *gp)
Base abstract class representing cross section in finite element mesh.
Definition: crosssection.h:107
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property &#39;aProperty&#39;.
Definition: material.C:52
virtual int unpackAndUpdateUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *gp)
Unpack and updates all necessary data of given integration point (according to element parallel_mode)...
Material * giveMaterial(int n)
Service for accessing particular domain material model.
Definition: domain.C:281
virtual int checkConsistency()
Allows programmer to test some internal data, before computation begins.
Definition: femcmpnn.C:94
virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode)
Returns true if stiffness matrix of receiver is symmetric Default implementation returns true...
Definition: material.h:129
FluidDynamicMaterial * giveFluidMaterial()
Abstract base class for all material models.
Definition: material.h:95
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual int packUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *gp)
Pack all necessary data of integration point (according to element parallel_mode) into given communic...
virtual int checkConsistency()
Allows programmer to test some internal data, before computation begins.
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual int giveIPValue(FloatArray &answer, GaussPoint *ip, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
Class representing the a dynamic Input Record.
virtual int estimatePackSize(DataStream &buff, GaussPoint *ip)
Estimates the necessary pack size to hold all packed data of receiver.
Definition: material.h:298
Domain * giveDomain() const
Definition: femcmpnn.h:100
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual int unpackAndUpdateUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Unpack and updates all necessary data of given integration point (according to element parallel_mode)...
Definition: material.h:294
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
Definition: material.C:142
virtual Material * giveMaterial()
Definition: element.C:484

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