MCPcopy Create free account
hub / github.com/AMReX-Astro/Castro / add_index

Method add_index

Source/driver/set_variables.py:77–85  ·  view source on GitHub ↗

increment the counter

(self, index)

Source from the content-addressed store, hash-verified

75 self.cxx_starting_val = starting_val-1
76
77 def add_index(self, index):
78 """increment the counter"""
79
80 try:
81 i = int(index.count_cxx)
82 except ValueError:
83 self.cxx_strings.append(index.count_cxx.strip())
84 else:
85 self.numeric += i
86
87 def get_cxx_value(self, offset=0):
88 """return the current value of the counter for C++ (0-based)"""

Callers 1

doitFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected