Start SPHLite 0.2.1 hardening

This commit is contained in:
Codex
2026-07-02 22:33:21 +08:00
parent 4716eb0151
commit 000209cc7d
12 changed files with 1022 additions and 428 deletions
+20
View File
@@ -0,0 +1,20 @@
*Node
1, 0.0, 0.0, 0.0
2, 0.1, 0.0, 0.0
3, 0.0, 0.1, 0.0
4, 0.0, 0.0, 0.1
*Element, Type=SPH3D
1, 1
2, 2
3, 3
4, 4
*Elset, Elset=WaterParticles
1, 2, 3, 4
*Material, Name=WaterCase, Type=water
*Density
1000.0
*Section, Elset=WaterParticles, Material=WaterCase
*SphLite Eos, Type=Tait, Material=WaterCase, Rho0=1000.0, C0=1480.0, Gamma=7.0, P0=0.0
*SphLite Viscosity, Type=Monaghan, Material=WaterCase, Alpha=0.1, Beta=0.0, Eta2=0.01
*SphLite Particle Control, H=0.15, Mass=1.0, Volume=0.001
*SphLite Time Control, Dt=1.0E-6, Time=1.0E-6, Steps=1, Safety=0.5
+20
View File
@@ -0,0 +1,20 @@
*NODE
1, 0.0, 0.0, 0.0
2, 0.1, 0.0, 0.0
3, 0.0, 0.1, 0.0
4, 0.0, 0.0, 0.1
*ELEMENT, TYPE=SPH3D
1, 1
2, 2
3, 3
4, 4
*ELSET, ELSET=WATER_PARTICLES
1, 2, 3, 4
*MATERIAL, NAME=WATER, TYPE=WATER
*DENSITY
1000.0
*SECTION, ELSET=WATER_PARTICLES, MATERIAL=WATER
*SPHLITE EOS, TYPE=TAIT, MATERIAL=WATER, RHO0=1000.0, C0=1480.0, GAMMA=7.0, P0=0.0
*SPHLITE VISCOSITY, TYPE=MONAGHAN, MATERIAL=WATER, ALPHA=0.1, BETA=0.0, ETA2=0.01
*SPHLITE PARTICLE CONTROL, H=0.15, MASS=1.0, VOLUME=0.001
*SPHLITE TIME CONTROL, DT=1.0E-6, TIME=2.0E-6, STEPS=2, SAFETY=0.5
+1 -1
View File
@@ -71,7 +71,7 @@ int main(void)
ierr = sphlite_get_version(&major, &minor, &patch);
if (ierr != 0) return fail("get_version failed");
if (major != 0 || minor != 2 || patch != 0) return fail("unexpected version");
if (major != 0 || minor != 2 || patch != 1) return fail("unexpected version");
snprintf(path, sizeof(path), "%s/minimal_particles_011.inp", SPHLITE_TEST_DATA_DIR);
ierr = sphlite_read_inp(path);
+1 -1
View File
@@ -11,7 +11,7 @@ int main()
sphlite::Session session;
sphlite::Version version = sphlite::version();
if (version.major != 0 || version.minor != 2 || version.patch != 0) {
if (version.major != 0 || version.minor != 2 || version.patch != 1) {
return 1;
}
+1 -1
View File
@@ -37,7 +37,7 @@ program test_smoke
call sph_get_version(major, minor, patch, ierr)
call assert_ok(ierr, 'version failed')
if (major /= 0 .or. minor /= 2 .or. patch /= 0) call fail('unexpected version')
if (major /= 0 .or. minor /= 2 .or. patch /= 1) call fail('unexpected version')
call sph_db_allocate(2, ierr)
call assert_ok(ierr, 'database allocation failed')