[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
ffd_parameterization.hpp
1 #ifndef __DESIGN_PARAMETERIZATION_FFD_H__
2 #define __DESIGN_PARAMETERIZATION_FFD_H__
3 
4 #include "base_parameterization.hpp"
5 #include "mesh/free_form_deformation.h"
6 
7 namespace PHiLiP {
8 
10 template<int dim>
12 
13  using VectorType = dealii::LinearAlgebra::distributed::Vector<double>;
14  using MatrixType = dealii::TrilinosWrappers::SparseMatrix;
15 
16 public:
19  std::shared_ptr<HighOrderGrid<dim,double>> _high_order_grid,
20  const FreeFormDeformation<dim> &_ffd,
21  std::vector< std::pair< unsigned int, unsigned int > > &_ffd_design_variables_indices_dim);
22 
24  void initialize_design_variables(VectorType &ffd_des_var) override;
25 
27  void compute_dXv_dXp(MatrixType &dXv_dXp) const override;
28 
31  const MatrixType &dXv_dXp,
32  const VectorType &ffd_des_var) override;
33 
35  void output_design_variables(const unsigned int iteration_no) const override;
36 
38  unsigned int get_number_of_design_variables() const override;
39 
40 private:
43 
45  const std::vector< std::pair< unsigned int, unsigned int > > ffd_design_variables_indices_dim;
46 
49 };
50 
51 } // namespace PHiLiP
52 #endif
void compute_dXv_dXp(MatrixType &dXv_dXp) const override
Computes the derivative of volume nodes w.r.t. FFD design parameters. Overrides the virtual function ...
void output_design_variables(const unsigned int iteration_no) const override
Outputs design variables of FFD.
VectorType initial_ffd_des_var
Initial design variable. Value is set in initialize_design_variables().
Files for the baseline physics.
Definition: ADTypes.hpp:10
FFD design parameterization. Holds an object of FreeFormDeformation and uses it to update the mesh wh...
Free form deformation class from Sederberg 1986.
dealii::TrilinosWrappers::SparseMatrix MatrixType
Alias for dealii::TrilinosWrappers::SparseMatrix.
Abstract class for design parameterization. Objective function and the constraints take this class&#39;s ...
unsigned int get_number_of_design_variables() const override
Returns the number of FFD design variables.
FreeFormDeformationParameterization(std::shared_ptr< HighOrderGrid< dim, double >> _high_order_grid, const FreeFormDeformation< dim > &_ffd, std::vector< std::pair< unsigned int, unsigned int > > &_ffd_design_variables_indices_dim)
Constructor.
bool update_mesh_from_design_variables(const MatrixType &dXv_dXp, const VectorType &ffd_des_var) override
Checks if the design variables have changed and updates volume nodes based on the parameterization...
const std::vector< std::pair< unsigned int, unsigned int > > ffd_design_variables_indices_dim
List of FFD design variables and axes.
FreeFormDeformation< dim > ffd
Free-form deformation used to parametrize the geometry.
void initialize_design_variables(VectorType &ffd_des_var) override
Initializes FFD design variables and set locally owned and ghost indices. Overrides the virtual funct...
dealii::LinearAlgebra::distributed::Vector< double > VectorType
Alias for dealii&#39;s parallel distributed vector.