OOFEM 3.0
Loading...
Searching...
No Matches
anisomassmat.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
36#include "floatmatrix.h"
37#include "floatmatrixf.h"
38#include "gausspoint.h"
39#include "classfactory.h"
40
41#include <cstdlib>
42
43namespace oofem {
45
46void
47AnisotropicMassTransferMaterial :: initializeFrom(InputRecord &ir)
48{
49 TransportMaterial :: initializeFrom(ir);
50
52 IR_GIVE_FIELD(ir, c, _IFT_AnisotropicMassTransferMaterial_c); // Read permeability matrix c from input file
53 if ( c.giveNumberOfColumns() != 3 && c.giveNumberOfRows() != 3 ) {
55 }
56 k = c;
57}
58
59
61AnisotropicMassTransferMaterial :: computeFlux3D(const FloatArrayF<3> &grad, double field, GaussPoint *gp, TimeStep *tStep) const
62{
63 auto ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) );
64 auto answer = - dot(k, grad);
65 ms->setTempField(field);
66 ms->setTempGradient(grad);
67 ms->setTempFlux(answer);
68 return answer;
69}
70
71
73AnisotropicMassTransferMaterial :: computeTangent3D(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
74{
75 return k;
76}
77
78
79double
80AnisotropicMassTransferMaterial :: giveCharacteristicValue(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
81{
82 OOFEM_ERROR("unknown mode (%s)", __MatResponseModeToString(mode) );
83}
84} // end namespace oofem
#define _IFT_AnisotropicMassTransferMaterial_c
#define REGISTER_Material(class)
FloatMatrixF< 3, 3 > k
Conductivity/permeability matrix.
int giveNumberOfColumns() const
Returns number of columns of receiver.
int giveNumberOfRows() const
Returns number of rows of receiver.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
#define OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
double dot(const FloatArray &x, const FloatArray &y)

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