/home/runner/work/kynema/kynema/kynema/src/model/model.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/model/model.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
model.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <span>
4#include <tuple>
5
16#include "elements/elements.hpp"
21#include "mesh_connectivity.hpp"
22#include "node.hpp"
23#include "solver/solver.hpp"
24#include "state/state.hpp"
25
26namespace kynema {
27
39template <
40 typename DeviceType =
41 Kokkos::Device<Kokkos::DefaultExecutionSpace, Kokkos::DefaultExecutionSpace::memory_space>>
42[[nodiscard]] inline Solver<DeviceType> CreateSolver(
44) {
45 dof::assemble_node_freedom_allocation_table(state, elements, constraints);
47 dof::create_element_freedom_table(elements, state);
48 dof::create_constraint_freedom_table(constraints, state);
49
50 return {
51 state.ID,
52 state.active_dofs,
54 elements.NumberOfNodesPerElement(),
55 elements.NodeStateIndices(),
56 constraints.num_dofs,
57 constraints.base_active_dofs,
58 constraints.target_active_dofs,
59 constraints.base_node_freedom_table,
60 constraints.target_node_freedom_table,
61 constraints.row_range,
62 };
63}
64
74class Model {
75public:
77 static constexpr size_t InvalidNodeID{0U};
78
80 Model() = default;
81
87 explicit Model(std::array<double, 3> gravity) : gravity_(gravity) {}
88
89 //--------------------------------------------------------------------------
90 // Miscellaneous
91 //--------------------------------------------------------------------------
92
97 void SetGravity(double x, double y, double z) {
98 this->gravity_[0] = x;
99 this->gravity_[1] = y;
100 this->gravity_[2] = z;
101 }
102
103 //--------------------------------------------------------------------------
104 // Nodes
105 //--------------------------------------------------------------------------
106
113 const auto id = this->nodes_.size();
114 this->nodes_.emplace_back(id);
115 return NodeBuilder(this->nodes_.back());
116 }
117
124 [[nodiscard]] const Node& GetNode(size_t id) const { return this->nodes_[id]; }
125
132 [[nodiscard]] Node& GetNode(size_t id) { return this->nodes_[id]; }
133
139 [[nodiscard]] size_t NumNodes() const { return this->nodes_.size(); }
140
146 [[nodiscard]] const std::vector<Node>& GetNodes() const { return this->nodes_; }
147
148 //--------------------------------------------------------------------------
149 // Beam Elements
150 //--------------------------------------------------------------------------
151
162 std::span<const size_t> node_ids, std::span<const BeamSection> sections,
163 std::span<const std::array<double, 2>> quadrature
164 ) {
165 const auto elem_id = this->beam_elements_.size();
166 this->beam_elements_.emplace_back(elem_id, node_ids, sections, quadrature);
167 this->mesh_connectivity_.AddBeamElementConnectivity(elem_id, node_ids);
168 return elem_id;
169 }
170
178 [[nodiscard]] const BeamElement& GetBeamElement(size_t id) const {
179 return this->beam_elements_[id];
180 }
181
189 [[nodiscard]] BeamElement& GetBeamElement(size_t id) { return this->beam_elements_[id]; }
190
196 [[nodiscard]] const std::vector<BeamElement>& GetBeamElements() const {
197 return this->beam_elements_;
198 }
199
205 [[nodiscard]] size_t NumBeamElements() const { return this->beam_elements_.size(); }
206
212 [[nodiscard]] BeamsInput CreateBeamsInput() const {
213 return {this->beam_elements_, this->gravity_};
214 }
215
223 template <typename DeviceType>
224 [[nodiscard]] Beams<DeviceType> CreateBeams() const {
225 return kynema::CreateBeams<DeviceType>(this->CreateBeamsInput(), this->nodes_);
226 }
227
234 void TranslateBeam(size_t beam_elem_id, const std::array<double, 3>& displacement) {
235 const auto& beam_elem = this->beam_elements_[beam_elem_id];
236 for (const auto& node_id : beam_elem.node_ids) {
237 this->GetNode(node_id).Translate(displacement);
238 }
239 }
240
249 size_t beam_elem_id, const std::array<double, 4>& displacement_quaternion,
250 const std::array<double, 3>& point
251 ) {
252 const auto& beam_elem = this->beam_elements_[beam_elem_id];
253 for (const auto& node_id : beam_elem.node_ids) {
254 this->GetNode(node_id).RotateAboutPoint(displacement_quaternion, point);
255 }
256 }
257
266 size_t beam_elem_id, const std::array<double, 6>& velocity,
267 const std::array<double, 3>& point
268 ) {
269 const auto& beam_elem = this->beam_elements_[beam_elem_id];
270 for (const auto& node_id : beam_elem.node_ids) {
271 this->GetNode(node_id).SetVelocityAboutPoint(velocity, point);
272 }
273 }
274
284 size_t beam_elem_id, const std::array<double, 6>& acceleration,
285 const std::array<double, 3>& omega, const std::array<double, 3>& point
286 ) {
287 const auto& beam_elem = this->beam_elements_[beam_elem_id];
288 for (const auto& node_id : beam_elem.node_ids) {
289 this->GetNode(node_id).SetAccelerationAboutPoint(acceleration, omega, point);
290 }
291 }
292
293 //--------------------------------------------------------------------------
294 // Mass Elements
295 //--------------------------------------------------------------------------
296
305 size_t AddMassElement(const size_t node_id, const std::array<std::array<double, 6>, 6>& mass) {
306 const auto elem_id = this->mass_elements_.size();
307 this->mass_elements_.emplace_back(elem_id, node_id, mass);
308 this->mesh_connectivity_.AddMassElementConnectivity(elem_id, node_id);
309 return elem_id;
310 }
311
319 [[nodiscard]] const MassElement& GetMassElement(size_t id) const {
320 return this->mass_elements_[id];
321 }
322
330 [[nodiscard]] MassElement& GetMassElement(size_t id) { return this->mass_elements_[id]; }
331
337 [[nodiscard]] const std::vector<MassElement>& GetMassElements() const {
338 return this->mass_elements_;
339 }
340
346 [[nodiscard]] size_t NumMassElements() const { return this->mass_elements_.size(); }
347
355 template <typename DeviceType>
356 [[nodiscard]] Masses<DeviceType> CreateMasses() const {
357 return kynema::CreateMasses<DeviceType>(
358 MassesInput(this->mass_elements_, this->gravity_), this->nodes_
359 );
360 }
361
362 //--------------------------------------------------------------------------
363 // Spring Elements
364 //--------------------------------------------------------------------------
365
377 const size_t node1_id, const size_t node2_id, const double stiffness,
378 const double undeformed_length
379 ) {
380 const auto elem_id = this->spring_elements_.size();
381 this->spring_elements_.emplace_back(
382 elem_id, std::array{node1_id, node2_id}, stiffness, undeformed_length
383 );
384 this->mesh_connectivity_.AddSpringElementConnectivity(
385 elem_id, std::array{node1_id, node2_id}
386 );
387 return elem_id;
388 }
389
397 [[nodiscard]] const SpringElement& GetSpringElement(size_t id) const {
398 return this->spring_elements_[id];
399 }
400
408 [[nodiscard]] SpringElement& GetSpringElement(size_t id) { return this->spring_elements_[id]; }
409
415 [[nodiscard]] size_t NumSpringElements() const { return this->spring_elements_.size(); }
416
424 template <typename DeviceType>
425 [[nodiscard]] Springs<DeviceType> CreateSprings() const {
426 return kynema::CreateSprings<DeviceType>(SpringsInput(this->spring_elements_), this->nodes_);
427 }
428
429 //--------------------------------------------------------------------------
430 // Elements
431 //--------------------------------------------------------------------------
432
440 template <typename DeviceType>
441 [[nodiscard]] Elements<DeviceType> CreateElements() const {
442 return {
443 this->CreateBeams<DeviceType>(),
444 this->CreateMasses<DeviceType>(),
445 this->CreateSprings<DeviceType>(),
446 };
447 }
448
449 //--------------------------------------------------------------------------
450 // State
451 //--------------------------------------------------------------------------
452
460 template <typename DeviceType>
461 [[nodiscard]] State<DeviceType> CreateState() const {
462 auto state = State<DeviceType>(this->nodes_.size());
463 model::CopyNodesToState<DeviceType>(state, this->nodes_);
464 return state;
465 }
466
467 //--------------------------------------------------------------------------
468 // Constraints
469 //--------------------------------------------------------------------------
470
477 size_t AddFixedBC(const size_t node_id) {
478 const auto id = this->constraints_.size();
479 this->constraints_.emplace_back(
481 );
482 this->mesh_connectivity_.AddConstraintConnectivity(id, std::vector<size_t>{node_id});
483 return id;
484 }
485
494 const size_t node_id,
495 const std::array<double, 7>& initial_displacement = {0., 0., 0., 1., 0., 0., 0.}
496 ) {
497 const auto id = this->constraints_.size();
498 this->constraints_.emplace_back(
500 std::array{0., 0., 0.}, initial_displacement
501 );
502 this->mesh_connectivity_.AddConstraintConnectivity(id, std::vector<size_t>{node_id});
503 return id;
504 }
505
512 size_t AddRigidJointConstraint(const std::array<size_t, 2>& node_ids) {
513 const auto id = this->constraints_.size();
514 this->constraints_.emplace_back(id, constraints::ConstraintType::RigidJoint, node_ids);
515 this->mesh_connectivity_.AddConstraintConnectivity(
516 id, std::vector<size_t>{node_ids[0], node_ids[1]}
517 );
518 return id;
519 }
520
530 const std::array<size_t, 2>& node_ids, const std::array<double, 3>& axis, double* torque
531 ) {
532 const auto id = this->constraints_.size();
533 this->constraints_.emplace_back(
535 std::array{0., 0., 0., 1., 0., 0., 0.}, torque
536 );
537 this->mesh_connectivity_.AddConstraintConnectivity(
538 id, std::vector<size_t>{node_ids[0], node_ids[1]}
539 );
540 return id;
541 }
542
551 const std::array<size_t, 2>& node_ids, const std::array<double, 3>& axis, double* control
552 ) {
553 const auto id = this->constraints_.size();
554 this->constraints_.emplace_back(
556 std::array{0., 0., 0., 1., 0., 0., 0.}, control
557 );
558 this->mesh_connectivity_.AddConstraintConnectivity(
559 id, std::vector<size_t>{node_ids[0], node_ids[1]}
560 );
561 return id;
562 }
563
570 size_t AddFixedBC3DOFs(const size_t node_id) {
571 const auto id = this->constraints_.size();
572 this->constraints_.emplace_back(
574 );
575 this->mesh_connectivity_.AddConstraintConnectivity(id, std::vector<size_t>{node_id});
576 return id;
577 }
578
585 size_t AddPrescribedBC3DOFs(const size_t node_id) {
586 const auto id = this->constraints_.size();
587 this->constraints_.emplace_back(
589 );
590 this->mesh_connectivity_.AddConstraintConnectivity(id, std::vector<size_t>{node_id});
591 return id;
592 }
593
599 size_t AddRigidJoint6DOFsTo3DOFs(const std::array<size_t, 2>& node_ids) {
600 const auto id = this->constraints_.size();
601 this->constraints_.emplace_back(
603 );
604 this->mesh_connectivity_.AddConstraintConnectivity(
605 id, std::vector<size_t>{node_ids[0], node_ids[1]}
606 );
607 return id;
608 }
609
614 [[nodiscard]] size_t NumConstraints() const { return this->constraints_.size(); }
615
621 template <typename DeviceType>
623 return Constraints<DeviceType>(this->constraints_, this->nodes_);
624 }
625
631 template <
632 typename DeviceType = Kokkos::Device<
633 Kokkos::DefaultExecutionSpace, Kokkos::DefaultExecutionSpace::memory_space>>
634 [[nodiscard]] std::tuple<State<DeviceType>, Elements<DeviceType>, Constraints<DeviceType>>
635 CreateSystem() const {
636 return {
637 this->CreateState<DeviceType>(), this->CreateElements<DeviceType>(),
638 this->CreateConstraints<DeviceType>()
639 };
640 }
641
647 template <
648 typename DeviceType = Kokkos::Device<
649 Kokkos::DefaultExecutionSpace, Kokkos::DefaultExecutionSpace::memory_space>>
650 [[nodiscard]] std::tuple<
653 auto [state, elements, constraints] = this->CreateSystem<DeviceType>();
654 auto solver = CreateSolver<DeviceType>(state, elements, constraints);
655 return {state, elements, constraints, solver};
656 }
657
658 //--------------------------------------------------------------------------
659 // Mesh Connectivity
660 //--------------------------------------------------------------------------
661
666 [[nodiscard]] const model::MeshConnectivity& GetMeshConnectivity() const {
667 return this->mesh_connectivity_;
668 }
669
674 [[nodiscard]] model::MeshConnectivity& GetMeshConnectivity() { return this->mesh_connectivity_; }
675
680 void ExportMeshConnectivityToYAML(const std::string& filename = "mesh_connectivity.yaml") const {
681 this->mesh_connectivity_.ExportToYAML(filename);
682 }
683
684private:
685 std::array<double, 3> gravity_ = {0., 0., 0.}; //< Gravity components
686 std::vector<Node> nodes_; //< Nodes in the model
687 std::vector<BeamElement> beam_elements_; //< Beam elements in the model
688 std::vector<MassElement> mass_elements_; //< Mass elements in the model
689 std::vector<SpringElement> spring_elements_; //< Spring elements in the model
690 std::vector<constraints::Constraint> constraints_; //< Constraints in the model
691 model::MeshConnectivity
692 mesh_connectivity_; //< Mesh connectivity tracking element-node relationships
693};
694
695} // namespace kynema
Struct to define the connectivity structure of elements, nodes, and constraints defining an Kynema pr...
Definition model.hpp:74
size_t AddRigidJoint6DOFsTo3DOFs(const std::array< size_t, 2 > &node_ids)
Adds a rigid joint constraint (6DOFs to 3DOFs) to the model and returns the ID.
Definition model.hpp:599
State< DeviceType > CreateState() const
Creates an State struct based on the nodes in this model.
Definition model.hpp:461
Beams< DeviceType > CreateBeams() const
Createsa Beams structure based on the beam elements in the model.
Definition model.hpp:224
Masses< DeviceType > CreateMasses() const
Create a a masses struct based on the mass elements present in the model.
Definition model.hpp:356
size_t AddPrescribedBC3DOFs(const size_t node_id)
Adds a prescribed boundary condition constraint (6DOFs to 3DOFs) to the model and returns the ID.
Definition model.hpp:585
size_t AddPrescribedBC(const size_t node_id, const std::array< double, 7 > &initial_displacement={0., 0., 0., 1., 0., 0., 0.})
Adds a prescribed boundary condition constraint to the model and returns the ID.
Definition model.hpp:493
Model()=default
Default constructor.
size_t AddRotationControl(const std::array< size_t, 2 > &node_ids, const std::array< double, 3 > &axis, double *control)
Adds a rotation control constraint to the model and returns the ID.
Definition model.hpp:550
size_t AddFixedBC3DOFs(const size_t node_id)
Adds a fixed boundary condition constraint (6DOFs to 3DOFs) to the model and returns the ID.
Definition model.hpp:570
const model::MeshConnectivity & GetMeshConnectivity() const
Get the mesh connectivity.
Definition model.hpp:666
void TranslateBeam(size_t beam_elem_id, const std::array< double, 3 > &displacement)
Translate all beam nodes by given displacement.
Definition model.hpp:234
Springs< DeviceType > CreateSprings() const
Creates a Springs struct based on the spring elements in the model.
Definition model.hpp:425
void ExportMeshConnectivityToYAML(const std::string &filename="mesh_connectivity.yaml") const
Export mesh connectivity to a YAML file.
Definition model.hpp:680
void SetBeamAccelerationAboutPoint(size_t beam_elem_id, const std::array< double, 6 > &acceleration, const std::array< double, 3 > &omega, const std::array< double, 3 > &point)
Set the acceleration of the beam about a given point.
Definition model.hpp:283
const std::vector< MassElement > & GetMassElements() const
Returns a reference to the mass elements present in the model.
Definition model.hpp:337
const std::vector< BeamElement > & GetBeamElements() const
Returns a reference to the beam elements present in the model.
Definition model.hpp:196
BeamElement & GetBeamElement(size_t id)
Returns a beam element by ID.
Definition model.hpp:189
model::MeshConnectivity & GetMeshConnectivity()
Get the mesh connectivity.
Definition model.hpp:674
void SetGravity(double x, double y, double z)
Sets the gravity components for the model.
Definition model.hpp:97
static constexpr size_t InvalidNodeID
Represents an invalid node in constraints that only uses the target node.
Definition model.hpp:77
Constraints< DeviceType > CreateConstraints() const
Returns a Constraints object initialized from the model constraints.
Definition model.hpp:622
size_t AddFixedBC(const size_t node_id)
Adds a fixed boundary condition constraint to the model and returns the ID.
Definition model.hpp:477
Model(std::array< double, 3 > gravity)
Constructor with gravity specified.
Definition model.hpp:87
const BeamElement & GetBeamElement(size_t id) const
Returns a beam element by ID.
Definition model.hpp:178
void SetBeamVelocityAboutPoint(size_t beam_elem_id, const std::array< double, 6 > &velocity, const std::array< double, 3 > &point)
Set the translational and rotational velocity of the beam about a given point.
Definition model.hpp:265
const MassElement & GetMassElement(size_t id) const
Returns a mass element by ID.
Definition model.hpp:319
const std::vector< Node > & GetNodes() const
Returns constant reference to nodes vector.
Definition model.hpp:146
SpringElement & GetSpringElement(size_t id)
Returns a spring element by ID.
Definition model.hpp:408
NodeBuilder AddNode()
Adds a node to the model.
Definition model.hpp:112
const Node & GetNode(size_t id) const
Returns a node by ID.
Definition model.hpp:124
Elements< DeviceType > CreateElements() const
Creates an Elements struct with Beams, Masses, and Springs.
Definition model.hpp:441
size_t AddRigidJointConstraint(const std::array< size_t, 2 > &node_ids)
Adds a rigid constraint to the model and returns the ID.
Definition model.hpp:512
const SpringElement & GetSpringElement(size_t id) const
Returns a spring element by ID.
Definition model.hpp:397
Node & GetNode(size_t id)
Returns a node by ID.
Definition model.hpp:132
size_t AddMassElement(const size_t node_id, const std::array< std::array< double, 6 >, 6 > &mass)
Adds a mass element to the model.
Definition model.hpp:305
BeamsInput CreateBeamsInput() const
Createsa Beams input file based on the beam elements in the model.
Definition model.hpp:212
MassElement & GetMassElement(size_t id)
Returns a mass element by ID.
Definition model.hpp:330
size_t NumSpringElements() const
Returns the number of spring elements present in the model.
Definition model.hpp:415
size_t AddBeamElement(std::span< const size_t > node_ids, std::span< const BeamSection > sections, std::span< const std::array< double, 2 > > quadrature)
Adds a beam element to the model.
Definition model.hpp:161
size_t AddRevoluteJointConstraint(const std::array< size_t, 2 > &node_ids, const std::array< double, 3 > &axis, double *torque)
Adds a revolute/hinge constraint to the model and returns the ID.
Definition model.hpp:529
std::tuple< State< DeviceType >, Elements< DeviceType >, Constraints< DeviceType >, Solver< DeviceType > > CreateSystemWithSolver() const
Returns a State, Elements, Constraints, and Solver object initialized from the model.
Definition model.hpp:652
std::tuple< State< DeviceType >, Elements< DeviceType >, Constraints< DeviceType > > CreateSystem() const
Returns a State, Elements, and Constraints object initialized from the model.
Definition model.hpp:635
size_t NumMassElements() const
Returns the number of mass elements present in the model.
Definition model.hpp:346
size_t NumBeamElements() const
Returns the number of beam elements present in the model.
Definition model.hpp:205
size_t AddSpringElement(const size_t node1_id, const size_t node2_id, const double stiffness, const double undeformed_length)
Adds a spring element to the model.
Definition model.hpp:376
size_t NumNodes() const
Gets the number of nodes present in the model.
Definition model.hpp:139
void RotateBeamAboutPoint(size_t beam_elem_id, const std::array< double, 4 > &displacement_quaternion, const std::array< double, 3 > &point)
Rotate all beam nodes by given quaternion about a given point.
Definition model.hpp:248
size_t NumConstraints() const
Returns the number of constraints present in the model.
Definition model.hpp:614
Builder class for constructing and configuring Node objects.
Definition node.hpp:282
Class to manage element-to-node connectivity information for a mesh.
Definition mesh_connectivity.hpp:18
void AddSpringElementConnectivity(size_t elem_id, const std::array< size_t, 2 > &node_ids)
Adds a spring element's node connectivity.
Definition mesh_connectivity.hpp:45
void AddBeamElementConnectivity(size_t elem_id, std::span< const size_t > node_ids)
Adds a beam element's node connectivity.
Definition mesh_connectivity.hpp:27
void ExportToYAML(std::ostream &file) const
Export mesh connectivity inforation to a YAML file.
Definition mesh_connectivity.hpp:98
void AddMassElementConnectivity(size_t elem_id, size_t node_id)
Adds a mass element's node connectivity.
Definition mesh_connectivity.hpp:36
void AddConstraintConnectivity(size_t constraint_id, std::span< const size_t > node_ids)
Adds a constraint's node connectivity.
Definition mesh_connectivity.hpp:54
void compute_node_freedom_map_table(State< DeviceType > &state)
Compute the node freedom map table, a pointer map to the start of the degrees of freedom ofa given no...
Definition compute_node_freedom_map_table.hpp:38
void assemble_node_freedom_allocation_table(State< DeviceType > &state, const Elements< DeviceType > &elements, const Constraints< DeviceType > &constraints)
Creates the node freedom allocation table in state based on the connectivities defined in the element...
Definition assemble_node_freedom_allocation_table.hpp:140
void create_element_freedom_table(Elements< DeviceType > &elements, const State< DeviceType > &state)
Creates the element freedom tables for all of the elements in the system.
Definition create_element_freedom_table.hpp:106
void create_constraint_freedom_table(Constraints< DeviceType > &constraints, const State< DeviceType > &state)
Creates node freedom tables for each the target and base nodes in the constraints.
Definition create_constraint_freedom_table.hpp:66
Definition calculate_constraint_output.hpp:8
Solver< DeviceType > CreateSolver(State< DeviceType > &state, Elements< DeviceType > &elements, Constraints< DeviceType > &constraints)
Compute freedom tables for state, elements, and constraints, then construct and return solver.
Definition model.hpp:42
Beam element constitutes flexible beams material behavior in kynema.
Definition beam_element.hpp:17
Represents the input data for creating flexible beams.
Definition beams_input.hpp:22
Contains the field variables needed to compute the per-element contributions to the residual vector a...
Definition beams.hpp:22
Container class for managing multiple constraints in a simulation.
Definition constraints.hpp:29
View< size_t * > target_active_dofs
Definition constraints.hpp:49
View< Kokkos::pair< size_t, size_t > * > row_range
Definition constraints.hpp:45
View< size_t *[6]> base_node_freedom_table
Definition constraints.hpp:50
size_t num_dofs
Definition constraints.hpp:36
View< size_t * > base_active_dofs
Definition constraints.hpp:48
View< size_t *[6]> target_node_freedom_table
Definition constraints.hpp:51
A container providing handle to all structural elements present in the model.
Definition elements.hpp:20
Kokkos::View< size_t *, DeviceType > NumberOfNodesPerElement() const
Returns the number of nodes per element for each element in the system.
Definition elements.hpp:41
Kokkos::View< size_t **, DeviceType > NodeStateIndices() const
Returns the state indices for each node of each element in the system.
Definition elements.hpp:87
Mass element constitutes rigid bodies/masses material behavior in kynema. It has a single node and a ...
Definition mass_element.hpp:11
Represents the input data for creating mass/rigid body elements.
Definition masses_input.hpp:14
Contains field variables for mass elements (aka, rigid bodies) to compute per-element contributions t...
Definition masses.hpp:17
Represents a node in the finite element model.
Definition node.hpp:26
Node & Translate(const std::array< double, 3 > &displacement)
Translate node by a displacement vector.
Definition node.hpp:87
Node & RotateAboutPoint(const std::array< double, 4 > &q, const std::array< double, 3 > &point)
Rotate node by a quaternion about the given point.
Definition node.hpp:100
void SetVelocityAboutPoint(const std::array< double, 6 > &velocity, const std::array< double, 3 > &point)
Set node velocity based on rigid body motion about a reference point.
Definition node.hpp:203
void SetAccelerationAboutPoint(const std::array< double, 6 > &acceleration, const std::array< double, 3 > &omega, const std::array< double, 3 > &point)
Set node acceleration based on rigid body motion about a reference point.
Definition node.hpp:233
This object manages the assembly and solution of linear system arising from the generalized-alpha bas...
Definition solver.hpp:21
Spring element represents a constitutively linear spring connecting two nodes and defined by its scal...
Definition spring_element.hpp:12
Represents the input data for creating spring elements.
Definition springs_input.hpp:13
Contains field variables for spring elements to compute per-element contributions to the residual vec...
Definition springs.hpp:14
Container for storing the complete system state of the simulation at a given time increment.
Definition state.hpp:18
View< size_t * > ID
Definition state.hpp:24
View< size_t * > active_dofs
Definition state.hpp:26
View< size_t * > node_freedom_map_table
Definition state.hpp:27