Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
d4c91aa
Start on adding tensor fields & numerical methods
aratraw Mar 10, 2026
fde99ae
added standard boring numerical stuff
aratraw Mar 10, 2026
47f9eb6
added & refactored headers at delta/geometry & delta/numerical
aratraw Mar 11, 2026
fe7bea8
implementing numerical methods. which are actually exact, not approxi…
aratraw Mar 11, 2026
482b9b0
magical recursive blackbox refactoring in process, do not disturb
aratraw Mar 12, 2026
bee8e4f
Grand Magical Refactor continues
aratraw Mar 12, 2026
1195cac
finalizing the grand mysterious refactor
aratraw Mar 13, 2026
96255c0
well.. added new tests, trying to make them work. Guess I'll have to …
aratraw Mar 13, 2026
2f792ce
war with rational.h is over; a truce between a man and a machine was …
aratraw Mar 15, 2026
b8e6801
one new test suite from /geometry compiles at least, so that's an ach…
aratraw Mar 15, 2026
33b37a3
I repeat: Hard Reset, writing geometry & numerical anew
aratraw Mar 16, 2026
361c1a9
first commit after hard reset. If I haven't gone all the way, I'd nev…
aratraw Mar 16, 2026
1502146
IT'S ALIVE. IT'S ALIVE. Hard reset->refactor->tests compile mostly.
aratraw Mar 18, 2026
488a88e
stage 0 finished. This time - for real. 46 tests pass on constructive…
aratraw Mar 18, 2026
4401738
strange intermit commit: tensors implemented in full, discrete_operat…
aratraw Mar 19, 2026
8324f0f
all enabled tests pass, matrix field pending. Why does it break? No h…
aratraw Mar 19, 2026
9c07559
All included tests successful however long time it takes. matrix_fiel…
aratraw Mar 20, 2026
5d197ca
Fixed matrix_field. Tests successful but transcendent functions take …
aratraw Mar 21, 2026
191fbc4
WIP: Initial rational refactor, green but slow tests
aratraw Mar 22, 2026
621e417
trash commit just to track the files
aratraw Mar 22, 2026
103367a
new kernel for rational compiles but stack-overflows on first test. s…
aratraw Mar 23, 2026
9d945cb
rewrote rational from scratch for yet another time - start on test de…
aratraw Mar 24, 2026
4fd5e9e
first test suite on new rational - pass. debugging second one
aratraw Mar 24, 2026
63fccd4
it's alive; 20 tests pass, pending correct lazy overflow handling
aratraw Mar 25, 2026
496ac7e
3 test suites on new rational - pass; architecture optimization impen…
aratraw Mar 25, 2026
c54af66
rewrote rational once again, now without overhead for deep copying; i…
aratraw Mar 26, 2026
e6623e1
intermit commit to fix our gains; almost done debugging rational, loo…
aratraw Mar 27, 2026
beaf0bb
debug in progress, 35/38 tests on rational - passs
aratraw Mar 27, 2026
5a67efe
all tests pass on rational, things looking good. time to merge back t…
aratraw Mar 28, 2026
ecbe260
Merge pull request #3 from aratraw/feature/rational-ace. Implemented.…
aratraw Mar 28, 2026
33d6fa4
The Great Second Rational War is over. Many a dark hair have fallen v…
aratraw Mar 29, 2026
b665445
today we celebrate victory: old basic tests pass on new rational kern…
aratraw Mar 30, 2026
c4306ee
180-ish tests passing, thought gotta clear up some legacy crutches th…
aratraw Mar 30, 2026
c709f47
200-ish total tests passing, still need to purge double in some small…
aratraw Mar 30, 2026
6e2d9f4
The Holy Purge of Double has ended. Salvation is nigh
aratraw Mar 31, 2026
1924603
resolved minor ambiguities with Rational constructors, 'saul' good man
aratraw Mar 31, 2026
7924422
90-ish discrete differential geometry tests compile on the new ration…
aratraw Mar 31, 2026
6f988fd
intermit commit before coding garbage collection on lazy rational
aratraw Apr 1, 2026
77a0efe
added garbage collection to the rational lazy expression node pool ha…
aratraw Apr 2, 2026
8c4e39e
minor fix: deduplicated 'product path' with 'product delta path'
aratraw Apr 2, 2026
43d2507
commit before yet again major optimization, this time for discrete op…
aratraw Apr 2, 2026
b1d3a7a
kinda optimizing lazy for batch evaluation, sorta works - hard stuff...
aratraw Apr 3, 2026
d773b5c
optimized lazy eval: worst case path is equal to eager path, which is…
aratraw Apr 3, 2026
6de2308
did something; reviving the frankenstein, step 1. tests stable
aratraw Apr 9, 2026
ca726db
sorta approaching pure boost::multiprecision in speed, the gap in spe…
aratraw Apr 9, 2026
cc748e6
Shrunk sizeof(Value) from 72 to 40bytes for better alignment with L1 …
aratraw Apr 10, 2026
5ffcd3e
we're somehow up to 10 times faster than boost by median of 15 compar…
aratraw Apr 11, 2026
a466402
nah, just kidding - it was a bug afterall; you really thought we coul…
aratraw Apr 11, 2026
8affca6
added lazy sum node. lazy mode is unfathomably slow, working on it
aratraw Apr 12, 2026
e1bff2d
The One Commit To Fix Everything(squashed refactor branch)
aratraw Apr 17, 2026
052dc9e
implemented batching logic to evaluating lazy trees. this logic is cr…
aratraw Apr 17, 2026
d0b368c
WE DID IT BOYS. Yeah, had to throw out my implementation of SmallStor…
aratraw Apr 20, 2026
1f70936
better transcendental functions functionality & test coverage
aratraw Apr 22, 2026
3401c85
The Third Rational War is Truly Over. No false positives this time, a…
aratraw Apr 27, 2026
2d2853d
switched some docs around
aratraw Apr 27, 2026
951d7c6
fixed a sneaky heisenbug; 400+ tests successful, delta library is uni…
aratraw Apr 27, 2026
9c839e7
all but one tests pass
aratraw Apr 27, 2026
66ab965
parametrized matrix exponent pade by required epsilon and thus fixed …
aratraw Apr 28, 2026
a2f9410
minor polish
aratraw Apr 28, 2026
bcd10ff
added Green's Identities 1D & 2D for ProductGrids on Euclidean Metric…
aratraw Apr 29, 2026
92da62f
numerical stage 2: hat basis, dual complex, discrete forms, cotangent…
aratraw May 1, 2026
f014216
changed license to polyform, added copyright notice
aratraw May 1, 2026
26e8d6c
added developer comments to rational headers
aratraw May 1, 2026
bcce1fe
added comments to geometry/numerical headers
aratraw May 1, 2026
e09af1c
added comments
aratraw May 2, 2026
ab6b714
added comments to tests
aratraw May 2, 2026
711a5fa
added comments
aratraw May 2, 2026
4275d13
optimized benchmarking
aratraw May 2, 2026
f1a3691
adding docs
aratraw May 3, 2026
cacbce9
updated docs, optimized sqrt, it was actually tough
aratraw May 3, 2026
0d0a78b
updated docs
aratraw May 3, 2026
cf37364
prepping for release 0.2
aratraw May 3, 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ vcpkg-configuration.json
*.sln
*.vcxproj*

# Generated documentation
docs/doxygen/

#local dev crutch-tools
devjournal.md
concat_codebase_to_txt.bat
Expand Down
31 changes: 24 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ endif()
find_package(Boost REQUIRED) # Boost libraries (headers mostly)
find_package(Eigen3 REQUIRED) # Eigen3 for linear algebra
find_package(fmt CONFIG REQUIRED) # fmtlib for formatting

find_package(absl CONFIG REQUIRED) # migration from pure multiprecision.
# 4. Google Test (included once for the whole project)
include(FetchContent)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) # Ensure consistent CRT with MSVC
Expand All @@ -58,6 +58,8 @@ target_link_libraries(delta_core INTERFACE
Eigen3::Eigen
OpenMP::OpenMP_CXX
fmt::fmt
absl::int128
absl::strings
)

if(MSVC)
Expand All @@ -67,19 +69,34 @@ if(MSVC)
target_compile_definitions(delta_core INTERFACE EIGEN_HAS_OPENMP)
endif()

# Option to select static vs dynamic rational backend (see delta/core/rational.h)
option(DELTA_USE_STATIC_RATIONAL "Use static rational with fixed bit width" OFF)
if(DELTA_USE_STATIC_RATIONAL)
target_compile_definitions(delta_core INTERFACE DELTA_RATIONAL_BITS=256)
endif()

# Helper variable: directory containing the MSVC compiler (used for DLL discovery in tests)
get_filename_component(MSVC_BIN_DIR ${CMAKE_CXX_COMPILER} DIRECTORY CACHE INTERNAL "")



# Явно указываем стандарт C++20 для всех таргетов
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Для MSVC включаем /std:c++20 и /permissive- для строгого соответствия стандарту
#if(MSVC)
# add_compile_options(/std:c++20 /permissive-)
# add_compile_options(/showIncludes-)
# set(CMAKE_MSVC_SHOW_INCLUDES OFF CACHE BOOL "" FORCE)
#endif()

# Добавляем определение макроса для тестов
add_compile_definitions($<$<CONFIG:Debug>:_DEBUG>)

# Add subdirectories for tests, examples, and benchmarks
add_subdirectory("tests/rational")
add_subdirectory("tests/basic")
add_subdirectory("tests/calculus")
add_subdirectory("tests/regulative_ideas")
add_subdirectory("tests/geometry")
add_subdirectory("tests/numerical")
add_subdirectory("examples/arbitrary_regulative_ideas")
#add_subdirectory("tests/solvers")
#add_subdirectory("examples/arbitrary_regulative_ideas")
add_subdirectory("benchmarks")
64 changes: 25 additions & 39 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
"cacheVariables": {
"CMAKE_C_COMPILER": "cl.exe",
"CMAKE_CXX_COMPILER": "cl.exe",
"CMAKE_MSVC_SHOW_INCLUDES": "OFF",
"CMAKE_DEPENDS_USE_COMPILER": "OFF",
"CMAKE_NINJA_FORCE_RESPONSE_FILE": "ON",
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows"
"VCPKG_TARGET_TRIPLET": "x64-windows",
"CMAKE_CXX_FLAGS": "/DWIN32 /D_WINDOWS /W3 /GR /EHsc /MP"
},
"condition": {
"type": "equals",
Expand All @@ -27,18 +31,30 @@
"value": "x64",
"strategy": "external"
},
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "x64-release",
"displayName": "x64 Release",
"inherits": "x64-debug",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
"inherits": "windows-base",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_CXX_FLAGS_RELEASE": "/O2 /Oi /Ot /Gy /DNDEBUG /GL /Gw /arch:AVX2",
"CMAKE_EXE_LINKER_FLAGS_RELEASE": "/OPT:REF /OPT:ICF /LTCG"
}
},
{
"name": "linux-base",
"hidden": true,
"inherits": "windows-base",
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-linux"
Expand All @@ -47,10 +63,6 @@
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"architecture": {
"value": "x64",
"strategy": "external"
}
},
{
Expand All @@ -63,37 +75,11 @@
"name": "x64-release-linux",
"displayName": "x64 Release (Linux)",
"inherits": "linux-base",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
},
{
"name": "macos-base",
"hidden": true,
"inherits": "windows-base",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-osx"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"architecture": {
"value": "x64",
"strategy": "external"
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG -flto",
"CMAKE_EXE_LINKER_FLAGS_RELEASE": "-flto"
}
},
{
"name": "x64-debug-macos",
"displayName": "x64 Debug (macOS)",
"inherits": "macos-base",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "x64-release-macos",
"displayName": "x64 Release (macOS)",
"inherits": "macos-base",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
}
]
}
}
153 changes: 153 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# ============================================================================
# Doxyfile 1.12.0 for Δ‑Analysis Library
#
# Generate with: doxygen Doxyfile
# ============================================================================

# ----------------------------------------------------------------------------
# 1. Project
# ----------------------------------------------------------------------------
PROJECT_NAME = "Δ‑Analysis"
PROJECT_NUMBER = 0.2.0
PROJECT_BRIEF = "Constructive mathematical framework for limits, continuity,
differentiation, integration and DEC based on exact rational arithmetic. Also lazy expressions, soon to be symbolic"

OUTPUT_DIRECTORY = ./docs/doxygen
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English

# ----------------------------------------------------------------------------
# 2. Input files
# ----------------------------------------------------------------------------
INPUT = ./include \
./README.md \
./docs \
./tests

RECURSIVE = YES

# Exclude everything that is not a chosen example
EXCLUDE = ./tests/basic \
./tests/geometry/constructive_core_test.cpp \
./tests/geometry/discrete_operators_3d_4d_test.cpp \
./tests/geometry/discrete_operators_test.cpp \
./tests/geometry/dual_complex_test.cpp \
./tests/geometry/hat_basis_test.cpp \
./tests/geometry/matrix_field_test.cpp \
./tests/geometry/product_regulative_test.cpp \
./tests/geometry/simplicial_complex_test.cpp \
./tests/geometry/tensor_field_test.cpp \
./tests/numerical/integrals_test.cpp \
./tests/rational \
./tests/regulative_ideas/test_matrix.cpp \
./tests/regulative_ideas/test_padic.cpp \
./tests/regulative_ideas/test_tree.cpp \
./tests/solvers \
./tests/test_fixtures.h \
./tests/test_fixtures_geometry_numerical.h \
./benchmarks \
./examples

# Where to look for tags
EXAMPLE_PATH = ./tests
EXAMPLE_PATTERNS = *.cpp

FILE_PATTERNS = *.h *.hpp *.md
IMAGE_PATH = ./docs/images

# ----------------------------------------------------------------------------
# 3. Extraction mode (rely on /** comments, not EXTRACT_ALL)
# ----------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_PACKAGE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO

# ----------------------------------------------------------------------------
# 4. Preprocessing and C++20 concepts
# ----------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \
"DELTA_USE_CACHING=1" \
"requires=" \
"concept="

# ----------------------------------------------------------------------------
# 5. HTML output
# ----------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_DYNAMIC_MENUS = YES
HTML_COLORSTYLE = LIGHT
GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 350
SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO

# ----------------------------------------------------------------------------
# 6. LaTeX / PDF (disabled)
# ----------------------------------------------------------------------------
GENERATE_LATEX = NO

# ----------------------------------------------------------------------------
# 7. Diagrams – DOT
# ----------------------------------------------------------------------------
HAVE_DOT = NO # it falls with errors as of yet, which is none of my concerns
DOT_NUM_THREADS = 1
SHORT_NAMES = YES
DOT_GRAPH_MAX_NODES = 50
CLASS_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
DIRECTORY_GRAPH = YES
DOT_CLEANUP = YES
DOT_MULTI_TARGETS = NO
# ----------------------------------------------------------------------------
# 8. Extra pages and main page
# ----------------------------------------------------------------------------
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = YES

USE_MDFILE_AS_MAINPAGE = ./README.md

# ----------------------------------------------------------------------------
# 9. Graphs and relations
# ----------------------------------------------------------------------------
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
DIRECTORY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES

# ----------------------------------------------------------------------------
# 10. Source browser (disabled)
# ----------------------------------------------------------------------------
SOURCE_BROWSER = NO
VERBATIM_HEADERS = NO

# ----------------------------------------------------------------------------
# 11. Project-specific settings
# ----------------------------------------------------------------------------
HIDE_SCOPE_NAMES = YES
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = YES
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = ./include
STRIP_FROM_INC_PATH = ./include

# ----------------------------------------------------------------------------
# 12. Encoding
# ----------------------------------------------------------------------------
DOXYGEN_ENCODING = UTF-8
Loading
Loading