Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c5efb59
Add CMake build artifacts and vim swap files to .gitignore
Eleven7825 Oct 13, 2025
b324b1f
Add Integrator class to encapsulate Newton iteration logic
Eleven7825 Oct 13, 2025
c4609d5
Refactor main.cpp to use Integrator class
Eleven7825 Oct 13, 2025
7eec430
Fix: Add missing iEqOld variable for output calls
Eleven7825 Oct 13, 2025
d095026
Merge branch 'main' into feature/issue-442-integrator-class
mrp089 Oct 17, 2025
1d7c5cf
change license header
mrp089 Oct 17, 2025
fbe9c34
Rename integrator files to Integrator to follow class naming convention
Eleven7825 Oct 23, 2025
d3d942f
Convert Integrator class documentation to Doxygen format
Eleven7825 Oct 23, 2025
0113997
Refactor istr to be a class member variable
Eleven7825 Oct 23, 2025
9955e3d
De-clutter step() method by moving debug writes to individual functions
Eleven7825 Oct 23, 2025
8dbde2f
Standardize terminology to use 'Newton iteration' instead of 'inner l…
Eleven7825 Oct 23, 2025
7065339
Move dmsg debug statements into respective Integrator helper functions
Eleven7825 Oct 24, 2025
f2ee520
Remove pic namespace and integrate functions into Integrator class
Eleven7825 Nov 6, 2025
98d09f0
Extract An, Dn, and Yn from ComMod to Integrator class
Eleven7825 Nov 7, 2025
8e2f9d6
Extract Ao, Do, Yo from ComMod to Integrator class
Eleven7825 Nov 7, 2025
bbb88d6
Merge remote changes with Ao, Do, Yo extraction work
Eleven7825 Nov 7, 2025
9b52ad5
Thread Do/Dn displacement parameters through all boundary condition a…
Eleven7825 Nov 12, 2025
316d6da
Fix Do/Dn displacement parameter threading for moving mesh simulations
Eleven7825 Nov 13, 2025
63e5753
Merge branch 'main' into feature/issue-442-integrator-class
mrp089 Nov 13, 2025
4407dc1
Merge branch 'main' into feature/issue-442-integrator-class
mrp089 Dec 11, 2025
65d3eec
address mrp089's comments on renaming methods and remove redundant va…
Jan 6, 2026
22459d8
remove Do checks and some comments of Ao, Yo, Do
Jan 8, 2026
39f0b94
Merge branch 'main' into feature/issue-442-integrator-class
Eleven7825 Jan 9, 2026
e4f88d3
Lump An, Dn, Yn, Ao, Do, Yo into solu_state_vars
Eleven7825 Jan 9, 2026
ccf7ecd
Change `solutions` struct to be nested, for example `solution.old.A` …
Eleven7825 Jan 14, 2026
ec07838
Change the argument positions at `all_fun.h`. Now Dn and Do no longer…
Jan 19, 2026
ca653bb
Fix the function signature gnnb at nn.cpp to make Dn and Do not take …
Jan 20, 2026
1f4acb8
Add Solution getters to ComMod.h and update Integrator to use them
Jan 23, 2026
695f9d6
Update boundary condition functions to use SolutionStates
Jan 25, 2026
75db517
Refactor ris functions to use SolutionStates and remove temp_solution…
Jan 25, 2026
f0eacd7
Update eq_assem functions to use SolutionStates
Jan 25, 2026
5917389
Update txt functions to use SolutionStates
Jan 25, 2026
c49aff3
Update output functions to use SolutionStates
Jan 25, 2026
7309075
Update initialization functions to use SolutionStates
Jan 25, 2026
a73c528
Update all_fun integ functions and uris functions to use SolutionStates
Jan 25, 2026
7bd5223
Merge branch 'main' into feature/issue-442-integrator-class
mrp089 Jan 28, 2026
d6919af
Update txt functions and uris functions to use SolutionStates
Jan 28, 2026
3b23497
Fix missed integ call in uris_meanp
Jan 28, 2026
7716ab5
Merge branch 'feature/issue-442-integrator-class' of github.com:Eleve…
Jan 28, 2026
93a60f6
Merge branch 'main' into feature/issue-442-integrator-class
mrp089 Feb 2, 2026
eb75141
Merge branch 'main' into feature/issue-442-integrator-class
Eleven7825 Feb 11, 2026
b5ca973
Add const to read-only SolutionStates& params and pass SolutionStates…
Feb 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .gitignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all those .gitignore's necessary?

Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
build

# CMake build artifacts
CMakeCache.txt
CMakeFiles/
Makefile
cmake_install.cmake
*-build/
*-prefix/

# Compiled binaries and libraries
Code/bin/
Code/lib/

# Generated headers
Code/Source/Include/simvascular_options.h
Code/Source/Include/simvascular_version.h
Code/ThirdParty/*/simvascular_*.h

# Vim swap files
*.swp
*.swo
*~

# System files osx
**/.DS_Store

Expand Down
2 changes: 1 addition & 1 deletion Code/Source/solver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ set(CSRCS
heatf.h heatf.cpp
heats.h heats.cpp
initialize.h initialize.cpp
Integrator.h Integrator.cpp
l_elas.h l_elas.cpp
lhsa.h lhsa.cpp
ls.h ls.cpp
Expand All @@ -191,7 +192,6 @@ set(CSRCS
nn.h nn.cpp
output.h output.cpp
load_msh.h load_msh.cpp
pic.h pic.cpp
post.h post.cpp
read_files.h read_files.cpp
read_msh.h read_msh.cpp
Expand Down
52 changes: 34 additions & 18 deletions Code/Source/solver/ComMod.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,40 @@

class LinearAlgebra;

/**
* @brief Represents solution variables at a single time level
*
* Contains the three primary solution arrays used in time integration:
* A (time derivative), D (integrated variable), and Y (variable)
*/
struct Solution {
Array<double> A; ///< Time derivative (acceleration in structural mechanics)
Array<double> D; ///< Integrated variable (displacement in structural mechanics)
Array<double> Y; ///< Variable (velocity in structural mechanics)

// Semantic getters for improved readability
Array<double>& get_acceleration() { return A; }
const Array<double>& get_acceleration() const { return A; }

Array<double>& get_velocity() { return Y; }
const Array<double>& get_velocity() const { return Y; }

Array<double>& get_displacement() { return D; }
const Array<double>& get_displacement() const { return D; }
};

/**
* @brief Holds solution state at old and current time levels
*
* Contains solution arrays at two time levels for time integration:
* - old: Previous converged solution at time n
* - current: Current solution being computed at time n+1
*/
struct SolutionStates {
Solution old; ///< Previous converged solution at time n (Ao, Do, Yo)
Solution current; ///< Current solution being computed at time n+1 (An, Dn, Yn)
};

/// @brief Fourier coefficients that are used to specify unsteady BCs
//
class fcType
Expand Down Expand Up @@ -1749,18 +1783,6 @@ class ComMod {
/// @brief RIS mapping array, with global (total) enumeration
std::vector<Array2D> grisMapList;

/// @brief Old time derivative of variables (acceleration); known result at current time step
Array<double> Ao;

/// @brief New time derivative of variables (acceleration); unknown result at next time step
Array<double> An;

/// @brief Old integrated variables (displacement)
Array<double> Do;

/// @brief New integrated variables (displacement)
Array<double> Dn;

/// @brief Residual vector
Array<double> R;

Expand All @@ -1770,12 +1792,6 @@ class ComMod {
/// @brief Position vector of mesh nodes (in ref config)
Array<double> x;

/// @brief Old variables (velocity); known result at current time step
Array<double> Yo;

/// @brief New variables (velocity); unknown result at next time step
Array<double> Yn;

/// @brief Body force
Array<double> Bf;

Expand Down
Loading
Loading