#2735: EinsteinBase: storage declaration simplification
Reporter:Samuel Cupp
Status:new
Milestone:ET_2023_11
Version:
Type:enhancement
Priority:trivial
Component:EinsteinToolkit thorn

Currently, the various *Base thorns declare storage like

if (timelevels == 1)
{
  STORAGE: stress_energy_scalar[1]
  STORAGE: stress_energy_vector[1]
  STORAGE: stress_energy_tensor[1]
}
else if (timelevels == 2)
{
  STORAGE: stress_energy_scalar[2]
  STORAGE: stress_energy_vector[2]
  STORAGE: stress_energy_tensor[2]
}
else if (timelevels == 3)
{
  STORAGE: stress_energy_scalar[3]
  STORAGE: stress_energy_vector[3]
  STORAGE: stress_energy_tensor[3]
}

We can instead just say

STORAGE: stress_energy_scalar[timelevels]
STORAGE: stress_energy_vector[timelevels]
STORAGE: stress_energy_tensor[timelevels]

This, of course, will properly declare the storage depending on the parameter at runtime. As I understand the behavior, this also works for timelevels = 0.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2735/einsteinbase-storage-declaration