Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate use of reserved identifiers in SEACAS libraries and code #420

Merged
merged 6 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions packages/seacas/applications/conjoin/CJ_Internals.C
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,12 @@ int Excn::Internals::put_metadata(const Mesh<INT> &mesh, const CommunicationMeta
return EX_FATAL;
}

struct ex__file_item *file = ex__find_file_item(exodusFilePtr);
struct exi_file_item *file = exi_find_file_item(exodusFilePtr);
if (file) {
file->time_varid = varid;
}

ex__compress_variable(exodusFilePtr, varid, -2); /* don't compress, but do set collective io */
exi_compress_variable(exodusFilePtr, varid, -2); /* don't compress, but do set collective io */
}

int map_type = get_type(exodusFilePtr, EX_MAPS_INT64_DB);
Expand Down Expand Up @@ -355,7 +355,7 @@ int Excn::Internals::put_metadata(const Mesh<INT> &mesh, const CommunicationMeta
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 1);
exi_compress_variable(exodusFilePtr, varid, 1);
}

if (mesh.elementCount > 0) {
Expand Down Expand Up @@ -387,7 +387,7 @@ int Excn::Internals::put_metadata(const Mesh<INT> &mesh, const CommunicationMeta
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 1);
exi_compress_variable(exodusFilePtr, varid, 1);
}

if (mesh.blockCount > 0) {
Expand Down Expand Up @@ -468,7 +468,7 @@ int Excn::Internals::put_metadata(const std::vector<Block> &blocks)
// Iterate over element blocks ...
for (size_t iblk = 0; iblk < num_elem_blk; iblk++) {

ex__inc_file_item(exodusFilePtr, ex__get_counter_list(EX_ELEM_BLOCK));
exi_inc_file_item(exodusFilePtr, exi_get_counter_list(EX_ELEM_BLOCK));

if (blocks[iblk].elementCount == 0) {
continue;
Expand Down Expand Up @@ -533,7 +533,7 @@ int Excn::Internals::put_metadata(const std::vector<Block> &blocks)
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);

// Attribute name array...
std::array adims{numattrdim, namestrdim};
Expand Down Expand Up @@ -563,7 +563,7 @@ int Excn::Internals::put_metadata(const std::vector<Block> &blocks)
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, connid, 1);
exi_compress_variable(exodusFilePtr, connid, 1);

// store element type as attribute of connectivity variable
status = nc_put_att_text(exodusFilePtr, connid, ATT_NAME_ELB,
Expand Down Expand Up @@ -648,9 +648,9 @@ template <typename INT> int Excn::Internals::put_metadata(const std::vector<Node

for (int i = 0; i < num_node_sets; i++) {

// NOTE: ex__inc_file_item is used to find the number of node sets
// NOTE: exi_inc_file_item is used to find the number of node sets
// for a specific file and returns that value incremented.
int cur_num_node_sets = ex__inc_file_item(exodusFilePtr, ex__get_counter_list(EX_NODE_SET));
int cur_num_node_sets = exi_inc_file_item(exodusFilePtr, exi_get_counter_list(EX_NODE_SET));

if (nodesets[i].nodeCount == 0) {
continue;
Expand Down Expand Up @@ -693,7 +693,7 @@ template <typename INT> int Excn::Internals::put_metadata(const std::vector<Node
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 1);
exi_compress_variable(exodusFilePtr, varid, 1);

// Create variable for distribution factors if required
if (nodesets[i].dfCount > 0) {
Expand Down Expand Up @@ -726,7 +726,7 @@ template <typename INT> int Excn::Internals::put_metadata(const std::vector<Node
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);
}
}
return EX_NOERR;
Expand Down Expand Up @@ -796,9 +796,9 @@ template <typename INT> int Excn::Internals::put_metadata(const std::vector<Side

for (int i = 0; i < num_side_sets; i++) {

// NOTE: ex__inc_file_item is used to find the number of side sets
// NOTE: exi_inc_file_item is used to find the number of side sets
// for a specific file and returns that value incremented.
int cur_num_side_sets = ex__inc_file_item(exodusFilePtr, ex__get_counter_list(EX_SIDE_SET));
int cur_num_side_sets = exi_inc_file_item(exodusFilePtr, exi_get_counter_list(EX_SIDE_SET));

if (sidesets[i].sideCount == 0) {
continue;
Expand Down Expand Up @@ -840,7 +840,7 @@ template <typename INT> int Excn::Internals::put_metadata(const std::vector<Side
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 1);
exi_compress_variable(exodusFilePtr, varid, 1);

// create side list variable for side set
status = nc_def_var(exodusFilePtr, VAR_SIDE_SS(cur_num_side_sets + 1), bulk_type, 1,
Expand All @@ -859,7 +859,7 @@ template <typename INT> int Excn::Internals::put_metadata(const std::vector<Side
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 1);
exi_compress_variable(exodusFilePtr, varid, 1);

// Create variable for distribution factors if required
if (sidesets[i].dfCount > 0) {
Expand Down Expand Up @@ -900,7 +900,7 @@ template <typename INT> int Excn::Internals::put_metadata(const std::vector<Side
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);
}
}
return EX_NOERR;
Expand Down Expand Up @@ -1021,7 +1021,7 @@ namespace {
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);
}

if (dimension > 1) {
Expand All @@ -1034,7 +1034,7 @@ namespace {
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);
}

if (dimension > 2) {
Expand All @@ -1047,7 +1047,7 @@ namespace {
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/seacas/applications/ejoin/EJ_index_sort.C
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace {
}
}

template <typename T, typename INT> void ex__iqsort(T *v, INT iv[], size_t N)
template <typename T, typename INT> void exi_iqsort(T *v, INT iv[], size_t N)
{
if (N <= 1) {
return;
Expand Down Expand Up @@ -138,14 +138,14 @@ void index_coord_sort(const std::vector<double> &xyz, std::vector<INT> &index, i
for (size_t i = axis; i < xyz.size(); i += 3) {
comp[j++] = xyz[i];
}
ex__iqsort(comp.data(), index.data(), index.size());
exi_iqsort(comp.data(), index.data(), index.size());
}

template <typename INT> void index_sort(const std::vector<INT> &ids, std::vector<INT> &index)
{
index.resize(ids.size());
std::iota(index.begin(), index.end(), (INT)0);
ex__iqsort(ids.data(), index.data(), index.size());
exi_iqsort(ids.data(), index.data(), index.size());
}

template void index_coord_sort(const std::vector<double> &xyz, std::vector<int> &index, int axis);
Expand Down
50 changes: 25 additions & 25 deletions packages/seacas/applications/epu/EP_Internals.C
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,12 @@ int Excn::Internals<INT>::put_metadata(const Mesh &mesh, const CommunicationMeta
return EX_FATAL;
}

struct ex__file_item *file = ex__find_file_item(exodusFilePtr);
struct exi_file_item *file = exi_find_file_item(exodusFilePtr);
if (file) {
file->time_varid = varid;
}

ex__compress_variable(exodusFilePtr, varid, -2); /* don't compress, but do set collective io */
exi_compress_variable(exodusFilePtr, varid, -2); /* don't compress, but do set collective io */
}

if (mesh.nodeCount > 0) {
Expand Down Expand Up @@ -521,7 +521,7 @@ int Excn::Internals<INT>::put_metadata(const Mesh &mesh, const CommunicationMeta
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 1);
exi_compress_variable(exodusFilePtr, varid, 1);
}
}

Expand Down Expand Up @@ -555,7 +555,7 @@ int Excn::Internals<INT>::put_metadata(const Mesh &mesh, const CommunicationMeta
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 1);
exi_compress_variable(exodusFilePtr, varid, 1);
}
}

Expand Down Expand Up @@ -658,7 +658,7 @@ template <typename INT> int Excn::Internals<INT>::put_metadata(const std::vector
// Iterate over element blocks ...
for (size_t iblk = 0; iblk < num_elem_blk; iblk++) {

ex__inc_file_item(exodusFilePtr, ex__get_counter_list(EX_ELEM_BLOCK));
exi_inc_file_item(exodusFilePtr, exi_get_counter_list(EX_ELEM_BLOCK));

if (blocks[iblk].elementCount == 0) {
continue;
Expand Down Expand Up @@ -723,7 +723,7 @@ template <typename INT> int Excn::Internals<INT>::put_metadata(const std::vector
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);

// Attribute name array...
dims[0] = numattrdim;
Expand Down Expand Up @@ -753,7 +753,7 @@ template <typename INT> int Excn::Internals<INT>::put_metadata(const std::vector
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, connid, 1);
exi_compress_variable(exodusFilePtr, connid, 1);

// store element type as attribute of connectivity variable
status = nc_put_att_text(exodusFilePtr, connid, ATT_NAME_ELB,
Expand Down Expand Up @@ -843,10 +843,10 @@ int Excn::Internals<INT>::put_metadata(const std::vector<NodeSet<INT>> &nodesets

for (int i = 0; i < num_node_sets; i++) {

// NOTE: ex__inc_file_item is used to find the number of node sets
// NOTE: exi_inc_file_item is used to find the number of node sets
// for a specific file and returns that value incremented.
int cur_num_node_sets =
(int)ex__inc_file_item(exodusFilePtr, ex__get_counter_list(EX_NODE_SET));
(int)exi_inc_file_item(exodusFilePtr, exi_get_counter_list(EX_NODE_SET));

if (nodesets[i].nodeCount == 0) {
continue;
Expand Down Expand Up @@ -888,7 +888,7 @@ int Excn::Internals<INT>::put_metadata(const std::vector<NodeSet<INT>> &nodesets
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 1);
exi_compress_variable(exodusFilePtr, varid, 1);

// Create variable for distribution factors if required
if (nodesets[i].dfCount > 0) {
Expand Down Expand Up @@ -921,7 +921,7 @@ int Excn::Internals<INT>::put_metadata(const std::vector<NodeSet<INT>> &nodesets
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);
}
}
return EX_NOERR;
Expand Down Expand Up @@ -994,10 +994,10 @@ int Excn::Internals<INT>::put_metadata(const std::vector<SideSet<INT>> &sidesets

for (size_t i = 0; i < num_side_sets; i++) {

// NOTE: ex__inc_file_item is used to find the number of side sets
// NOTE: exi_inc_file_item is used to find the number of side sets
// for a specific file and returns that value incremented.
int cur_num_side_sets =
(int)ex__inc_file_item(exodusFilePtr, ex__get_counter_list(EX_SIDE_SET));
(int)exi_inc_file_item(exodusFilePtr, exi_get_counter_list(EX_SIDE_SET));

if (sidesets[i].sideCount == 0) {
continue;
Expand Down Expand Up @@ -1038,7 +1038,7 @@ int Excn::Internals<INT>::put_metadata(const std::vector<SideSet<INT>> &sidesets
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 1);
exi_compress_variable(exodusFilePtr, varid, 1);

// create side list variable for side set
status = nc_def_var(exodusFilePtr, VAR_SIDE_SS(cur_num_side_sets + 1), bulk_type, 1,
Expand All @@ -1057,7 +1057,7 @@ int Excn::Internals<INT>::put_metadata(const std::vector<SideSet<INT>> &sidesets
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 1);
exi_compress_variable(exodusFilePtr, varid, 1);

// Create variable for distribution factors if required
if (sidesets[i].dfCount > 0) {
Expand Down Expand Up @@ -1098,7 +1098,7 @@ int Excn::Internals<INT>::put_metadata(const std::vector<SideSet<INT>> &sidesets
}
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);
}
}
return EX_NOERR;
Expand Down Expand Up @@ -1171,10 +1171,10 @@ int Excn::Internals<INT>::put_metadata(const std::vector<EdgeBlock<INT>> &edgebl

for (size_t i = 0; i < num_edge_blocks; i++) {

// NOTE: ex__inc_file_item is used to find the number of edge blocks
// NOTE: exi_inc_file_item is used to find the number of edge blocks
// for a specific file and returns that value incremented.
int cur_num_edge_blocks =
(int)ex__inc_file_item(exodusFilePtr, ex__get_counter_list(EX_EDGE_BLOCK));
(int)exi_inc_file_item(exodusFilePtr, exi_get_counter_list(EX_EDGE_BLOCK));

if (edgeblocks[i].edgeCount == 0) {
continue;
Expand Down Expand Up @@ -1224,7 +1224,7 @@ int Excn::Internals<INT>::put_metadata(const std::vector<EdgeBlock<INT>> &edgebl
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, connid, 1);
exi_compress_variable(exodusFilePtr, connid, 1);

// store edge type as attribute of connectivity variable
status = nc_put_att_text(exodusFilePtr, connid, ATT_NAME_ELB,
Expand Down Expand Up @@ -1308,10 +1308,10 @@ int Excn::Internals<INT>::put_metadata(const std::vector<FaceBlock<INT>> &facebl

for (size_t i = 0; i < num_face_blocks; i++) {

// NOTE: ex__inc_file_item is used to find the number of face blocks
// NOTE: exi_inc_file_item is used to find the number of face blocks
// for a specific file and returns that value incremented.
int cur_num_face_blocks =
(int)ex__inc_file_item(exodusFilePtr, ex__get_counter_list(EX_FACE_BLOCK));
(int)exi_inc_file_item(exodusFilePtr, exi_get_counter_list(EX_FACE_BLOCK));

if (faceblocks[i].faceCount == 0) {
continue;
Expand Down Expand Up @@ -1362,7 +1362,7 @@ int Excn::Internals<INT>::put_metadata(const std::vector<FaceBlock<INT>> &facebl
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, connid, 1);
exi_compress_variable(exodusFilePtr, connid, 1);

// store face type as attribute of connectivity variable
status = nc_put_att_text(exodusFilePtr, connid, ATT_NAME_ELB,
Expand Down Expand Up @@ -1503,7 +1503,7 @@ namespace {
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);
}

if (dimension > 1) {
Expand All @@ -1516,7 +1516,7 @@ namespace {
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);
}

if (dimension > 2) {
Expand All @@ -1529,7 +1529,7 @@ namespace {
ex_err_fn(exodusFilePtr, __func__, errmsg.c_str(), status);
return EX_FATAL;
}
ex__compress_variable(exodusFilePtr, varid, 2);
exi_compress_variable(exodusFilePtr, varid, 2);
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/exoIIv2for32/src/exo_jack_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -2424,9 +2424,9 @@ void F2C(expfrm, EXPFRM)(int *idexo, int *nframe, void_int *cfids, real *coord,

/*!
* Routine to return floating point word size
* \sa ex__get_cpu_ws()
* \sa exi_get_cpu_ws()
*/
int F2C(excpws, EXCPWS)(void) { return (ex__get_cpu_ws()); }
int F2C(excpws, EXCPWS)(void) { return (exi_get_cpu_ws()); }

/*!
* Routine to return large model setting
Expand Down
Loading