OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
matstatmapperint.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 /*
36  * matstatmapperint.C
37  *
38  * Created on: Nov 6, 2013
39  * Author: Erik Svenning
40  */
41 
42 #include "matstatmapperint.h"
43 
44 #include "error.h"
46 #include "mmaclosestiptransfer.h"
47 #include "matstatus.h"
48 
49 namespace oofem {
51 {
53 }
54 
56 {
57  if ( mpMaterialMapper != NULL ) {
58  delete mpMaterialMapper;
59  mpMaterialMapper = NULL;
60  }
61 }
62 
63 int MaterialStatusMapperInterface :: MSMI_map(const GaussPoint &iGP, const Domain &iOldDom, Set &sourceSet, const TimeStep &iTStep, MaterialStatus &oStatus)
64 {
65  // Mapping of "regular" Gauss points
66  int result = 1;
67 
68  Domain *dold = const_cast< Domain * >(& iOldDom);
69  GaussPoint *gp = const_cast< GaussPoint * >(& iGP);
70  TimeStep *tStep = const_cast< TimeStep * >(& iTStep);
71  IntArray type;
72 
73  mpMaterialMapper->init(dold, type, gp, sourceSet, tStep);
74 
75  mpMaterialMapper->mapStatus(oStatus);
76 
77 
78  return result;
79 }
80 
81 int MaterialStatusMapperInterface :: MSMI_map_cz(const GaussPoint &iGP, const Domain &iOldDom, Set &sourceSet, const TimeStep &iTStep, MaterialStatus &oStatus)
82 {
83  // Mapping of cohesive zone Gauss points
84  int result = 1;
85 
86  Domain *dold = const_cast< Domain * >(& iOldDom);
87  GaussPoint *gp = const_cast< GaussPoint * >(& iGP);
88  TimeStep *tStep = const_cast< TimeStep * >(& iTStep);
89  IntArray type;
90  bool gpBelongsToCohesiveZone = true;
91 
92  mpMaterialMapper->init(dold, type, gp, sourceSet, tStep, gpBelongsToCohesiveZone);
93 
94  mpMaterialMapper->mapStatus(oStatus);
95 
96  return result;
97 }
98 
99 
101 {
102  int result = 1;
103 
104 
105 
106  return result;
107 }
108 
110 {
111  int result = 1;
112 
113 
114 
115  return result;
116 }
117 } /* namespace oofem */
Class and object Domain.
Definition: domain.h:115
The class implements the closest integration point transfer of state variables.
void init(Domain *dold, IntArray &varTypes, GaussPoint *gp, Set &sourceElemSet, TimeStep *tStep, bool iCohesiveZoneGP=false)
Initializes the receiver state before mapping.
virtual int MSMI_finish(const TimeStep &iTStep)
Finishes the mapping for given time step.
virtual int MSMI_update(const GaussPoint &iGP, const TimeStep &iTStep)
Updates the internal state variables from previously mapped values.
Class implementing an array of integers.
Definition: intarray.h:61
MaterialMappingAlgorithm * mpMaterialMapper
Set of elements, boundaries, edges and/or nodes.
Definition: set.h:66
virtual int MSMI_map(const GaussPoint &iGP, const Domain &iOldDom, Set &sourceSet, const TimeStep &iTStep, MaterialStatus &oStatus)
Maps all internal state variables from the old domain to the given gp status.
virtual int mapStatus(MaterialStatus &oStatus) const =0
Initializes receiver according to object description stored in input record.
virtual int MSMI_map_cz(const GaussPoint &iGP, const Domain &iOldDom, Set &sourceSet, const TimeStep &iTStep, MaterialStatus &oStatus)
Abstract base class representing a material status information.
Definition: matstatus.h:84
the oofem namespace is to define a context or scope in which all oofem names are defined.
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:29 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011