VonMises.h
Go to the documentation of this file.
1 /* ---------------------------------------------------------------------
2  * _
3  * _ __ ___ __ _ _ __ _ __ ___ ___ | |_
4  * | '_ ` _ \ / _` | '__| '_ ` _ \ / _ \| __|
5  * | | | | | | (_| | | | | | | | | (_) | |_
6  * |_| |_| |_|\__,_|_| |_| |_| |_|\___/ \__|
7  *
8  * Unit of Strength of Materials and Structural Analysis
9  * University of Innsbruck,
10  * 2020 - today
11  *
12  * festigkeitslehre@uibk.ac.at
13  *
14  * Matthias Neuner matthias.neuner@uibk.ac.at
15  *
16  * This file is part of the MAteRialMOdellingToolbox (marmot).
17  *
18  * This library is free software; you can redistribute it and/or
19  * modify it under the terms of the GNU Lesser General Public
20  * License as published by the Free Software Foundation; either
21  * version 2.1 of the License, or (at your option) any later version.
22  *
23  * The full text of the license can be found in the file LICENSE.md at
24  * the top level directory of marmot.
25  * ---------------------------------------------------------------------
26  */
27 #pragma once
30 #include "Marmot/MarmotTypedefs.h"
31 
32 namespace Marmot::Materials {
33 
35 
36  public:
37  using MarmotMaterialHypoElastic::MarmotMaterialHypoElastic;
38 
39  void computeStress( double* stress,
40  double* dStress_dStrain,
41 
42  const double* dStrain,
43  const double* timeOld,
44  const double dT,
45  double& pNewDT ) override;
46 
48 
49  public:
50  inline const static auto layout = makeLayout( {
51  { .name = "kappa", .length = 1 },
52  } );
53 
54  double& kappa;
55 
56  VonMisesModelStateVarManager( double* theStateVarVector )
57  : MarmotStateVarVectorManager( theStateVarVector, layout ), kappa( find( "kappa" ) ){};
58  };
59  std::unique_ptr< VonMisesModelStateVarManager > managedStateVars;
60 
61  int getNumberOfRequiredStateVars() override { return VonMisesModelStateVarManager::layout.nRequiredStateVars; }
62 
63  void assignStateVars( double* stateVars, int nStateVars ) override;
64 
65  StateView getStateView( const std::string& result ) override;
66  };
67 
68 } // namespace Marmot::Materials
MarmotMaterialHypoElastic.h
Marmot::Materials::VonMisesModel::VonMisesModelStateVarManager::layout
static const auto layout
Definition: VonMises.h:50
Marmot::Materials::VonMisesModel::getStateView
StateView getStateView(const std::string &result) override
Definition: VonMises.cpp:26
MarmotTypedefs.h
Marmot::Materials::VonMisesModel::VonMisesModelStateVarManager::VonMisesModelStateVarManager
VonMisesModelStateVarManager(double *theStateVarVector)
Definition: VonMises.h:56
Marmot::Materials::VonMisesModel::assignStateVars
void assignStateVars(double *stateVars, int nStateVars) override
Definition: VonMises.cpp:17
Marmot::Materials::VonMisesModel::managedStateVars
std::unique_ptr< VonMisesModelStateVarManager > managedStateVars
Definition: VonMises.h:59
Marmot::Materials
Definition: MarmotKelvinChain.h:33
Marmot::Materials::VonMisesModel::VonMisesModelStateVarManager
Definition: VonMises.h:47
Marmot::Materials::VonMisesModel::computeStress
void computeStress(double *stress, double *dStress_dStrain, const double *dStrain, const double *timeOld, const double dT, double &pNewDT) override
Definition: VonMises.cpp:31
MarmotStateVarVectorManager
A convenience auxiliary class for managing multiple statevars with arbitrary length in a single conse...
Definition: MarmotStateVarVectorManager.h:37
MarmotStateVarVectorManager.h
StateView
Definition: MarmotUtils.h:29
Marmot::Materials::VonMisesModel
Definition: VonMises.h:34
MarmotStateVarVectorManager::makeLayout
static StateVarVectorLayout makeLayout(const std::vector< StateVarEntryDefinition > &theEntries)
generate the statevar vector layout from a list of entries, defined by name and length
Definition: MarmotStateVarVectorManager.h:74
Marmot::Materials::VonMisesModel::getNumberOfRequiredStateVars
int getNumberOfRequiredStateVars() override
Definition: VonMises.h:61
MarmotMaterial::stateVars
double * stateVars
Definition: MarmotMaterial.h:38
Marmot::Materials::VonMisesModel::VonMisesModelStateVarManager::kappa
double & kappa
Definition: VonMises.h:54
MarmotMaterial::nStateVars
int nStateVars
Definition: MarmotMaterial.h:39
MarmotStateVarVectorManager::find
double & find(const std::string &name) const
get the reference to the first array element of an entry in the statevar vector
Definition: MarmotStateVarVectorManager.h:48
MarmotMaterialHypoElastic
Definition: MarmotMaterialHypoElastic.h:54