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/MarmotUtils.h"
31 #include <string>
32 #include <vector>
33 
35 
36 public:
37  enum StateTypes {
45  };
46 
51  };
52 
53  virtual ~MarmotElement();
54 
55  virtual int getNumberOfRequiredStateVars() = 0;
56 
57  virtual std::vector< std::vector< std::string > > getNodeFields() = 0;
58 
59  virtual std::vector< int > getDofIndicesPermutationPattern() = 0;
60 
61  virtual int getNNodes() = 0;
62 
63  virtual int getNSpatialDimensions() = 0;
64 
65  virtual int getNDofPerElement() = 0;
66 
67  virtual std::string getElementShape() = 0;
68 
69  virtual void assignStateVars( double* stateVars, int nStateVars ) = 0;
70 
71  virtual void assignProperty( const ElementProperties& property );
72 
73  virtual void assignProperty( const MarmotMaterialSection& property );
74 
75  virtual void assignNodeCoordinates( const double* coordinates ) = 0;
76 
77  virtual void initializeYourself() = 0;
78 
79  virtual void setInitialConditions( StateTypes state, const double* values ) = 0;
80 
81  virtual void computeYourself( const double* QTotal,
82  const double* dQ,
83  double* Pint,
84  double* K,
85  const double* time,
86  double dT,
87  double& pNewdT ) = 0;
88 
90  double* Pext,
91  double* K,
92  int elementFace,
93  const double* load,
94  const double* QTotal,
95  const double* time,
96  double dT ) = 0;
97 
98  virtual void computeBodyForce( double* Pext,
99  double* K,
100  const double* load,
101  const double* QTotal,
102  const double* time,
103  double dT ) = 0;
104 
105  virtual StateView getStateView( const std::string& stateName, int quadraturePoint ) = 0;
106 
107  virtual std::vector< double > getCoordinatesAtCenter() = 0;
108 
109  virtual std::vector< std::vector< double > > getCoordinatesAtQuadraturePoints() = 0;
110 
111  virtual int getNumberOfQuadraturePoints() = 0;
112 };
MarmotElement::GeostaticStress
@ GeostaticStress
Definition: MarmotElement.h:42
MarmotElement::~MarmotElement
virtual ~MarmotElement()
ElementProperties
Definition: MarmotElementProperty.h:42
MarmotElement::MarmotMaterialStateVars
@ MarmotMaterialStateVars
Definition: MarmotElement.h:43
MarmotElement::assignProperty
virtual void assignProperty(const ElementProperties &property)
MarmotElement::MarmotMaterialInitialization
@ MarmotMaterialInitialization
Definition: MarmotElement.h:44
MarmotElement
Definition: MarmotElement.h:34
MarmotElement::Sigma11
@ Sigma11
Definition: MarmotElement.h:38
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:40
MarmotElement::DistributedLoadTypes
DistributedLoadTypes
Definition: MarmotElement.h:47
MarmotElement::SurfaceTraction
@ SurfaceTraction
Definition: MarmotElement.h:50
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:37
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:41
MarmotMaterialSection
Definition: MarmotElementProperty.h:30
MarmotElement::Pressure
@ Pressure
Definition: MarmotElement.h:48
MarmotElement::SurfaceTorsion
@ SurfaceTorsion
Definition: MarmotElement.h:49
MarmotElement::Sigma22
@ Sigma22
Definition: MarmotElement.h:39
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