Skip to content

Commit

Permalink
static_cast<int> and const for composite body input arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
itopcuoglu committed Apr 25, 2024
1 parent 2bc0821 commit cd2d454
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/exawind/exawind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ int main(int argc, char** argv)

if (node["composite_body"]) {
const YAML::Node& composite_mesh = node["composite_body"];
const int num_composite = composite_mesh.size();
const int num_composite = static_cast<int>(composite_mesh.size());
sim.set_composite_num(num_composite);

for (int i = 0; i < num_composite; i++) {
Expand Down
10 changes: 5 additions & 5 deletions src/OversetSimulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,23 @@ class OversetSimulation
void set_holemap_alg(bool alg)
{
m_is_adaptive_holemap_alg = alg;
if (m_is_adaptive_holemap_alg == true) m_tg.setHoleMapAlgorithm(1);
if (m_is_adaptive_holemap_alg) m_tg.setHoleMapAlgorithm(1);
}

void set_composite_num(int num_composite)
void set_composite_num(const int num_composite)
{
m_num_composite_bodies = num_composite;
m_tg.setNumCompositeBodies(num_composite);
}

void set_composite_body(
int body_index,
int num_body_tags,
const int num_body_tags,
std::vector<int> bodytags,
std::vector<int> dominance_tags,
double search_tol)
const double search_tol)
{
if (m_is_adaptive_holemap_alg == true) {
if (m_is_adaptive_holemap_alg) {
m_tg.registerCompositeBody(
(body_index+1), num_body_tags, bodytags.data(),
dominance_tags.data(), search_tol);
Expand Down

0 comments on commit cd2d454

Please sign in to comment.