80#ifndef CODI_FORWARD_TYPE
133 default: assert(
false); nNodes = 0; EL_KIND = -(1<<30);
break;
253 unsigned short iMesh,
254 unsigned long Iteration,
255 unsigned short RunTime_EqSystem,
256 bool Output)
override;
268 unsigned long TimeIter)
override;
277 unsigned long indexNode,
278 unsigned short iDim)
const {
361 unsigned short val_marker)
final;
371 unsigned short val_marker)
final;
381 unsigned short val_marker)
final;
391 unsigned short val_marker)
final;
402 unsigned short val_marker)
final;
412 unsigned short val_marker)
final;
422 unsigned short val_marker)
final { }
432 unsigned short val_marker)
final;
555 switch (config->GetKind_ObjFunc()) {
578 if (config->GetWeakly_Coupled_Heat()) {
579 solver[
HEAT_SOL]->Evaluate_ObjFunc(config, solver);
662 unsigned long iOuterIter)
final;
733 bool val_update_geo)
override;
752 bool reset)
override;
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Base class for FEM elasticity solvers.
Definition CFEASolverBase.hpp:41
Main class for defining a FEM solver for elastic structural problems.
Definition CFEASolver.hpp:38
void BC_Sine_Load(CGeometry *geometry, const CConfig *config, unsigned short val_marker) final
Impose a sine-wave load boundary condition in cartesian coordinates.
Definition CFEASolver.hpp:420
CSysVector< su2double > TimeRes
Vector for adding mass and damping contributions to the residual.
Definition CFEASolver.hpp:77
su2double GetTotal_OFStressPenalty(void) const final
Retrieve the value of the stress penalty objective function.
Definition CFEASolver.hpp:546
void SetTotal_CFEA(su2double val_cfea) final
Set the value of the FEA coefficient.
Definition CFEASolver.hpp:594
void GeneralizedAlpha_UpdateDisp(const CGeometry *geometry, const CConfig *config) final
Update the solution using an implicit Generalized Alpha solver.
Definition CFEASolver.cpp:2480
su2double Compute_LoadCoefficient(su2double CurrentTime, su2double RampTime, const CConfig *config) final
Get multiplier for loads.
Definition CFEASolver.cpp:2104
su2double GetTotal_CFEA(void) const final
Provide the maximum Von Mises Stress for structural analysis.
Definition CFEASolver.hpp:516
su2double Total_CFEA
Total FEA coefficient for all the boundaries.
Definition CFEASolver.hpp:43
void ComputeAitken_Coefficient(CGeometry *geometry, const CConfig *config, unsigned long iOuterIter) final
Computation of Aitken's coefficient.
Definition CFEASolver.cpp:2645
su2double GetLoad_Increment(void) const final
Get the value of the load increment for nonlinear structural analysis.
Definition CFEASolver.hpp:712
void Stiffness_Penalty(CGeometry *geometry, CNumerics **numerics_container, CConfig *config)
Compute the penalty due to the stiffness increase.
Definition CFEASolver.cpp:3061
void Compute_OFRefGeom(CGeometry *geometry, const CConfig *config)
Compute the objective function for a reference geometry.
Definition CFEASolver.cpp:2848
void Compute_BodyForces(CGeometry *geometry, CNumerics **numerics, const CConfig *config) final
Compute the inertial loads.
Definition CFEASolver.cpp:1449
void Compute_MassMatrix(const CGeometry *geometry, CNumerics **numerics, const CConfig *config) final
Compute the mass matrix of the problem.
Definition CFEASolver.cpp:897
void BC_Damper(CGeometry *geometry, const CConfig *config, unsigned short val_marker) final
Impose a damping load.
Definition CFEASolver.cpp:2046
su2double GetTotal_OFDiscreteness(void) const final
Retrieve the value of the discreteness objective function.
Definition CFEASolver.hpp:536
void ImplicitNewmark_Iteration(const CGeometry *geometry, CNumerics **numerics, const CConfig *config) final
Iterate using an implicit Newmark solver.
Definition CFEASolver.cpp:2178
su2double Total_ForwardGradient
Vector of the total forward gradient.
Definition CFEASolver.hpp:70
void Set_ElementProperties(CGeometry *geometry, CConfig *config)
Set container of element properties.
Definition CFEASolver.cpp:289
CSysVector< su2double > TimeRes_Aux
Auxiliary vector for adding mass and damping contributions to the residual.
Definition CFEASolver.hpp:76
void Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, CNumerics **numerics, unsigned short iMesh, unsigned long Iteration, unsigned short RunTime_EqSystem, bool Output) override
Set residuals to zero.
Definition CFEASolver.cpp:562
bool element_based
Bool to determine if an element-based file is used.
Definition CFEASolver.hpp:98
void ImplicitNewmark_Update(const CGeometry *geometry, const CConfig *config) final
Update the solution using an implicit Newmark solver.
Definition CFEASolver.cpp:2265
unsigned short * iElem_iDe
For DE cases, ID of the region considered for each iElem.
Definition CFEASolver.hpp:45
su2double Total_OFRefNode
Total Objective Function: Reference Node.
Definition CFEASolver.hpp:61
void Compute_StiffMatrix_NodalStressRes(CGeometry *geometry, CNumerics **numerics, const CConfig *config) final
Compute the stiffness matrix of the problem and the nodal stress terms at the same time.
Definition CFEASolver.cpp:750
su2double loadIncrement
Coefficient that determines the amount of load which is applied.
Definition CFEASolver.hpp:53
void Compute_StiffMatrix(CGeometry *geometry, CNumerics **numerics, const CConfig *config) final
Compute the stiffness matrix of the problem.
Definition CFEASolver.cpp:654
su2double GetTotal_OFRefNode(void) const final
Retrieve the value of the objective function for a reference node.
Definition CFEASolver.hpp:526
void Compute_OFCompliance(CGeometry *geometry, const CConfig *config)
Compute the compliance objective function.
Definition CFEASolver.cpp:3008
void Compute_OFVolFrac(CGeometry *geometry, const CConfig *config)
Compute the objective function for a volume fraction.
Definition CFEASolver.cpp:2965
static constexpr bool LockStrategy
Definition CFEASolver.hpp:94
su2double GetFSI_Residual(void) const final
Get the value of the FSI residual for the history file.
Definition CFEASolver.hpp:645
void BC_Dir_Load(CGeometry *geometry, const CConfig *config, unsigned short val_marker) final
Impose a load boundary condition in cartesian coordinates.
Definition CFEASolver.cpp:1984
bool initial_calc
Becomes false after first call to Preprocessing.
Definition CFEASolver.hpp:100
void BC_Normal_Load(CGeometry *geometry, const CConfig *config, unsigned short val_marker) final
Impose a load boundary condition normal to the boundary.
Definition CFEASolver.cpp:1889
void ImplicitNewmark_Relaxation(const CGeometry *geometry, const CConfig *config) final
A virtual member.
Definition CFEASolver.cpp:2316
array< DummyGridColor<>, 1 > ElemColoring
Definition CFEASolver.hpp:93
su2double RelaxCoeff
Relaxation coefficient .
Definition CFEASolver.hpp:73
void SetAitken_Relaxation(CGeometry *geometry, const CConfig *config) final
Aitken's relaxation of the solution.
Definition CFEASolver.cpp:2736
bool IsElementBased(void) const final
Determines whether there is an element-based file or not.
Definition CFEASolver.hpp:588
su2double Total_OFStressPenalty
Total Objective Function: Stress penalty.
Definition CFEASolver.hpp:65
su2double Global_OFRefNode
Global Objective Function (added over time steps): Reference Node.
Definition CFEASolver.hpp:68
void RegisterVariables(CGeometry *geometry, CConfig *config, bool reset) override
A virtual member.
Definition CFEASolver.cpp:3245
su2double Total_OFVolFrac
Total Objective Function: Volume fraction (topology optimization).
Definition CFEASolver.hpp:62
static void GetElemKindAndNumNodes(unsigned short VTK_Type, int &EL_KIND, unsigned short &nNodes)
Get the element container index and number of nodes of a given VTK type.
Definition CFEASolver.hpp:125
void Solve_System(CGeometry *geometry, CConfig *config) final
Routine to solve the Jacobian-Residual linearized system.
Definition CFEASolver.cpp:2558
su2double Total_OFRefGeom
Total Objective Function: Reference Geometry.
Definition CFEASolver.hpp:60
void ExtractAdjoint_Variables(CGeometry *geometry, CConfig *config) override
A virtual member.
Definition CFEASolver.cpp:3257
void Compute_MassRes(const CGeometry *geometry, CNumerics **numerics, const CConfig *config) final
Compute the mass residual of the problem.
Definition CFEASolver.cpp:989
void Compute_IntegrationConstants(const CConfig *config)
Compute constants for time integration.
Definition CFEASolver.cpp:1533
void GeneralizedAlpha_Iteration(const CGeometry *geometry, CNumerics **numerics, const CConfig *config) final
Iterate using an implicit Generalized Alpha solver.
Definition CFEASolver.cpp:2368
void Compute_OFRefNode(CGeometry *geometry, const CConfig *config)
Compute the objective function for a reference node.
Definition CFEASolver.cpp:2921
void SetTotal_OFRefGeom(su2double val_ofrefgeom) final
Set the value of the objective function for a reference geometry.
Definition CFEASolver.hpp:600
su2double GetFSI_ConvValue(unsigned short val_index) const final
Get the value of the FSI convergence.
Definition CFEASolver.hpp:692
su2double Global_OFRefGeom
Global Objective Function (added over time steps): Reference Geometry.
Definition CFEASolver.hpp:67
su2double GetTotal_OFCompliance(void) const final
Retrieve the value of the structural compliance objective function.
Definition CFEASolver.hpp:541
su2double GetRelaxCoeff(void) const final
Get the value of the relaxation coefficient history for the history file.
Definition CFEASolver.hpp:639
void FilterElementDensities(CGeometry *geometry, const CConfig *config)
Filter the density field for topology optimization applications.
Definition CFEASolver.cpp:3303
su2double GetForceCoeff(void) const final
Get the value of the force coefficient history for the history file.
Definition CFEASolver.hpp:633
void SetWAitken_Dyn_tn1() final
Store the value of the last Aitken relaxation factor in the current time step.
Definition CFEASolver.hpp:697
void SetRelaxCoeff(su2double val_relaxcoeff) final
Set the value of the FSI relaxation factor.
Definition CFEASolver.hpp:627
su2double FSI_Conv[2]
Values to check the convergence of the FSI problem.
Definition CFEASolver.hpp:50
void SetTotal_OFRefNode(su2double val_ofrefnode) final
Set the value of the objective function for a reference node.
Definition CFEASolver.hpp:606
CProperty ** element_properties
Vector which stores the properties of each element.
Definition CFEASolver.hpp:86
void GeneralizedAlpha_UpdateLoads(const CGeometry *geometry, const CConfig *config) final
Update the solution using an implicit Generalized Alpha solver.
Definition CFEASolver.cpp:2549
su2double WAitken_Dyn
Aitken's dynamic coefficient.
Definition CFEASolver.hpp:55
void Set_Prestretch(CGeometry *geometry, CConfig *config)
Set a reference geometry for prestretched conditions.
Definition CFEASolver.cpp:396
bool topol_filter_applied
True if density filtering has been performed.
Definition CFEASolver.hpp:99
~CFEASolver(void) override
Destructor of the class.
Definition CFEASolver.cpp:224
void OutputForwardModeGradient(const CConfig *config, bool newFile, su2double fun, su2double fun_avg, su2double der, su2double der_avg) const
Write the forward mode gradient to file.
Definition CFEASolver.cpp:2777
su2double Total_OFCompliance
Total Objective Function: Compliance (topology optimization).
Definition CFEASolver.hpp:64
su2double ForceCoeff
Load transfer coefficient .
Definition CFEASolver.hpp:72
void SetFSI_Residual(su2double val_FSI_residual) final
Set the value of the FSI residual for the history file.
Definition CFEASolver.hpp:620
void Set_VertexEliminationSchedule(CGeometry *geometry, const vector< unsigned short > &markers)
Mitigation for an issue with Dirichlet boundary conditions and MPI, some ranks do not get enough of t...
Definition CFEASolver.cpp:545
void SetInitialCondition(CGeometry **geometry, CSolver ***solver_container, CConfig *config, unsigned long TimeIter) override
Set the initial condition for the FEM structural problem.
Definition CFEASolver.cpp:624
CVariable * nodes
The highest level in the variable hierarchy this solver can safely use, CVariable is the common denom...
Definition CFEASolver.hpp:112
void SetForceCoeff(su2double val_forcecoeff) final
Set the value of the force coefficient history for the history file.
Definition CFEASolver.hpp:613
su2double a_dt[9]
Time integration constants.
Definition CFEASolver.hpp:47
CVariable * GetBaseClassPointerToNodes() override
Return nodes to allow CSolver::base_nodes to be set.
Definition CFEASolver.hpp:117
void Postprocessing(CGeometry *geometry, CConfig *config, CNumerics **numerics, bool of_comp_mode) final
Postprocessing.
Definition CFEASolver.cpp:1781
CSysMatrix< su2mixedfloat > MassMatrix
Sparse structure for storing the mass matrix.
Definition CFEASolver.hpp:81
void HybridParallelInitialization(CGeometry *geometry)
Actions required to initialize the supporting variables for hybrid parallel execution.
Definition CFEASolver.cpp:243
void SetFSI_ConvValue(unsigned short val_index, su2double val_criteria) final
Get the value of the FSI convergence.
Definition CFEASolver.hpp:685
su2double FSI_Residual
FSI residual.
Definition CFEASolver.hpp:74
void Compute_NodalStress(CGeometry *geometry, CNumerics **numerics, const CConfig *config)
Compute the stress at the nodes for output purposes.
Definition CFEASolver.cpp:1168
void LoadRestart(CGeometry **geometry, CSolver ***solver, CConfig *config, int val_iter, bool val_update_geo) override
Load a solution from a restart file.
Definition CFEASolver.cpp:3147
unsigned short Get_iElem_iDe(unsigned long iElem) const final
Retrieve the iDe index for DE computations.
Definition CFEASolver.hpp:719
su2double Conv_Check[3]
Current values for convergence check: UTOL, RTOL, ETOL.
Definition CFEASolver.hpp:49
su2double Total_OFDiscreteness
Total Objective Function: Discreteness (topology optimization).
Definition CFEASolver.hpp:63
unsigned long idxIncrement
Index of the current load increment.
Definition CFEASolver.hpp:52
su2double WAitken_Dyn_tn1
Aitken's dynamic coefficient in the previous iteration.
Definition CFEASolver.hpp:56
void Evaluate_ObjFunc(const CConfig *config, CSolver **solver) final
Compute the objective function.
Definition CFEASolver.hpp:553
su2double GetRes_FEM(unsigned short val_var) const final
Get the residual for FEM structural analysis.
Definition CFEASolver.hpp:511
virtual su2double Get_ValCoord(const CGeometry *geometry, unsigned long indexNode, unsigned short iDim) const
Get the value of the reference coordinate to set on the element structure.
Definition CFEASolver.hpp:276
DummyVectorOfLocks UpdateLocks
Definition CFEASolver.hpp:95
su2double GetTotal_OFRefGeom(void) const final
Retrieve the value of the objective function for a reference geometry.
Definition CFEASolver.hpp:521
su2double PenaltyValue
Penalty value to maintain total stiffness constant.
Definition CFEASolver.hpp:58
void BC_Clamped(CGeometry *geometry, const CConfig *config, unsigned short val_marker) final
Clamped boundary conditions.
Definition CFEASolver.cpp:1582
void BC_DispDir(CGeometry *geometry, const CConfig *config, unsigned short val_marker) final
A virtual member.
Definition CFEASolver.cpp:1714
void Compute_NodalStressRes(CGeometry *geometry, CNumerics **numerics, const CConfig *config) final
Compute the nodal stress terms and add them to the residual.
Definition CFEASolver.cpp:1070
void PredictStruct_Displacement(CGeometry *geometry, const CConfig *config) final
Predictor for structural displacements based on previous iterations.
Definition CFEASolver.cpp:2593
void GeneralizedAlpha_UpdateSolution(const CGeometry *geometry, const CConfig *config) final
Update the solution using an implicit Generalized Alpha solver.
Definition CFEASolver.cpp:2493
void Set_ReferenceGeometry(CGeometry *geometry, CConfig *config)
Set a reference geometry for .
Definition CFEASolver.cpp:471
const CVariable * heat_nodes
Pointer to the heat solver nodes to access temperature for coupled simulations.
Definition CFEASolver.hpp:106
void BC_Sym_Plane(CGeometry *geometry, const CConfig *config, unsigned short val_marker) final
Symmetry boundary conditions.
Definition CFEASolver.cpp:1652
unsigned long omp_chunk_size
Chunk size used in light point loops.
Definition CFEASolver.hpp:41
void BC_Clamped_Post(CGeometry *geometry, const CConfig *config, unsigned short val_marker) final
Enforce the solution to be 0 in the clamped nodes - Avoids accumulation of numerical error.
Definition CFEASolver.cpp:1615
bool body_forces
Whether any body force is active.
Definition CFEASolver.hpp:101
void SetLoad_Increment(unsigned long iInc, su2double loadInc) final
Set the value of the load increment for nonlinear structural analysis.
Definition CFEASolver.hpp:703
CSysVector< su2double > LinSysReact
Vector to store the residual before applying the BCs.
Definition CFEASolver.hpp:78
su2double GetTotal_OFVolFrac(void) const final
Retrieve the value of the volume fraction objective function.
Definition CFEASolver.hpp:531
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
CPoint * nodes
Node vector (dual grid information).
Definition CGeometry.hpp:253
Class for defining the numerical methods.
Definition CNumerics.hpp:48
su2double GetCoord(unsigned long iPoint, unsigned long iDim) const
Get the coordinates dor the control volume.
Definition CPoint.hpp:158
Base class for defining element properties.
Definition CElementProperty.hpp:37
Definition CSolver.hpp:71
su2double Total_Custom_ObjFunc
Total custom objective function.
Definition CSolver.hpp:107
su2double Total_ComboObj
Total 'combo' objective for all monitored boundaries.
Definition CSolver.hpp:108
Main class for defining block-compressed-row-storage sparse matrices.
Definition CSysMatrix.hpp:256
Class for holding and manipulating vectors needed by linear solvers.
Definition CSysVector.hpp:195
Main class for defining the variables.
Definition CVariable.hpp:50
passivedouble su2double
Definition code_config.hpp:181
const int EL_QUAD
Elements of four nodes (2D).
Definition option_structure.hpp:617
@ VOLUME_FRACTION
Volume average physical density, for material-based topology optimization applications.
Definition option_structure.hpp:2261
@ TOPOL_DISCRETENESS
Measure of the discreteness of the current topology.
Definition option_structure.hpp:2262
@ STRESS_PENALTY
Penalty function of VM stresses above a maximum value.
Definition option_structure.hpp:2264
@ REFERENCE_GEOMETRY
Norm of displacements with respect to target geometry.
Definition option_structure.hpp:2259
@ TOPOL_COMPLIANCE
Measure of the discreteness of the current topology.
Definition option_structure.hpp:2263
@ CUSTOM_OBJFUNC
Custom objective function definition.
Definition option_structure.hpp:2258
@ REFERENCE_NODE
Objective function defined as the difference of a particular node respect to a reference position.
Definition option_structure.hpp:2260
@ TRIANGLE
VTK nomenclature for defining a triangle element.
Definition option_structure.hpp:134
@ PYRAMID
VTK nomenclature for defining a pyramid element.
Definition option_structure.hpp:139
@ PRISM
VTK nomenclature for defining a prism element.
Definition option_structure.hpp:138
@ QUADRILATERAL
VTK nomenclature for defining a quadrilateral element.
Definition option_structure.hpp:135
@ HEXAHEDRON
VTK nomenclature for defining a hexahedron element.
Definition option_structure.hpp:137
@ TETRAHEDRON
VTK nomenclature for defining a tetrahedron element.
Definition option_structure.hpp:136
const int EL_TRIA
Elements of three nodes (2D).
Definition option_structure.hpp:616
@ HEAT_SOL
Position of the heat equation in the solution solver array.
Definition option_structure.hpp:582
const int EL_HEXA
Elements of eight nodes (3D).
Definition option_structure.hpp:621
const int EL_PRISM
Elements of six nodes (3D).
Definition option_structure.hpp:623
const int EL_TETRA
Elements of four nodes (3D).
Definition option_structure.hpp:620
const int EL_PYRAM
Elements of five nodes (3D).
Definition option_structure.hpp:622
LINEAR_SOLVER_MODE
Type of operation for the linear system solver, changes the source of solver options.
Definition option_structure.hpp:3027
@ STANDARD
Operate in standard mode.
Definition omp_structure.hpp:101