56 inline virtual unsigned long GetMat_Mod(
void)
const {
return 0; }
71 inline virtual unsigned long GetDV(
void)
const {
return 0; }
113 unsigned long iMat_Mod = 0;
114 unsigned long iElectric_Prop = 0;
115 unsigned long iDV = 0;
128 CElementProperty(
unsigned long valMat_Model,
unsigned long valMat_Prop,
unsigned long valElectric_Prop,
129 unsigned long valDV,
su2double valDensity = 1.0)
131 iMat_Mod(valMat_Model),
132 iElectric_Prop(valElectric_Prop),
134 design_rho(valDensity),
135 physical_rho(valDensity) {}
145 inline unsigned long GetMat_Mod(
void)
const override {
return iMat_Mod; }
155 inline unsigned long GetDV(
void)
const override {
return iDV; }
Class for defining element properties for the structural solver.
Definition CElementProperty.hpp:111
void RegisterDensity(void) override
Register the Design density as an AD input variable.
Definition CElementProperty.hpp:189
void SetPhysicalDensity(su2double valDensity) override
Set the Physical density (used to penalize element stiffness by the FEM solver).
Definition CElementProperty.hpp:170
CElementProperty(unsigned long valMat_Model, unsigned long valMat_Prop, unsigned long valElectric_Prop, unsigned long valDV, su2double valDensity=1.0)
Constructor of the class.
Definition CElementProperty.hpp:128
su2double GetAdjointDensity(void) override
Extract the derivative of the Design density.
Definition CElementProperty.hpp:180
void SetDesignDensity(su2double valDensity) override
Set the Design density (topology optimization variable).
Definition CElementProperty.hpp:160
~CElementProperty(void) override
Destructor of the class.
Definition CElementProperty.hpp:140
su2double GetPhysicalDensity(void) const override
Get the value of the Physical density.
Definition CElementProperty.hpp:175
unsigned long GetElectric_Prop(void) const override
Get index of the electric properties.
Definition CElementProperty.hpp:150
su2double GetDesignDensity(void) const override
Get the value of the Design density.
Definition CElementProperty.hpp:165
unsigned long GetMat_Mod(void) const override
Get the material model to use for the element.
Definition CElementProperty.hpp:145
unsigned long GetDV(void) const override
Get index of the design variable.
Definition CElementProperty.hpp:155
Base class for defining element properties.
Definition CElementProperty.hpp:37
virtual su2double GetPhysicalDensity(void) const
Get the value of the Physical density.
Definition CElementProperty.hpp:91
CProperty(unsigned long valMat_Prop)
Constructor of the class.
Definition CElementProperty.hpp:46
virtual su2double GetAdjointDensity(void)
Extract the derivative of the Design density.
Definition CElementProperty.hpp:96
virtual ~CProperty(void)
Destructor of the class.
Definition CElementProperty.hpp:51
virtual unsigned long GetElectric_Prop(void) const
Get index of the electric properties.
Definition CElementProperty.hpp:66
unsigned long iMat_Prop
Index of the properties (E, Nu) for the structural model used.
Definition CElementProperty.hpp:39
virtual su2double GetDesignDensity(void) const
Get the value of the Design density.
Definition CElementProperty.hpp:81
virtual void RegisterDensity(void)
Register the Design density as an AD input variable.
Definition CElementProperty.hpp:101
virtual unsigned long GetMat_Mod(void) const
Get the material model to use for the element.
Definition CElementProperty.hpp:56
virtual void SetDesignDensity(su2double valDensity)
Set the Design density (topology optimization variable).
Definition CElementProperty.hpp:76
virtual unsigned long GetDV(void) const
Get index of the design variable.
Definition CElementProperty.hpp:71
virtual void SetPhysicalDensity(su2double valDensity)
Set the Physical density (used to penalize element stiffness by the FEM solver).
Definition CElementProperty.hpp:86
unsigned long GetMat_Prop(void) const
Get index of the physical properties.
Definition CElementProperty.hpp:61
passivedouble su2double
Definition code_config.hpp:181
void RegisterInput(su2double &data)
Registers the variable as an input. I.e. as a leaf of the computational graph.
Definition ad_structure.hpp:101
void ResetInput(su2double &data)
Reset the variable (set index to zero).
Definition ad_structure.hpp:179
passivedouble GetDerivative(const su2double &data)
Get the derivative value of the datatype (needs to be implemented for each new type).
Definition datatype_structure.hpp:117