Added acPrintMeshInfo for printing all mesh parameters
This commit is contained in:
@@ -215,6 +215,9 @@ acVertexBufferIdx(const int i, const int j, const int k, const AcMeshInfo info)
|
||||
k * info.int_params[AC_mx] * info.int_params[AC_my];
|
||||
}
|
||||
|
||||
/** Prints all parameters inside AcMeshInfo */
|
||||
void acPrintMeshInfo(const AcMeshInfo config);
|
||||
|
||||
/*
|
||||
static inline int
|
||||
acGetParam(const AcMeshInfo info, const AcIntParam param)
|
||||
|
@@ -36,6 +36,21 @@ const char* vtxbuf_names[] = {AC_FOR_VTXBUF_HANDLES(AC_GEN_STR)};
|
||||
static const int num_nodes = 1;
|
||||
static Node nodes[num_nodes];
|
||||
|
||||
void
|
||||
acPrintMeshInfo(const AcMeshInfo config)
|
||||
{
|
||||
for (int i = 0; i < NUM_INT_PARAMS; ++i)
|
||||
printf("[%s]: %d\n", intparam_names[i], config.int_params[i]);
|
||||
for (int i = 0; i < NUM_INT3_PARAMS; ++i)
|
||||
printf("[%s]: (%d, %d, %d)\n", int3param_names[i], config.int3_params[i].x,
|
||||
config.int3_params[i].y, config.int3_params[i].z);
|
||||
for (int i = 0; i < NUM_REAL_PARAMS; ++i)
|
||||
printf("[%s]: %g\n", realparam_names[i], double(config.real_params[i]));
|
||||
for (int i = 0; i < NUM_REAL3_PARAMS; ++i)
|
||||
printf("[%s]: (%g, %g, %g)\n", real3param_names[i], double(config.real3_params[i].x),
|
||||
double(config.real3_params[i].y), double(config.real3_params[i].z));
|
||||
}
|
||||
|
||||
AcResult
|
||||
acInit(const AcMeshInfo mesh_info)
|
||||
{
|
||||
|
@@ -34,15 +34,6 @@
|
||||
#include "src/core/errchk.h"
|
||||
#include "src/core/math_utils.h"
|
||||
|
||||
static inline void
|
||||
print(const AcMeshInfo& config)
|
||||
{
|
||||
for (int i = 0; i < NUM_INT_PARAMS; ++i)
|
||||
printf("[%s]: %d\n", intparam_names[i], config.int_params[i]);
|
||||
for (int i = 0; i < NUM_REAL_PARAMS; ++i)
|
||||
printf("[%s]: %g\n", realparam_names[i], double(config.real_params[i]));
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Find the index of the keyword in names
|
||||
\return Index in range 0...n if the keyword is in names. -1 if the keyword was
|
||||
@@ -155,7 +146,7 @@ update_config(AcMeshInfo* config)
|
||||
#if VERBOSE_PRINTING // Defined in astaroth.h
|
||||
printf("###############################################################\n");
|
||||
printf("Config dimensions recalculated:\n");
|
||||
print(*config);
|
||||
acPrintMeshInfo(*config);
|
||||
printf("###############################################################\n");
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user