Skip to content

Commit

Permalink
formatting etc
Browse files Browse the repository at this point in the history
  • Loading branch information
mbkuhn committed Nov 25, 2024
1 parent 4288772 commit fbff59f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion include/mesh_motion/MotionOscillationKernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class MotionOscillationKernel : public NgpMotionKernel<MotionOscillationKernel>
double amplitude_{0.0};
double period_2nd_{0.0};
double amplitude_2nd_{0.0};

};

} // namespace nalu
Expand Down
9 changes: 5 additions & 4 deletions src/mesh_motion/MotionOscillationKernel.C
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ MotionOscillationKernel::load(const YAML::Node& node)
endTime_ = endTime_ + DBL_EPSILON;

// Oscillation based on period and amplitude
get_required(node, "period", period_, period_);
get_required(node, "amplitude", amplitude_, amplitude_);
get_required(node, "period", period_);
get_required(node, "amplitude", amplitude_);
// Bichromatic oscillation also available
get_if_present(node, "period_bichromatic", period_2nd_, period_2nd_);
get_if_present(node, "period_bichromatic", period_2nd_, period_2nd_);
get_if_present(node, "amplitude_bichromatic", amplitude_2nd_, amplitude_2nd_);

if (node["direction"]) {
Expand Down Expand Up @@ -60,10 +60,11 @@ MotionOscillationKernel::build_transformation(
// repeat for bichromatic
angle =
2.0 * M_PI / period_2nd_ * (stk::math::max(0.0, motionTime - startTime_));
disp += amplitude_2nd_ * stk::math::sin(angle)
disp += amplitude_2nd_ * stk::math::sin(angle);

// get magnitude of oscillation direction vector
double mag = 0.0;

for (int d = 0; d < nalu_ngp::NDimMax; d++)
mag += direction_[d] * direction_[d];
mag = stk::math::sqrt(mag);
Expand Down

0 comments on commit fbff59f

Please sign in to comment.