MarmotElement.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  * Magdalena Schreter magdalena.schreter@uibk.ac.at
16  *
17  * This file is part of the MAteRialMOdellingToolbox (marmot).
18  *
19  * This library is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU Lesser General Public
21  * License as published by the Free Software Foundation; either
22  * version 2.1 of the License, or (at your option) any later version.
23  *
24  * The full text of the license can be found in the file LICENSE.md at
25  * the top level directory of marmot.
26  * ---------------------------------------------------------------------
27  */
28 #pragma once
30 #include "Marmot/MarmotJournal.h"
31 #include "Marmot/MarmotUtils.h"
32 #include <stdexcept>
33 #include <string>
34 #include <vector>
35 
37 
38 public:
39  enum StateTypes {
47  };
48 
53  };
54 
55  virtual ~MarmotElement();
56 
57  virtual int getNumberOfRequiredStateVars() = 0;
58 
59  virtual std::vector< std::vector< std::string > > getNodeFields() = 0;
60 
61  virtual std::vector< int > getDofIndicesPermutationPattern() = 0;
62 
63  virtual int getNNodes() = 0;
64 
65  virtual int getNSpatialDimensions() = 0;
66 
67  virtual int getNDofPerElement() = 0;
68 
69  virtual std::string getElementShape() = 0;
70 
71  virtual void assignStateVars( double* stateVars, int nStateVars ) = 0;
72 
73  virtual void assignProperty( const ElementProperties& property );
74 
75  virtual void assignProperty( const MarmotMaterialSection& property );
76 
77  virtual void assignNodeCoordinates( const double* coordinates ) = 0;
78 
79  virtual void initializeYourself() = 0;
80 
81  virtual void setInitialConditions( StateTypes state, const double* values ) = 0;
82 
83  virtual void computeYourself( const double* QTotal,
84  const double* dQ,
85  double* Pint,
86  double* K,
87  const double* time,
88  double dT,
89  double& pNewdT ) = 0;
90 
92  double* Pext,
93  double* K,
94  int elementFace,
95  const double* load,
96  const double* QTotal,
97  const double* time,
98  double dT ) = 0;
99 
100  virtual void computeBodyForce( double* Pext,
101  double* K,
102  const double* load,
103  const double* QTotal,
104  const double* time,
105  double dT ) = 0;
106 
107  virtual void computeLumpedInertia( double* I )
108  {
109  throw std::invalid_argument( MakeString() << __PRETTY_FUNCTION__ << "not yet implemented" );
110  };
111 
112  virtual void computeConsistentInertia( double* I )
113  {
114  throw std::invalid_argument( MakeString() << __PRETTY_FUNCTION__ << "not yet implemented" );
115  };
116 
117  virtual StateView getStateView( const std::string& stateName, int quadraturePoint ) = 0;
118 
119  virtual std::vector< double > getCoordinatesAtCenter() = 0;
120 
121  virtual std::vector< std::vector< double > > getCoordinatesAtQuadraturePoints() = 0;
122 
123  virtual int getNumberOfQuadraturePoints() = 0;
124 };
MarmotElement::GeostaticStress
@ GeostaticStress
Definition: MarmotElement.h:44
MarmotElement::~MarmotElement
virtual ~MarmotElement()
ElementProperties
Definition: MarmotElementProperty.h:42
MarmotElement::MarmotMaterialStateVars
@ MarmotMaterialStateVars
Definition: MarmotElement.h:45
MarmotElement::assignProperty
virtual void assignProperty(const ElementProperties &property)
MarmotElement::MarmotMaterialInitialization
@ MarmotMaterialInitialization
Definition: MarmotElement.h:46
MarmotElement
Definition: MarmotElement.h:36
MarmotJournal.h
MarmotElement::Sigma11
@ Sigma11
Definition: MarmotElement.h:40
MarmotElement::getStateView
virtual StateView getStateView(const std::string &stateName, int quadraturePoint)=0
MarmotElement::assignProperty
virtual void assignProperty(const MarmotMaterialSection &property)
MarmotElement::getNodeFields
virtual std::vector< std::vector< std::string > > getNodeFields()=0
MarmotElement::getDofIndicesPermutationPattern
virtual std::vector< int > getDofIndicesPermutationPattern()=0
MarmotElement::assignStateVars
virtual void assignStateVars(double *stateVars, int nStateVars)=0
MarmotElementProperty.h
MarmotElement::Sigma33
@ Sigma33
Definition: MarmotElement.h:42
MarmotElement::DistributedLoadTypes
DistributedLoadTypes
Definition: MarmotElement.h:49
MarmotElement::SurfaceTraction
@ SurfaceTraction
Definition: MarmotElement.h:52
Marmot::ContinuumMechanics::VoigtNotation::I
const Marmot::Vector6d I
Definition: MarmotVoigt.cpp:19
MarmotElement::computeDistributedLoad
virtual void computeDistributedLoad(DistributedLoadTypes loadType, double *Pext, double *K, int elementFace, const double *load, const double *QTotal, const double *time, double dT)=0
MarmotElement::getNDofPerElement
virtual int getNDofPerElement()=0
StateView
Definition: MarmotUtils.h:29
MarmotElement::getNNodes
virtual int getNNodes()=0
MarmotElement::computeBodyForce
virtual void computeBodyForce(double *Pext, double *K, const double *load, const double *QTotal, const double *time, double dT)=0
MarmotElement::getNumberOfRequiredStateVars
virtual int getNumberOfRequiredStateVars()=0
MarmotElement::initializeYourself
virtual void initializeYourself()=0
MarmotUtils.h
MarmotElement::StateTypes
StateTypes
Definition: MarmotElement.h:39
MarmotElement::computeConsistentInertia
virtual void computeConsistentInertia(double *I)
Definition: MarmotElement.h:112
MarmotElement::getNumberOfQuadraturePoints
virtual int getNumberOfQuadraturePoints()=0
MarmotElement::getNSpatialDimensions
virtual int getNSpatialDimensions()=0
MarmotElement::getCoordinatesAtQuadraturePoints
virtual std::vector< std::vector< double > > getCoordinatesAtQuadraturePoints()=0
MarmotElement::getElementShape
virtual std::string getElementShape()=0
MarmotElement::HydrostaticStress
@ HydrostaticStress
Definition: MarmotElement.h:43
MarmotMaterialSection
Definition: MarmotElementProperty.h:30
MarmotElement::Pressure
@ Pressure
Definition: MarmotElement.h:50
MarmotElement::SurfaceTorsion
@ SurfaceTorsion
Definition: MarmotElement.h:51
MarmotElement::Sigma22
@ Sigma22
Definition: MarmotElement.h:41
MarmotElement::computeYourself
virtual void computeYourself(const double *QTotal, const double *dQ, double *Pint, double *K, const double *time, double dT, double &pNewdT)=0
MarmotElement::getCoordinatesAtCenter
virtual std::vector< double > getCoordinatesAtCenter()=0
MarmotElement::assignNodeCoordinates
virtual void assignNodeCoordinates(const double *coordinates)=0
MarmotElement::setInitialConditions
virtual void setInitialConditions(StateTypes state, const double *values)=0
MakeString
Definition: MarmotJournal.h:32
MarmotElement::computeLumpedInertia
virtual void computeLumpedInertia(double *I)
Definition: MarmotElement.h:107