Cantera  2.3.0
vcs_rearrange.cpp
Go to the documentation of this file.
1 /**
2  * @file vcs_rearrange.cpp
3  * implementation file for rearranging species.
4  */
5 
6 // This file is part of Cantera. See License.txt in the top-level directory or
7 // at http://www.cantera.org/license.txt for license and copyright information.
8 
10 
11 namespace Cantera
12 {
14 {
15  warn_deprecated("VCS_SOLVE::vcs_rearrange",
16  "Unused. To be removed after Cantera 2.3.");
17  size_t k1 = 0;
18 
19  // Loop over all of the species
20  for (size_t i = 0; i < m_numSpeciesTot; ++i) {
21  // Find the index of I in the index vector m_speciesIndexVector[]. Call
22  // it k1 and continue.
23  for (size_t j = 0; j < m_numSpeciesTot; ++j) {
24  size_t n = m_speciesMapIndex[j];
25  k1 = j;
26  if (n == i) {
27  break;
28  }
29  }
30 
31  //Switch the species data back from k1 into i. because we loop over all
32  //species, reaction data are now permanently hosed.
33  vcs_switch_pos(false, i, k1);
34  }
35  return 0;
36 }
37 
38 }
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
Definition: global.cpp:54
Header file for the internal object that holds the vcs equilibrium problem (see Class VCS_SOLVE and E...
std::vector< size_t > m_speciesMapIndex
Index vector that keeps track of the species vector rearrangement.
Definition: vcs_solve.h:1652
size_t m_numSpeciesTot
Total number of species in the problems.
Definition: vcs_solve.h:1387
int vcs_rearrange()
Switch all species data back to the original order.
void vcs_switch_pos(const bool ifunc, const size_t k1, const size_t k2)
Swaps the indices for all of the global data for two species, k1 and k2.
Namespace for the Cantera kernel.
Definition: application.cpp:29