OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
structuralfe2material.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 structuralfe2material_h
36 #define structuralfe2material_h
37 
39 #include "Materials/structuralms.h"
40 
41 #include <memory>
42 
44 
45 #define _IFT_StructuralFE2Material_Name "structfe2material"
46 #define _IFT_StructuralFE2Material_fileName "filename"
47 #define _IFT_StructuralFE2Material_useNumericalTangent "use_num_tangent"
48 
49 
50 namespace oofem {
51 class EngngModel;
52 class PrescribedGradientHomogenization;
53 
55 {
56 protected:
58  std :: unique_ptr< EngngModel > rve;
61 
63  bool oldTangent;
64 
67 
68  std :: string mInputFile;
69 
70 
71 
72 public:
73  StructuralFE2MaterialStatus(int n, Domain * d, GaussPoint * g, const std :: string & inputfile);
75 
76  EngngModel *giveRVE() { return this->rve.get(); }
77  PrescribedGradientHomogenization *giveBC();// { return this->bc; }
78 
79  void markOldTangent();
80  void computeTangent(TimeStep *tStep);
81 
83  bool createRVE(int n, GaussPoint *gp, const std :: string &inputfile);
84 
86  void setTimeStep(TimeStep *tStep);
87 
89 
90  virtual const char *giveClassName() const { return "StructuralFE2MaterialStatus"; }
91 
92  virtual void initTempStatus();
93 
94  virtual void updateYourself(TimeStep *tStep);
95 
96  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
97  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
98 
99  const FloatArray &giveNormal() const { return mNormalDir; }
100  void letNormalBe(FloatArray iN) { mNormalDir = std :: move(iN); }
101 
102  double giveRveLength();
103 
105  virtual void copyStateVariables(const MaterialStatus &iStatus);
106  virtual void addStateVariables(const MaterialStatus &iStatus) {OOFEM_ERROR("Not implemented.")};
107 
108  // For debugging only
109  bool mNewlyInitialized;
110 
111 };
112 
113 
125 {
126 protected:
127  std :: string inputfile;
128  static int n;
130 
131 public:
132  StructuralFE2Material(int n, Domain * d);
133  virtual ~StructuralFE2Material();
134 
136  virtual void giveInputRecord(DynamicInputRecord &input);
137  virtual const char *giveInputRecordName() const { return _IFT_StructuralFE2Material_Name; }
138  virtual const char *giveClassName() const { return "StructuralFE2Material"; }
139  virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode) { return true; }
140 
141  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const;
142  // stress computation methods
143  virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep);
144 
145  virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep);
146 };
147 
148 } // end namespace oofem
149 #endif // structuralfe2material_h
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
virtual const char * giveClassName() const
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Class for homogenization of applied gradients.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
This class implements a structural material status information.
Definition: structuralms.h:65
virtual const char * giveInputRecordName() const
virtual const char * giveClassName() const
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: femcmpnn.C:77
MatResponseMode
Describes the character of characteristic material matrix.
void setTimeStep(TimeStep *tStep)
Copies time step data to RVE.
PrescribedGradientHomogenization * giveBC()
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: matstatus.h:140
virtual void addStateVariables(const MaterialStatus &iStatus)
#define OOFEM_ERROR(...)
Definition: error.h:61
#define _IFT_StructuralFE2Material_Name
const FloatArray & giveNormal() const
FloatArray mNormalDir
Interface normal direction.
std::unique_ptr< EngngModel > rve
The RVE.
PrescribedGradientHomogenization * bc
Boundary condition in RVE that performs the computational homogenization.
Abstract base class representing a material status information.
Definition: matstatus.h:84
Class representing vector of real numbers.
Definition: floatarray.h:82
bool createRVE(int n, GaussPoint *gp, const std::string &inputfile)
Creates/Initiates the RVE problem.
StructuralFE2MaterialStatus(int n, Domain *d, GaussPoint *g, const std::string &inputfile)
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
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
virtual void copyStateVariables(const MaterialStatus &iStatus)
Functions for MaterialStatusMapperInterface.
Class representing the general Input Record.
Definition: inputrecord.h:101
Class representing the a dynamic Input Record.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
Abstract base class for all "structural" constitutive models.
Multiscale constitutive model for subscale structural problems.
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.
virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode)
Returns true if stiffness matrix of receiver is symmetric Default implementation returns true...
Class representing integration point in finite element program.
Definition: gausspoint.h:93
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:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011