/home/runner/work/kynema/kynema/kynema/src/elements/masses/masses_input.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/elements/masses/masses_input.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
masses_input.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <span>
5#include <vector>
6
7#include "mass_element.hpp"
8
9namespace kynema {
10
15 std::vector<MassElement> elements; //< All elements present in the masses/rigid_body
16 std::array<double, 3> gravity; //< Gravity vector
17
18 MassesInput(std::span<const MassElement> elems, std::span<const double, 3> g)
19 : gravity({g[0], g[1], g[2]}) {
20 elements.assign(std::begin(elems), std::end(elems));
21 }
22
24 [[nodiscard]] size_t NumElements() const { return elements.size(); }
25};
26
27} // namespace kynema
Definition calculate_constraint_output.hpp:8
Represents the input data for creating mass/rigid body elements.
Definition masses_input.hpp:14
std::vector< MassElement > elements
Definition masses_input.hpp:15
std::array< double, 3 > gravity
Definition masses_input.hpp:16
MassesInput(std::span< const MassElement > elems, std::span< const double, 3 > g)
Definition masses_input.hpp:18
size_t NumElements() const
Returns the total number of elements present in masses/rigid_body portion of the mesh.
Definition masses_input.hpp:24