30 CMFD_PRECISION* _array;
38 omp_lock_t* _cell_locks;
40 void setNumX(
int num_x);
41 void setNumY(
int num_y);
42 void setNumZ(
int num_z);
43 void setNumGroups(
int num_groups);
46 Vector(omp_lock_t* cell_locks,
int num_x = 1,
int num_y = 1,
int num_z = 1,
53 CMFD_PRECISION* vals);
60 CMFD_PRECISION
getValue(
int cell,
int group);
71 void setValue(
int cell,
int group, CMFD_PRECISION val);
72 void setValues(
int cell,
int group_start,
int group_end,
73 CMFD_PRECISION* vals);
74 void setAll(CMFD_PRECISION val);
77 #endif // SRC_VECTOR_H_ void setAll(CMFD_PRECISION val)
Fill vector with a value.
Definition: Vector.cpp:125
CMFD_PRECISION * getArray()
Get the array describing the vector.
Definition: Vector.cpp:265
void setValues(int cell, int group_start, int group_end, CMFD_PRECISION *vals)
Set values in the vector.
Definition: Vector.cpp:171
int getNumY()
Get the number of cells in the y dimension.
Definition: Vector.cpp:283
void incrementValue(int cell, int group, CMFD_PRECISION val)
Increment a value in the vector.
Definition: Vector.cpp:60
CMFD_PRECISION getValue(int cell, int group)
Get a value at location described by a given cell and group index.
Definition: Vector.cpp:256
void copyTo(Vector *vector)
Copy the values from the current vector to an input vector.
Definition: Vector.cpp:246
omp_lock_t * getCellLocks()
Return the array of cell locks for atomic cell operations.
Definition: Vector.cpp:384
int getNumZ()
Get the number of cells in the z dimension.
Definition: Vector.cpp:292
void scaleByValue(CMFD_PRECISION val)
Scales the vector by a given value.
Definition: Vector.cpp:212
void setValue(int cell, int group, CMFD_PRECISION val)
Set a value in the vector.
Definition: Vector.cpp:140
int getNumX()
Get the number of cells in the x dimension.
Definition: Vector.cpp:274
void clear()
Clear all values in the vector.
Definition: Vector.cpp:203
virtual ~Vector()
Destructor deletes the arrays used to represent the vector.
Definition: Vector.cpp:43
int getNumGroups()
Get the number of groups in each cell.
Definition: Vector.cpp:301
int getNumRows()
Get the number of rows in the vector.
Definition: Vector.cpp:310
void printString()
Print the vector object to the log file.
Definition: Vector.cpp:223
Vector(omp_lock_t *cell_locks, int num_x=1, int num_y=1, int num_z=1, int num_groups=1)
Constructor initializes Vector object as a floating point array and sets the vector dimensions...
Definition: Vector.cpp:17
double getSum()
Get the sum of all the values in the vector.
Definition: Vector.cpp:319
void incrementValues(int cell, int group_start, int group_end, CMFD_PRECISION *vals)
Increment values in the vector.
Definition: Vector.cpp:92
Utility function for the accurate pairwise sum of a list of floating point numbers.
Utility functions for writing log messages to the screen.