Skip to content

Commit

Permalink
modify conditionals and add consts (#945)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbkuhn authored Dec 26, 2023
1 parent 2d6acd4 commit 672b867
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
7 changes: 3 additions & 4 deletions amr-wind/wind_energy/actuator/wing/fixed_wing_ops.H
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,15 @@ struct ReadInputsOp<FixedWing, ActSrcLine>

pp.query("motion_type", wdata.motion_type);
{
if (amrex::toLower(wdata.motion_type) == "none") {
// do nothing, this is default
} else if (amrex::toLower(wdata.motion_type) == "linear") {
// do nothing for default, "none"
if (amrex::toLower(wdata.motion_type) == "linear") {
// get velocity
pp.get("velocity", wdata.vel_tr);
} else if (amrex::toLower(wdata.motion_type) == "sine") {
// get parameters
pp.get("sine_period", wdata.s_period);
pp.get("sine_vector", wdata.s_vector);
} else {
} else if (amrex::toLower(wdata.motion_type) != "none") {
amrex::Abort(
"Invalid FixedWingLine motion type. Valid options are "
"none, linear, and sine.");
Expand Down
8 changes: 4 additions & 4 deletions amr-wind/wind_energy/actuator/wing/wing_ops.H
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ void new_wing_position_velocity(
VecList& points,
vs::Vector& vtr,
const int npts,
amrex::Real tn,
amrex::Real tnp1,
const amrex::Real tn,
const amrex::Real tnp1,
const std::string motion,
amrex::Real period,
vs::Vector svec);
const amrex::Real period,
const vs::Vector svec);

template <typename T>
ComponentView make_component_view(typename T::DataType& data)
Expand Down
8 changes: 4 additions & 4 deletions amr-wind/wind_energy/actuator/wing/wing_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ void new_wing_position_velocity(
VecList& points,
vs::Vector& vtr,
const int npts,
amrex::Real tn,
amrex::Real tnp1,
const amrex::Real tn,
const amrex::Real tnp1,
const std::string motion,
amrex::Real period,
vs::Vector svec)
const amrex::Real period,
const vs::Vector svec)
{
// Get displacement of points from n to n+1
// Also, if translation velocity changes, update it
Expand Down

0 comments on commit 672b867

Please sign in to comment.