OOFEM 3.0
Loading...
Searching...
No Matches
latticestructuralmaterial.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 - 2025 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
37#include "domain.h"
38#include "verbose.h"
42#include "gausspoint.h"
43#include "floatmatrix.h"
44#include "floatarray.h"
45#include "floatmatrixf.h"
46#include "floatarrayf.h"
47#include "mathfem.h"
48#include "engngm.h"
49#include "fieldmanager.h"
50#include "dynamicinputrecord.h"
51
52namespace oofem {
53LatticeStructuralMaterial :: LatticeStructuralMaterial(int n, Domain *d) : StructuralMaterial(n, d) { }
54
55
56bool
57LatticeStructuralMaterial :: hasMaterialModeCapability(MaterialMode mode) const
58//
59// returns whether receiver supports given mode
60//
61{
62 return mode == _3dLattice || mode == _2dLattice || mode == _1dLattice;
63}
64
65void
66LatticeStructuralMaterial :: giveStiffnessMatrix(FloatMatrix &answer,
67 MatResponseMode rMode,
68 GaussPoint *gp, TimeStep *tStep) const
69//
70// Returns characteristic material stiffness matrix of the receiver
71//
72{
73 answer = this->give3dLatticeStiffnessMatrix(rMode, gp, tStep);
74}
75
76
77int
78LatticeStructuralMaterial :: giveIPValue(FloatArray &answer,
79 GaussPoint *gp,
81 TimeStep *atTime)
82{
83 auto status = static_cast< LatticeMaterialStatus * >( this->giveStatus(gp) );
84
85 if ( type == IST_LatticeStress ) {
86 answer = status->giveLatticeStress();
87 return 1;
88 } else if ( type == IST_LatticeStrain ) {
89 answer = status->giveLatticeStrain();
90 return 1;
91 } else {
92 return StructuralMaterial :: giveIPValue(answer, gp, type, atTime);
93 }
94}
95
96
97double
98LatticeStructuralMaterial :: giveLatticeStress1d(double strain, GaussPoint *gp, TimeStep *tStep)
99{
100 FloatArrayF< 6 >tempStrain;
101 tempStrain [ 0 ] = strain;
102 auto answer = giveLatticeStress3d(tempStrain, gp, tStep);
103 return answer [ 0 ];
104}
105
107LatticeStructuralMaterial :: giveLatticeStress2d(const FloatArrayF< 3 > &strain, GaussPoint *gp, TimeStep *tStep)
108{
109 auto answer = giveLatticeStress3d(assemble< 6 >(strain, { 0, 1, 5 }), gp, tStep);
110 return answer [ { 0, 1, 5 } ];
111}
112
114LatticeStructuralMaterial :: giveLatticeStress3d(const FloatArrayF< 6 > &strain, GaussPoint *gp, TimeStep *tStep)
115{
116 OOFEM_ERROR("3dLattice mode not supported");
117}
118
120LatticeStructuralMaterial :: give1dLatticeStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
121//
122// return material stiffness matrix for 1dlattice
123//
124{
125 OOFEM_ERROR("No general implementation provided");
126}
127
129LatticeStructuralMaterial :: give2dLatticeStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
130//
131// return material stiffness matrix for 2dlattice
132//
133{
134 OOFEM_ERROR("No general implementation provided");
135}
136
138LatticeStructuralMaterial :: give3dLatticeStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
139//
140// return material stiffness matrix for 2dlattice
141//
142{
143 OOFEM_ERROR("No general implementation provided");
144}
145} // end namespace oofem
virtual FloatMatrixF< 6, 6 > give3dLatticeStiffnessMatrix(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
virtual FloatArrayF< 6 > giveLatticeStress3d(const FloatArrayF< 6 > &strain, GaussPoint *gp, TimeStep *tStep)
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
StructuralMaterial(int n, Domain *d)
#define OOFEM_ERROR(...)
Definition error.h:79
FloatArrayF< N > assemble(const FloatArrayF< M > &x, int const (&c)[M])
Assemble components into zero matrix.

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011