OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
micromaterial.h
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 #ifndef micromaterial_h
36 #define micromaterial_h
37 
38 #include "structuralmaterial.h"
39 #include "../sm/Materials/structuralms.h"
40 #include "dictionary.h"
41 #include "floatarray.h"
42 #include "floatmatrix.h"
43 #include "sparsemtrx.h"
44 #include "datastream.h"
45 #include "contextioerr.h"
46 #include "unknownnumberingscheme.h"
47 #include "boundarycondition.h"
49 #include "error.h"
50 
52 
53 #define _IFT_MicroMaterial_Name "micromat"
54 #define _IFT_MicroMaterial_fileName "file"
55 
56 
57 namespace oofem {
58 class UnknownNumberingScheme;
59 class MicroMaterial;
60 class MacroLSpace;
61 
63 {
64 public:
67 
69  virtual ~MicroMaterialStatus();
70 
71  virtual void initTempStatus();
72  virtual void updateYourself(TimeStep *tStep);
73  virtual void printOutputAt(FILE *file, TimeStep *tStep);
74 
75  virtual const char *giveClassName() const { return "MicroMaterialStatus"; }
76 
77  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
78  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
79 };
80 
81 
90 {
91 public:
93  MicroMaterial(int n, Domain * d);
95  virtual ~MicroMaterial();
96 
97  std :: string inputFileNameMicro;
98 
100 
101  virtual const char *giveInputRecordName() const { return _IFT_MicroMaterial_Name; }
102  virtual const char *giveClassName() const { return "MicroMaterial"; }
103 
104  virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *, const FloatArray &, TimeStep *);
105 
106  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const;
107 
108  void giveMacroStiffnessMatrix(FloatMatrix &answer, TimeStep *tStep, MatResponseMode rMode, const IntArray &microMasterNodes, const IntArray &microBoundaryNodes);
109 
110  void setMacroProperties(Domain *macroDomain, MacroLSpace *macroLSpaceElement, const IntArray &microMasterNodes, const IntArray &microBoundaryNodes);
111 
114 
117 
120 
122  void init(void);
123  int giveDofEquationNumber(Dof *dof) const;
124  virtual bool isDefault() const { return isDefaultNumbering; }
125  virtual int giveRequiredNumberOfDomainEquation() const;
126  //friend class EngngModel;-not here but define in EngngModel class
128  std::vector< FloatArray >microMasterCoords;
141 
142 protected:
150  enum EquationNumbering { AllNodes, BoundaryNodes, InteriorNodes };
156 };
157 } // end namespace oofem
158 #endif // micromaterial_h
virtual const char * giveClassName() const
Definition: micromaterial.h:75
EngngModel * problemMicro
Pointer to the underlying micro problem.
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
EquationNumbering DofEquationNumbering
IntArray microBoundaryDofsArr
Array of equation numbers associated to boundary nodes.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
int totalBoundaryDofs
Number of equations associated with boundary nodes.
IntArray microInternalDofsArr
Array of equation numbers associated to internal nodes.
virtual ~MicroMaterialStatus()
Destructor.
Definition: micromaterial.C:69
This class implements a structural material status information.
Definition: structuralms.h:65
int reqNumberOfDomainEquation
Required number of domain equations.
MicroMaterialStatus(int, Domain *d, GaussPoint *gp)
Constructor.
Definition: micromaterial.C:67
std::vector< FloatArray > microMasterCoords
Array containing coordinates of 8 master nodes of microproblem.
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.
Definition: micromaterial.C:81
int NumberOfDofManagers
Number of DOF Managers.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: micromaterial.C:71
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
Definition: micromaterial.C:76
int ** microBoundaryDofs
Array containing equation numbers for boundary nodes [DofManagerNumber][DOF].
This class is a base class for microproblem.
Definition: micromaterial.h:89
bool microMatIsUsed
Flag signalizing whether micromaterial is used by other element.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: matstatus.h:140
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: micromaterial.C:84
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: micromaterial.C:89
std::string inputFileNameMicro
Definition: micromaterial.h:97
Abstract base class representing a material status information.
Definition: matstatus.h:84
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
int ** microInternalDofs
Array containing equation numbers for internal nodes to be condensed out [DofManagerNumber][DOF].
Class representing the general Input Record.
Definition: inputrecord.h:101
This class implements a macroelement.
Definition: macrolspace.h:59
int ** microDefaultDofs
Array containing default equation numbers for all nodes [DofManagerNumber][DOF].
virtual bool isDefault() const
Returns true, if receiver is the default engngModel equation numbering scheme; This is useful for som...
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
int maxNumberOfDomainEquation
The maximum DOFs corresponding to released all of the boundary conditions.
Abstract base class for all "structural" constitutive models.
#define _IFT_MicroMaterial_Name
Definition: micromaterial.h:53
MacroLSpace * macroLSpaceElement
Pointer to the macroscale element.
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
the oofem namespace is to define a context or scope in which all oofem names are defined.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
virtual const char * giveClassName() const
Domain * macroDomain
Pointer to the macroscale domain.
int totalInternalDofs
Number of equations associated with boundary nodes.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
virtual const char * giveInputRecordName() const

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