Skip to content

Commit

Permalink
remove aux_names vector (#2539)
Browse files Browse the repository at this point in the history
this seems to be a holdover from when we copied things from Fortran
but we can access the names directly from network_properties.H
  • Loading branch information
zingale authored Aug 11, 2023
1 parent 76295aa commit ba9dfc2
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Source/driver/Castro_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,17 +525,11 @@ Castro::variableSetUp ()
}

#if NAUX_NET > 0
// Get the auxiliary names from the network model.
std::vector<std::string> aux_names;
for (int i = 0; i < NumAux; i++) {
aux_names.push_back(short_aux_names_cxx[i]);
}

if ( ParallelDescriptor::IOProcessor())
{
std::cout << NumAux << " Auxiliary Variables: " << std::endl;
for (int i = 0; i < NumAux; i++) {
std::cout << aux_names[i] << ' ' << ' ';
std::cout << short_aux_names_cxx[i] << ' ' << ' ';
}
std::cout << std::endl;
}
Expand All @@ -544,7 +538,7 @@ Castro::variableSetUp ()
{
set_scalar_bc(bc, phys_bc);
bcs[UFX+i] = bc;
name[UFX+i] = "rho_" + aux_names[i];
name[UFX+i] = "rho_" + short_aux_names_cxx[i];
}
#endif

Expand Down Expand Up @@ -1010,9 +1004,9 @@ Castro::variableSetUp ()

#if NAUX_NET > 0
for (int i = 0; i < NumAux; i++) {
derive_lst.add(aux_names[i],IndexType::TheCellType(),1,ca_derspec,the_same_box);
derive_lst.addComponent(aux_names[i],desc_lst,State_Type,URHO,1);
derive_lst.addComponent(aux_names[i],desc_lst,State_Type,UFX+i,1);
derive_lst.add(short_aux_names_cxx[i], IndexType::TheCellType(), 1, ca_derspec, the_same_box);
derive_lst.addComponent(short_aux_names_cxx[i], desc_lst, State_Type, URHO, 1);
derive_lst.addComponent(short_aux_names_cxx[i], desc_lst, State_Type, UFX+i, 1);
}
#endif

Expand Down

0 comments on commit ba9dfc2

Please sign in to comment.