svMultiPhysics
Loading...
Searching...
No Matches
SolutionStates.h
1// SPDX-FileCopyrightText: Copyright (c) Stanford University, The Regents of the University of California, and others.
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef SOLUTION_STATES_H
5#define SOLUTION_STATES_H
6
7#include "Array.h"
8
9/**
10 * @brief Represents solution variables at a single time step
11 *
12 * Contains the three primary solution arrays used in time integration:
13 * A (time derivative), D (integrated variable), and Y (variable)
14 */
15struct Solution {
16 Array<double>& get_acceleration() { return acceleration_; }
17 const Array<double>& get_acceleration() const { return acceleration_; }
18
19 Array<double>& get_velocity() { return velocity_; }
20 const Array<double>& get_velocity() const { return velocity_; }
21
22 Array<double>& get_displacement() { return displacement_; }
23 const Array<double>& get_displacement() const { return displacement_; }
24
25private:
26 Array<double> acceleration_; ///< Time derivative (acceleration in structural mechanics)
27 Array<double> displacement_; ///< Integrated variable (displacement in structural mechanics)
28 Array<double> velocity_; ///< Variable (velocity in structural mechanics)
29};
30
31/**
32 * @brief Holds solution state at old, current, and intermediate time levels
33 *
34 * Contains solution arrays at three time levels for time integration:
35 * - old: Previous converged solution at time n
36 * - current: Current solution being computed at time n+1
37 * - intermediate: Generalized-alpha intermediate level (Ag, Yg, Dg)
38 */
40 Solution old; ///< Previous converged solution at time n (Ao, Do, Yo)
41 Solution current; ///< Current solution being computed at time n+1 (An, Dn, Yn)
42 Solution intermediate; ///< Generalized-alpha intermediate level (Ag, Yg, Dg)
43};
44
45#endif
Represents solution variables at a single time step.
Definition SolutionStates.h:15
Holds solution state at old, current, and intermediate time levels.
Definition SolutionStates.h:39
Solution intermediate
Generalized-alpha intermediate level (Ag, Yg, Dg)
Definition SolutionStates.h:42
Solution current
Current solution being computed at time n+1 (An, Dn, Yn)
Definition SolutionStates.h:41
Solution old
Previous converged solution at time n (Ao, Do, Yo)
Definition SolutionStates.h:40