https://mooseframework.inl.gov
OptUtils.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "MooseTypes.h"
13 
14 namespace libMesh
15 {
16 template <typename Number>
17 class PetscVector;
18 
19 template <typename Number>
20 class PetscMatrix;
21 }
22 
23 namespace OptUtils
24 {
25 void copyReporterIntoPetscVector(const std::vector<std::vector<Real> *> reporterVectors,
28  std::vector<std::vector<Real> *> reporterVectors);
29 void copyReporterIntoPetscMatrix(const std::vector<std::vector<Real> *> reporterVectors,
32  std::vector<std::vector<Real> *> reporterVectors);
33 }
void copyPetscVectorIntoReporter(const libMesh::PetscVector< Number > &x, std::vector< std::vector< Real > *> reporterVectors)
Definition: OptUtils.C:33
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
const std::vector< double > x
void copyPetscMatrixIntoReporter(const libMesh::PetscMatrix< Number > &x, std::vector< std::vector< Real > *> reporterVectors)
Definition: OptUtils.C:53
void copyReporterIntoPetscVector(const std::vector< std::vector< Real > *> reporterVectors, libMesh::PetscVector< Number > &x)
Definition: OptUtils.C:21
void copyReporterIntoPetscMatrix(const std::vector< std::vector< Real > *> reporterVectors, libMesh::PetscMatrix< Number > &x)
Definition: OptUtils.C:42