1 #ifndef __DESIGN_PARAMETERIZATION_BASE_H__ 2 #define __DESIGN_PARAMETERIZATION_BASE_H__ 4 #include "mesh/high_order_grid.h" 12 using VectorType = dealii::LinearAlgebra::distributed::Vector<double>;
13 using MatrixType = dealii::TrilinosWrappers::SparseMatrix;
49 dealii::ConditionalOStream
pcout;
int n_mpi
Total no. of processors.
int mpi_rank
Processor# of current processor.
BaseParameterization(std::shared_ptr< HighOrderGrid< dim, double >> _high_order_grid)
Constructor.
virtual unsigned int get_number_of_design_variables() const =0
Returns the number of design variables. To be implemented by derived classes.
bool has_design_variable_been_updated(const VectorType ¤t_design_var, const VectorType &updated_design_var) const
Checks if the design variable has changed.
Files for the baseline physics.
dealii::TrilinosWrappers::SparseMatrix MatrixType
Alias for dealii::TrilinosWrappers::SparseMatrix.
Abstract class for design parameterization. Objective function and the constraints take this class's ...
virtual void compute_dXv_dXp(MatrixType &dXv_dXp) const =0
Computes derivative of volume nodes w.r.t. design parameters.
virtual bool update_mesh_from_design_variables(const MatrixType &dXv_dXp, const VectorType &design_var)=0
Checks if the design variable has changed and updates volume nodes based on the parameterization.
MPI_Comm mpi_communicator
Alias for MPI_COMM_WORLD.
std::shared_ptr< HighOrderGrid< dim, double > > high_order_grid
Pointer to high order grid.
virtual ~BaseParameterization()=default
Destructor.
virtual void initialize_design_variables(VectorType &design_var)=0
Initialize design variables and set locally owned and ghost indices.
dealii::LinearAlgebra::distributed::Vector< double > VectorType
Alias for dealii's parallel distributed vector.
dealii::ConditionalOStream pcout
std::cout only on processor #0.
virtual void output_design_variables(const unsigned int) const
Outputs design variables. Doesn't output anything if not overridden.