OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
intvarfield.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 "intvarfield.h"
36 #include "classfactory.h"
37 #include "dofmanager.h"
39 
40 namespace oofem {
42  Field(ft)
43 {
44  this->type = ist;
46  this->domain = d;
47 }
48 
50 {
51  if ( mma ) {
52  delete mma;
53  }
54 }
55 
56 int
58 {
59  IntArray types(1);
60  types.at(1) = this->type;
62  Set eset(0, domain);
63  eset.addAllElements();
64  this->mma->__init(domain, types, coords, eset, tStep);
65  this->mma->__mapVariable(answer, coords, this->type, tStep);
66 
67  return 0; // ok
68 }
69 
70 int
72 {
73  if ( dman->hasCoordinates() ) {
74  return this->evaluateAt(answer, * ( dman->giveCoordinates() ), mode, tStep);
75  } else {
76  return 1; // failed -> dman without coordinates
77  }
78 }
79 
82 {
83  return CIO_OK;
84 }
85 
88 {
89  return CIO_OK;
90 }
91 } // end namespace oofem
InternalVariableField(InternalStateType ist, FieldType b, MaterialMappingAlgorithmType mma_type, Domain *d)
Constructor.
Definition: intvarfield.C:41
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
MaterialMappingAlgorithm * mma
Material mapping algorithm used.
Definition: intvarfield.h:60
Class and object Domain.
Definition: domain.h:115
FieldType
Physical type of field.
Definition: field.h:60
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the receiver state previously written in stream.
Definition: intvarfield.C:87
virtual FloatArray * giveCoordinates()
Definition: dofmanager.h:382
Base class for dof managers.
Definition: dofmanager.h:113
MaterialMappingAlgorithm * createMaterialMappingAlgorithm(MaterialMappingAlgorithmType name)
Definition: classfactory.C:431
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual bool hasCoordinates()
Definition: dofmanager.h:378
Abstract class representing field.
Definition: field.h:80
InternalStateType type
InternalStateType.
Definition: intvarfield.h:62
Domain * domain
Source domain.
Definition: intvarfield.h:64
Set of elements, boundaries, edges and/or nodes.
Definition: set.h:66
virtual int __mapVariable(FloatArray &answer, const FloatArray &coords, InternalStateType type, TimeStep *tStep)=0
Maps and update the unknown of given type from old mesh oldd to new mesh to which gp belongs to...
MaterialMappingAlgorithmType
Enumerative type used to classify supported MaterialMappingAlgorithms.
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores receiver state to output stream.
Definition: intvarfield.C:81
void addAllElements()
Initialize the element set to contain all elements in the receiver domain.
Definition: set.C:212
ClassFactory & classFactory
Definition: classfactory.C:59
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
virtual void __init(Domain *dold, IntArray &varTypes, const FloatArray &coords, Set &sourceElemSet, TimeStep *tStep, bool iCohesiveZoneGP=false)=0
Initializes the receiver state before mapping.
virtual int evaluateAt(FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep)
Evaluates the field at given point.
Definition: intvarfield.C:57
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class representing solution step.
Definition: timestep.h:80

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