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

Fix modernize-use-using #43

Closed
Closed
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
2 changes: 1 addition & 1 deletion src/MeshBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#define HOLE 0
#define FIELD 1

class MeshBlock

Check warning on line 48 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Release)

‘MeshBlock’ has a field ‘MeshBlock::wbcfacebox’ whose type uses the anonymous namespace [-Wsubobject-linkage]

Check warning on line 48 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Release)

‘MeshBlock’ has a field ‘MeshBlock::obcfacebox’ whose type uses the anonymous namespace [-Wsubobject-linkage]

Check warning on line 48 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

‘MeshBlock’ has a field ‘MeshBlock::wbcfacebox’ whose type uses the anonymous namespace [-Wsubobject-linkage]

Check warning on line 48 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

‘MeshBlock’ has a field ‘MeshBlock::obcfacebox’ whose type uses the anonymous namespace [-Wsubobject-linkage]
{
private:
/** Mesh block info provided by the application code
Expand Down Expand Up @@ -277,9 +277,9 @@
};

/** basic destructor */
~MeshBlock();

Check warning on line 280 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

type of ‘__dt_comp ’ does not match original declaration [-Wlto-type-mismatch]

void preprocess(int use_adaptholemap);

Check warning on line 282 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

type of ‘preprocess’ does not match original declaration [-Wlto-type-mismatch]

void tagBoundary(void);

Expand All @@ -287,11 +287,11 @@

void writeGridFile(int bid);

void writeFlowFile(int bid, double* q, int nvar, int type);

Check warning on line 290 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

type of ‘writeFlowFile’ does not match original declaration [-Wlto-type-mismatch]

void setData(TIOGA::MeshBlockInfo* minfo);

Check warning on line 292 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

type of ‘setData’ does not match original declaration [-Wlto-type-mismatch]

void setData(

Check warning on line 294 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

type of ‘setData’ does not match original declaration [-Wlto-type-mismatch]
int btag,
int nnodesi,
double* xyzi,
Expand All @@ -307,19 +307,19 @@
uint64_t* cell_gid = nullptr,
uint64_t* node_gid = nullptr);

void setResolutions(double* nres, double* cres);

Check warning on line 310 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

type of ‘setResolutions’ does not match original declaration [-Wlto-type-mismatch]

void search();

Check warning on line 312 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

type of ‘search’ does not match original declaration [-Wlto-type-mismatch]
void search_uniform_hex();
void writeOBB(int bid);

void writeOBB2(OBB* obc, int bid);

void updateSolnData(int inode, double* qvar, double* q);

Check warning on line 318 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

type of ‘updateSolnData’ does not match original declaration [-Wlto-type-mismatch]

int getNinterp(void) { return ninterp; };

void getInterpolatedSolution(

Check warning on line 322 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

type of ‘getInterpolatedSolution’ does not match original declaration [-Wlto-type-mismatch]
int* nints,
int* nreals,
int** intData,
Expand All @@ -328,7 +328,7 @@
int nvar,
int interptype);

void getInterpolatedSolutionAMR(

Check warning on line 331 in src/MeshBlock.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

type of ‘getInterpolatedSolutionAMR’ does not match original declaration [-Wlto-type-mismatch]
int* nints,
int* nreals,
int** intData,
Expand Down Expand Up @@ -391,7 +391,7 @@
void insertAndSort(
int pointid,
int senderid,
int meshtag,
int meshtagdonor,
int remoteid,
double donorRes,
double receptorRes);
Expand Down
90 changes: 45 additions & 45 deletions src/codetypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/* Floating point definition */
/*====================================================================*/
#define REAL double
typedef int32_t qcoord_t;
using qcoord_t = int32_t;
/*====================================================================*/
/* Base for indexing (0 or 1) */
/*====================================================================*/
Expand Down Expand Up @@ -151,21 +151,21 @@
};
};

typedef struct
using bound_t = struct
{
double lo; /**< lower bound */
double hi; /**< upper bound */
} bound_t;
};

typedef struct
using box_t = struct
{
bound_t x; /**< x bounds */
bound_t y; /**< y bounds */
bound_t z; /**< z bounds */
} box_t;
};

/** The 3D full octant datatype: 130 bytes per octant */
typedef struct octant_full
using octant_full_t = struct octant_full
{
qcoord_t x, y, z; /**< [12B] binary coordinates */
uint32_t id; /**< [4B] element id on level */
Expand All @@ -174,96 +174,96 @@
uint8_t refined; /**< [1B] flag if refined (i.e. is a parent) */
struct octant_full* nhbr[6]; /**< [48B] neighbor octant list */
struct octant_full* children[8]; /**< [64B] children octants if refined */
} octant_full_t;
};

typedef struct octant_coordinates
using octant_coordinates_t = struct octant_coordinates
{
qcoord_t x, y, z; /**< [12B] binary coordinates */
} octant_coordinates_t;
};

/** 3D octant datatype: 48 bytes per octant */
typedef struct octant
using octant_t = struct octant
{
qcoord_t x, y, z; /**< [12B] binary coordinates */
uint8_t filltype; /**< [1B] floodfill: [0] inside SB, [1] outside SB, [2]
hole SB */
uint8_t leafflag; /**< [1B] flag if refined (i.e. is a parent) */
uint8_t pad[2]; /**< [2B] padding */
uint32_t children[8]; /**< [32B] children octant IDs */
} octant_t;
};

typedef struct level_octant
using level_octant_t = struct level_octant
{
uint32_t elem_count; /**< number of octants in level */
uint8_t level_id; /**< level number */
std::vector<octant_full_t>
octants; /**< [elem_count] locally stored octants */
} level_octant_t;
};

typedef struct level_octant_coordinate
using level_octant_coordinate_t = struct level_octant_coordinate
{
uint8_t level_id; /**< level number */
uint32_t elem_count; /**< number of octants in level */
std::vector<octant_coordinates_t> octants; /**< [elem_count] octant list */
} level_octant_coordinate_t;
};

typedef struct level
using level_t = struct level
{
uint8_t level_id; /**< level number */
uint32_t elem_count; /**< number of octants in level */
std::vector<octant_t> octants; /**< [elem_count] octant list */
} level_t;
};

typedef struct ADAPTIVE_HOLEMAP_OCTANT
using ADAPTIVE_HOLEMAP_OCTANT = struct ADAPTIVE_HOLEMAP_OCTANT
{
int8_t existWall; /**< flag to indicate map contains wall */
double extents_lo[3]; /**< lower coordinates of tree */
double extents_hi[3]; /**< upper coordinates of tree */

uint8_t nlevel; /**< number of levels */
level_octant_t levels[OCTANT_MAXLEVEL];
} ADAPTIVE_HOLEMAP_OCTANT;
};

typedef struct
using ahm_meta_t = struct
{
uint8_t nlevel; /**< number of levels in map */
double extents_lo[3]; /**< lower coordinates of tree */
double extents_hi[3]; /**< upper coordinates of tree */
uint64_t leaf_count; /**< total leaf octant count */
uint64_t elem_count; /**< total octant count */
} ahm_meta_t;
};

typedef struct
using ahm_meta_minimal_t = struct
{
uint8_t nlevel; /**< number of levels in map */
double extents_lo[3]; /**< lower coordinates of tree */
double extents_hi[3]; /**< upper coordinates of tree */
uint64_t elem_count; /**< total octant count */
} ahm_meta_minimal_t;
};

typedef struct ADAPTIVE_HOLEMAP_COMPOSITE
using ADAPTIVE_HOLEMAP_COMPOSITE = struct ADAPTIVE_HOLEMAP_COMPOSITE

Check warning on line 244 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Release)

‘ADAPTIVE_HOLEMAP_COMPOSITE’ has a field ‘ADAPTIVE_HOLEMAP_COMPOSITE::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 244 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Release)

‘ADAPTIVE_HOLEMAP_COMPOSITE’ has a field ‘ADAPTIVE_HOLEMAP_COMPOSITE::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 244 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Release)

‘ADAPTIVE_HOLEMAP_COMPOSITE’ has a field ‘ADAPTIVE_HOLEMAP_COMPOSITE::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 244 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Release)

‘ADAPTIVE_HOLEMAP_COMPOSITE’ has a field ‘ADAPTIVE_HOLEMAP_COMPOSITE::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 244 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

‘ADAPTIVE_HOLEMAP_COMPOSITE’ has a field ‘ADAPTIVE_HOLEMAP_COMPOSITE::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 244 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

‘ADAPTIVE_HOLEMAP_COMPOSITE’ has a field ‘ADAPTIVE_HOLEMAP_COMPOSITE::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 244 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

‘ADAPTIVE_HOLEMAP_COMPOSITE’ has a field ‘ADAPTIVE_HOLEMAP_COMPOSITE::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 244 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

‘ADAPTIVE_HOLEMAP_COMPOSITE’ has a field ‘ADAPTIVE_HOLEMAP_COMPOSITE::meta’ whose type has no linkage [-Wsubobject-linkage]
{
ahm_meta_minimal_t meta; /**< adaptive hole map meta data */
level_octant_coordinate_t levels[OCTANT_MAXLEVEL];
} ADAPTIVE_HOLEMAP_COMPOSITE;
};

typedef struct ADAPTIVE_HOLEMAP
using ADAPTIVE_HOLEMAP = struct ADAPTIVE_HOLEMAP

Check warning on line 250 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Release)

‘ADAPTIVE_HOLEMAP’ has a field ‘ADAPTIVE_HOLEMAP::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 250 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Release)

‘ADAPTIVE_HOLEMAP’ has a field ‘ADAPTIVE_HOLEMAP::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 250 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Release)

‘ADAPTIVE_HOLEMAP’ has a field ‘ADAPTIVE_HOLEMAP::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 250 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Release)

‘ADAPTIVE_HOLEMAP’ has a field ‘ADAPTIVE_HOLEMAP::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 250 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

‘ADAPTIVE_HOLEMAP’ has a field ‘ADAPTIVE_HOLEMAP::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 250 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

‘ADAPTIVE_HOLEMAP’ has a field ‘ADAPTIVE_HOLEMAP::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 250 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

‘ADAPTIVE_HOLEMAP’ has a field ‘ADAPTIVE_HOLEMAP::meta’ whose type has no linkage [-Wsubobject-linkage]

Check warning on line 250 in src/codetypes.h

View workflow job for this annotation

GitHub Actions / CPU (ubuntu-latest, Debug)

‘ADAPTIVE_HOLEMAP’ has a field ‘ADAPTIVE_HOLEMAP::meta’ whose type has no linkage [-Wsubobject-linkage]
{
uint8_t existWall; /**< flag to indicate map contains wall */
ahm_meta_t meta; /**< adaptive hole map meta data */
level_t levels[OCTANT_MAXLEVEL];
} ADAPTIVE_HOLEMAP;
};

typedef struct HOLEMAP
using HOLEMAP = struct HOLEMAP
{
int existWall;
int nx[3];
int* samLocal;
int* sam;
double extents[6];
} HOLEMAP;
};

typedef struct OBB
using OBB = struct OBB
{
double xc[3];
double dxc[3];
Expand All @@ -275,64 +275,64 @@
int tag_remote;
int send_tag;
int recv_tag;
} OBB;
};

typedef struct DONORLIST
using DONORLIST = struct DONORLIST
{
int donorData[4];
double donorRes;
double receptorRes;
int cancel;
struct DONORLIST* next;
} DONORLIST;
};

typedef struct PACKET
using PACKET = struct PACKET
{
int nints;
int nreals;
int* intData;
REAL* realData;
} PACKET;
};

typedef struct INTERPLIST
using INTERPLIST = struct INTERPLIST
{
int cancel;
int nweights;
int receptorInfo[3];
double xtmp[3];
int* inode;
double* weights;
} INTERPLIST;
};

typedef struct INTERPLIST2
using INTERPLIST2 = struct INTERPLIST2
{
int cancel;
int nweights;
int receptorInfo[3];
int* inode;
double* weights;
struct INTERPLIST2* next;
} INTERPLIST2;
};

typedef struct INTEGERLIST
using INTEGERLIST = struct INTEGERLIST
{
int inode;
struct INTEGERLIST* next;
} INTEGERLIST;
};

typedef struct INTEGERLIST2
using INTEGERLIST2 = struct INTEGERLIST2
{
int intDataSize, realDataSize;
int* intData;
double* realData;
struct INTEGERLIST2* next;
} INTEGERLIST2;
};

typedef struct CompositeBody
using CompositeBody = struct CompositeBody
{
double searchTol;
std::vector<int> bodyids;
std::vector<int> dominanceflags;
} CompositeBody;
};

#endif /* CODETYPES_H */
4 changes: 2 additions & 2 deletions src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ tioga* tg;
** pointer storage for connectivity arrays that
** comes from external solver
*/
typedef struct inpdata
using inpdata = struct inpdata
{
int** vconn;
int* nc;
int* nv;
} inpdata;
};
inpdata idata[MAXBLOCKS];

#endif /* GLOBALS_H */
Loading