OOFEM 3.0
Loading...
Searching...
No Matches
anisolinearelasticmaterial.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 "structuralms.h"
38#include "floatmatrix.h"
39#include "classfactory.h"
40#include "dynamicinputrecord.h"
41
42namespace oofem {
44
45void
46AnisotropicLinearElasticMaterial :: initializeFrom(InputRecord &ir)
47{
48 LinearElasticMaterial :: initializeFrom(ir);
49
50 // read the stiffness coefficients arranged by rows from the diagonal to the right (21 values)
51 FloatArray stiffness;
53 if ( stiffness.giveSize() != 21 ) {
54 OOFEM_ERROR( "Incorrect size of stiff - should be 21, is %d\n", (int)stiffness.giveSize() );
55 }
56
57 // put the stiffness coefficients into a 6x6 matrix
58 for ( int k = 1, i = 1; i <= 6; i++ ) {
59 tangent.at(i, i) = stiffness.at(k++);
60 for ( int j = i + 1; j <= 6; j++ ) {
61 tangent.at(i, j) = tangent.at(j, i) = stiffness.at(k++);
62 }
63 }
64 this->computesSubTangents();
65
66 FloatArray alpha_input(6);
68 if ( alpha_input.giveSize() != 6 ) {
69 OOFEM_ERROR( "Incorrect size of talpha - should be 6, is %d\n", (int)alpha.giveSize() );
70 }
71 alpha = alpha_input;
72}
73
74
75void
76AnisotropicLinearElasticMaterial :: giveInputRecord(DynamicInputRecord &input)
77{
78 Material :: giveInputRecord(input);
79 FloatArray stiffness(21);
80 for ( int k = 1, i = 1; i <= 6; i++ ) {
81 for ( int j = i; j <= 6; j++ ) {
82 stiffness.at(k++) = tangent.at(i, j);
83 }
84 }
86
88}
89
90} // end namespace oofem
#define _IFT_AnisotropicLinearElasticMaterial_stiff
Stiffness coefficients arranged by rows from the diagonal to the right (21 values).
#define _IFT_AnisotropicLinearElasticMaterial_talpha
Thermal expansion, 6 components in strain-Voigt order,.
#define REGISTER_Material(class)
void setField(int item, InputFieldType id)
double & at(Index i)
Definition floatarray.h:202
Index giveSize() const
Returns the size of receiver.
Definition floatarray.h:261
FloatMatrixF< 6, 6 > tangent
Preconstructed 3d tangent.
FloatArrayF< 6 > alpha
Thermal expansion.
#define OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67

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