37 const std::string & name_in,
38 const unsigned int number_in) :
40 Parent(es, name_in, number_in),
94 cast_int<numeric_index_type>(constraint_jac_sparsity.size());
97 unsigned int n_procs =
comm().
size();
99 if (
comm().rank() < (n_eq_constraints % n_procs))
102 C_eq->init(n_eq_constraints, n_local_rows,
false,
PARALLEL);
110 cast_int<numeric_index_type>(constraint_jac_sparsity[i].size());
130 cast_int<numeric_index_type>(constraint_jac_sparsity.size());
133 unsigned int n_procs =
comm().
size();
135 if (
comm().rank() < (n_ineq_constraints % n_procs))
146 cast_int<numeric_index_type>(constraint_jac_sparsity[i].size());
164 START_LOG(
"solve()",
"OptimizationSystem");
169 STOP_LOG(
"solve()",
"OptimizationSystem");
virtual void init_data() override
Manages multiples systems of equations.
void initialize_inequality_constraints_storage(const std::vector< std::set< numeric_index_type >> &constraint_jac_sparsity)
std::unique_ptr< NumericVector< Number > > lambda_ineq
processor_id_type size() const
virtual void solve() override
virtual void clear() override
virtual void init_data() override
virtual void reinit() override
std::unique_ptr< NumericVector< Number > > C_eq
Provides a uniform interface to vector storage schemes for different linear algebra libraries...
const Parallel::Communicator & comm() const
dof_id_type n_local_dofs() const
std::unique_ptr< SparseMatrix< Number > > C_ineq_jac
dof_id_type n_dofs() const
NumericVector< Number > & add_vector(const std::string &vec_name, const bool projections=true, const ParallelType type=PARALLEL)
dof_id_type numeric_index_type
Manages consistently variables, degrees of freedom, and coefficient vectors.
virtual void reinit() override
std::vector< std::set< numeric_index_type > > ineq_constraint_jac_sparsity
std::vector< std::set< numeric_index_type > > eq_constraint_jac_sparsity
std::unique_ptr< SparseMatrix< Number > > C_eq_jac
std::unique_ptr< OptimizationSolver< Number > > optimization_solver
std::unique_ptr< NumericVector< Number > > lambda_eq
void initialize_equality_constraints_storage(const std::vector< std::set< numeric_index_type >> &constraint_jac_sparsity)
virtual ~OptimizationSystem()
virtual void clear() override
OptimizationSystem(EquationSystems &es, const std::string &name, const unsigned int number)
const DofMap & get_dof_map() const
std::unique_ptr< NumericVector< Number > > C_ineq