You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(121) |
Aug
(343) |
Sep
(98) |
Oct
(55) |
Nov
(158) |
Dec
(219) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(278) |
Feb
(170) |
Mar
(286) |
Apr
(32) |
May
(83) |
Jun
(140) |
Jul
(212) |
Aug
(242) |
Sep
(52) |
Oct
(29) |
Nov
(132) |
Dec
(259) |
2010 |
Jan
(251) |
Feb
(147) |
Mar
(76) |
Apr
(140) |
May
(43) |
Jun
(66) |
Jul
(273) |
Aug
(205) |
Sep
(260) |
Oct
(100) |
Nov
(58) |
Dec
(264) |
2011 |
Jan
(219) |
Feb
(344) |
Mar
(320) |
Apr
(334) |
May
(125) |
Jun
(131) |
Jul
(195) |
Aug
(155) |
Sep
(55) |
Oct
(261) |
Nov
(286) |
Dec
(216) |
2012 |
Jan
(188) |
Feb
(177) |
Mar
(39) |
Apr
(179) |
May
(148) |
Jun
(43) |
Jul
(229) |
Aug
(104) |
Sep
(76) |
Oct
(82) |
Nov
(93) |
Dec
(180) |
2013 |
Jan
(323) |
Feb
(335) |
Mar
(35) |
Apr
(220) |
May
(238) |
Jun
(122) |
Jul
(316) |
Aug
(73) |
Sep
(135) |
Oct
(515) |
Nov
(320) |
Dec
(185) |
2014 |
Jan
(81) |
Feb
(146) |
Mar
(337) |
Apr
(234) |
May
(112) |
Jun
(239) |
Jul
(323) |
Aug
(123) |
Sep
(83) |
Oct
(285) |
Nov
(321) |
Dec
(96) |
2015 |
Jan
(77) |
Feb
(79) |
Mar
(124) |
Apr
(71) |
May
(35) |
Jun
(45) |
Jul
(77) |
Aug
(44) |
Sep
(22) |
Oct
(84) |
Nov
(120) |
Dec
(37) |
2016 |
Jan
(38) |
Feb
(74) |
Mar
(242) |
Apr
(153) |
May
(59) |
Jun
(44) |
Jul
(67) |
Aug
(74) |
Sep
(150) |
Oct
(35) |
Nov
(69) |
Dec
(43) |
2017 |
Jan
(43) |
Feb
(9) |
Mar
(274) |
Apr
(40) |
May
(81) |
Jun
(81) |
Jul
(87) |
Aug
(46) |
Sep
(98) |
Oct
(50) |
Nov
(220) |
Dec
(66) |
2018 |
Jan
(110) |
Feb
(22) |
Mar
(20) |
Apr
(147) |
May
(148) |
Jun
(30) |
Jul
(83) |
Aug
(63) |
Sep
(40) |
Oct
(53) |
Nov
(51) |
Dec
(104) |
2019 |
Jan
(14) |
Feb
(81) |
Mar
(80) |
Apr
(102) |
May
(16) |
Jun
(5) |
Jul
(34) |
Aug
(24) |
Sep
(9) |
Oct
(12) |
Nov
(42) |
Dec
(76) |
2020 |
Jan
(15) |
Feb
(11) |
Mar
(12) |
Apr
(7) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <luc...@us...> - 2019-12-18 19:11:15
|
Revision: 26222 http://sourceforge.net/p/sbml/code/26222 Author: luciansmith Date: 2019-12-18 19:11:13 +0000 (Wed, 18 Dec 2019) Log Message: ----------- Fix a validation error in the test file. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/extension/test/test-data/ImageTest3.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/extension/test/test-data/ImageTest3.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/extension/test/test-data/ImageTest3.xml 2019-12-18 19:08:14 UTC (rev 26221) +++ branches/libsbml-experimental/src/sbml/packages/spatial/extension/test/test-data/ImageTest3.xml 2019-12-18 19:11:13 UTC (rev 26222) @@ -245,9 +245,9 @@ <spatial:listOfGeometryDefinitions> <spatial:sampledFieldGeometry spatial:id="BioModel1_Application0_20120725_161513" spatial:sampledField="img_20120725_161513" spatial:isActive="true"> <spatial:listOfSampledVolumes> - <spatial:sampledVolume spatial:id="sv_background" spatial:domainType="background" spatial:sampledValue="0" spatial:minValue="0" spatial:maxValue="0"/> - <spatial:sampledVolume spatial:id="sv_237" spatial:domainType="roi_237" spatial:sampledValue="1" spatial:minValue="0" spatial:maxValue="0"/> - <spatial:sampledVolume spatial:id="sv_255" spatial:domainType="roi_255" spatial:sampledValue="2" spatial:minValue="0" spatial:maxValue="0"/> + <spatial:sampledVolume spatial:id="sv_background" spatial:domainType="background" spatial:sampledValue="0"/> + <spatial:sampledVolume spatial:id="sv_237" spatial:domainType="roi_237" spatial:sampledValue="1"/> + <spatial:sampledVolume spatial:id="sv_255" spatial:domainType="roi_255" spatial:sampledValue="2"/> </spatial:listOfSampledVolumes> </spatial:sampledFieldGeometry> </spatial:listOfGeometryDefinitions> |
From: <luc...@us...> - 2019-12-18 19:08:18
|
Revision: 26221 http://sourceforge.net/p/sbml/code/26221 Author: luciansmith Date: 2019-12-18 19:08:14 +0000 (Wed, 18 Dec 2019) Log Message: ----------- Add support and tests for spatial rule 22155. Also, fix other tests that failed this one. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-02-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-03-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-pass-00-01.xml Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-pass-00-02.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-18 19:08:14 UTC (rev 26221) @@ -212,6 +212,7 @@ , SpatialParametricObjectThreePointsForTriangles = 1222152 , SpatialParametricObjectFourPointsForQuadrilaterals = 1222153 , SpatialParametricObjectIndexesMustBePositiveIntegers = 1222154 +, SpatialParametricObjectIndexesMustBePoints = 1222155 , SpatialCSGeometryAllowedCoreAttributes = 1222201 , SpatialCSGeometryAllowedCoreElements = 1222202 , SpatialCSGeometryAllowedElements = 1222203 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-18 19:08:14 UTC (rev 26221) @@ -1802,6 +1802,16 @@ } }, + // 1222155 + { SpatialParametricObjectIndexesMustBePoints, + "Every index in a <parametricObject> must be a defined point.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "Every element of an uncompressed ArrayData child of a <parametricObject> must be less than the number of points described by the <spatialPoints> object in the same <parametricGeometry>.", + { "L3V1 Spatial V1 Section" + } + }, + // 1222201 { SpatialCSGeometryAllowedCoreAttributes, "Core attributes allowed on <csGeometry>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-18 19:08:14 UTC (rev 26221) @@ -2113,6 +2113,52 @@ END_CONSTRAINT +// 122155 +START_CONSTRAINT(SpatialParametricObjectIndexesMustBePoints, ParametricObject, po) +{ + bool fail = false; + const SBase* parent = po.getParentSBMLObject(); + pre(parent != NULL); + parent = parent->getParentSBMLObject(); + pre(parent != NULL); + const ParametricGeometry* pg = static_cast<const ParametricGeometry*>(parent); + const SpatialPoints* sp = pg->getSpatialPoints(); + size_t numPoints = sp->getNumArrayDataEntries(); + + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + pre(geometry->getNumCoordinateComponents() != 0); + pre(numPoints % geometry->getNumCoordinateComponents() == 0); + numPoints = numPoints/(geometry->getNumCoordinateComponents()); + + size_t len = po.getNumPointIndexEntries(); + int* data = new int[len]; + po.getPointIndex(data); + for (size_t d = 0; d < len; d++) + { + if (data[d] >= (int)numPoints) + { + stringstream ss_msg; + ss_msg << "A <parametricObject>"; + if (po.isSetId()) + { + ss_msg << " with id '" << po.getId() << "'"; + } + ss_msg << " has a point index value of '" << data[d]; + ss_msg << "', which is too large for the number of points in the <spatialPoints> object ("; + ss_msg << numPoints << ")."; + msg = ss_msg.str(); + fail = true; + break; + } + } + inv(fail == false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-18 19:08:14 UTC (rev 26221) @@ -113,6 +113,7 @@ addConstraint(new VConstraintParametricObjectSpatialParametricObjectPointIndexLengthMustMatchUncompressed(*this)); addConstraint(new VConstraintParametricObjectSpatialParametricObjectThreePointsForTriangles(*this)); addConstraint(new VConstraintParametricObjectSpatialParametricObjectFourPointsForQuadrilaterals(*this)); +addConstraint(new VConstraintParametricObjectSpatialParametricObjectIndexesMustBePoints(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-01.xml 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-01.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -30,7 +30,7 @@ <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> <spatial:listOfParametricObjects> - <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="23" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 8 0; 8 7 6</spatial:parametricObject> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="23" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 4 0; 4 7 6</spatial:parametricObject> </spatial:listOfParametricObjects> </spatial:parametricGeometry> </spatial:listOfGeometryDefinitions> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-02.xml 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-02.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -30,7 +30,7 @@ <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> <spatial:listOfParametricObjects> - <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="21" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 8 0; 8</spatial:parametricObject> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="21" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 4 0; 4</spatial:parametricObject> </spatial:listOfParametricObjects> </spatial:parametricGeometry> </spatial:listOfGeometryDefinitions> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-pass-00-01.xml 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-pass-00-01.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -30,7 +30,7 @@ <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> <spatial:listOfParametricObjects> - <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 8 0; 8 7 6 5</spatial:parametricObject> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 4 0; 4 7 6 5</spatial:parametricObject> </spatial:listOfParametricObjects> </spatial:parametricGeometry> </spatial:listOfGeometryDefinitions> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-01.xml 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-01.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -30,7 +30,7 @@ <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> <spatial:listOfParametricObjects> - <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 -5 6 2; 2 6 7 3; 3 7 8 0; 8 7 6 5</spatial:parametricObject> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 -5 6 2; 2 6 7 3; 3 7 4 0; 4 7 6 5</spatial:parametricObject> </spatial:listOfParametricObjects> </spatial:parametricGeometry> </spatial:listOfGeometryDefinitions> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-03.xml 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-03.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -30,7 +30,7 @@ <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> <spatial:listOfParametricObjects> - <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 0.6 2; 2 6 7 3; 3 7 8 0; 8 7 6 5</spatial:parametricObject> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 0.6 2; 2 6 7 3; 3 7 4 0; 4 7 6 5</spatial:parametricObject> </spatial:listOfParametricObjects> </spatial:parametricGeometry> </spatial:listOfGeometryDefinitions> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-02-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-02-02.xml 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-02-02.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -30,7 +30,7 @@ <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> <spatial:listOfParametricObjects> - <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 -5 6 2; 2 6 7 3; 3 7 -8 0; 8 7 6 5</spatial:parametricObject> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 -5 6 2; 2 6 7 3; 3 7 -4 0; 4 7 6 5</spatial:parametricObject> </spatial:listOfParametricObjects> </spatial:parametricGeometry> </spatial:listOfGeometryDefinitions> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-03-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-03-04.xml 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-03-04.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -30,7 +30,7 @@ <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> <spatial:listOfParametricObjects> - <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 0.6 2; 2 6 7 3; 3 7.9 8 0; -0.001 7 6 5</spatial:parametricObject> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 0.6 2; 2 6 7 3; 3 6.9 4 0; -0.001 7 6 5</spatial:parametricObject> </spatial:listOfParametricObjects> </spatial:parametricGeometry> </spatial:listOfGeometryDefinitions> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-pass-00-01.xml 2019-12-18 05:32:05 UTC (rev 26220) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-pass-00-01.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -30,7 +30,7 @@ <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> <spatial:listOfParametricObjects> - <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 8 0; 8 7 6 5</spatial:parametricObject> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 4 0; 7 6 5 4</spatial:parametricObject> </spatial:listOfParametricObjects> </spatial:parametricGeometry> </spatial:listOfGeometryDefinitions> Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-fail-01-01.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 8 0; 8 7 6 5</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-fail-01-02.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="12" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="12" spatial:polygonType="triangle">0 1 2; 2 1 3; 3 1 0; 4 0 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-pass-00-01.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 4 0; 7 6 5 4</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222155-pass-00-02.xml 2019-12-18 19:08:14 UTC (rev 26221) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="12" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="12" spatial:polygonType="triangle">0 1 2; 2 1 3; 3 1 0; 3 0 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-18 05:32:07
|
Revision: 26220 http://sourceforge.net/p/sbml/code/26220 Author: luciansmith Date: 2019-12-18 05:32:05 +0000 (Wed, 18 Dec 2019) Log Message: ----------- Add support and tests for spatial rule 22154. Support for this ended up being put in at read time, as it was impossible to tell whether an entry was not an integer if it had been already stored as one. This is probably more efficient, anyway. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-02-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-03-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-pass-00-01.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.cpp 2019-12-18 00:48:39 UTC (rev 26219) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.cpp 2019-12-18 05:32:05 UTC (rev 26220) @@ -1597,8 +1597,8 @@ ParametricObject::setElementText(const std::string& text) { stringstream strStream(text); - int val; - vector<int> valuesVector; + double val; + vector<double> valuesVector; while (strStream >> val) { @@ -1618,9 +1618,27 @@ int* data = new int[length]; for (unsigned int i = 0; i < length; ++i) { - data[i] = valuesVector.at(i); + data[i] = lround(valuesVector.at(i)); + if (data[i]<0 || trunc(valuesVector.at(i)) != valuesVector.at(i)) + { + stringstream ss_msg; + ss_msg << "A <parametricObject>"; + if (isSetId()) + { + ss_msg << " with id '" << getId() << "'"; + } + ss_msg << " has an entry with the value '" << valuesVector.at(i); + ss_msg << "', which is not a non-negative integer."; + SBMLErrorLog* log = getErrorLog(); + + if (log) + { + log->logPackageError("spatial", + SpatialParametricObjectIndexesMustBePositiveIntegers, + getPackageVersion(), getLevel(), getVersion(), ss_msg.str()); + } + } } - setPointIndex(data, length); delete[] data; } Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-18 00:48:39 UTC (rev 26219) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-18 05:32:05 UTC (rev 26220) @@ -211,6 +211,7 @@ , SpatialParametricObjectPointIndexLengthMustMatchCompressed = 1222151 , SpatialParametricObjectThreePointsForTriangles = 1222152 , SpatialParametricObjectFourPointsForQuadrilaterals = 1222153 +, SpatialParametricObjectIndexesMustBePositiveIntegers = 1222154 , SpatialCSGeometryAllowedCoreAttributes = 1222201 , SpatialCSGeometryAllowedCoreElements = 1222202 , SpatialCSGeometryAllowedElements = 1222203 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-18 00:48:39 UTC (rev 26219) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-18 05:32:05 UTC (rev 26220) @@ -1792,6 +1792,16 @@ } }, + // 1222154 + { SpatialParametricObjectIndexesMustBePositiveIntegers, + "Every index in a <parametricObject> must be a non-negative integer.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "Every element of an uncompressed ArrayData child of a <parametricObject> must be a non-negative integer.", + { "L3V1 Spatial V1 Section" + } + }, + // 1222201 { SpatialCSGeometryAllowedCoreAttributes, "Core attributes allowed on <csGeometry>.", Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-01.xml 2019-12-18 05:32:05 UTC (rev 26220) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 -5 6 2; 2 6 7 3; 3 7 8 0; 8 7 6 5</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-01-03.xml 2019-12-18 05:32:05 UTC (rev 26220) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 0.6 2; 2 6 7 3; 3 7 8 0; 8 7 6 5</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-02-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-02-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-02-02.xml 2019-12-18 05:32:05 UTC (rev 26220) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 -5 6 2; 2 6 7 3; 3 7 -8 0; 8 7 6 5</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-03-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-03-04.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-fail-03-04.xml 2019-12-18 05:32:05 UTC (rev 26220) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 0.6 2; 2 6 7 3; 3 7.9 8 0; -0.001 7 6 5</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222154-pass-00-01.xml 2019-12-18 05:32:05 UTC (rev 26220) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 8 0; 8 7 6 5</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-18 00:48:40
|
Revision: 26219 http://sourceforge.net/p/sbml/code/26219 Author: luciansmith Date: 2019-12-18 00:48:39 +0000 (Wed, 18 Dec 2019) Log Message: ----------- Add support and tests for spatial rules 22152 and 22153. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-pass-00-01.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 23:56:18 UTC (rev 26218) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-18 00:48:39 UTC (rev 26219) @@ -208,7 +208,9 @@ , SpatialParametricObjectNameMustBeString = 1222109 , SpatialParametricObjectDataTypeMustBeDataKindEnum = 1222110 , SpatialParametricObjectPointIndexLengthMustMatchUncompressed = 1222150 -, SpatialParametricObjectPointIndexLengthMustMatchCompressed = 1222152 +, SpatialParametricObjectPointIndexLengthMustMatchCompressed = 1222151 +, SpatialParametricObjectThreePointsForTriangles = 1222152 +, SpatialParametricObjectFourPointsForQuadrilaterals = 1222153 , SpatialCSGeometryAllowedCoreAttributes = 1222201 , SpatialCSGeometryAllowedCoreElements = 1222202 , SpatialCSGeometryAllowedElements = 1222203 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 23:56:18 UTC (rev 26218) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-18 00:48:39 UTC (rev 26219) @@ -1772,6 +1772,27 @@ } }, + // 1222152 + { SpatialParametricObjectThreePointsForTriangles, + "The number of point indexes must be divisible by three if polygonType is 'triangle'.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the attribute 'spatial:polygonType' of a <parametricObject> has the value 'triangle', the number of uncompressed entries in its ArrayData child must be evenly divisible by three.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222153 + { SpatialParametricObjectFourPointsForQuadrilaterals, + "The number of point indexes must be divisible by four if polygonType is 'quadrilateral'.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the attribute 'spatial:polygonType' of a <parametricObject> has the value 'quadrilateral', the number of uncompressed entries in its ArrayData child must be evenly divisible by four.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222201 { SpatialCSGeometryAllowedCoreAttributes, "Core attributes allowed on <csGeometry>.", LIBSBML_CAT_GENERAL_CONSISTENCY, Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 23:56:18 UTC (rev 26218) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-18 00:48:39 UTC (rev 26219) @@ -2073,6 +2073,46 @@ END_CONSTRAINT +// 122152 +START_CONSTRAINT(SpatialParametricObjectThreePointsForTriangles, ParametricObject, po) +{ + pre(po.getPolygonType() == SPATIAL_POLYGONKIND_TRIANGLE); + pre(po.getNumPointIndexEntries() % 3 != 0); + stringstream ss_msg; + ss_msg << "A <parametricObject>"; + if (po.isSetId()) + { + ss_msg << " with id '" << po.getId() << "'"; + } + ss_msg << " has a polygonType of 'triangle' but " << po.getNumPointIndexEntries(); + ss_msg << " entries, which is not a multiple of three."; + msg = ss_msg.str(); + + inv(false); +} +END_CONSTRAINT + + +// 122153 +START_CONSTRAINT(SpatialParametricObjectFourPointsForQuadrilaterals, ParametricObject, po) +{ + pre(po.getPolygonType() == SPATIAL_POLYGONKIND_QUADRILATERAL); + pre(po.getNumPointIndexEntries() % 4 != 0); + stringstream ss_msg; + ss_msg << "A <parametricObject>"; + if (po.isSetId()) + { + ss_msg << " with id '" << po.getId() << "'"; + } + ss_msg << " has a polygonType of 'quadrilateral' but " << po.getNumPointIndexEntries(); + ss_msg << " entries, which is not a multiple of four."; + msg = ss_msg.str(); + + inv(false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 23:56:18 UTC (rev 26218) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-18 00:48:39 UTC (rev 26219) @@ -111,6 +111,8 @@ addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsUIntArrayDataNotNegative(*this)); addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsIntArrayDataIntegers(*this)); addConstraint(new VConstraintParametricObjectSpatialParametricObjectPointIndexLengthMustMatchUncompressed(*this)); +addConstraint(new VConstraintParametricObjectSpatialParametricObjectThreePointsForTriangles(*this)); +addConstraint(new VConstraintParametricObjectSpatialParametricObjectFourPointsForQuadrilaterals(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-fail-01-01.xml 2019-12-18 00:48:39 UTC (rev 26219) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="13" spatial:polygonType="triangle">0 1 2; 2 1 3; 3 1 0; 3 0 2; 1</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-fail-01-02.xml 2019-12-18 00:48:39 UTC (rev 26219) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="11" spatial:polygonType="triangle">0 1 2; 2 1 3; 3 1 0; 3 0 </spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222152-pass-00-01.xml 2019-12-18 00:48:39 UTC (rev 26219) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="12" spatial:polygonType="triangle">0 1 2; 2 1 3; 3 1 0; 3 0 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-01.xml 2019-12-18 00:48:39 UTC (rev 26219) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="23" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 8 0; 8 7 6</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-fail-01-02.xml 2019-12-18 00:48:39 UTC (rev 26219) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="21" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 8 0; 8</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222153-pass-00-01.xml 2019-12-18 00:48:39 UTC (rev 26219) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="24" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 0 1, 1 0 0, 0 1 1, 1 0 1, 1 1 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="24" spatial:polygonType="quadrilateral">0 1 2 3; 0 4 5 1; 1 5 6 2; 2 6 7 3; 3 7 8 0; 8 7 6 5</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-17 23:56:20
|
Revision: 26218 http://sourceforge.net/p/sbml/code/26218 Author: luciansmith Date: 2019-12-17 23:56:18 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Add entries for spatial validation rule 22151. No support yet, as support for compressed arrays seems to be missing in general. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 23:48:32 UTC (rev 26217) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 23:56:18 UTC (rev 26218) @@ -208,6 +208,7 @@ , SpatialParametricObjectNameMustBeString = 1222109 , SpatialParametricObjectDataTypeMustBeDataKindEnum = 1222110 , SpatialParametricObjectPointIndexLengthMustMatchUncompressed = 1222150 +, SpatialParametricObjectPointIndexLengthMustMatchCompressed = 1222152 , SpatialCSGeometryAllowedCoreAttributes = 1222201 , SpatialCSGeometryAllowedCoreElements = 1222202 , SpatialCSGeometryAllowedElements = 1222203 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 23:48:32 UTC (rev 26217) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 23:56:18 UTC (rev 26218) @@ -1754,15 +1754,24 @@ // 1222150 { SpatialParametricObjectPointIndexLengthMustMatchUncompressed, - "The 'dataType' attribute must be DataKindEnum.", + "The 'pointIndexLength' attribute must match the entries when uncompressed.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "If the 'spatial:compression' attribute of a ParametricObject has the value 'uncompressed', the 'spatial:pointIndexLength' attribute of the same ParametricObject must equal the number of entries in the ArrayData child of the ParametricObject.", + "If the 'spatial:compression' attribute of a <parametricObject> has the value 'uncompressed', the 'spatial:pointIndexLength' attribute of the same <parametricObject> must equal the number of entries in the ArrayData child of the <parametricObject>.", { "L3V1 Spatial V1 Section" } }, - // 1222201 + // 1222151 + { SpatialParametricObjectPointIndexLengthMustMatchCompressed, + "The 'pointIndexLength' attribute must match the compressed data.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the 'spatial:compression' attribute of a <parametricObject> has the value 'deflated', the 'spatial:pointIndexLength' attribute of the same <parametricObject> must equal the number of non-whitespace characters of the ArrayData child of the <parametricObject>.", + { "L3V1 Spatial V1 Section" + } + }, + { SpatialCSGeometryAllowedCoreAttributes, "Core attributes allowed on <csGeometry>.", LIBSBML_CAT_GENERAL_CONSISTENCY, |
From: <luc...@us...> - 2019-12-17 23:48:34
|
Revision: 26217 http://sourceforge.net/p/sbml/code/26217 Author: luciansmith Date: 2019-12-17 23:48:32 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Add support and tests for spatial rule 22150. As part of this, fix the ParametricObject class to not assume that the PointIndexLength attribute is the true length of the array data, and to allow commas and semicolons separating the numbers. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.cpp branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.h branches/libsbml-experimental/src/sbml/packages/spatial/sbml/test/TestParametricObject.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-pass-00-02.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.cpp 2019-12-17 22:43:55 UTC (rev 26216) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.cpp 2019-12-17 23:48:32 UTC (rev 26217) @@ -62,6 +62,7 @@ , mPolygonType (SPATIAL_POLYGONKIND_INVALID) , mDomainType ("") , mPointIndex (NULL) + , mNumPointIndexEntries (0) , mPointIndexLength (SBML_INT_MAX) , mIsSetPointIndexLength (false) , mCompression (SPATIAL_COMPRESSIONKIND_INVALID) @@ -80,6 +81,7 @@ , mPolygonType (SPATIAL_POLYGONKIND_INVALID) , mDomainType ("") , mPointIndex (NULL) + , mNumPointIndexEntries (0) , mPointIndexLength (SBML_INT_MAX) , mIsSetPointIndexLength (false) , mCompression (SPATIAL_COMPRESSIONKIND_INVALID) @@ -98,12 +100,13 @@ , mPolygonType ( orig.mPolygonType ) , mDomainType ( orig.mDomainType ) , mPointIndex ( NULL ) + , mNumPointIndexEntries (orig.mNumPointIndexEntries) , mPointIndexLength ( orig.mPointIndexLength ) , mIsSetPointIndexLength ( orig.mIsSetPointIndexLength ) , mCompression ( orig.mCompression ) , mDataType ( orig.mDataType ) { - setPointIndex(orig.mPointIndex, orig.mPointIndexLength); + setPointIndex(orig.mPointIndex, orig.mNumPointIndexEntries); } @@ -120,7 +123,8 @@ mPolygonType = rhs.mPolygonType; mDomainType = rhs.mDomainType; mPointIndex = NULL; - setPointIndex(rhs.mPointIndex, rhs.mPointIndexLength); + mNumPointIndexEntries = rhs.mNumPointIndexEntries; + setPointIndex(rhs.mPointIndex, rhs.mNumPointIndexEntries); mPointIndexLength = rhs.mPointIndexLength; mIsSetPointIndexLength = rhs.mIsSetPointIndexLength; mCompression = rhs.mCompression; @@ -216,7 +220,7 @@ return; } - memcpy(outArray, mPointIndex, sizeof(int)*mPointIndexLength); + memcpy(outArray, mPointIndex, sizeof(int)*mNumPointIndexEntries); } @@ -231,6 +235,13 @@ } +size_t +ParametricObject::getNumPointIndexEntries() const +{ + return mNumPointIndexEntries; +} + + /* * Returns the value of the "compression" attribute of this ParametricObject. */ @@ -441,7 +452,7 @@ * Sets the value of the "pointIndex" attribute of this ParametricObject. */ int -ParametricObject::setPointIndex(int* inArray, int arrayLength) +ParametricObject::setPointIndex(int* inArray, size_t arrayLength) { if (inArray == NULL) { @@ -455,8 +466,7 @@ mPointIndex = new int[arrayLength]; memcpy(mPointIndex, inArray, sizeof(int)*arrayLength); - mIsSetPointIndexLength = true; - mPointIndexLength = arrayLength; + mNumPointIndexEntries = arrayLength; return LIBSBML_OPERATION_SUCCESS; } @@ -813,7 +823,7 @@ if (isSetPointIndex()) { - for (int i = 0; i < mPointIndexLength; ++i) + for (int i = 0; i < mNumPointIndexEntries; ++i) { stream << (long)mPointIndex[i] << " "; } @@ -1593,6 +1603,12 @@ while (strStream >> val) { valuesVector.push_back(val); + if (strStream.peek() == ',') { + strStream.get(); + } + if (strStream.peek() == ';') { + strStream.get(); + } } unsigned int length = (unsigned int)valuesVector.size(); Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.h 2019-12-17 22:43:55 UTC (rev 26216) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.h 2019-12-17 23:48:32 UTC (rev 26217) @@ -134,6 +134,7 @@ PolygonKind_t mPolygonType; std::string mDomainType; int* mPointIndex; + size_t mNumPointIndexEntries; int mPointIndexLength; bool mIsSetPointIndexLength; CompressionKind_t mCompression; @@ -291,6 +292,17 @@ /** + * Returns the number of entries of the child vector of this + * ParametricObject. In the uncompressed case, this should equal + * the 'pointIndexLength' attribute. + * + * @return the number of entries of the child vector of this + * ParametricObject. + */ + size_t getNumPointIndexEntries() const; + + + /** * Returns the value of the "compression" attribute of this ParametricObject. * * @return the value of the "compression" attribute of this ParametricObject @@ -537,7 +549,7 @@ * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, * OperationReturnValues_t} */ - int setPointIndex(int* inArray, int arrayLength); + int setPointIndex(int* inArray, size_t arrayLength); /** Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/test/TestParametricObject.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/test/TestParametricObject.cpp 2019-12-17 22:43:55 UTC (rev 26216) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/test/TestParametricObject.cpp 2019-12-17 23:48:32 UTC (rev 26217) @@ -160,6 +160,7 @@ G->setId("i"); G->setPolygonType("triangle"); G->setDomainType("p"); + G->setPointIndexLength(3); G->setPointIndex(points, 3); Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 22:43:55 UTC (rev 26216) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 23:48:32 UTC (rev 26217) @@ -207,6 +207,7 @@ , SpatialParametricObjectCompressionMustBeCompressionKindEnum = 1222108 , SpatialParametricObjectNameMustBeString = 1222109 , SpatialParametricObjectDataTypeMustBeDataKindEnum = 1222110 +, SpatialParametricObjectPointIndexLengthMustMatchUncompressed = 1222150 , SpatialCSGeometryAllowedCoreAttributes = 1222201 , SpatialCSGeometryAllowedCoreElements = 1222202 , SpatialCSGeometryAllowedElements = 1222203 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 22:43:55 UTC (rev 26216) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 23:48:32 UTC (rev 26217) @@ -1752,6 +1752,16 @@ } }, + // 1222150 + { SpatialParametricObjectPointIndexLengthMustMatchUncompressed, + "The 'dataType' attribute must be DataKindEnum.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the 'spatial:compression' attribute of a ParametricObject has the value 'uncompressed', the 'spatial:pointIndexLength' attribute of the same ParametricObject must equal the number of entries in the ArrayData child of the ParametricObject.", + { "L3V1 Spatial V1 Section" + } + }, + // 1222201 { SpatialCSGeometryAllowedCoreAttributes, "Core attributes allowed on <csGeometry>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 22:43:55 UTC (rev 26216) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 23:48:32 UTC (rev 26217) @@ -2051,6 +2051,28 @@ END_CONSTRAINT +// 122150 +START_CONSTRAINT(SpatialParametricObjectPointIndexLengthMustMatchUncompressed, ParametricObject, po) +{ + pre(po.isSetCompression()); + pre(po.getCompression() == SPATIAL_COMPRESSIONKIND_UNCOMPRESSED); + pre(po.getPointIndexLength() != po.getNumPointIndexEntries()); + stringstream ss_msg; + ss_msg << "A <parametricObject>"; + if (po.isSetId()) + { + ss_msg << " with id '" << po.getId() << "'"; + } + ss_msg << " is set 'uncompressed' and has an 'arrayDataLength' of '"; + ss_msg << po.getPointIndexLength() << "', but actually contains "; + ss_msg << po.getNumPointIndexEntries() << " entries."; + msg = ss_msg.str(); + + inv(false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 22:43:55 UTC (rev 26216) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 23:48:32 UTC (rev 26217) @@ -110,6 +110,7 @@ addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsFloatArrayDataMustMatch(*this)); addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsUIntArrayDataNotNegative(*this)); addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsIntArrayDataIntegers(*this)); +addConstraint(new VConstraintParametricObjectSpatialParametricObjectPointIndexLengthMustMatchUncompressed(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-fail-01-01.xml 2019-12-17 23:48:32 UTC (rev 26217) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="5" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-fail-01-02.xml 2019-12-17 23:48:32 UTC (rev 26217) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="2" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-pass-00-01.xml 2019-12-17 23:48:32 UTC (rev 26217) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222150-pass-00-02.xml 2019-12-17 23:48:32 UTC (rev 26217) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0, 1, 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-17 22:43:56
|
Revision: 26216 http://sourceforge.net/p/sbml/code/26216 Author: luciansmith Date: 2019-12-17 22:43:55 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Add other uint* options to test. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 22:33:55 UTC (rev 26215) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 22:43:55 UTC (rev 26216) @@ -1992,7 +1992,7 @@ { bool fail = false; pre(sp.isSetDataType()); - pre(sp.getDataType() == SPATIAL_DATAKIND_UINT); + pre(sp.getDataType() == SPATIAL_DATAKIND_UINT || sp.getDataType() == SPATIAL_DATAKIND_UINT8 || sp.getDataType() == SPATIAL_DATAKIND_UINT16 || sp.getDataType() == SPATIAL_DATAKIND_UINT32); size_t len = sp.getNumArrayDataEntries(); double* data = new double[len]; sp.getArrayData(data); @@ -2005,7 +2005,8 @@ { ss_msg << " with id '" << sp.getId() << "'"; } - ss_msg << " has a data type of 'uint', but has an entry with the value '" << val; + ss_msg << " has a data type of '" << sp.getDataTypeAsString(); + ss_msg << "', but has an entry with the value '" << val; ss_msg << "', which is negative."; msg = ss_msg.str(); fail = true; @@ -2023,7 +2024,7 @@ { bool fail = false; pre(sp.isSetDataType()); - pre(sp.getDataType() == SPATIAL_DATAKIND_UINT || sp.getDataType() == SPATIAL_DATAKIND_INT); + pre(sp.getDataType() == SPATIAL_DATAKIND_INT || sp.getDataType() == SPATIAL_DATAKIND_UINT || sp.getDataType() == SPATIAL_DATAKIND_UINT8 || sp.getDataType() == SPATIAL_DATAKIND_UINT16 || sp.getDataType() == SPATIAL_DATAKIND_UINT32); size_t len = sp.getNumArrayDataEntries(); double* data = new double[len]; sp.getArrayData(data); |
From: <luc...@us...> - 2019-12-17 22:33:57
|
Revision: 26215 http://sourceforge.net/p/sbml/code/26215 Author: luciansmith Date: 2019-12-17 22:33:55 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Add some uint tests for integers, not just negativity. Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-07.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-08.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-09.xml Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-07.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-07.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-07.xml 2019-12-17 22:33:55 UTC (rev 26215) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="uint" spatial:id="spatialPoints_1">0.5 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-08.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-08.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-08.xml 2019-12-17 22:33:55 UTC (rev 26215) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="uint" spatial:id="spatialPoints_1">1e-20 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-09.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-09.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-09.xml 2019-12-17 22:33:55 UTC (rev 26215) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="uint" spatial:id="spatialPoints_1">1e-40 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-17 22:25:36
|
Revision: 26214 http://sourceforge.net/p/sbml/code/26214 Author: luciansmith Date: 2019-12-17 22:25:35 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Add support and tests for spatial rules 24054 and 24055. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-05.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-06.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-03.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 21:49:33 UTC (rev 26213) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 22:25:35 UTC (rev 26214) @@ -377,6 +377,8 @@ , SpatialSpatialPointsDataLengthMustMatchCompressed = 1224051 , SpatialSpatialPointsArrayDataMultipleOfDimensions = 1224052 , SpatialSpatialPointsFloatArrayDataMustMatch = 1224053 +, SpatialSpatialPointsUIntArrayDataNotNegative = 1224054 +, SpatialSpatialPointsIntArrayDataIntegers = 1224055 } SpatialSBMLErrorCode_t; Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 21:49:33 UTC (rev 26213) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 22:25:35 UTC (rev 26214) @@ -3720,6 +3720,26 @@ } }, + // 1224054 + { SpatialSpatialPointsUIntArrayDataNotNegative, + "The <spatialPoints> entries in 'uint' must be positive.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the 'spatial:dataType' attribute of a <spatialPoints> has the value 'uint', none of the uncompressed entries in the ArrayData child of the <spatialPoints> may be negative.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1224055 + { SpatialSpatialPointsIntArrayDataIntegers, + "The <spatialPoints> entries in 'uint' and 'int' must be integers.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the 'spatial:dataType' attribute of a <spatialPoints> has the value 'uint' or 'int', all of the uncompressed entries in the ArrayData child of the <spatialPoints> must be integers.", + { "L3V1 Spatial V1 Section" + } + }, + }; /** @endcond */ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 21:49:33 UTC (rev 26213) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 22:25:35 UTC (rev 26214) @@ -1987,6 +1987,69 @@ END_CONSTRAINT +// 1224054 +START_CONSTRAINT(SpatialSpatialPointsUIntArrayDataNotNegative, SpatialPoints, sp) +{ + bool fail = false; + pre(sp.isSetDataType()); + pre(sp.getDataType() == SPATIAL_DATAKIND_UINT); + size_t len = sp.getNumArrayDataEntries(); + double* data = new double[len]; + sp.getArrayData(data); + for (size_t d = 0; d < len; d++) { + double val = data[d]; + if (val < 0) { + stringstream ss_msg; + ss_msg << "A <spatialPoints>"; + if (sp.isSetId()) + { + ss_msg << " with id '" << sp.getId() << "'"; + } + ss_msg << " has a data type of 'uint', but has an entry with the value '" << val; + ss_msg << "', which is negative."; + msg = ss_msg.str(); + fail = true; + break; + } + } + delete[] data; + inv(fail == false); +} +END_CONSTRAINT + + +// 1224055 +START_CONSTRAINT(SpatialSpatialPointsIntArrayDataIntegers, SpatialPoints, sp) +{ + bool fail = false; + pre(sp.isSetDataType()); + pre(sp.getDataType() == SPATIAL_DATAKIND_UINT || sp.getDataType() == SPATIAL_DATAKIND_INT); + size_t len = sp.getNumArrayDataEntries(); + double* data = new double[len]; + sp.getArrayData(data); + for (size_t d = 0; d < len; d++) { + double val = data[d]; + if (trunc(val) != val) { + stringstream ss_msg; + ss_msg << "A <spatialPoints>"; + if (sp.isSetId()) + { + ss_msg << " with id '" << sp.getId() << "'"; + } + ss_msg << " has a data type of '" << sp.getDataTypeAsString(); + ss_msg << "', but has an entry with the value '" << val; + ss_msg << "', which is not an integer."; + msg = ss_msg.str(); + fail = true; + break; + } + } + delete[] data; + inv(fail == false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 21:49:33 UTC (rev 26213) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 22:25:35 UTC (rev 26214) @@ -108,6 +108,8 @@ addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsDataLengthMustMatchUncompressed(*this)); addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsArrayDataMultipleOfDimensions(*this)); addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsFloatArrayDataMustMatch(*this)); +addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsUIntArrayDataNotNegative(*this)); +addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsIntArrayDataIntegers(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-fail-01-01.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="uint" spatial:id="spatialPoints_1">0 0 0, 0 -1 0, 0 -1 -1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-pass-00-01.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="uint" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224054-pass-00-02.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="uint" spatial:id="spatialPoints_1">-0 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-01.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="12" spatial:compression="uncompressed" spatial:dataType="int" spatial:id="spatialPoints_1">0.5 0 0, 0 1 0, 0 1 1, -1 -1 -1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-02.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="12" spatial:compression="uncompressed" spatial:dataType="int" spatial:id="spatialPoints_1">1e-20 0 0, 0 1 0, 0 1 1, -1 -1 -1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-03.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="12" spatial:compression="uncompressed" spatial:dataType="int" spatial:id="spatialPoints_1">1e-40 0 0, 0 1 0, 0 1 1, -1 -1 -1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-04.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-04.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="12" spatial:compression="uncompressed" spatial:dataType="int" spatial:id="spatialPoints_1">-0.5 0 0, 0 1 0, 0 1 1, -1 -1 -1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-05.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-05.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-05.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="12" spatial:compression="uncompressed" spatial:dataType="int" spatial:id="spatialPoints_1">-1e-20 0 0, 0 1 0, 0 1 1, -1 -1 -1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-06.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-06.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-fail-01-06.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="12" spatial:compression="uncompressed" spatial:dataType="int" spatial:id="spatialPoints_1">-1e-40 0 0, 0 1 0, 0 1 1, -1 -1 -1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-01.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="12" spatial:compression="uncompressed" spatial:dataType="int" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1 1, -1 -1 -1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-02.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="12" spatial:compression="uncompressed" spatial:dataType="int" spatial:id="spatialPoints_1">1e45 0 0, 0 1 0, 0 1 1, -1 -1 -1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224055-pass-00-03.xml 2019-12-17 22:25:35 UTC (rev 26214) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="12" spatial:compression="uncompressed" spatial:dataType="int" spatial:id="spatialPoints_1">-1e45 0 0, 0 1 0, 0 1 1, -1 -1 -1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-17 21:49:34
|
Revision: 26213 http://sourceforge.net/p/sbml/code/26213 Author: luciansmith Date: 2019-12-17 21:49:33 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Add support and tests for spatial rule 24053. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-05.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-06.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 20:27:15 UTC (rev 26212) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 21:49:33 UTC (rev 26213) @@ -376,6 +376,7 @@ , SpatialSpatialPointsDataLengthMustMatchUncompressed = 1224050 , SpatialSpatialPointsDataLengthMustMatchCompressed = 1224051 , SpatialSpatialPointsArrayDataMultipleOfDimensions = 1224052 +, SpatialSpatialPointsFloatArrayDataMustMatch = 1224053 } SpatialSBMLErrorCode_t; Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 20:27:15 UTC (rev 26212) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 21:49:33 UTC (rev 26213) @@ -3710,6 +3710,16 @@ } }, + // 1224053 + { SpatialSpatialPointsFloatArrayDataMustMatch, + "The <spatialPoints> entries in 'float' must be single precision.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the 'spatial:dataType' attribute of a <spatialPoints> has the value 'float', none of the uncompressed entries in the ArrayData child of the <spatialPoints> may have a value outside of the range of an IEEE 754-1985 single-precision floating point value (approximately +/-3.4028235e38, and +/-1.17549e?38).", + { "L3V1 Spatial V1 Section" + } + }, + }; /** @endcond */ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 20:27:15 UTC (rev 26212) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 21:49:33 UTC (rev 26213) @@ -1956,6 +1956,37 @@ END_CONSTRAINT +// 1224053 +START_CONSTRAINT(SpatialSpatialPointsFloatArrayDataMustMatch, SpatialPoints, sp) +{ + bool fail = false; + pre(sp.isSetDataType()); + pre(sp.getDataType() == SPATIAL_DATAKIND_FLOAT); + size_t len = sp.getNumArrayDataEntries(); + double* data = new double[len]; + sp.getArrayData(data); + for (size_t d = 0; d < len; d++) { + double val = data[d]; + if (val > 3.4028235e38 || val < -3.4028235e38 || (val > 0 && val < 1.17549e-38) || val < 0 && val > -1.17549e-38) { + stringstream ss_msg; + ss_msg << "A <spatialPoints>"; + if (sp.isSetId()) + { + ss_msg << " with id '" << sp.getId() << "'"; + } + ss_msg << " has an entry with the value '" << val; + ss_msg << "', which is outside the range of single-precision 'float' values."; + msg = ss_msg.str(); + fail = true; + break; + } + } + delete[] data; + inv(fail == false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 20:27:15 UTC (rev 26212) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 21:49:33 UTC (rev 26213) @@ -107,6 +107,7 @@ addConstraint(new VConstraintParametricGeometrySpatialParametricGeometryNotIn1D(*this)); addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsDataLengthMustMatchUncompressed(*this)); addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsArrayDataMultipleOfDimensions(*this)); +addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsFloatArrayDataMustMatch(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-01.xml 2019-12-17 21:49:33 UTC (rev 26213) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="float" spatial:id="spatialPoints_1">1e-40 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-02.xml 2019-12-17 21:49:33 UTC (rev 26213) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="float" spatial:id="spatialPoints_1">-1e-40 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-03.xml 2019-12-17 21:49:33 UTC (rev 26213) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="float" spatial:id="spatialPoints_1">1e40 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-04.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-fail-01-04.xml 2019-12-17 21:49:33 UTC (rev 26213) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="float" spatial:id="spatialPoints_1">-1e40 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-01.xml 2019-12-17 21:49:33 UTC (rev 26213) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">1e-40 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-02.xml 2019-12-17 21:49:33 UTC (rev 26213) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="float" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-03.xml 2019-12-17 21:49:33 UTC (rev 26213) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="float" spatial:id="spatialPoints_1">1e-36 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-04.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-04.xml 2019-12-17 21:49:33 UTC (rev 26213) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="float" spatial:id="spatialPoints_1">-1e-36 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-05.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-05.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-05.xml 2019-12-17 21:49:33 UTC (rev 26213) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="float" spatial:id="spatialPoints_1">1e36 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-06.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-06.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224053-pass-00-06.xml 2019-12-17 21:49:33 UTC (rev 26213) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="float" spatial:id="spatialPoints_1">-1e36 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-17 20:27:17
|
Revision: 26212 http://sourceforge.net/p/sbml/code/26212 Author: luciansmith Date: 2019-12-17 20:27:15 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Add support and tests for spatial rule 24052. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-03.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 20:03:03 UTC (rev 26211) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 20:27:15 UTC (rev 26212) @@ -375,6 +375,7 @@ , SpatialSpatialPointsDataTypeMustBeDataKindEnum = 1224008 , SpatialSpatialPointsDataLengthMustMatchUncompressed = 1224050 , SpatialSpatialPointsDataLengthMustMatchCompressed = 1224051 +, SpatialSpatialPointsArrayDataMultipleOfDimensions = 1224052 } SpatialSBMLErrorCode_t; Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 20:03:03 UTC (rev 26211) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 20:27:15 UTC (rev 26212) @@ -3700,6 +3700,16 @@ } }, + // 1224052 + { SpatialSpatialPointsArrayDataMultipleOfDimensions, + "The <spatialPoints> entries must match the dimensionality of the <geometry>.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "When uncompressed, the number of entries in the ArrayData child of a <spatialPoints> must be evenly divisible by the number of <coordinateComponent> children of the <geometry> of the model (two or three).", + { "L3V1 Spatial V1 Section" + } + }, + }; /** @endcond */ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 20:03:03 UTC (rev 26211) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 20:27:15 UTC (rev 26212) @@ -1933,6 +1933,29 @@ END_CONSTRAINT +// 1224052 +START_CONSTRAINT(SpatialSpatialPointsArrayDataMultipleOfDimensions, SpatialPoints, sp) +{ + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + pre(sp.getNumArrayDataEntries() % geometry->getNumCoordinateComponents() != 0); + stringstream ss_msg; + ss_msg << "A <spatialPoints>"; + if (sp.isSetId()) + { + ss_msg << " with id '" << sp.getId() << "'"; + } + ss_msg << " has " << sp.getNumArrayDataEntries() << " entries, which is not a multiple of "; + ss_msg << geometry->getNumCoordinateComponents() << ", the dimensionality of the <geometry>."; + msg = ss_msg.str(); + + inv(false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 20:03:03 UTC (rev 26211) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 20:27:15 UTC (rev 26212) @@ -106,6 +106,7 @@ addConstraint(new VConstraintTransformationComponentSpatialTransformationComponentComponentsLengthMustBe16(*this)); addConstraint(new VConstraintParametricGeometrySpatialParametricGeometryNotIn1D(*this)); addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsDataLengthMustMatchUncompressed(*this)); +addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsArrayDataMultipleOfDimensions(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-fail-01-01.xml 2019-12-17 20:27:15 UTC (rev 26212) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="8" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-fail-01-02.xml 2019-12-17 20:27:15 UTC (rev 26212) @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="5" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0, 0 1, 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-01.xml 2019-12-17 20:27:15 UTC (rev 26212) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-02.xml 2019-12-17 20:27:15 UTC (rev 26212) @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="6" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0, 0 1, 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224052-pass-00-03.xml 2019-12-17 20:27:15 UTC (rev 26212) @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="6" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 1 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-17 20:03:04
|
Revision: 26211 http://sourceforge.net/p/sbml/code/26211 Author: luciansmith Date: 2019-12-17 20:03:03 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Add entries for spatial validation rule 24051. No support yet, as support for compressed arrays seems to be missing in general. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 19:58:56 UTC (rev 26210) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 20:03:03 UTC (rev 26211) @@ -374,6 +374,7 @@ , SpatialSpatialPointsNameMustBeString = 1224007 , SpatialSpatialPointsDataTypeMustBeDataKindEnum = 1224008 , SpatialSpatialPointsDataLengthMustMatchUncompressed = 1224050 +, SpatialSpatialPointsDataLengthMustMatchCompressed = 1224051 } SpatialSBMLErrorCode_t; Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 19:58:56 UTC (rev 26210) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 20:03:03 UTC (rev 26211) @@ -3690,6 +3690,16 @@ } }, + // 1224051 + { SpatialSpatialPointsDataLengthMustMatchCompressed, + "The 'arrayDataLength' attribute must match the compressed string.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the 'spatial:compression' attribute of a SpatialPoints has the value 'deflated', the 'spatial:arrayDataLength' attribute of the same SpatialPoints must equal the number of non-whitespace characters of the ArrayData child of the SpatialPoints.", + { "L3V1 Spatial V1 Section" + } + }, + }; /** @endcond */ |
From: <luc...@us...> - 2019-12-17 19:58:58
|
Revision: 26210 http://sourceforge.net/p/sbml/code/26210 Author: luciansmith Date: 2019-12-17 19:58:56 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Fix how the length of the arrayData is stored in SpatialPoints. We cannot let it be set by the user, because the user may enter an incorrect value, which could result in memory corruption. Instead, just store the 'arrayDataLength' as an attribute, but store the *actual* length of the array in a different member variable. Also, allow commas and semicolons in the array, as the spec claims is possible. Then use this information to test spatial validation rule 24050. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SpatialPoints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SpatialPoints.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-pass-00-01.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SpatialPoints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SpatialPoints.cpp 2019-12-17 18:04:49 UTC (rev 26209) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SpatialPoints.cpp 2019-12-17 19:58:56 UTC (rev 26210) @@ -60,6 +60,7 @@ : SBase(level, version) , mCompression (SPATIAL_COMPRESSIONKIND_INVALID) , mArrayData (NULL) + , mNumArrayDataEntries (0) , mArrayDataLength (SBML_INT_MAX) , mIsSetArrayDataLength (false) , mDataType (SPATIAL_DATAKIND_INVALID) @@ -76,6 +77,7 @@ : SBase(spatialns) , mCompression (SPATIAL_COMPRESSIONKIND_INVALID) , mArrayData (NULL) + , mNumArrayDataEntries (0) , mArrayDataLength (SBML_INT_MAX) , mIsSetArrayDataLength (false) , mDataType (SPATIAL_DATAKIND_INVALID) @@ -92,11 +94,12 @@ : SBase( orig ) , mCompression ( orig.mCompression ) , mArrayData ( NULL ) + , mNumArrayDataEntries (orig.mNumArrayDataEntries) , mArrayDataLength ( orig.mArrayDataLength ) , mIsSetArrayDataLength ( orig.mIsSetArrayDataLength ) , mDataType ( orig.mDataType ) { - setArrayData(orig.mArrayData, orig.mArrayDataLength); + setArrayData(orig.mArrayData, orig.mNumArrayDataEntries); } @@ -112,7 +115,8 @@ SBase::operator=(rhs); mCompression = rhs.mCompression; mArrayData = NULL; - setArrayData(rhs.mArrayData, rhs.mArrayDataLength); + mNumArrayDataEntries = rhs.mNumArrayDataEntries; + setArrayData(rhs.mArrayData, rhs.mNumArrayDataEntries); mArrayDataLength = rhs.mArrayDataLength; mIsSetArrayDataLength = rhs.mIsSetArrayDataLength; mDataType = rhs.mDataType; @@ -198,7 +202,7 @@ return; } - memcpy(outArray, mArrayData, sizeof(double)*mArrayDataLength); + memcpy(outArray, mArrayData, sizeof(double)*mNumArrayDataEntries); } @@ -211,7 +215,12 @@ return mArrayDataLength; } + size_t SpatialPoints::getNumArrayDataEntries() const + { + return mNumArrayDataEntries; + } + /* * Returns the value of the "dataType" attribute of this SpatialPoints. */ @@ -359,7 +368,7 @@ * Sets the value of the "arrayData" attribute of this SpatialPoints. */ int -SpatialPoints::setArrayData(double* inArray, int arrayLength) +SpatialPoints::setArrayData(double* inArray, size_t arrayLength) { if (inArray == NULL) { @@ -373,8 +382,7 @@ mArrayData = new double[arrayLength]; memcpy(mArrayData, inArray, sizeof(double)*arrayLength); - mIsSetArrayDataLength = true; - mArrayDataLength = arrayLength; + mNumArrayDataEntries = arrayLength; return LIBSBML_OPERATION_SUCCESS; } @@ -635,7 +643,7 @@ if (isSetArrayData()) { - for (int i = 0; i < mArrayDataLength; ++i) + for (int i = 0; i < mNumArrayDataEntries; ++i) { stream << (double)mArrayData[i] << " "; } @@ -1256,9 +1264,15 @@ while (strStream >> val) { valuesVector.push_back(val); + if (strStream.peek() == ',') { + strStream.get(); + } + if (strStream.peek() == ';') { + strStream.get(); + } } - unsigned int length = (unsigned int)valuesVector.size(); + size_t length = valuesVector.size(); if (length > 0) { @@ -1552,7 +1566,7 @@ int SpatialPoints_setArrayData(SpatialPoints_t* sp, double* arrayData, - int arrayLength) + size_t arrayLength) { return (sp != NULL) ? sp->setArrayData(arrayData, arrayLength) : LIBSBML_INVALID_OBJECT; Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SpatialPoints.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SpatialPoints.h 2019-12-17 18:04:49 UTC (rev 26209) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SpatialPoints.h 2019-12-17 19:58:56 UTC (rev 26210) @@ -120,6 +120,7 @@ CompressionKind_t mCompression; double* mArrayData; + size_t mNumArrayDataEntries; int mArrayDataLength; bool mIsSetArrayDataLength; DataKind_t mDataType; @@ -264,6 +265,17 @@ /** + * Returns the number of entries in the "arrayData" child of this + * SpatialPoints. When uncompressed, this value should match the + * 'arrayDataLength' attribute. + * + * @return the number of entries in the "arrayData" child of this SpatialPoints + * as a size_t. + */ + size_t getNumArrayDataEntries() const; + + + /** * Returns the value of the "dataType" attribute of this SpatialPoints. * * @return the value of the "dataType" attribute of this SpatialPoints as a @@ -441,7 +453,7 @@ * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, * OperationReturnValues_t} */ - int setArrayData(double* inArray, int arrayLength); + int setArrayData(double* inArray, size_t arrayLength); /** @@ -1377,7 +1389,7 @@ int SpatialPoints_setArrayData(SpatialPoints_t* sp, double* arrayData, - int arrayLength); + size_t arrayLength); /** Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 18:04:49 UTC (rev 26209) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 19:58:56 UTC (rev 26210) @@ -373,6 +373,7 @@ , SpatialSpatialPointsArrayDataLengthMustBeInteger = 1224006 , SpatialSpatialPointsNameMustBeString = 1224007 , SpatialSpatialPointsDataTypeMustBeDataKindEnum = 1224008 +, SpatialSpatialPointsDataLengthMustMatchUncompressed = 1224050 } SpatialSBMLErrorCode_t; Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 18:04:49 UTC (rev 26209) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 19:58:56 UTC (rev 26210) @@ -3680,6 +3680,16 @@ } }, + // 1224050 + { SpatialSpatialPointsDataLengthMustMatchUncompressed, + "The 'arrayDataLength' attribute must match the entries when uncompressed.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the 'spatial:compression' attribute of a <spatialPoints> has the value 'uncompressed', the 'spatial:arrayDataLength' attribute of the same <spatialPoints> must equal the number of entries in the ArrayData child of the <spatialPoints>.", + { "L3V1 Spatial V1 Section" + } + }, + }; /** @endcond */ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 18:04:49 UTC (rev 26209) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 19:58:56 UTC (rev 26210) @@ -1911,16 +1911,28 @@ END_CONSTRAINT -// 122__ -//START_CONSTRAINT(Spatial, Class, class) -//{ -// bool fail = false; -// -// inv(fail == false); -//} -//END_CONSTRAINT +// 1224050 +START_CONSTRAINT(SpatialSpatialPointsDataLengthMustMatchUncompressed, SpatialPoints, sp) +{ + pre(sp.isSetCompression()); + pre(sp.getCompression() == SPATIAL_COMPRESSIONKIND_UNCOMPRESSED); + pre(sp.getArrayDataLength() != sp.getNumArrayDataEntries()); + stringstream ss_msg; + ss_msg << "A <spatialPoints>"; + if (sp.isSetId()) + { + ss_msg << " with id '" << sp.getId() << "'"; + } + ss_msg << " is set 'uncompressed' and has an 'arrayDataLength' of '"; + ss_msg << sp.getArrayDataLength() << "', but actually contains "; + ss_msg << sp.getNumArrayDataEntries() << " entries."; + msg = ss_msg.str(); + inv(false); +} +END_CONSTRAINT + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 18:04:49 UTC (rev 26209) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 19:58:56 UTC (rev 26210) @@ -105,6 +105,7 @@ addConstraint(new VConstraintCSGScaleSpatialCSGScaleNoScaleZIn2D(*this)); addConstraint(new VConstraintTransformationComponentSpatialTransformationComponentComponentsLengthMustBe16(*this)); addConstraint(new VConstraintParametricGeometrySpatialParametricGeometryNotIn1D(*this)); +addConstraint(new VConstraintSpatialPointsSpatialSpatialPointsDataLengthMustMatchUncompressed(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-fail-01-01.xml 2019-12-17 19:58:56 UTC (rev 26210) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="5" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-fail-01-02.xml 2019-12-17 19:58:56 UTC (rev 26210) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="55" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1224050-pass-00-01.xml 2019-12-17 19:58:56 UTC (rev 26210) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="true"> + <spatial:spatialPoints spatial:arrayDataLength="9" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1">0 0 0, 0 1 0, 0 1 1</spatial:spatialPoints> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="3" spatial:polygonType="triangle">0 1 2</spatial:parametricObject> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-17 18:04:51
|
Revision: 26209 http://sourceforge.net/p/sbml/code/26209 Author: luciansmith Date: 2019-12-17 18:04:49 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Add support and tests for spatial rule 22050. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-pass-00-02.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 01:26:54 UTC (rev 26208) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 18:04:49 UTC (rev 26209) @@ -196,6 +196,7 @@ , SpatialParametricGeometryAllowedElements = 1222003 , SpatialParametricGeometryLOParametricObjectsAllowedCoreElements= 1222004 , SpatialParametricGeometryLOParametricObjectsAllowedCoreAttributes= 1222005 +, SpatialParametricGeometryNotIn1D = 1222050 , SpatialParametricObjectAllowedCoreAttributes = 1222101 , SpatialParametricObjectAllowedCoreElements = 1222102 , SpatialParametricObjectAllowedAttributes = 1222103 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 01:26:54 UTC (rev 26208) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 18:04:49 UTC (rev 26209) @@ -1617,6 +1617,16 @@ } }, + // 1222050 + { SpatialParametricGeometryNotIn1D, + "No <parametricGeometry> allowed in 1D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "A model may not have a <parametricGeometry> and a <geometry> with exactly one <coordinateComponent> child.", + { "L3V1 Spatial V1 Section" + } + }, + // 1222101 { SpatialParametricObjectAllowedCoreAttributes, "Core attributes allowed on <parametricObject>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 01:26:54 UTC (rev 26208) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 18:04:49 UTC (rev 26209) @@ -1892,6 +1892,25 @@ END_CONSTRAINT +// 1222050 +START_CONSTRAINT(SpatialParametricGeometryNotIn1D, ParametricGeometry, pg) +{ + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + pre(geometry->getNumCoordinateComponents() == 1); + msg = "A <parametricGeometry>"; + if (pg.isSetId()) { + msg += " with the id '" + pg.getId() + "'"; + } + msg += " was found in the model, but the <geometry> has exactly one <coordinateComponent> child."; + + inv(false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 01:26:54 UTC (rev 26208) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 18:04:49 UTC (rev 26209) @@ -104,6 +104,7 @@ addConstraint(new VConstraintCSGScaleSpatialCSGScaleNoScaleYIn1D(*this)); addConstraint(new VConstraintCSGScaleSpatialCSGScaleNoScaleZIn2D(*this)); addConstraint(new VConstraintTransformationComponentSpatialTransformationComponentComponentsLengthMustBe16(*this)); +addConstraint(new VConstraintParametricGeometrySpatialParametricGeometryNotIn1D(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-fail-01-01.xml 2019-12-17 18:04:49 UTC (rev 26209) @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="false"> + <spatial:spatialPoints spatial:arrayDataLength="0" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1"/> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="0" spatial:polygonType="triangle"/> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-pass-00-01.xml 2019-12-17 18:04:49 UTC (rev 26209) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="false"> + <spatial:spatialPoints spatial:arrayDataLength="0" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1"/> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="0" spatial:polygonType="triangle"/> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222050-pass-00-02.xml 2019-12-17 18:04:49 UTC (rev 26209) @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:parametricGeometry spatial:id="geometryDefinition_3" spatial:isActive="false"> + <spatial:spatialPoints spatial:arrayDataLength="0" spatial:compression="uncompressed" spatial:dataType="double" spatial:id="spatialPoints_1"/> + <spatial:listOfParametricObjects> + <spatial:parametricObject spatial:compression="uncompressed" spatial:dataType="double" spatial:domainType="domainType_1" spatial:id="parametricObject_1" spatial:pointIndexLength="0" spatial:polygonType="triangle"/> + </spatial:listOfParametricObjects> + </spatial:parametricGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-17 01:26:55
|
Revision: 26208 http://sourceforge.net/p/sbml/code/26208 Author: luciansmith Date: 2019-12-17 01:26:54 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Fix 'SpatialPoints'->'<spatialPoints>' in error message. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 01:22:02 UTC (rev 26207) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 01:26:54 UTC (rev 26208) @@ -1586,7 +1586,7 @@ LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, "A <parametricGeometry> object may contain one and only one instance of " - "each of the SpatialPoints and <listOfParametricObjects> elements. No other " + "each of the <spatialPoints> and <listOfParametricObjects> elements. No other " "elements from the SBML Level 3 Spatial Processes namespaces are permitted " "on a <parametricGeometry> object. ", { "L3V1 Spatial V1 Section" |
From: <luc...@us...> - 2019-12-17 01:22:04
|
Revision: 26207 http://sourceforge.net/p/sbml/code/26207 Author: luciansmith Date: 2019-12-17 01:22:02 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Partial support for validation rule 23050. Unfortunately, the 'components' attribute in the spec has become a child object in the implementation. This has to be resolved before 23050 can be tested. Also, fix the CSGTransformation reader so it can have children other than the expected CSGNode. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGTransformation.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGTransformation.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGTransformation.cpp 2019-12-17 00:11:33 UTC (rev 26206) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGTransformation.cpp 2019-12-17 01:22:02 UTC (rev 26207) @@ -1094,92 +1094,96 @@ const std::string& name = stream.peek().getName(); SPATIAL_CREATE_NS(spatialns, getSBMLNamespaces()); + SpatialSBMLErrorCode_t err = SpatialCSGTranslationAllowedElements; - if (isSetCSGNode()) + if (getTypeCode() == SBML_SPATIAL_CSGTRANSLATION) { - if (getTypeCode() == SBML_SPATIAL_CSGTRANSLATION) - { - getErrorLog()->logPackageError("spatial", - SpatialCSGTranslationAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); - } - else if (getTypeCode() == SBML_SPATIAL_CSGROTATION) - { - getErrorLog()->logPackageError("spatial", - SpatialCSGRotationAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); - } - else if (getTypeCode() == SBML_SPATIAL_CSGSCALE) - { - getErrorLog()->logPackageError("spatial", - SpatialCSGScaleAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); - } - else if (getTypeCode() == SBML_SPATIAL_CSGHOMOGENEOUSTRANSFORMATION) - { - getErrorLog()->logPackageError("spatial", - SpatialCSGHomogeneousTransformationAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); - } - delete obj; - return NULL; + err = SpatialCSGTranslationAllowedElements; } + else if (getTypeCode() == SBML_SPATIAL_CSGROTATION) + { + err = SpatialCSGRotationAllowedElements; + } + else if (getTypeCode() == SBML_SPATIAL_CSGSCALE) + { + err = SpatialCSGScaleAllowedElements; + } + else if (getTypeCode() == SBML_SPATIAL_CSGHOMOGENEOUSTRANSFORMATION) + { + err = SpatialCSGHomogeneousTransformationAllowedElements; + } if (name == "csgPrimitive") { + if (isSetCSGNode()) + { + getErrorLog()->logPackageError("spatial", err, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); + delete obj; + return NULL; + } mCSGNode = new CSGPrimitive(spatialns); obj = mCSGNode; } else if (name == "csgTranslation") { + if (isSetCSGNode()) + { + getErrorLog()->logPackageError("spatial", err, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); + delete obj; + return NULL; + } mCSGNode = new CSGTranslation(spatialns); obj = mCSGNode; } else if (name == "csgRotation") { + if (isSetCSGNode()) + { + getErrorLog()->logPackageError("spatial", err, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); + delete obj; + return NULL; + } mCSGNode = new CSGRotation(spatialns); obj = mCSGNode; } else if (name == "csgScale") { + if (isSetCSGNode()) + { + getErrorLog()->logPackageError("spatial", err, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); + delete obj; + return NULL; + } mCSGNode = new CSGScale(spatialns); obj = mCSGNode; } else if (name == "csgHomogeneousTransformation") { + if (isSetCSGNode()) + { + getErrorLog()->logPackageError("spatial", err, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); + delete obj; + return NULL; + } mCSGNode = new CSGHomogeneousTransformation(spatialns); obj = mCSGNode; } else if (name == "csgSetOperator") { - mCSGNode = new CSGSetOperator(spatialns); - obj = mCSGNode; - } - else { - if (getTypeCode() == SBML_SPATIAL_CSGTRANSLATION) + if (isSetCSGNode()) { - getErrorLog()->logPackageError("spatial", - SpatialCSGTranslationAllowedElements, getPackageVersion(), getLevel(), + getErrorLog()->logPackageError("spatial", err, getPackageVersion(), getLevel(), getVersion(), "", getLine(), getColumn()); + delete obj; + return NULL; } - else if (getTypeCode() == SBML_SPATIAL_CSGROTATION) - { - getErrorLog()->logPackageError("spatial", - SpatialCSGRotationAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); - } - else if (getTypeCode() == SBML_SPATIAL_CSGSCALE) - { - getErrorLog()->logPackageError("spatial", - SpatialCSGScaleAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); - } - else if (getTypeCode() == SBML_SPATIAL_CSGHOMOGENEOUSTRANSFORMATION) - { - getErrorLog()->logPackageError("spatial", - SpatialCSGHomogeneousTransformationAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); - } + mCSGNode = new CSGSetOperator(spatialns); + obj = mCSGNode; } delete spatialns; Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 00:11:33 UTC (rev 26206) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 01:22:02 UTC (rev 26207) @@ -267,6 +267,7 @@ , SpatialTransformationComponentAllowedAttributes = 1223003 , SpatialTransformationComponentComponentsMustBeString = 1223004 , SpatialTransformationComponentComponentsLengthMustBeInteger = 1223005 +, SpatialTransformationComponentComponentsLengthMustBe16 = 1223050 , SpatialCSGPrimitiveAllowedCoreAttributes = 1223101 , SpatialCSGPrimitiveAllowedCoreElements = 1223102 , SpatialCSGPrimitiveAllowedAttributes = 1223103 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 00:11:33 UTC (rev 26206) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 01:22:02 UTC (rev 26207) @@ -2440,6 +2440,17 @@ } }, + // 1223050 + { SpatialTransformationComponentComponentsLengthMustBe16, + "The 'componentsLength' attribute must be '16'.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:componentsLength' on a <transformationComponent> " + "must have a value of '16'.", + { "L3V1 Spatial V1 Section" + } + }, + // 1223101 { SpatialCSGPrimitiveAllowedCoreAttributes, "Core attributes allowed on <csgPrimitive>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 00:11:33 UTC (rev 26206) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 01:22:02 UTC (rev 26207) @@ -1873,6 +1873,25 @@ END_CONSTRAINT +// 1223050 +START_CONSTRAINT(SpatialTransformationComponentComponentsLengthMustBe16, TransformationComponent, tc) +{ + pre(tc.isSetComponentsLength()); + pre(tc.getComponentsLength() != 16); + stringstream ss_msg; + ss_msg << "A <csgTransformationComponent>"; + if (tc.isSetId()) + { + ss_msg << " with id '" << tc.getId() << "'"; + } + ss_msg << " has a 'componentsLength' of '"; + ss_msg << tc.getComponentsLength() + "', instead of a value of '16'."; + msg = ss_msg.str(); + inv(false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 00:11:33 UTC (rev 26206) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 01:22:02 UTC (rev 26207) @@ -103,6 +103,7 @@ addConstraint(new VConstraintCSGScaleSpatialCSGScaleScaleZRequiredIn3D(*this)); addConstraint(new VConstraintCSGScaleSpatialCSGScaleNoScaleYIn1D(*this)); addConstraint(new VConstraintCSGScaleSpatialCSGScaleNoScaleZIn2D(*this)); +addConstraint(new VConstraintTransformationComponentSpatialTransformationComponentComponentsLengthMustBe16(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); |
From: <luc...@us...> - 2019-12-17 00:11:35
|
Revision: 26206 http://sourceforge.net/p/sbml/code/26206 Author: luciansmith Date: 2019-12-17 00:11:33 +0000 (Tue, 17 Dec 2019) Log Message: ----------- Add support and tests for spatial rules 22850-22854. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222850-fail-01-01-10102.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222850-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222852-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222852-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222853-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222853-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-pass-00-02.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-16 23:17:21 UTC (rev 26205) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-17 00:11:33 UTC (rev 26206) @@ -255,6 +255,10 @@ , SpatialCSGScaleScaleYMustBeDouble = 1222805 , SpatialCSGScaleScaleZMustBeDouble = 1222806 , SpatialCSGScaleAllowedElements = 1222850 +, SpatialCSGScaleScaleYRequiredIn2D = 1222851 +, SpatialCSGScaleScaleZRequiredIn3D = 1222852 +, SpatialCSGScaleNoScaleYIn1D = 1222853 +, SpatialCSGScaleNoScaleZIn2D = 1222854 , SpatialCSGHomogeneousTransformationAllowedCoreAttributes = 1222901 , SpatialCSGHomogeneousTransformationAllowedCoreElements = 1222902 , SpatialCSGHomogeneousTransformationAllowedElements = 1222903 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-16 23:17:21 UTC (rev 26205) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-17 00:11:33 UTC (rev 26206) @@ -2301,6 +2301,46 @@ } }, + // 1222751 + { SpatialCSGScaleScaleYRequiredIn2D, + "A <csgScale> must have 'scaleY' in 2D or 3D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:scaleY' on a <csgScale> is required if the <geometry> of the model has a <coordinateComponent> child of type 'cartesianY'.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222752 + { SpatialCSGScaleScaleZRequiredIn3D, + "A <csgScale> must have 'scaleZ' in 3D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:scaleZ' on a <csgScale> is required if the <geometry> of the model has a <coordinateComponent> child of type 'cartesianZ'.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222753 + { SpatialCSGScaleNoScaleYIn1D, + "A <csgScale> must not have 'scaleY' in 1D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:scaleY' on a <csgScale> must not be defined if the <geometry> of the model has no <coordinateComponent> child of type 'cartesianY'.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222754 + { SpatialCSGScaleNoScaleZIn2D, + "A <csgScale> must not have 'scaleZ' in 1D or 2D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:scaleZ' on a <csgScale> must not be defined if the <geometry> of the model has no <coordinateComponent> child of type 'cartesian'.", + { "L3V1 Spatial V1 Section" + } + }, + // 1222901 { SpatialCSGHomogeneousTransformationAllowedCoreAttributes, "Core attributes allowed on <csgHomogeneousTransformation>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-16 23:17:21 UTC (rev 26205) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-17 00:11:33 UTC (rev 26206) @@ -1665,7 +1665,7 @@ END_CONSTRAINT -// 1222651 +// 1222751 START_CONSTRAINT(SpatialCSGRotationRotateYRequiredIn2D, CSGRotation, rotation) { bool fail = false; @@ -1690,7 +1690,7 @@ END_CONSTRAINT -// 1222652 +// 1222752 START_CONSTRAINT(SpatialCSGRotationRotateZRequiredIn3D, CSGRotation, rotation) { bool fail = false; @@ -1715,7 +1715,7 @@ END_CONSTRAINT -// 1222653 +// 1222753 START_CONSTRAINT(SpatialCSGRotationNoRotateYIn1D, CSGRotation, rotation) { pre(rotation.isSetRotateY()); @@ -1736,7 +1736,7 @@ END_CONSTRAINT -// 1222654 +// 1222754 START_CONSTRAINT(SpatialCSGRotationNoRotateZIn2D, CSGRotation, rotation) { pre(rotation.isSetRotateZ()); @@ -1757,7 +1757,7 @@ END_CONSTRAINT -// 1222655 +// 1222755 START_CONSTRAINT(SpatialCSGRotationNoOriginIn3D, CSGRotation, rotation) { pre(rotation.isSetRotateX()); @@ -1781,6 +1781,98 @@ END_CONSTRAINT +// 1222851 +START_CONSTRAINT(SpatialCSGScaleScaleYRequiredIn2D, CSGScale, scale) +{ + bool fail = false; + pre(!scale.isSetScaleY()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + if (geometry->getCoordinateComponent(cc)->getType() == SPATIAL_COORDINATEKIND_CARTESIAN_Y) { + msg = "A <csgTranslation>"; + if (scale.isSetId()) { + msg += " with the id '" + scale.getId() + "'"; + } + msg += " has no 'scaleY' value, but the <geometry> has a <coordinateComponent> child of type 'cartesianY'."; + fail = true; + break; + } + } + inv(fail == false); +} +END_CONSTRAINT + + +// 1222852 +START_CONSTRAINT(SpatialCSGScaleScaleZRequiredIn3D, CSGScale, scale) +{ + bool fail = false; + pre(!scale.isSetScaleZ()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + if (geometry->getCoordinateComponent(cc)->getType() == SPATIAL_COORDINATEKIND_CARTESIAN_Z) { + msg = "A <csgTranslation>"; + if (scale.isSetId()) { + msg += " with the id '" + scale.getId() + "'"; + } + msg += " has no 'scaleZ' value, but the <geometry> has a <coordinateComponent> child of type 'cartesianZ'."; + fail = true; + break; + } + } + inv(fail == false); +} +END_CONSTRAINT + + +// 1222853 +START_CONSTRAINT(SpatialCSGScaleNoScaleYIn1D, CSGScale, scale) +{ + pre(scale.isSetScaleY()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + pre(geometry->getCoordinateComponent(cc)->getType() != SPATIAL_COORDINATEKIND_CARTESIAN_Y); + } + msg = "A <csgTranslation>"; + if (scale.isSetId()) { + msg += " with the id '" + scale.getId() + "'"; + } + msg += " has a 'scaleY' value, but the <geometry> has no <coordinateComponent> child of type 'cartesianY'."; + inv(false); +} +END_CONSTRAINT + + +// 1222854 +START_CONSTRAINT(SpatialCSGScaleNoScaleZIn2D, CSGScale, scale) +{ + pre(scale.isSetScaleZ()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + pre(geometry->getCoordinateComponent(cc)->getType() != SPATIAL_COORDINATEKIND_CARTESIAN_Z); + } + msg = "A <csgTranslation>"; + if (scale.isSetId()) { + msg += " with the id '" + scale.getId() + "'"; + } + msg += " has a 'scaleZ' value, but the <geometry> has no <coordinateComponent> child of type 'cartesianZ'."; + inv(false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-16 23:17:21 UTC (rev 26205) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-17 00:11:33 UTC (rev 26206) @@ -99,6 +99,10 @@ addConstraint(new VConstraintCSGRotationSpatialCSGRotationNoRotateYIn1D(*this)); addConstraint(new VConstraintCSGRotationSpatialCSGRotationNoRotateZIn2D(*this)); addConstraint(new VConstraintCSGRotationSpatialCSGRotationNoOriginIn3D(*this)); +addConstraint(new VConstraintCSGScaleSpatialCSGScaleScaleYRequiredIn2D(*this)); +addConstraint(new VConstraintCSGScaleSpatialCSGScaleScaleZRequiredIn3D(*this)); +addConstraint(new VConstraintCSGScaleSpatialCSGScaleNoScaleYIn1D(*this)); +addConstraint(new VConstraintCSGScaleSpatialCSGScaleNoScaleZIn2D(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222850-fail-01-01-10102.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222850-fail-01-01-10102.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222850-fail-01-01-10102.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2" spatial:scaleY="0.3" spatial:scaleZ="0.4"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + <spatial:csgPrimitive spatial:id="sphere2" spatial:primitiveType="sphere"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222850-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222850-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222850-pass-00-01.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2" spatial:scaleY="0.3" spatial:scaleZ="0.4"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-fail-01-01.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2" spatial:scaleZ="0.4"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-fail-01-02.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2"> + <spatial:csgPrimitive spatial:id="circle1" spatial:primitiveType="circle"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-pass-00-01.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2" spatial:scaleY="0.3" spatial:scaleZ="0.4"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222851-pass-00-02.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2" spatial:scaleY="0.3"> + <spatial:csgPrimitive spatial:id="circle1" spatial:primitiveType="circle"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222852-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222852-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222852-fail-01-01.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2" spatial:scaleY="0.3"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222852-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222852-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222852-pass-00-01.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2" spatial:scaleY="0.3" spatial:scaleZ="0.4"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222853-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222853-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222853-fail-01-01.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2" spatial:scaleY="0.3"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222853-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222853-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222853-pass-00-01.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-fail-01-01.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2" spatial:scaleZ="0.2"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-fail-01-02.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2" spatial:scaleY="0.3" spatial:scaleZ="0.4"> + <spatial:csgPrimitive spatial:id="circle1" spatial:primitiveType="circle"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-pass-00-01.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222854-pass-00-02.xml 2019-12-17 00:11:33 UTC (rev 26206) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgScale spatial:scaleX="0.2" spatial:scaleY="0.3"> + <spatial:csgPrimitive spatial:id="circle1" spatial:primitiveType="circle"/> + </spatial:csgScale> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-16 23:17:23
|
Revision: 26205 http://sourceforge.net/p/sbml/code/26205 Author: luciansmith Date: 2019-12-16 23:17:21 +0000 (Mon, 16 Dec 2019) Log Message: ----------- Add support and tests for spatial rule 22755. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-04.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-16 22:03:00 UTC (rev 26204) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-16 23:17:21 UTC (rev 26205) @@ -247,6 +247,7 @@ , SpatialCSGRotationRotateZRequiredIn3D = 1222752 , SpatialCSGRotationNoRotateYIn1D = 1222753 , SpatialCSGRotationNoRotateZIn2D = 1222754 +, SpatialCSGRotationNoOriginIn3D = 1222755 , SpatialCSGScaleAllowedCoreAttributes = 1222801 , SpatialCSGScaleAllowedCoreElements = 1222802 , SpatialCSGScaleAllowedAttributes = 1222803 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-16 22:03:00 UTC (rev 26204) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-16 23:17:21 UTC (rev 26205) @@ -2164,7 +2164,7 @@ LIBSBML_SEV_ERROR, "A <csgRotation> object may contain one and only one child " "CSGNode element. No other elements from the SBML Level 3 Spatial Processes " - "namespaces are permitted on a <csgRotation> object. ", + "namespaces are permitted on a <csgRotation> object.", { "L3V1 Spatial V1 Section" } }, @@ -2174,7 +2174,7 @@ "A <csgRotation> must have 'rotateY' in 2D or 3D geometries.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The attribute 'spatial:rotateY' on a <csgRotation> is required if the <geometry> of the model has a <coordinateComponent> child of type 'cartesianY'. ", + "The attribute 'spatial:rotateY' on a <csgRotation> is required if the <geometry> of the model has a <coordinateComponent> child of type 'cartesianY'.", { "L3V1 Spatial V1 Section" } }, @@ -2184,7 +2184,7 @@ "A <csgRotation> must have 'rotateZ' in 3D geometries.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The attribute 'spatial:rotateZ' on a <csgRotation> is required if the <geometry> of the model has a <coordinateComponent> child of type 'cartesianZ'. ", + "The attribute 'spatial:rotateZ' on a <csgRotation> is required if the <geometry> of the model has a <coordinateComponent> child of type 'cartesianZ'.", { "L3V1 Spatial V1 Section" } }, @@ -2194,7 +2194,7 @@ "A <csgRotation> must not have 'rotateY' in 1D geometries.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The attribute 'spatial:rotateY' on a <csgRotation> must not be defined if the <geometry> of the model has no <coordinateComponent> child of type 'cartesianY'. ", + "The attribute 'spatial:rotateY' on a <csgRotation> must not be defined if the <geometry> of the model has no <coordinateComponent> child of type 'cartesianY'.", { "L3V1 Spatial V1 Section" } }, @@ -2204,12 +2204,22 @@ "A <csgRotation> must not have 'rotateZ' in 2D geometries.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The attribute 'spatial:rotateZ' on a <csgRotation> must not be defined if the <geometry> of the model has no <coordinateComponent> child of type 'cartesianZ'. ", + "The attribute 'spatial:rotateZ' on a <csgRotation> must not be defined if the <geometry> of the model has no <coordinateComponent> child of type 'cartesianZ'.", { "L3V1 Spatial V1 Section" } }, - // 1222801 + // 1222755 + { SpatialCSGRotationNoOriginIn3D, + "A <csgRotation> must have a non-zero 'rotate' attribute in 3D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the <geometry> of the model has exactly three <coordinateComponent> children, at least one of the attributes 'spatial:rotateX', 'spatial:rotateY', or 'spatial:rotateZ' of a <csgRotation> must not be equal to zero.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222801 { SpatialCSGScaleAllowedCoreAttributes, "Core attributes allowed on <csgScale>.", LIBSBML_CAT_GENERAL_CONSISTENCY, Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-16 22:03:00 UTC (rev 26204) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-16 23:17:21 UTC (rev 26205) @@ -1757,6 +1757,30 @@ END_CONSTRAINT +// 1222655 +START_CONSTRAINT(SpatialCSGRotationNoOriginIn3D, CSGRotation, rotation) +{ + pre(rotation.isSetRotateX()); + pre(rotation.isSetRotateY()); + pre(rotation.isSetRotateZ()); + pre(rotation.getRotateX() == 0); + pre(rotation.getRotateY() == 0); + pre(rotation.getRotateZ() == 0); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + pre(geometry->getNumCoordinateComponents() == 3); + msg = "A <csgTranslation>"; + if (rotation.isSetId()) { + msg += " with the id '" + rotation.getId() + "'"; + } + msg += " has values of '0' for its 'rotateX', 'rotateY', and 'rotateZ' attributes, but the <geometry> has three <coordinateComponent> children."; + inv(false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-16 22:03:00 UTC (rev 26204) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-16 23:17:21 UTC (rev 26205) @@ -98,6 +98,7 @@ addConstraint(new VConstraintCSGRotationSpatialCSGRotationRotateZRequiredIn3D(*this)); addConstraint(new VConstraintCSGRotationSpatialCSGRotationNoRotateYIn1D(*this)); addConstraint(new VConstraintCSGRotationSpatialCSGRotationNoRotateZIn2D(*this)); +addConstraint(new VConstraintCSGRotationSpatialCSGRotationNoOriginIn3D(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-fail-01-01.xml 2019-12-16 23:17:21 UTC (rev 26205) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.0" spatial:rotateY="0.0" spatial:rotateZ="0.0" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-01.xml 2019-12-16 23:17:21 UTC (rev 26205) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.0" spatial:rotateY="0.0" spatial:rotateZ="0.4" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-02.xml 2019-12-16 23:17:21 UTC (rev 26205) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.0" spatial:rotateY="0.0" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="square1" spatial:primitiveType="square"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-03.xml 2019-12-16 23:17:21 UTC (rev 26205) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.1" spatial:rotateY="0.0" spatial:rotateZ="0.0" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-04.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222755-pass-00-04.xml 2019-12-16 23:17:21 UTC (rev 26205) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.0" spatial:rotateY="0.1" spatial:rotateZ="0.0" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-16 22:03:02
|
Revision: 26204 http://sourceforge.net/p/sbml/code/26204 Author: luciansmith Date: 2019-12-16 22:03:00 +0000 (Mon, 16 Dec 2019) Log Message: ----------- Add support and tests for spatial rules 22750-22754. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222750-fail-01-01-10102.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222750-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222752-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222752-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222753-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222753-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-pass-00-02.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-16 21:17:17 UTC (rev 26203) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-16 22:03:00 UTC (rev 26204) @@ -243,6 +243,10 @@ , SpatialCSGRotationRotateYMustBeDouble = 1222706 , SpatialCSGRotationRotateZMustBeDouble = 1222707 , SpatialCSGRotationAllowedElements = 1222750 +, SpatialCSGRotationRotateYRequiredIn2D = 1222751 +, SpatialCSGRotationRotateZRequiredIn3D = 1222752 +, SpatialCSGRotationNoRotateYIn1D = 1222753 +, SpatialCSGRotationNoRotateZIn2D = 1222754 , SpatialCSGScaleAllowedCoreAttributes = 1222801 , SpatialCSGScaleAllowedCoreElements = 1222802 , SpatialCSGScaleAllowedAttributes = 1222803 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-16 21:17:17 UTC (rev 26203) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-16 22:03:00 UTC (rev 26204) @@ -2169,6 +2169,46 @@ } }, + // 1222751 + { SpatialCSGRotationRotateYRequiredIn2D, + "A <csgRotation> must have 'rotateY' in 2D or 3D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:rotateY' on a <csgRotation> is required if the <geometry> of the model has a <coordinateComponent> child of type 'cartesianY'. ", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222752 + { SpatialCSGRotationRotateZRequiredIn3D, + "A <csgRotation> must have 'rotateZ' in 3D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:rotateZ' on a <csgRotation> is required if the <geometry> of the model has a <coordinateComponent> child of type 'cartesianZ'. ", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222753 + { SpatialCSGRotationNoRotateYIn1D, + "A <csgRotation> must not have 'rotateY' in 1D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:rotateY' on a <csgRotation> must not be defined if the <geometry> of the model has no <coordinateComponent> child of type 'cartesianY'. ", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222754 + { SpatialCSGRotationNoRotateZIn2D, + "A <csgRotation> must not have 'rotateZ' in 2D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:rotateZ' on a <csgRotation> must not be defined if the <geometry> of the model has no <coordinateComponent> child of type 'cartesianZ'. ", + { "L3V1 Spatial V1 Section" + } + }, + // 1222801 { SpatialCSGScaleAllowedCoreAttributes, "Core attributes allowed on <csgScale>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-16 21:17:17 UTC (rev 26203) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-16 22:03:00 UTC (rev 26204) @@ -1665,6 +1665,98 @@ END_CONSTRAINT +// 1222651 +START_CONSTRAINT(SpatialCSGRotationRotateYRequiredIn2D, CSGRotation, rotation) +{ + bool fail = false; + pre(!rotation.isSetRotateY()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + if (geometry->getCoordinateComponent(cc)->getType() == SPATIAL_COORDINATEKIND_CARTESIAN_Y) { + msg = "A <csgTranslation>"; + if (rotation.isSetId()) { + msg += " with the id '" + rotation.getId() + "'"; + } + msg += " has no 'rotateY' value, but the <geometry> has a <coordinateComponent> child of type 'cartesianY'."; + fail = true; + break; + } + } + inv(fail == false); +} +END_CONSTRAINT + + +// 1222652 +START_CONSTRAINT(SpatialCSGRotationRotateZRequiredIn3D, CSGRotation, rotation) +{ + bool fail = false; + pre(!rotation.isSetRotateZ()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + if (geometry->getCoordinateComponent(cc)->getType() == SPATIAL_COORDINATEKIND_CARTESIAN_Z) { + msg = "A <csgTranslation>"; + if (rotation.isSetId()) { + msg += " with the id '" + rotation.getId() + "'"; + } + msg += " has no 'rotateZ' value, but the <geometry> has a <coordinateComponent> child of type 'cartesianY'."; + fail = true; + break; + } + } + inv(fail == false); +} +END_CONSTRAINT + + +// 1222653 +START_CONSTRAINT(SpatialCSGRotationNoRotateYIn1D, CSGRotation, rotation) +{ + pre(rotation.isSetRotateY()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + pre(geometry->getCoordinateComponent(cc)->getType() != SPATIAL_COORDINATEKIND_CARTESIAN_Y); + } + msg = "A <csgTranslation>"; + if (rotation.isSetId()) { + msg += " with the id '" + rotation.getId() + "'"; + } + msg += " has a 'rotateY' value, but the <geometry> has no <coordinateComponent> child of type 'cartesianY'."; + inv(false); +} +END_CONSTRAINT + + +// 1222654 +START_CONSTRAINT(SpatialCSGRotationNoRotateZIn2D, CSGRotation, rotation) +{ + pre(rotation.isSetRotateZ()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + pre(geometry->getCoordinateComponent(cc)->getType() != SPATIAL_COORDINATEKIND_CARTESIAN_Z); + } + msg = "A <csgTranslation>"; + if (rotation.isSetId()) { + msg += " with the id '" + rotation.getId() + "'"; + } + msg += " has a 'rotateZ' value, but the <geometry> has no <coordinateComponent> child of type 'cartesianZ'."; + inv(false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-16 21:17:17 UTC (rev 26203) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-16 22:03:00 UTC (rev 26204) @@ -94,6 +94,10 @@ addConstraint(new VConstraintCSGTranslationSpatialCSGTranslationTranslateZRequiredIn3D(*this)); addConstraint(new VConstraintCSGTranslationSpatialCSGTranslationNoTranslateYIn1D(*this)); addConstraint(new VConstraintCSGTranslationSpatialCSGTranslationNoTranslateZIn2D(*this)); +addConstraint(new VConstraintCSGRotationSpatialCSGRotationRotateYRequiredIn2D(*this)); +addConstraint(new VConstraintCSGRotationSpatialCSGRotationRotateZRequiredIn3D(*this)); +addConstraint(new VConstraintCSGRotationSpatialCSGRotationNoRotateYIn1D(*this)); +addConstraint(new VConstraintCSGRotationSpatialCSGRotationNoRotateZIn2D(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222750-fail-01-01-10102.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222750-fail-01-01-10102.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222750-fail-01-01-10102.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateY="0.3" spatial:rotateZ="0.4" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + <spatial:csgPrimitive spatial:id="cube2" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222750-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222750-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222750-pass-00-01.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateY="0.3" spatial:rotateZ="0.4" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-fail-01-01.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateZ="0.4" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-fail-01-02.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-pass-00-01.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateY="0.3" spatial:rotateZ="0.4" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222751-pass-00-02.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateY="0.3" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222752-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222752-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222752-fail-01-01.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateY="0.3" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222752-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222752-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222752-pass-00-01.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateY="0.3" spatial:rotateZ="0.4" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222753-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222753-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222753-fail-01-01.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateY="0.3" spatial:rotateAngleInRadians="2.7"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222753-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222753-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222753-pass-00-01.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateAngleInRadians="2.7"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-fail-01-01.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateZ="0.3" spatial:rotateAngleInRadians="2.7"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-fail-01-02.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateY="0.3" spatial:rotateZ="0.4" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-pass-00-01.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateAngleInRadians="2.7"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222754-pass-00-02.xml 2019-12-16 22:03:00 UTC (rev 26204) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgRotation spatial:rotateX="0.2" spatial:rotateY="0.3" spatial:rotateAngleInRadians="2.7"> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgRotation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-12-16 21:17:19
|
Revision: 26203 http://sourceforge.net/p/sbml/code/26203 Author: luciansmith Date: 2019-12-16 21:17:17 +0000 (Mon, 16 Dec 2019) Log Message: ----------- Add support and tests for spatial rules 22650-22654. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGTransformation.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222650-fail-01-01-10102.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222650-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222652-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222652-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222653-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222653-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-pass-00-02.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGTransformation.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGTransformation.cpp 2019-12-12 15:37:20 UTC (rev 26202) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGTransformation.cpp 2019-12-16 21:17:17 UTC (rev 26203) @@ -1095,89 +1095,91 @@ SPATIAL_CREATE_NS(spatialns, getSBMLNamespaces()); - if (name == "csgPrimitive") + if (isSetCSGNode()) { - if (isSetCSGNode()) + if (getTypeCode() == SBML_SPATIAL_CSGTRANSLATION) { getErrorLog()->logPackageError("spatial", - SpatialCSGPrimitiveAllowedCoreElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); + SpatialCSGTranslationAllowedElements, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); } + else if (getTypeCode() == SBML_SPATIAL_CSGROTATION) + { + getErrorLog()->logPackageError("spatial", + SpatialCSGRotationAllowedElements, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); + } + else if (getTypeCode() == SBML_SPATIAL_CSGSCALE) + { + getErrorLog()->logPackageError("spatial", + SpatialCSGScaleAllowedElements, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); + } + else if (getTypeCode() == SBML_SPATIAL_CSGHOMOGENEOUSTRANSFORMATION) + { + getErrorLog()->logPackageError("spatial", + SpatialCSGHomogeneousTransformationAllowedElements, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); + } + delete obj; + return NULL; + } - delete mCSGNode; - mCSGNode = NULL; + if (name == "csgPrimitive") + { mCSGNode = new CSGPrimitive(spatialns); obj = mCSGNode; } else if (name == "csgTranslation") { - if (isSetCSGNode()) - { - getErrorLog()->logPackageError("spatial", - SpatialCSGTranslationAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); - } - - delete mCSGNode; - mCSGNode = NULL; mCSGNode = new CSGTranslation(spatialns); obj = mCSGNode; } else if (name == "csgRotation") { - if (isSetCSGNode()) - { - getErrorLog()->logPackageError("spatial", - SpatialCSGRotationAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); - } - - delete mCSGNode; - mCSGNode = NULL; mCSGNode = new CSGRotation(spatialns); obj = mCSGNode; } else if (name == "csgScale") { - if (isSetCSGNode()) - { - getErrorLog()->logPackageError("spatial", - SpatialCSGScaleAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); - } - - delete mCSGNode; - mCSGNode = NULL; mCSGNode = new CSGScale(spatialns); obj = mCSGNode; } else if (name == "csgHomogeneousTransformation") { - if (isSetCSGNode()) - { - getErrorLog()->logPackageError("spatial", - SpatialCSGHomogeneousTransformationAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); - } - - delete mCSGNode; - mCSGNode = NULL; mCSGNode = new CSGHomogeneousTransformation(spatialns); obj = mCSGNode; } else if (name == "csgSetOperator") { - if (isSetCSGNode()) + mCSGNode = new CSGSetOperator(spatialns); + obj = mCSGNode; + } + else { + if (getTypeCode() == SBML_SPATIAL_CSGTRANSLATION) { getErrorLog()->logPackageError("spatial", - SpatialCSGSetOperatorAllowedElements, getPackageVersion(), getLevel(), - getVersion(), "", getLine(), getColumn()); + SpatialCSGTranslationAllowedElements, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); } - - delete mCSGNode; - mCSGNode = NULL; - mCSGNode = new CSGSetOperator(spatialns); - obj = mCSGNode; + else if (getTypeCode() == SBML_SPATIAL_CSGROTATION) + { + getErrorLog()->logPackageError("spatial", + SpatialCSGRotationAllowedElements, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); + } + else if (getTypeCode() == SBML_SPATIAL_CSGSCALE) + { + getErrorLog()->logPackageError("spatial", + SpatialCSGScaleAllowedElements, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); + } + else if (getTypeCode() == SBML_SPATIAL_CSGHOMOGENEOUSTRANSFORMATION) + { + getErrorLog()->logPackageError("spatial", + SpatialCSGHomogeneousTransformationAllowedElements, getPackageVersion(), getLevel(), + getVersion(), "", getLine(), getColumn()); + } } delete spatialns; Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-12 15:37:20 UTC (rev 26202) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-12-16 21:17:17 UTC (rev 26203) @@ -231,6 +231,10 @@ , SpatialCSGTranslationTranslateYMustBeDouble = 1222605 , SpatialCSGTranslationTranslateZMustBeDouble = 1222606 , SpatialCSGTranslationAllowedElements = 1222650 +, SpatialCSGTranslationTranslateYRequiredIn2D = 1222651 +, SpatialCSGTranslationTranslateZRequiredIn3D = 1222652 +, SpatialCSGTranslationNoTranslateYIn1D = 1222653 +, SpatialCSGTranslationNoTranslateZIn2D = 1222654 , SpatialCSGRotationAllowedCoreAttributes = 1222701 , SpatialCSGRotationAllowedCoreElements = 1222702 , SpatialCSGRotationAllowedAttributes = 1222703 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-12 15:37:20 UTC (rev 26202) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-12-16 21:17:17 UTC (rev 26203) @@ -2035,6 +2035,46 @@ } }, + // 1222651 + { SpatialCSGTranslationTranslateYRequiredIn2D, + "A <csgTranslation> must have 'translateY' in 2D or 3D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:translateY' on a <csgTranslation> is required if the <geometry> of the model has a <coordinateComponent> child of type 'cartesianY'. ", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222652 + { SpatialCSGTranslationTranslateZRequiredIn3D, + "A <csgTranslation> must have 'translateZ' in 3D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:translateZ' on a <csgTranslation> is required if the <geometry> of the model has a <coordinateComponent> child of type 'cartesianZ'. ", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222653 + { SpatialCSGTranslationNoTranslateYIn1D, + "A <csgTranslation> must not have 'translateY' in 1D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:translateY' on a <csgTranslation> must not be defined if the <geometry> of the model has no <coordinateComponent> child of type 'cartesianY'. ", + { "L3V1 Spatial V1 Section" + } + }, + + // 1222654 + { SpatialCSGTranslationNoTranslateZIn2D, + "A <csgTranslation> must not have 'translateZ' in 1D or 2D geometries.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'spatial:translateZ' on a <csgTranslation> must not be defined if the <geometry> of the model has no <coordinateComponent> child of type 'cartesianZ'. ", + { "L3V1 Spatial V1 Section" + } + }, + // 1222701 { SpatialCSGRotationAllowedCoreAttributes, "Core attributes allowed on <csgRotation>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-12 15:37:20 UTC (rev 26202) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-12-16 21:17:17 UTC (rev 26203) @@ -351,7 +351,10 @@ { pre(domaintype.isSetSpatialDimensions()); - const Geometry* geometry = static_cast<const Geometry*>(domaintype.getParentSBMLObject()->getParentSBMLObject()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); pre(geometry->getNumCoordinateComponents()==3); int dim = domaintype.getSpatialDimensions(); @@ -380,7 +383,10 @@ { pre(domaintype.isSetSpatialDimensions()); - const Geometry* geometry = static_cast<const Geometry*>(domaintype.getParentSBMLObject()->getParentSBMLObject()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); pre(geometry->getNumCoordinateComponents()==2); int dim = domaintype.getSpatialDimensions(); @@ -409,7 +415,10 @@ { pre(domaintype.isSetSpatialDimensions()); - const Geometry* geometry = static_cast<const Geometry*>(domaintype.getParentSBMLObject()->getParentSBMLObject()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); pre(geometry->getNumCoordinateComponents()==1); int dim = domaintype.getSpatialDimensions(); @@ -436,7 +445,10 @@ // 1221650 START_CONSTRAINT(SpatialSampledFieldOneSampleIn1DGeometry, SampledField, sfield) { - const Geometry* geometry = static_cast<const Geometry*>(sfield.getParentSBMLObject()->getParentSBMLObject()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); pre(geometry->getNumCoordinateComponents()==1); bool fail = false; @@ -474,7 +486,10 @@ // 1221651 START_CONSTRAINT(SpatialSampledFieldTwoSamplesIn2DGeometry, SampledField, sfield) { - const Geometry* geometry = static_cast<const Geometry*>(sfield.getParentSBMLObject()->getParentSBMLObject()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); pre(geometry->getNumCoordinateComponents()==2); bool fail = false; @@ -513,7 +528,10 @@ // 1221652 START_CONSTRAINT(SpatialSampledFieldThreeSamplesIn3DGeometry, SampledField, sfield) { - const Geometry* geometry = static_cast<const Geometry*>(sfield.getParentSBMLObject()->getParentSBMLObject()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); pre(geometry->getNumCoordinateComponents()==3); bool fail = false; @@ -1555,6 +1573,98 @@ END_CONSTRAINT +// 1222651 +START_CONSTRAINT(SpatialCSGTranslationTranslateYRequiredIn2D, CSGTranslation, translation) +{ + bool fail = false; + pre(!translation.isSetTranslateY()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + if (geometry->getCoordinateComponent(cc)->getType() == SPATIAL_COORDINATEKIND_CARTESIAN_Y) { + msg = "A <csgTranslation>"; + if (translation.isSetId()) { + msg += " with the id '" + translation.getId() + "'"; + } + msg += " has no 'translationY' value, but the <geometry> has a <coordinateComponent> child of type 'cartesianY'."; + fail = true; + break; + } + } + inv(fail == false); +} +END_CONSTRAINT + + +// 1222652 +START_CONSTRAINT(SpatialCSGTranslationTranslateZRequiredIn3D, CSGTranslation, translation) +{ + bool fail = false; + pre(!translation.isSetTranslateZ()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + if (geometry->getCoordinateComponent(cc)->getType() == SPATIAL_COORDINATEKIND_CARTESIAN_Z) { + msg = "A <csgTranslation>"; + if (translation.isSetId()) { + msg += " with the id '" + translation.getId() + "'"; + } + msg += " has no 'translationZ' value, but the <geometry> has a <coordinateComponent> child of type 'cartesianZ'."; + fail = true; + break; + } + } + inv(fail == false); +} +END_CONSTRAINT + + +// 1222653 +START_CONSTRAINT(SpatialCSGTranslationNoTranslateYIn1D, CSGTranslation, translation) +{ + pre(translation.isSetTranslateY()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + pre(geometry->getCoordinateComponent(cc)->getType() != SPATIAL_COORDINATEKIND_CARTESIAN_Y); + } + msg = "A <csgTranslation>"; + if (translation.isSetId()) { + msg += " with the id '" + translation.getId() + "'"; + } + msg += " has a 'translationY' value, but the <geometry> has no <coordinateComponent> child of type 'cartesianY'."; + inv(false); +} +END_CONSTRAINT + + +// 1222654 +START_CONSTRAINT(SpatialCSGTranslationNoTranslateZIn2D, CSGTranslation, translation) +{ + pre(translation.isSetTranslateZ()); + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + for (unsigned long cc = 0; cc < geometry->getNumCoordinateComponents(); cc++) { + pre(geometry->getCoordinateComponent(cc)->getType() != SPATIAL_COORDINATEKIND_CARTESIAN_Z); + } + msg = "A <csgTranslation>"; + if (translation.isSetId()) { + msg += " with the id '" + translation.getId() + "'"; + } + msg += " has a 'translationZ' value, but the <geometry> has no <coordinateComponent> child of type 'cartesianZ'."; + inv(false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-12 15:37:20 UTC (rev 26202) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-12-16 21:17:17 UTC (rev 26203) @@ -90,6 +90,10 @@ addConstraint(new VConstraintCSGSetOperatorSpatialCSGSetOperatorDifferenceMustHaveTwoChildren(*this)); addConstraint(new VConstraintCSGSetOperatorSpatialCSGSetOperatorComplementsMustReferenceChildren(*this)); addConstraint(new VConstraintCSGSetOperatorSpatialCSGSetOperatorShouldHaveTwoPlusChildren(*this)); +addConstraint(new VConstraintCSGTranslationSpatialCSGTranslationTranslateYRequiredIn2D(*this)); +addConstraint(new VConstraintCSGTranslationSpatialCSGTranslationTranslateZRequiredIn3D(*this)); +addConstraint(new VConstraintCSGTranslationSpatialCSGTranslationNoTranslateYIn1D(*this)); +addConstraint(new VConstraintCSGTranslationSpatialCSGTranslationNoTranslateZIn2D(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222650-fail-01-01-10102.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222650-fail-01-01-10102.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222650-fail-01-01-10102.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2" spatial:translateY="0.3" spatial:translateZ="0.4"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + <spatial:csgPrimitive spatial:id="cube1" spatial:primitiveType="cube"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222650-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222650-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222650-pass-00-01.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2" spatial:translateY="0.3" spatial:translateZ="0.4"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-fail-01-01.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2" spatial:translateZ="0.4"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-fail-01-02.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2"> + <spatial:csgPrimitive spatial:id="circle1" spatial:primitiveType="circle"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-pass-00-01.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2" spatial:translateY="0.3" spatial:translateZ="0.4"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222651-pass-00-02.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2" spatial:translateY="0.3"> + <spatial:csgPrimitive spatial:id="circle1" spatial:primitiveType="circle"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222652-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222652-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222652-fail-01-01.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2" spatial:translateY="0.3"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222652-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222652-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222652-pass-00-01.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_5" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_6" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="3"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2" spatial:translateY="0.3" spatial:translateZ="0.4"> + <spatial:csgPrimitive spatial:id="sphere1" spatial:primitiveType="sphere"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222653-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222653-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222653-fail-01-01.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2" spatial:translateY="0.3"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222653-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222653-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222653-pass-00-01.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-fail-01-01.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2" spatial:translateZ="0.3"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-fail-01-02.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_3" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_4" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="2"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2" spatial:translateY="0.3" spatial:translateZ="0.4"> + <spatial:csgPrimitive spatial:id="circle1" spatial:primitiveType="circle"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-pass-00-01.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:spatial="http://www.sbml.org/sbml/level3/version1/spatial/version1"> + <model> + <spatial:geometry spatial:coordinateSystem="cartesian" spatial:id="geometry_1"> + <spatial:listOfCoordinateComponents> + <spatial:coordinateComponent spatial:id="coordinateComponent_1" spatial:type="cartesianX" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="0"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + <spatial:listOfDomainTypes> + <spatial:domainType spatial:id="domainType_1" spatial:spatialDimensions="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + <spatial:listOfGeometryDefinitions> + <spatial:csGeometry spatial:id="csGeometryDefinition_1" spatial:isActive="true"> + <spatial:listOfCSGObjects> + <spatial:csgObject spatial:domainType="domainType_1" spatial:id="csgObject_1" spatial:ordinal="0"> + <spatial:csgTranslation spatial:translateX="0.2"> + <spatial:csgSetOperator spatial:id="nothing" spatial:operationType="union"/> + </spatial:csgTranslation> + </spatial:csgObject> + </spatial:listOfCSGObjects> + </spatial:csGeometry> + </spatial:listOfGeometryDefinitions> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1222654-pass-00-02.xml 2019-12-16 21:17:17 UTC (rev 26203) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml level="3" spatial:required="true" version="1" xmlns="http://www.sbml... [truncated message content] |
From: <fbe...@us...> - 2019-12-12 15:37:21
|
Revision: 26202 http://sourceforge.net/p/sbml/code/26202 Author: fbergmann Date: 2019-12-12 15:37:20 +0000 (Thu, 12 Dec 2019) Log Message: ----------- Merged revision(s) 26200-26201 from trunk/libsbml: Modified Paths: -------------- branches/libsbml-experimental/src/sbml/math/FormulaParser.cpp Modified: branches/libsbml-experimental/src/sbml/math/FormulaParser.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/math/FormulaParser.cpp 2019-12-12 15:28:08 UTC (rev 26201) +++ branches/libsbml-experimental/src/sbml/math/FormulaParser.cpp 2019-12-12 15:37:20 UTC (rev 26202) @@ -398,7 +398,7 @@ ASTNode_t * SBML_parseFormula (const char *formula) { - long rule, state, action; + long long rule, state, action; ASTNode_t *node = NULL; @@ -417,7 +417,7 @@ while (1) { - state = (long) Stack_peek(stack); + state = (long long) Stack_peek(stack); action = FormulaParser_getAction(state, token); if (action == ACCEPT_STATE) @@ -460,7 +460,7 @@ { rule = -action; node = FormulaParser_reduceStackByRule(stack, rule); - state = (long) Stack_peek(stack); + state = (long long) Stack_peek(stack); Stack_push( stack, node ); Stack_push( stack, (void *) FormulaParser_getGoto(state, rule) ); |
From: <fbe...@us...> - 2019-12-12 15:28:10
|
Revision: 26201 http://sourceforge.net/p/sbml/code/26201 Author: fbergmann Date: 2019-12-12 15:28:08 +0000 (Thu, 12 Dec 2019) Log Message: ----------- - fix compilation on mingw (all other platforms treat long as 'long long' only mingw decided to use 'long int' and then fail) Modified Paths: -------------- trunk/libsbml/src/sbml/math/FormulaParser.cpp Modified: trunk/libsbml/src/sbml/math/FormulaParser.cpp =================================================================== --- trunk/libsbml/src/sbml/math/FormulaParser.cpp 2019-12-06 20:59:55 UTC (rev 26200) +++ trunk/libsbml/src/sbml/math/FormulaParser.cpp 2019-12-12 15:28:08 UTC (rev 26201) @@ -398,7 +398,7 @@ ASTNode_t * SBML_parseFormula (const char *formula) { - long rule, state, action; + long long rule, state, action; ASTNode_t *node = NULL; @@ -417,7 +417,7 @@ while (1) { - state = (long) Stack_peek(stack); + state = (long long) Stack_peek(stack); action = FormulaParser_getAction(state, token); if (action == ACCEPT_STATE) @@ -460,7 +460,7 @@ { rule = -action; node = FormulaParser_reduceStackByRule(stack, rule); - state = (long) Stack_peek(stack); + state = (long long) Stack_peek(stack); Stack_push( stack, node ); Stack_push( stack, (void *) FormulaParser_getGoto(state, rule) ); |
From: <luc...@us...> - 2019-12-06 20:59:56
|
Revision: 26200 http://sourceforge.net/p/sbml/code/26200 Author: luciansmith Date: 2019-12-06 20:59:55 +0000 (Fri, 06 Dec 2019) Log Message: ----------- Python output as vectors, sets, dictionaries. Modified Paths: -------------- branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.cpp branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.h branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3PythonFormulaFormatter.cpp branches/libsbml-experimental-lucian/src/sbml/packages/extendedmath/extension/extendedmathASTPlugin.cpp Modified: branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.cpp =================================================================== --- branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.cpp 2019-12-04 23:43:52 UTC (rev 26199) +++ branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.cpp 2019-12-06 20:59:55 UTC (rev 26200) @@ -807,6 +807,14 @@ { L3FormulaFormatter_visitPythonLog(parent, node, sb, settings); } + else if (settings != NULL && settings->getPythonFormat() != PythonFormatSBML && type == AST_LINEAR_ALGEBRA_VECTOR) + { + L3FormulaFormatter_visitPythonVector(parent, node, sb, settings); + } + else if (settings != NULL && settings->getPythonFormat() != PythonFormatSBML && type == AST_SET_THEORY_SET) + { + L3FormulaFormatter_visitPythonSet(parent, node, sb, settings); + } else if (settings != NULL && settings->getPythonFormat() != PythonFormatSBML && ASTNode_getNumChildren(node) < 2 && (type == AST_PLUS || type == AST_TIMES || type == AST_LOGICAL_AND || type == AST_LOGICAL_OR)) { L3FormulaFormatter_visitPythonNary(parent, node, sb, settings); @@ -920,7 +928,50 @@ } +void L3FormulaFormatter_visitPythonVector(const ASTNode_t * parent, const ASTNode_t * node, StringBuffer_t * sb, const L3ParserSettings_t * settings) +{ + StringBuffer_appendChar(sb, '['); + for (unsigned int c = 0; c < node->getNumChildren(); c++) { + if (c > 0) { + StringBuffer_append(sb, ", "); + } + L3FormulaFormatter_visit(node, node->getChild(c), sb, settings); + } + StringBuffer_appendChar(sb, ']'); +} + +void L3FormulaFormatter_visitPythonSet(const ASTNode_t * parent, const ASTNode_t * node, StringBuffer_t * sb, const L3ParserSettings_t * settings) +{ + StringBuffer_appendChar(sb, '{'); + std::string nodeclass = node->getClass(); + bool isDict = true; + if (nodeclass != "dictionary") { + for (unsigned int c = 0; c < node->getNumChildren(); c++) { + ASTNode* child = node->getChild(c); + if (child->getType() != AST_RELATIONAL_EQ || child->getNumChildren() != 2) { + isDict = false; + } + } + } + for (unsigned int c = 0; c < node->getNumChildren(); c++) { + if (c > 0) { + StringBuffer_append(sb, ", "); + } + ASTNode* child = node->getChild(c); + if (child->getType() == AST_RELATIONAL_EQ && child->getNumChildren() == 2) { + L3FormulaFormatter_visit(child, child->getChild(0), sb, settings); + StringBuffer_append(sb, " : "); + L3FormulaFormatter_visit(child, child->getChild(1), sb, settings); + } + else { + L3FormulaFormatter_visit(node, node->getChild(c), sb, settings); + } + } + StringBuffer_appendChar(sb, '}'); +} + + void L3FormulaFormatter_visitPythonNary(const ASTNode_t * parent, const ASTNode_t * node, StringBuffer_t * sb, const L3ParserSettings_t * settings) { int nchildren = ASTNode_getNumChildren(node); Modified: branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.h =================================================================== --- branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.h 2019-12-04 23:43:52 UTC (rev 26199) +++ branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.h 2019-12-06 20:59:55 UTC (rev 26200) @@ -280,6 +280,31 @@ /** +* Visits the given ASTNode_t as a vector, and formats it as "[childrenlist]" +*/ +void +L3FormulaFormatter_visitPythonVector( const ASTNode_t *parent, + const ASTNode_t *node, + StringBuffer_t *sb, + const L3ParserSettings_t *settings ); + + +/** +* Visits the given ASTNode_t and formats it as a set or dictionary. It +* determines whether the node is a dictionary in one of two ways: one, +* if its class is 'dictionary', or two, if all of its children are +* AST_RELATIONAL_EQ with exactly two children each. If either is true, +* any AST_RELATIONAL_EQ with exactly two children is written out as +* "child1 : child2" +*/ +void +L3FormulaFormatter_visitPythonSet( const ASTNode_t *parent, + const ASTNode_t *node, + StringBuffer_t *sb, + const L3ParserSettings_t *settings ); + + +/** * Visits the given ASTNode_t for 'plus' or 'times' nodes with * zero or one child. Python has no functions that work like this, * so they're translated to their definitions. Modified: branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3PythonFormulaFormatter.cpp =================================================================== --- branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3PythonFormulaFormatter.cpp 2019-12-04 23:43:52 UTC (rev 26199) +++ branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3PythonFormulaFormatter.cpp 2019-12-06 20:59:55 UTC (rev 26200) @@ -115,6 +115,9 @@ "x && !y", "x > !y", "x > -y", + "vector(x, y, 3)", + "set(5, y, x+y)", + "set(t==3, g==5, h==6^2)", "" }; @@ -179,6 +182,9 @@ "x and not y", "x > (not y)", "x > -y", + "[x, y, 3]", + "{5, y, x + y}", + "{t : 3, g : 5, h : 6**2}", "" }; @@ -188,8 +194,9 @@ L3ParserSettings l3ps; l3ps.setPythonFormat(PythonFormatWithPackagesInNames); + l3ps.setParsePackageMath(EM_REMAINING, true); - for (i = 0; i < 59; i++) + for (i = 0; i < 62; i++) { n = SBML_parseL3Formula( formulae[i] ); s = SBML_formulaToL3StringWithSettings(n, &l3ps); Modified: branches/libsbml-experimental-lucian/src/sbml/packages/extendedmath/extension/extendedmathASTPlugin.cpp =================================================================== --- branches/libsbml-experimental-lucian/src/sbml/packages/extendedmath/extension/extendedmathASTPlugin.cpp 2019-12-04 23:43:52 UTC (rev 26199) +++ branches/libsbml-experimental-lucian/src/sbml/packages/extendedmath/extension/extendedmathASTPlugin.cpp 2019-12-06 20:59:55 UTC (rev 26200) @@ -68,7 +68,7 @@ node.type = AST_LINEAR_ALGEBRA_VECTOR; node.name = "vector"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_ANY; node.numAllowedChildren = zero; @@ -86,7 +86,7 @@ node.type = AST_LINEAR_ALGEBRA_MATRIX; node.name = "matrix"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_ANY; node.numAllowedChildren = zero; @@ -95,7 +95,7 @@ node.type = AST_LINEAR_ALGEBRA_MATRIXROW; node.name = "matrixrow"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_ANY; node.numAllowedChildren = zero; @@ -221,7 +221,7 @@ node.type = AST_STATISTICS_MOMENTABOUT; node.name = "momentabout"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; node.numAllowedChildren = one; @@ -374,7 +374,7 @@ node.type = AST_CALCULUS_LOWLIMIT; node.name = "lowlimit"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; node.numAllowedChildren = one; @@ -383,7 +383,7 @@ node.type = AST_CALCULUS_UPLIMIT; node.name = "uplimit"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; node.numAllowedChildren = one; @@ -428,7 +428,7 @@ node.type = AST_SET_THEORY_SET; node.name = "set"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_ANY; node.numAllowedChildren = zero; @@ -437,7 +437,7 @@ node.type = AST_SET_THEORY_LIST; node.name = "list"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_ANY; node.numAllowedChildren = zero; @@ -626,7 +626,7 @@ node.type = AST_BASIC_CONTENT_INTERVAL; node.name = "interval"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; node.numAllowedChildren = two; @@ -644,7 +644,7 @@ node.type = AST_BASIC_CONTENT_CONDITION; node.name = "condition"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; node.numAllowedChildren = one; @@ -653,7 +653,7 @@ node.type = AST_BASIC_CONTENT_DECLARE; node.name = "declare"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_ANY; node.numAllowedChildren = zero; @@ -707,7 +707,7 @@ node.type = AST_BASIC_CONTENT_DOMAINOFAPPLICATION; node.name = "domainofapplication"; node.csymbolURL = ""; - node.isFunction = false; + node.isFunction = true; //However, this is not an 'apply' function. node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; node.numAllowedChildren = one; |
From: <luc...@us...> - 2019-12-04 23:43:54
|
Revision: 26199 http://sourceforge.net/p/sbml/code/26199 Author: luciansmith Date: 2019-12-04 23:43:52 +0000 (Wed, 04 Dec 2019) Log Message: ----------- Add ability to export to Python to the L3FormulaFormatter. Modified Paths: -------------- branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.cpp branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.h branches/libsbml-experimental-lucian/src/sbml/math/L3ParserSettings.cpp branches/libsbml-experimental-lucian/src/sbml/math/L3ParserSettings.h branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3FormulaFormatter.c branches/libsbml-experimental-lucian/src/sbml/math/test/TestRunner.c Added Paths: ----------- branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3PythonFormulaFormatter.cpp Modified: branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.cpp =================================================================== --- branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.cpp 2019-12-04 21:59:50 UTC (rev 26198) +++ branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.cpp 2019-12-04 23:43:52 UTC (rev 26199) @@ -343,7 +343,7 @@ int L3FormulaFormatter_isGrouped (const ASTNode_t *parent, const ASTNode_t *child, const L3ParserSettings_t *settings) { - int pp, cp; + double pp, cp; int pt, ct; int group = 0; const ASTNode_t* rchild = NULL; @@ -364,7 +364,7 @@ return 1; } } - if (ASTNode_isLogical(parent) || ASTNode_isRelational(parent) || isTranslatedModulo(parent)) { + if ((settings == NULL || settings->getPythonFormat() == PythonFormatSBML) && (ASTNode_isLogical(parent) || ASTNode_isRelational(parent) || isTranslatedModulo(parent))) { if (!L3FormulaFormatter_hasUnambiguousGrammar(NULL, child, settings)) { //Always group potentially-ambiguous children of logical, relational, and modulo operators, since their precedence is unfamiliar to most users. group = 1; @@ -372,11 +372,24 @@ if (child == rchild) { if (isUnaryMinus(child) || isUnaryNot(child)) { //Don't need to group right-side unary minus nor unary not: they are not actually ambiguous - group = 0; + group = 0; } } } } + else if ((settings && settings->getPythonFormat() != PythonFormatSBML) && (isTranslatedModulo(parent))) { + if (!L3FormulaFormatter_hasUnambiguousGrammar(NULL, child, settings)) { + //Always group potentially-ambiguous children of logical, relational, and modulo operators, since their precedence is unfamiliar to most users. + group = 1; + rchild = L3FormulaFormatter_getRightChild(parent); + if (child == rchild) { + if (isUnaryMinus(child)) { + //Don't need to group right-side unary minus nor unary not: they are not actually ambiguous + group = 0; + } + } + } + } else if (!L3FormulaFormatter_hasUnambiguousGrammar(parent, child, settings)) { if ((ASTNode_isLogical(child) || ASTNode_isRelational(child) || isTranslatedModulo(child)) && @@ -388,6 +401,15 @@ group = 1; pp = getL3Precedence(parent); cp = getL3Precedence(child); + if (settings && settings->getPythonFormat() != PythonFormatSBML) { + //In Python, 'not' has higher precedence than and and or, but lower than <, >, etc. + if (ASTNode_getType(parent) == AST_LOGICAL_NOT) { + pp = 2.5; + } + if (ASTNode_getType(child) == AST_LOGICAL_NOT) { + cp = 2.5; + } + } if (pp < cp) { @@ -444,11 +466,11 @@ } else if (ASTNode_isOperator(node) || ASTNode_getType(node) == AST_FUNCTION_POWER) { - L3FormulaFormatter_formatOperator(sb, node); + L3FormulaFormatter_formatOperator(sb, node, settings); } else if (ASTNode_isLogical(node) || ASTNode_isRelational(node)) { - L3FormulaFormatter_formatLogicalRelational(sb, node); + L3FormulaFormatter_formatLogicalRelational(sb, node, settings); } else if (ASTNode_isRational(node)) { @@ -485,6 +507,48 @@ L3FormulaFormatter_formatFunction (StringBuffer_t *sb, const ASTNode_t *node, const L3ParserSettings_t *settings) { ASTNodeType_t type = ASTNode_getType(node); + if (settings != NULL && settings->getPythonFormat() == PythonFormatWithPackagesInNames) { + switch (type) { + case AST_FUNCTION_ARCCOS: + case AST_FUNCTION_ARCCOSH: + case AST_FUNCTION_ARCCOT: + case AST_FUNCTION_ARCSIN: + case AST_FUNCTION_ARCSINH: + case AST_FUNCTION_ARCTAN: + case AST_FUNCTION_ARCTANH: + case AST_FUNCTION_CEILING: + case AST_FUNCTION_COS: + case AST_FUNCTION_COSH: + case AST_FUNCTION_EXP: + case AST_FUNCTION_FACTORIAL: + case AST_FUNCTION_FLOOR: + case AST_FUNCTION_LN: + case AST_FUNCTION_LOG: + case AST_FUNCTION_SIN: + case AST_FUNCTION_SINH: + case AST_FUNCTION_TAN: + case AST_FUNCTION_TANH: + StringBuffer_append(sb, "math."); + break; + case AST_FUNCTION_ARCCOTH: + case AST_FUNCTION_ARCCSC: + case AST_FUNCTION_ARCCSCH: + case AST_FUNCTION_ARCSEC: + case AST_FUNCTION_ARCSECH: + case AST_FUNCTION_COT: + case AST_FUNCTION_COTH: + case AST_FUNCTION_CSC: + case AST_FUNCTION_CSCH: + case AST_FUNCTION_SEC: + case AST_FUNCTION_SECH: + StringBuffer_append(sb, "mpmath."); + break; + case AST_DISTRIB_FUNCTION_BERNOULLI: + break; + case AST_FUNCTION_DELAY: + break; + } + } switch (type) { case AST_PLUS: @@ -503,7 +567,12 @@ StringBuffer_append(sb, "pow"); break; case AST_FUNCTION_LN: - StringBuffer_append(sb, "ln"); + if (settings->getPythonFormat() == PythonFormatSBML) { + StringBuffer_append(sb, "ln"); + } + else { + StringBuffer_append(sb, "log"); + } break; case AST_FUNCTION_DELAY: StringBuffer_append(sb, "delay"); @@ -538,13 +607,18 @@ * to the given StringBuffer. */ void -L3FormulaFormatter_formatOperator (StringBuffer_t *sb, const ASTNode_t *node) +L3FormulaFormatter_formatOperator (StringBuffer_t *sb, const ASTNode_t *node, const L3ParserSettings_t *settings) { ASTNodeType_t type = ASTNode_getType(node); if (type == AST_FUNCTION_POWER || type == AST_POWER) { - StringBuffer_appendChar(sb, '^'); + if (settings->getPythonFormat() == PythonFormatSBML) { + StringBuffer_appendChar(sb, '^'); + } + else { + StringBuffer_append(sb, "**"); + } } else { @@ -599,7 +673,12 @@ if (util_isNaN(value)) { - StringBuffer_append(sb, "NaN"); + if (settings->getPythonFormat() == PythonFormatWithPackagesInNames) { + StringBuffer_append(sb, "math.nan"); + } + else { + StringBuffer_append(sb, "NaN"); + } } else if ((sign = util_isInf(value)) != 0) { @@ -607,8 +686,12 @@ { StringBuffer_appendChar(sb, '-'); } - - StringBuffer_append(sb, "INF"); + if (settings->getPythonFormat() == PythonFormatWithPackagesInNames) { + StringBuffer_append(sb, "math.inf"); + } + else { + StringBuffer_append(sb, "INF"); + } } else if (util_isNegZero(value)) { @@ -640,7 +723,7 @@ * to the given StringBuffer. */ void -L3FormulaFormatter_formatLogicalRelational (StringBuffer_t *sb, const ASTNode_t *node) +L3FormulaFormatter_formatLogicalRelational (StringBuffer_t *sb, const ASTNode_t *node, const L3ParserSettings_t *settings) { ASTNodeType_t type = ASTNode_getType(node); @@ -648,10 +731,20 @@ switch(type) { case AST_LOGICAL_AND: - StringBuffer_append(sb, "&&"); + if (settings->getPythonFormat() == PythonFormatSBML) { + StringBuffer_append(sb, "&&"); + } + else { + StringBuffer_append(sb, "and"); + } break; case AST_LOGICAL_OR: - StringBuffer_append(sb, "||"); + if (settings->getPythonFormat() == PythonFormatSBML) { + StringBuffer_append(sb, "||"); + } + else { + StringBuffer_append(sb, "or"); + } break; case AST_RELATIONAL_EQ: StringBuffer_append(sb, "=="); @@ -697,6 +790,7 @@ const L3ParserSettings_t *settings ) { + ASTNodeType_t type = ASTNode_getType(node); if (ASTNode_isLog10(node)) { L3FormulaFormatter_visitLog10(parent, node, sb, settings); @@ -709,6 +803,18 @@ { L3FormulaFormatter_visitModulo(parent, node, sb, settings); } + else if (settings != NULL && settings->getPythonFormat() != PythonFormatSBML && type == AST_FUNCTION_LOG) + { + L3FormulaFormatter_visitPythonLog(parent, node, sb, settings); + } + else if (settings != NULL && settings->getPythonFormat() != PythonFormatSBML && ASTNode_getNumChildren(node) < 2 && (type == AST_PLUS || type == AST_TIMES || type == AST_LOGICAL_AND || type == AST_LOGICAL_OR)) + { + L3FormulaFormatter_visitPythonNary(parent, node, sb, settings); + } + else if (settings != NULL && settings->getPythonFormat() != PythonFormatSBML && (ASTNode_isConstant(node))) + { + L3FormulaFormatter_visitPythonConstant(parent, node, sb, settings); + } else if (L3FormulaFormatter_isFunction(node, settings)) { L3FormulaFormatter_visitFunction(parent, node, sb, settings); @@ -792,12 +898,93 @@ StringBuffer_t *sb, const L3ParserSettings_t *settings ) { + if (settings != NULL && settings->getPythonFormat() == PythonFormatWithPackagesInNames) { + StringBuffer_append(sb, "math."); + } StringBuffer_append(sb, "log10("); L3FormulaFormatter_visit(node, ASTNode_getChild(node, 1), sb, settings); StringBuffer_appendChar(sb, ')'); } +void L3FormulaFormatter_visitPythonLog(const ASTNode_t * parent, const ASTNode_t * node, StringBuffer_t * sb, const L3ParserSettings_t * settings) +{ + assert(ASTNode_getNumChildren(node) == 2); + if (settings != NULL && settings->getPythonFormat() == PythonFormatWithPackagesInNames) { + StringBuffer_append(sb, "math."); + } + StringBuffer_append(sb, "log("); + L3FormulaFormatter_visit(node, ASTNode_getChild(node, 1), sb, settings); + StringBuffer_append(sb, ", "); + L3FormulaFormatter_visit(node, ASTNode_getChild(node, 0), sb, settings); + StringBuffer_appendChar(sb, ')'); +} + + +void L3FormulaFormatter_visitPythonNary(const ASTNode_t * parent, const ASTNode_t * node, StringBuffer_t * sb, const L3ParserSettings_t * settings) +{ + int nchildren = ASTNode_getNumChildren(node); + ASTNodeType_t type = ASTNode_getType(node); + if (nchildren == 0) + { + if (type == AST_PLUS) + { + StringBuffer_append(sb, "0"); + return; + } + if (type == AST_TIMES) + { + StringBuffer_append(sb, "1"); + return; + } + if (type == AST_LOGICAL_AND) + { + StringBuffer_append(sb, "True"); + return; + } + if (type == AST_LOGICAL_OR) + { + StringBuffer_append(sb, "False"); + return; + } + } + if (nchildren == 1) + { + L3FormulaFormatter_visit(parent, node->getChild(0), sb, settings); + } +} + +void L3FormulaFormatter_visitPythonConstant(const ASTNode_t * parent, const ASTNode_t * node, StringBuffer_t * sb, const L3ParserSettings_t * settings) +{ + ASTNodeType_t type = ASTNode_getType(node); + PythonFormatType_t pythontype = settings->getPythonFormat(); + switch (type) { + case AST_CONSTANT_E: + if (pythontype == PythonFormatWithoutPackagesInNames) { + StringBuffer_append(sb, "exponentiale"); + return; + } + StringBuffer_append(sb, "math.e"); + return; + case AST_CONSTANT_FALSE: + StringBuffer_append(sb, "False"); + return; + case AST_CONSTANT_PI: + if (pythontype == PythonFormatWithPackagesInNames) { + StringBuffer_append(sb, "math."); + } + StringBuffer_append(sb, "pi"); + return; + case AST_CONSTANT_TRUE: + StringBuffer_append(sb, "True"); + return; + case AST_NAME_AVOGADRO: + StringBuffer_append(sb, "avogadro"); + return; + } + assert(false); +} + /** * Visits the given ASTNode as the function "root(2, x)" and in doing so, * formats it as "sqrt(x)" (where x is any subexpression). @@ -808,6 +995,9 @@ StringBuffer_t *sb, const L3ParserSettings_t *settings ) { + if (settings != NULL && settings->getPythonFormat() == PythonFormatWithPackagesInNames) { + StringBuffer_append(sb, "math."); + } StringBuffer_append(sb, "sqrt("); L3FormulaFormatter_visit(node, ASTNode_getChild(node, 1), sb, settings); StringBuffer_appendChar(sb, ')'); @@ -867,7 +1057,12 @@ { StringBuffer_appendChar(sb, '('); } - StringBuffer_appendChar(sb, '!'); + if (settings && settings->getPythonFormat() == PythonFormatSBML) { + StringBuffer_appendChar(sb, '!'); + } + else { + StringBuffer_append(sb, "not "); + } L3FormulaFormatter_visit ( node, ASTNode_getLeftChild(node), sb, settings); if (group) { Modified: branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.h =================================================================== --- branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.h 2019-12-04 21:59:50 UTC (rev 26198) +++ branches/libsbml-experimental-lucian/src/sbml/math/L3FormulaFormatter.h 2019-12-04 23:43:52 UTC (rev 26199) @@ -200,7 +200,7 @@ * to the given StringBuffer_t. */ void -L3FormulaFormatter_formatOperator (StringBuffer_t *sb, const ASTNode_t *node); +L3FormulaFormatter_formatOperator (StringBuffer_t *sb, const ASTNode_t *node, const L3ParserSettings_t *settings); /** * Formats the given ASTNode_t as a rational number and appends the result to @@ -231,7 +231,7 @@ * internal operator and appends the result to the given StringBuffer_t. */ void -L3FormulaFormatter_formatLogicalRelational(StringBuffer_t *sb, const ASTNode_t *node); +L3FormulaFormatter_formatLogicalRelational(StringBuffer_t *sb, const ASTNode_t *node, const L3ParserSettings_t *settings); /** * Visits the given ASTNode_t node. This function is really just a @@ -268,6 +268,39 @@ /** +* Visits the given ASTNode_t as the function "log(x, y)" and in doing so, +* formats it as "log(y, x)" (where x and y are any subexpression). This +* is because in Python, the base is the second argument, not the first. +*/ +void +L3FormulaFormatter_visitPythonLog ( const ASTNode_t *parent, + const ASTNode_t *node, + StringBuffer_t *sb, + const L3ParserSettings_t *settings ); + + +/** +* Visits the given ASTNode_t for 'plus' or 'times' nodes with +* zero or one child. Python has no functions that work like this, +* so they're translated to their definitions. +*/ +void +L3FormulaFormatter_visitPythonNary ( const ASTNode_t *parent, + const ASTNode_t *node, + StringBuffer_t *sb, + const L3ParserSettings_t *settings ); + +/** +* Visits the given ASTNode_t for a constant, which Python will write +* differently than core SBML constants. +*/ +void L3FormulaFormatter_visitPythonConstant( const ASTNode_t *parent, + const ASTNode_t *node, + StringBuffer_t *sb, + const L3ParserSettings_t *settings ); + + +/** * Visits the given ASTNode_t as the function "root(2, x)" and in doing so, * formats it as "sqrt(x)" (where x is any subexpression). */ Modified: branches/libsbml-experimental-lucian/src/sbml/math/L3ParserSettings.cpp =================================================================== --- branches/libsbml-experimental-lucian/src/sbml/math/L3ParserSettings.cpp 2019-12-04 21:59:50 UTC (rev 26198) +++ branches/libsbml-experimental-lucian/src/sbml/math/L3ParserSettings.cpp 2019-12-04 23:43:52 UTC (rev 26199) @@ -71,12 +71,12 @@ , mAvoCsymbol(L3P_AVOGADRO_IS_CSYMBOL) , mStrCmpIsCaseSensitive(L3P_COMPARE_BUILTINS_CASE_INSENSITIVE) , mModuloL3v2(L3P_MODULO_IS_PIECEWISE) + , mPythonFormat(PythonFormatSBML) , mParsePackages() { - setParsePackageMath(EM_REMAINING, false); } -L3ParserSettings::L3ParserSettings(Model* model, ParseLogType_t parselog, bool collapseminus, bool parseunits, bool avocsymbol, bool caseSensitive, SBMLNamespaces* sbmlns, bool modulol3v2, bool l3v2functions) +L3ParserSettings::L3ParserSettings(Model* model, ParseLogType_t parselog, bool collapseminus, bool parseunits, bool avocsymbol, bool caseSensitive, SBMLNamespaces* sbmlns, bool modulol3v2, bool l3v2functions, PythonFormatType_t pythonFormat) : mModel (model) , mParselog(parselog) , mCollapseminus(collapseminus) @@ -84,10 +84,10 @@ , mAvoCsymbol(avocsymbol) , mStrCmpIsCaseSensitive(caseSensitive) , mModuloL3v2(modulol3v2) + , mPythonFormat(pythonFormat) , mParsePackages() { setParsePackageMath(EM_L3V2, l3v2functions); - setParsePackageMath(EM_REMAINING, false); } L3ParserSettings::L3ParserSettings(const L3ParserSettings& source) @@ -99,6 +99,7 @@ mAvoCsymbol = source.mAvoCsymbol; mStrCmpIsCaseSensitive = source.mStrCmpIsCaseSensitive; mModuloL3v2 = source.mModuloL3v2; + mPythonFormat = source.mPythonFormat; mParsePackages = source.mParsePackages; } @@ -111,6 +112,7 @@ mAvoCsymbol = source.mAvoCsymbol; mStrCmpIsCaseSensitive = source.mStrCmpIsCaseSensitive; mModuloL3v2 = source.mModuloL3v2; + mPythonFormat = source.mPythonFormat; mParsePackages = source.mParsePackages; return *this; } @@ -164,7 +166,10 @@ bool L3ParserSettings::getParseUnits() const { - return mParseunits; + if (mPythonFormat == PythonFormatSBML) { + return mParseunits; + } + return L3P_NO_UNITS; } @@ -314,9 +319,22 @@ bool L3ParserSettings::getParseModuloL3v2() const { - return mModuloL3v2; + if (mPythonFormat == PythonFormatSBML) { + return mModuloL3v2; + } + else return L3P_MODULO_IS_REM; } +void L3ParserSettings::setPythonFormat(PythonFormatType_t pythonFormat) +{ + mPythonFormat = pythonFormat; +} + +PythonFormatType_t L3ParserSettings::getPythonFormat() const +{ + return mPythonFormat; +} + void L3ParserSettings::setParseL3v2Functions(bool l3v2functions) { mParsePackages[EM_L3V2] = l3v2functions; @@ -331,7 +349,6 @@ return true; } - void L3ParserSettings::setParsePackageMath(ExtendedMathType_t package, bool parsepackage) { mParsePackages[package] = parsepackage; Modified: branches/libsbml-experimental-lucian/src/sbml/math/L3ParserSettings.h =================================================================== --- branches/libsbml-experimental-lucian/src/sbml/math/L3ParserSettings.h 2019-12-04 21:59:50 UTC (rev 26198) +++ branches/libsbml-experimental-lucian/src/sbml/math/L3ParserSettings.h 2019-12-04 23:43:52 UTC (rev 26199) @@ -409,7 +409,31 @@ #define L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC false +typedef enum +{ + PythonFormatWithPackagesInNames /*!< Unknown error from qual. */ + , PythonFormatWithoutPackagesInNames/*!< The desired output is Python without package names in . */ + , PythonFormatSBML /*!< The desired output is standard SBML, and not Python*/ +} PythonFormatType_t; + +/** + * Parse the functions added in l3v2. + * + * @see L3ParserSettings::getParseL3v2Functions() + * @see L3ParserSettings::setParseL3v2Functions() + */ +#define L3P_PYTHON_FORMAT true + /** + * Parse the @% symbol as an expanded 'piecewise' function (valid in all levels/versions). + * + * @see L3ParserSettings::getParseL3v2Functions() + * @see L3ParserSettings::setParseL3v2Functions() + */ +#define L3P_SBML_FORMAT false + + + /** * Parse the functions added in distrib. * * @see L3ParserSettings::getParseDistribFunctions() @@ -459,6 +483,7 @@ bool mAvoCsymbol; bool mStrCmpIsCaseSensitive; bool mModuloL3v2; + PythonFormatType_t mPythonFormat; std::map<ExtendedMathType_t, bool> mParsePackages; /** @endcond */ @@ -595,7 +620,7 @@ bool collapseminus, bool parseunits, bool avocsymbol, bool caseSensitive = false, SBMLNamespaces* sbmlns = NULL, bool moduloL3v2 = false, - bool l3v2functions = false); + bool l3v2functions = false, PythonFormatType_t pythonFormat = PythonFormatSBML); /** @@ -891,8 +916,45 @@ */ bool getParseModuloL3v2() const; + /** + * Sets the behavior for handling the @% symbol in mathematical + * formulas. + * + * @copydetails doc_modulo_l3v2_settings + * + * This method lets you tell the parser which behavior to use---either + * parse @% as the 'rem' function or as a piecewise function with the + * same interpretation. The two possibilities are + * represented using the following constants: + * + * @copydetails doc_modulo_l3v2_values + * + * @param modulol3v2 a boolean value (one of the constants + * @sbmlconstant{L3P_MODULO_IS_PIECEWISE,} or + * @sbmlconstant{L3P_MODULO_IS_REM,}) + * indicating how the @% symbol in the input should be handled. + * + * @see getParseModuloL3v2() + */ + void setPythonFormat(PythonFormatType_t pythonFormat); + /** + * Indicates the current behavior set for handling the @% symbol in + * mathematical formulas. + * + * @copydetails doc_modulo_l3v2_settings + * + * @return A boolean indicating the behavior currently set. The possible + * values are as follows: + * @copydetails doc_modulo_l3v2_values + * + * @see setParseModuloL3v2(@if java boolean@endif) + */ + PythonFormatType_t getPythonFormat() const; + + + /** * Sets the behavior for handling functions added in SBML L3v2 * * @copydetails doc_l3v2_function_settings Modified: branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3FormulaFormatter.c =================================================================== --- branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3FormulaFormatter.c 2019-12-04 21:59:50 UTC (rev 26198) +++ branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3FormulaFormatter.c 2019-12-04 23:43:52 UTC (rev 26199) @@ -1023,7 +1023,7 @@ // ensure we survive NULL arguments L3FormulaFormatter_format(NULL, NULL, NULL); L3FormulaFormatter_formatFunction(NULL, NULL, NULL); - L3FormulaFormatter_formatOperator(NULL, NULL); + L3FormulaFormatter_formatOperator(NULL, NULL, NULL); L3FormulaFormatter_visit(NULL, NULL, NULL, NULL); L3FormulaFormatter_visitFunction(NULL, NULL, NULL, NULL); L3FormulaFormatter_visitLog10(NULL, NULL, NULL, NULL); Added: branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3PythonFormulaFormatter.cpp =================================================================== --- branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3PythonFormulaFormatter.cpp (rev 0) +++ branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3PythonFormulaFormatter.cpp 2019-12-04 23:43:52 UTC (rev 26199) @@ -0,0 +1,395 @@ +/** + * \file TestL3PythonFormulaFormatter.c + * \brief FormulaFormatter unit tests + * \author Lucian Smith, from Ben Bornstein + * + * <!-------------------------------------------------------------------------- + * This file is part of libSBML. Please visit http://sbml.org for more + * information about SBML, and the latest version of libSBML. + * + * Copyright (C) 2019 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. University of Heidelberg, Heidelberg, Germany + * + * Copyright (C) 2013-2018 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK + * 3. University of Heidelberg, Heidelberg, Germany + * + * Copyright (C) 2009-2013 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK + * + * Copyright (C) 2006-2008 by the California Institute of Technology, + * Pasadena, CA, USA + * + * Copyright (C) 2002-2005 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. Japan Science and Technology Agency, Japan + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as http://sbml.org/software/libsbml/license.html + * ---------------------------------------------------------------------- -->*/ + +#include <sbml/common/common.h> + +#include <sbml/math/L3FormulaFormatter.h> +#include <sbml/math/FormulaParser.h> +#include <sbml/math/L3Parser.h> +#include <sbml/math/L3ParserSettings.h> +#include <sbml/xml/XMLNode.h> + +//extern int isTranslatedModulo (const ASTNode_t* node); +//extern int getL3Precedence(const ASTNode_t* node); + +#include <check.h> + +#if defined(__cplusplus) +LIBSBML_CPP_NAMESPACE_USE +CK_CPPSTART +#endif + +START_TEST (test_SBML_formulaToL3PythonString) +{ + const char *formulae[] = + { + "1", + "2.1", + "2.101e-10", + "foo", + "1 + foo", + "1 + 2", + "1 + 2 * 3", + "(1 - 2) * 3", + "1 + -2 / 3", + "1 + -2e-100 / 3", + "1 - -foo / 3", + "2 * foo^bar + 3.1", + "foo()", + "foo(1)", + "foo(1, bar)", + "foo(1, bar, 2^-3)", + "(a / b) * c", + "a / (b * c)", + "1 + 2 + 3", + "a * (b * c)", + "a + (b + c)", + "a * b * c", + "a + b + c", + "x % y", + "(1 + x) % (3 / y)", + "(x^2) % -y", + "x && (y == z)", + "(x && y) == z", + "(a && b) || c", + "a && (b || c)", + "a && b && c", + "a || b || c", + "-x^y", + "(-x)^y", + "x^-y", + "!(x^2)", + "(!x)^2", + "x^!2", + "1 ml", + "(3/4) uM", + "INF", + "NaN", + "avogadro", + "time", + "pi", + "true", + "false", + "(x > y) + (p == q)", + "(x > y > z) + (p == d == q)", + "(x || y) > (p && q)", + "or(x) > and(p)", + "or() > and()", + "(x * y)^2", + "(x * y * z)^2", + "times(x)^2", + "times()^2", + "x && !y", + "x > !y", + "x > -y", + "" + }; + + const char *matches[] = + { + "1", + "2.1", + "2.101e-10", + "foo", + "1 + foo", + "1 + 2", + "1 + 2 * 3", + "(1 - 2) * 3", + "1 + -2 / 3", + "1 + -2e-100 / 3", + "1 - -foo / 3", + "2 * foo**bar + 3.1", + "foo()", + "foo(1)", + "foo(1, bar)", + "foo(1, bar, 2**-3)", + "(a / b) * c", + "a / (b * c)", + "1 + 2 + 3", + "a * (b * c)", + "a + (b + c)", + "a * b * c", + "a + b + c", + "x % y", + "(1 + x) % (3 / y)", + "(x**2) % -y", + "x and (y == z)", + "(x and y) == z", + "(a and b) or c", + "a and (b or c)", + "a and b and c", + "a or b or c", + "-x**y", + "(-x)**y", + "x**-y", + "not x**2", + "(not x)**2", + "x**(not 2)", + "1", + "(3/4)", + "math.inf", + "math.nan", + "avogadro", + "time", + "math.pi", + "True", + "False", + "(x > y) + (p == q)", + "(x > y > z) + (p == d == q)", + "(x or y) > (p and q)", + "x > p", + "False > True", + "(x * y)**2", + "(x * y * z)**2", + "x**2", + "1**2", + "x and not y", + "x > (not y)", + "x > -y", + "" + }; + + ASTNode_t *n; + char *s; + int i; + + L3ParserSettings l3ps; + l3ps.setPythonFormat(PythonFormatWithPackagesInNames); + + for (i = 0; i < 59; i++) + { + n = SBML_parseL3Formula( formulae[i] ); + s = SBML_formulaToL3StringWithSettings(n, &l3ps); + std::cout << matches[i] << " | " << s << std::endl; + + if (!(s == std::string(matches[i]))) { + std::cout << "This was the one that failed." << std::endl; + } + fail_unless( !strcmp(s, matches[i]), NULL ); + + ASTNode_free(n); + safe_free(s); + } + + // SBML_deleteL3Parser(); +} +END_TEST + + +START_TEST (test_SBML_formulaToL3String_L1toL3) +{ + ASTNode_t *n; + char *s; + + + /** acos(x) -> acos(x) **/ + n = SBML_parseL3Formula("acos(x)"); + s = SBML_formulaToL3String(n); + + fail_unless( !strcmp(s, "acos(x)"), NULL ); + + safe_free(s); + ASTNode_free(n); + + + /** arcsin(x) -> asin(x) **/ + n = SBML_parseL3Formula("asin(x)"); + s = SBML_formulaToL3String(n); + + fail_unless( !strcmp(s, "asin(x)"), NULL ); + + safe_free(s); + ASTNode_free(n); + + + /** atan(x) -> atan(x) **/ + n = SBML_parseL3Formula("atan(x)"); + s = SBML_formulaToL3String(n); + + fail_unless( !strcmp(s, "atan(x)"), NULL ); + + safe_free(s); + ASTNode_free(n); + + + /** ceil(x) -> ceil(x) **/ + n = SBML_parseL3Formula("ceil(x)"); + s = SBML_formulaToL3String(n); + + fail_unless( !strcmp(s, "ceil(x)"), NULL ); + + safe_free(s); + ASTNode_free(n); + + + /** log(x) -> log10(x) **/ + n = SBML_parseL3Formula("log(x)"); + s = SBML_formulaToL3String(n); + + fail_unless( !strcmp(s, "log10(x)"), NULL ); + + safe_free(s); + ASTNode_free(n); + + /** log(x) -> log10(x), if parsed with the old parser **/ + n = SBML_parseFormula("log(x)"); + s = SBML_formulaToL3String(n); + + fail_unless( !strcmp(s, "ln(x)"), NULL ); + + safe_free(s); + ASTNode_free(n); + + /** log10( x) -> log10(x) **/ + n = SBML_parseL3Formula("log10(x)"); + s = SBML_formulaToL3String(n); + + fail_unless( !strcmp(s, "log10(x)"), NULL ); + + safe_free(s); + ASTNode_free(n); + + + /** pow(x, y) -> x^y **/ + n = SBML_parseL3Formula("pow(x, y)"); + s = SBML_formulaToL3String(n); + + fail_unless( !strcmp(s, "x^y"), NULL ); + + safe_free(s); + ASTNode_free(n); + + /** sqr(x) -> x^2 **/ + n = SBML_parseL3Formula("sqr(x)"); + s = SBML_formulaToL3String(n); + + fail_unless( !strcmp(s, "x^2"), NULL ); + + safe_free(s); + ASTNode_free(n); + + + /** sqrt(x) -> sqrt(x) **/ + n = SBML_parseL3Formula("sqrt(x)"); + s = SBML_formulaToL3String(n); + + fail_unless( !strcmp(s, "sqrt(x)"), NULL ); + + safe_free(s); + ASTNode_free(n); + + n = SBML_parseL3Formula("x + (y + z)"); + s = SBML_formulaToL3String(n); + fail_unless( !strcmp(s, "x + (y + z)"), NULL ); + + safe_free(s); + ASTNode_free(n); + + n = SBML_parseL3Formula("(x + y) + z"); + s = SBML_formulaToL3String(n); + fail_unless( !strcmp(s, "x + y + z"), NULL ); + + safe_free(s); + ASTNode_free(n); + + // SBML_deleteL3Parser(); +} +END_TEST + + +START_TEST (test_L3FormulaFormatter_collapseMinus) +{ + char *s; + ASTNode_t *n = ASTNode_create(); + ASTNode_t *c = ASTNode_create(); + ASTNode_t *c2 = ASTNode_create(); + ASTNode_t *c3 = ASTNode_create(); + ASTNode_t *c4 = ASTNode_create(); + L3ParserSettings_t* l3ps = L3ParserSettings_create(); + + ASTNode_setType(n, AST_MINUS); + ASTNode_setType(c, AST_MINUS); + ASTNode_addChild(n, c); + ASTNode_setType(c2, AST_MINUS); + ASTNode_addChild(c, c2); + ASTNode_setType(c3, AST_MINUS); + ASTNode_addChild(c2, c3); + ASTNode_setName(c4, "x"); + ASTNode_addChild(c3, c4); + + //default (false) + s = SBML_formulaToL3StringWithSettings(n, l3ps); + fail_unless( !strcmp(s, "----x"), NULL ); + safe_free(s); + + //explicit false + L3ParserSettings_setParseCollapseMinus(l3ps, 0); + s = SBML_formulaToL3StringWithSettings(n, l3ps); + fail_unless( !strcmp(s, "----x"), NULL ); + safe_free(s); + + //explicit true + L3ParserSettings_setParseCollapseMinus(l3ps, 1); + s = SBML_formulaToL3StringWithSettings(n, l3ps); + fail_unless( !strcmp(s, "x"), NULL ); + safe_free(s); + + ASTNode_free(n); + L3ParserSettings_free(l3ps); +} +END_TEST + + +Suite * +create_suite_L3PythonFormulaFormatter (void) +{ + Suite *suite = suite_create("L3FormulaFormatter"); + TCase *tcase = tcase_create("L3FormulaFormatter"); + + + tcase_add_test( tcase, test_SBML_formulaToL3PythonString ); + tcase_add_test( tcase, test_SBML_formulaToL3String_L1toL3 ); + tcase_add_test( tcase, test_L3FormulaFormatter_collapseMinus ); + + suite_add_tcase(suite, tcase); + + return suite; +} + +#if defined(__cplusplus) +CK_CPPEND +#endif + Property changes on: branches/libsbml-experimental-lucian/src/sbml/math/test/TestL3PythonFormulaFormatter.cpp ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: branches/libsbml-experimental-lucian/src/sbml/math/test/TestRunner.c =================================================================== --- branches/libsbml-experimental-lucian/src/sbml/math/test/TestRunner.c 2019-12-04 21:59:50 UTC (rev 26198) +++ branches/libsbml-experimental-lucian/src/sbml/math/test/TestRunner.c 2019-12-04 23:43:52 UTC (rev 26199) @@ -61,6 +61,7 @@ Suite *create_suite_FormulaFormatter (void); Suite *create_suite_FormulaParser (void); Suite *create_suite_L3FormulaFormatter(void); +Suite *create_suite_L3PythonFormulaFormatter(void); Suite *create_suite_L3FormulaParser (void); Suite *create_suite_L3FormulaParserC (void); Suite *create_suite_FormulaTokenizer (void); @@ -127,6 +128,7 @@ srunner_add_suite( runner, create_suite_FormulaFormatter () ); srunner_add_suite( runner, create_suite_FormulaParser () ); srunner_add_suite( runner, create_suite_L3FormulaFormatter () ); + srunner_add_suite( runner, create_suite_L3PythonFormulaFormatter() ); srunner_add_suite( runner, create_suite_L3FormulaParser () ); srunner_add_suite( runner, create_suite_L3FormulaParserC () ); srunner_add_suite( runner, create_suite_FormulaTokenizer () ); |
From: <luc...@us...> - 2019-12-04 22:00:20
|
Revision: 26198 http://sourceforge.net/p/sbml/code/26198 Author: luciansmith Date: 2019-12-04 21:59:50 +0000 (Wed, 04 Dec 2019) Log Message: ----------- Set eol-style on various files. Modified Paths: -------------- branches/libsbml-experimental/arrays-package.cmake branches/libsbml-experimental/dev/misc-files/create_matlab_dir/makeSFDir.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-arrays.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-distrib.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-dyn.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-multi.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-render.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-req.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-spatial.bat branches/libsbml-experimental/dev/packages/create_archives/create_archives.bat branches/libsbml-experimental/dev/packages/create_archives/create_archives.cmake branches/libsbml-experimental/dev/packages/create_archives/req_warning_comment.txt branches/libsbml-experimental/dev/packages/graduate_package_to_trunk/graduate.txt branches/libsbml-experimental/dev/utilities/build-python/README.md branches/libsbml-experimental/dev/utilities/build-python/build_all.bat branches/libsbml-experimental/dev/utilities/build-python/build_conda.bat branches/libsbml-experimental/dev/utilities/build-python/build_libsbml.bat branches/libsbml-experimental/dev/utilities/build-python/build_python.bat branches/libsbml-experimental/dev/utilities/build-python/python-src/CMakeLists.txt branches/libsbml-experimental/dev/utilities/build-python/python-src/configure-files.cmake branches/libsbml-experimental/dev/utilities/build-python/python-src/rename-files.cmake branches/libsbml-experimental/dev/utilities/build-python/remove_files.bat branches/libsbml-experimental/dev/utilities/build-python/source/create-conda-archives.cmake branches/libsbml-experimental/distrib-package.cmake branches/libsbml-experimental/dyn-package.cmake branches/libsbml-experimental/examples/c/fbc/CMakeLists.txt branches/libsbml-experimental/examples/c/fbc/fbc_example1.c branches/libsbml-experimental/examples/c/fbc/fbc_example1_v2.c branches/libsbml-experimental/examples/c/groups/groups_example1.c branches/libsbml-experimental/examples/c++/arrays/CMakeLists.txt branches/libsbml-experimental/examples/c++/distrib/CMakeLists.txt branches/libsbml-experimental/examples/c++/distrib/createTestSuiteModels.cpp branches/libsbml-experimental/examples/c++/distrib/distrib_example1.cpp branches/libsbml-experimental/examples/c++/dyn/CMakeLists.txt branches/libsbml-experimental/examples/c++/multi/CMakeLists.txt branches/libsbml-experimental/examples/c++/render/CMakeLists.txt branches/libsbml-experimental/examples/c++/req/CMakeLists.txt branches/libsbml-experimental/examples/c++/spatial/CMakeLists.txt branches/libsbml-experimental/examples/csharp/arrays/CMakeLists.txt branches/libsbml-experimental/examples/csharp/distrib/CMakeLists.txt branches/libsbml-experimental/examples/csharp/multi/CMakeLists.txt branches/libsbml-experimental/examples/csharp/multi/multi_example1.cs branches/libsbml-experimental/examples/csharp/multi/multi_example2.cs branches/libsbml-experimental/examples/csharp/multi/multi_example3.cs branches/libsbml-experimental/examples/csharp/multi/printMulti.cs branches/libsbml-experimental/examples/csharp/render/CMakeLists.txt branches/libsbml-experimental/examples/csharp/render/addRenderInformation.cs branches/libsbml-experimental/examples/csharp/render/printRenderInformation.cs branches/libsbml-experimental/examples/java/arrays/CMakeLists.txt branches/libsbml-experimental/examples/java/distrib/CMakeLists.txt branches/libsbml-experimental/examples/java/multi/CMakeLists.txt branches/libsbml-experimental/examples/java/render/CMakeLists.txt branches/libsbml-experimental/examples/java/spatial/CMakeLists.txt branches/libsbml-experimental/examples/python/append_to_note.py branches/libsbml-experimental/examples/python/inlineFunctionDefinitions.py branches/libsbml-experimental/examples/python/renameSId.py branches/libsbml-experimental/examples/python/stringInput.py branches/libsbml-experimental/examples/python/validateSBMLWithCallback.py branches/libsbml-experimental/l3v2extendedmath-package.cmake branches/libsbml-experimental/multi-package.cmake branches/libsbml-experimental/render-package.cmake branches/libsbml-experimental/req-package.cmake branches/libsbml-experimental/spatial-package.cmake branches/libsbml-experimental/src/bindings/csharp/test/sbml/TestSBMLDocument.cs branches/libsbml-experimental/src/bindings/java/test/org/sbml/libsbml/test/math/TestReadMathML.java branches/libsbml-experimental/src/bindings/java/test/org/sbml/libsbml/test/math/TestWriteMathML.java branches/libsbml-experimental/src/bindings/java/test/org/sbml/libsbml/test/sbml/TestSBMLDocument.java branches/libsbml-experimental/src/bindings/java/test/org/sbml/libsbml/test/sbml/TestSBMLError.java branches/libsbml-experimental/src/bindings/javascript/local-downcast-astplugins-arrays.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-astplugins-distrib.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-astplugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-astplugins-multi.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-converters-comp.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-converters-fbc.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-converters-layout.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-converters-qual.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-extension-arrays.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-extension-distrib.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-extension-dyn.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-extension-fbc.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-extension-groups.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-extension-multi.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-extension-req.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-extension-spatial.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-namespaces-arrays.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-namespaces-distrib.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-namespaces-dyn.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-namespaces-fbc.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-namespaces-groups.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-namespaces-multi.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-namespaces-req.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-namespaces-spatial.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-packages-arrays.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-packages-distrib.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-packages-dyn.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-packages-fbc.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-packages-groups.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-packages-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-packages-multi.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-packages-req.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-packages-spatial.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-plugins-arrays.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-plugins-distrib.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-plugins-dyn.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-plugins-fbc.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-plugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-plugins-layout.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-plugins-qual.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-plugins-req.cpp branches/libsbml-experimental/src/bindings/javascript/local-downcast-plugins-spatial.cpp branches/libsbml-experimental/src/bindings/matlab/test/test-data/algebraicRules.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/both.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/convertedFormulas.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/convertedFormulas2.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/convertedFormulasL2.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/createdAnnotation.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/createdAnnotationL2.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/csymbolAvogadro.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/csymbolDelay.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/csymbolTime-reaction-l2.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/csymbolTime.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/errors.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/fatal.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/fbc.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/fbcL3V2V1.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/fbcL3V2V2.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/fbcV2.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/fbcV2Labels.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/fbc_groups.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/fbc_qual.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/fbc_qual_groups.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/funcDefsWithInitialAssignments.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/functionDefinition.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/groups-example1.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/groups_qual.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/initialAssignments.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l1v1-branch.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l1v1-minimal.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l1v1-rules.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l1v1-units.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l1v1.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l1v2-all.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l2v1-all.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l2v1-allelements.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l2v1-assignment.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l2v2-all.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l2v2-newComponents.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l2v2-newelements.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l2v3-all.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l2v3-newMath.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l2v3-newelements.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l2v4-all.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l2v5-all.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l3v1core.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l3v2-empty-event.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l3v2-empty-math.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l3v2-newmath.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l3v2-no-model.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/l3v2core.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/math_no_arguments.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/missing_out.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/nestedPiecewise.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/nonLogicals.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/none.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/notes_annotations.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/outGP00.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/outGP01.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/outGP10.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/outGP11.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/piecewise.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/rateRules.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/readerror.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/sparseStoichiometry.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/species.xml branches/libsbml-experimental/src/bindings/matlab/test/test-data/warn.xml branches/libsbml-experimental/src/bindings/perl/local-downcast-astplugins-arrays.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-astplugins-distrib.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-astplugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-astplugins-multi.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-converters-comp.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-converters-fbc.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-converters-layout.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-converters-qual.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-extension-arrays.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-extension-distrib.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-extension-dyn.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-extension-groups.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-extension-multi.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-extension-req.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-extension-spatial.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-namespaces-arrays.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-namespaces-distrib.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-namespaces-dyn.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-namespaces-groups.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-namespaces-multi.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-namespaces-req.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-namespaces-spatial.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-packages-arrays.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-packages-distrib.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-packages-dyn.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-packages-groups.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-packages-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-packages-multi.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-packages-req.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-packages-spatial.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-plugins-arrays.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-plugins-distrib.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-plugins-dyn.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-plugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-plugins-req.cpp branches/libsbml-experimental/src/bindings/perl/local-downcast-plugins-spatial.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-astplugins-arrays.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-astplugins-distrib.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-astplugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-astplugins-multi.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-converters-comp.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-converters-fbc.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-converters-layout.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-converters-qual.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-extension-arrays.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-extension-distrib.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-extension-dyn.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-extension-fbc.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-extension-groups.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-extension-multi.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-extension-req.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-extension-spatial.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-namespaces-arrays.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-namespaces-distrib.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-namespaces-dyn.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-namespaces-fbc.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-namespaces-groups.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-namespaces-multi.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-namespaces-req.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-namespaces-spatial.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-namespaces.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-packages-arrays.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-packages-distrib.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-packages-dyn.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-packages-fbc.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-packages-groups.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-packages-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-packages-multi.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-packages-req.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-packages-spatial.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-plugins-arrays.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-plugins-distrib.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-plugins-dyn.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-plugins-fbc.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-plugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-plugins-layout.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-plugins-qual.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-plugins-req.cpp branches/libsbml-experimental/src/bindings/php/local-downcast-plugins-spatial.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-astplugins-arrays.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-astplugins-distrib.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-astplugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-astplugins-multi.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-converters-comp.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-converters-fbc.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-converters-layout.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-converters-qual.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-extension-arrays.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-extension-distrib.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-extension-dyn.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-extension-groups.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-extension-multi.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-extension-req.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-extension-spatial.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-namespaces-arrays.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-namespaces-distrib.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-namespaces-dyn.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-namespaces-groups.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-namespaces-multi.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-namespaces-req.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-namespaces-spatial.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-packages-arrays.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-packages-distrib.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-packages-dyn.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-packages-groups.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-packages-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-packages-multi.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-packages-req.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-packages-spatial.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-plugins-arrays.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-plugins-distrib.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-plugins-dyn.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-plugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-plugins-req.cpp branches/libsbml-experimental/src/bindings/python/local-downcast-plugins-spatial.cpp branches/libsbml-experimental/src/bindings/python/patch-python.cmake branches/libsbml-experimental/src/bindings/r/local-downcast-astplugins-arrays.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-astplugins-distrib.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-astplugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-astplugins-multi.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-converters-comp.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-converters-fbc.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-converters-layout.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-converters-qual.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-extension-arrays.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-extension-distrib.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-extension-dyn.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-extension-groups.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-extension-multi.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-extension-req.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-extension-spatial.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-namespaces-arrays.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-namespaces-distrib.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-namespaces-dyn.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-namespaces-groups.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-namespaces-multi.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-namespaces-req.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-namespaces-spatial.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-packages-arrays.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-packages-distrib.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-packages-dyn.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-packages-groups.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-packages-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-packages-multi.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-packages-req.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-packages-spatial.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-plugins-arrays.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-plugins-distrib.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-plugins-dyn.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-plugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-plugins-req.cpp branches/libsbml-experimental/src/bindings/r/local-downcast-plugins-spatial.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-astplugins-arrays.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-astplugins-distrib.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-astplugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-astplugins-multi.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-converters-comp.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-converters-fbc.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-converters-layout.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-converters-qual.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-extension-arrays.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-extension-distrib.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-extension-dyn.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-extension-groups.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-extension-multi.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-extension-req.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-extension-spatial.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-namespaces-arrays.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-namespaces-distrib.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-namespaces-dyn.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-namespaces-groups.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-namespaces-multi.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-namespaces-req.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-namespaces-spatial.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-packages-arrays.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-packages-distrib.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-packages-dyn.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-packages-groups.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-packages-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-packages-multi.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-packages-req.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-packages-spatial.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-plugins-arrays.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-plugins-distrib.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-plugins-dyn.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-plugins-l3v2extendedmath.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-plugins-req.cpp branches/libsbml-experimental/src/bindings/ruby/local-downcast-plugins-spatial.cpp branches/libsbml-experimental/src/bindings/swig/arrays-package.h branches/libsbml-experimental/src/bindings/swig/distrib-package.h branches/libsbml-experimental/src/bindings/swig/dyn-package.h branches/libsbml-experimental/src/bindings/swig/multi-package.h branches/libsbml-experimental/src/bindings/swig/spatial-package.h branches/libsbml-experimental/src/sbml/common/libsbml-config-common.h.cmake branches/libsbml-experimental/src/sbml/common/libsbml-namespace.h.cmake branches/libsbml-experimental/src/sbml/common/libsbml-package.h.cmake branches/libsbml-experimental/src/sbml/common/libsbml-version.h.cmake branches/libsbml-experimental/src/sbml/compress/ioapi_mem.c branches/libsbml-experimental/src/sbml/compress/ioapi_mem.h branches/libsbml-experimental/src/sbml/conversion/SBMLConverterTypes.h branches/libsbml-experimental/src/sbml/conversion/SBMLLevel1Version1Converter.h branches/libsbml-experimental/src/sbml/conversion/SBMLRateOfConverter.h branches/libsbml-experimental/src/sbml/packages/arrays/extension/ArraysSBMLDocumentPlugin.cpp branches/libsbml-experimental/src/sbml/packages/arrays/extension/ArraysSBMLDocumentPlugin.h branches/libsbml-experimental/src/sbml/packages/arrays/extension/ArraysSBasePlugin.cpp branches/libsbml-experimental/src/sbml/packages/arrays/extension/ArraysSBasePlugin.h branches/libsbml-experimental/src/sbml/packages/arrays/extension/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/arrays/extension/test/TestArrayInfixParsing.cpp branches/libsbml-experimental/src/sbml/packages/arrays/extension/test/TestArrayInfixWriting.cpp branches/libsbml-experimental/src/sbml/packages/arrays/extension/test/TestArraysExtension.cpp branches/libsbml-experimental/src/sbml/packages/arrays/extension/test/TestReadArraysExtension.cpp branches/libsbml-experimental/src/sbml/packages/arrays/extension/test/TestReadMathML.cpp branches/libsbml-experimental/src/sbml/packages/arrays/extension/test/TestRunner.cpp branches/libsbml-experimental/src/sbml/packages/arrays/extension/test/TestWriteArraysExtension.cpp branches/libsbml-experimental/src/sbml/packages/arrays/extension/test/TestWriteMathMLFromAST.cpp branches/libsbml-experimental/src/sbml/packages/arrays/extension/test/TestWriteMathMLFromInfix.cpp branches/libsbml-experimental/src/sbml/packages/arrays/sbml/ListOfDimensions.cpp branches/libsbml-experimental/src/sbml/packages/arrays/sbml/ListOfDimensions.h branches/libsbml-experimental/src/sbml/packages/arrays/sbml/ListOfIndices.cpp branches/libsbml-experimental/src/sbml/packages/arrays/sbml/ListOfIndices.h branches/libsbml-experimental/src/sbml/packages/arrays/util/ArraysFlatteningConverter.cpp branches/libsbml-experimental/src/sbml/packages/arrays/util/ArraysFlatteningConverter.h branches/libsbml-experimental/src/sbml/packages/arrays/util/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/arrays/util/test/TestArraysFlatteningConverter.cpp branches/libsbml-experimental/src/sbml/packages/arrays/util/test/TestRunner.cpp branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysConsistencyValidator.cpp branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysConsistencyValidator.h branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysIdentifierConsistencyValidator.cpp branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysIdentifierConsistencyValidator.h branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysSBMLError.h branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysValidator.cpp branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysValidator.h branches/libsbml-experimental/src/sbml/packages/arrays/validator/constraints/ArraysConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/arrays/validator/constraints/ArraysConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/arrays/validator/constraints/ArraysIdentifierConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/arrays/validator/constraints/ArraysIdentifierConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/comp/validator/constraints/CompConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/comp/validator/constraints/CompIdentifierConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/comp/validator/constraints/CompUnitConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/distrib/extension/DistribASTPlugin.cpp branches/libsbml-experimental/src/sbml/packages/distrib/extension/DistribASTPlugin.h branches/libsbml-experimental/src/sbml/packages/distrib/extension/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/distrib/extension/test/TestDistribExtension.cpp branches/libsbml-experimental/src/sbml/packages/distrib/extension/test/TestDistribExtensionMath.cpp branches/libsbml-experimental/src/sbml/packages/distrib/extension/test/TestReadMathML.cpp branches/libsbml-experimental/src/sbml/packages/distrib/extension/test/TestRunner.cpp branches/libsbml-experimental/src/sbml/packages/distrib/extension/test/TestWriteMathMLFromAST.cpp branches/libsbml-experimental/src/sbml/packages/distrib/sbml/DistribBase.cpp branches/libsbml-experimental/src/sbml/packages/distrib/sbml/DistribBase.h branches/libsbml-experimental/src/sbml/packages/distrib/sbml/ListOfUncertParameters.cpp branches/libsbml-experimental/src/sbml/packages/distrib/sbml/ListOfUncertParameters.h branches/libsbml-experimental/src/sbml/packages/distrib/sbml/ListOfUncertainties.cpp branches/libsbml-experimental/src/sbml/packages/distrib/sbml/ListOfUncertainties.h branches/libsbml-experimental/src/sbml/packages/distrib/sbml/UncertParameter.cpp branches/libsbml-experimental/src/sbml/packages/distrib/sbml/UncertParameter.h branches/libsbml-experimental/src/sbml/packages/distrib/sbml/UncertSpan.cpp branches/libsbml-experimental/src/sbml/packages/distrib/sbml/UncertSpan.h branches/libsbml-experimental/src/sbml/packages/distrib/sbml/Uncertainty.cpp branches/libsbml-experimental/src/sbml/packages/distrib/sbml/Uncertainty.h branches/libsbml-experimental/src/sbml/packages/distrib/sbml/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/distrib/sbml/test/TestRunner.cpp branches/libsbml-experimental/src/sbml/packages/distrib/util/AnnotationToDistribConverter.cpp branches/libsbml-experimental/src/sbml/packages/distrib/util/AnnotationToDistribConverter.h branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribToAnnotationConverter.cpp branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribToAnnotationConverter.h branches/libsbml-experimental/src/sbml/packages/distrib/util/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/distrib/util/test/TestDistribAnnotationConverter.cpp branches/libsbml-experimental/src/sbml/packages/distrib/util/test/TestRunner.cpp branches/libsbml-experimental/src/sbml/packages/distrib/validator/constraints/DistribConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/distrib/validator/constraints/DistribIdentifierConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/distrib/validator/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/distrib/validator/test/TestDistribConsistencyValidator.cpp branches/libsbml-experimental/src/sbml/packages/distrib/validator/test/TestFile.cpp branches/libsbml-experimental/src/sbml/packages/distrib/validator/test/TestFile.h branches/libsbml-experimental/src/sbml/packages/distrib/validator/test/TestValidator.cpp branches/libsbml-experimental/src/sbml/packages/distrib/validator/test/TestValidator.h branches/libsbml-experimental/src/sbml/packages/distrib-register.h branches/libsbml-experimental/src/sbml/packages/dyn/common/DynExtensionTypes.h branches/libsbml-experimental/src/sbml/packages/dyn/common/dynfwd.h branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynCompartmentPlugin.cpp branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynCompartmentPlugin.h branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynEventPlugin.cpp branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynEventPlugin.h branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynExtension.cpp branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynExtension.h branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynSBMLDocumentPlugin.cpp branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynSBMLDocumentPlugin.h branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynSBasePlugin.cpp branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynSBasePlugin.h branches/libsbml-experimental/src/sbml/packages/dyn/extension/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/dyn/extension/test/TestDynExtension.cpp branches/libsbml-experimental/src/sbml/packages/dyn/extension/test/TestReadDynExtension.cpp branches/libsbml-experimental/src/sbml/packages/dyn/extension/test/TestRunner.c branches/libsbml-experimental/src/sbml/packages/dyn/extension/test/TestWriteDynExtension.cpp branches/libsbml-experimental/src/sbml/packages/dyn/sbml/DynElement.cpp branches/libsbml-experimental/src/sbml/packages/dyn/sbml/DynElement.h branches/libsbml-experimental/src/sbml/packages/dyn/sbml/SpatialComponent.cpp branches/libsbml-experimental/src/sbml/packages/dyn/sbml/SpatialComponent.h branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynConsistencyValidator.cpp branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynConsistencyValidator.h branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynIdentifierConsistencyValidator.cpp branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynIdentifierConsistencyValidator.h branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynSBMLError.h branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynValidator.cpp branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynValidator.h branches/libsbml-experimental/src/sbml/packages/dyn/validator/constraints/DynConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/dyn/validator/constraints/DynIdentifierConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/dyn-register.h branches/libsbml-experimental/src/sbml/packages/fbc/extension/test/TestFbcAssociation.cpp branches/libsbml-experimental/src/sbml/packages/fbc/validator/constraints/FbcConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/fbc/validator/constraints/FbcIdentifierConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/groups-register.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/common/L3v2extendedmathExtensionTypes.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/common/l3v2extendedmathfwd.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/extension/L3v2extendedmathASTPlugin.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/extension/L3v2extendedmathExtension.cpp branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/extension/L3v2extendedmathExtension.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/extension/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/extension/test/Makefile.in branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/extension/test/TestL3v2EMExtension.cpp branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/extension/test/TestReadL3v2EMExtension.cpp branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/extension/test/TestReadWriteInfix.cpp branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/extension/test/TestRunner.c branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/extension/test/TestWriteL3v2EMExtension.cpp branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathMathMLConsistencyValidator.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathSBMLError.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathUnitConsistencyValidator.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathValidator.cpp branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathValidator.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2EMArgumentsUnitsCheck.cpp branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2EMArgumentsUnitsCheck.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2EMNumberArgsMathCheck.cpp branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2EMNumberArgsMathCheck.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2extendedmathMathMLConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2extendedmathUnitConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/constraints/Makefile.in branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/test/TestFile.cpp branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/test/TestFile.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/test/TestL3v2MathConsistencyValidator.cpp branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/test/TestValidator.cpp branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/test/TestValidator.h branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath/validator/test/test-data/Makefile.in branches/libsbml-experimental/src/sbml/packages/l3v2extendedmath-register.h branches/libsbml-experimental/src/sbml/packages/layout/validator/constraints/LayoutConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/layout/validator/constraints/LayoutIdentifierConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/multi-register.h branches/libsbml-experimental/src/sbml/packages/qual/validator/constraints/QualConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/qual/validator/constraints/QualIdentifierConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/qual/validator/constraints/QualMathConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfColorDefinitions.cpp branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfColorDefinitions.h branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfDrawables.cpp branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfDrawables.h branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfGlobalRenderInformation.h branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfGlobalStyles.cpp branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfGlobalStyles.h branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfGradientDefinitions.cpp branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfGradientDefinitions.h branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfGradientStops.cpp branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfGradientStops.h branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfLineEndings.cpp branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfLineEndings.h branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfLocalRenderInformation.h branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfLocalStyles.cpp branches/libsbml-experimental/src/sbml/packages/render/sbml/ListOfLocalStyles.h branches/libsbml-experimental/src/sbml/packages/render/sbml/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/render/validator/RenderConsistencyValidator.cpp branches/libsbml-experimental/src/sbml/packages/render/validator/RenderConsistencyValidator.h branches/libsbml-experimental/src/sbml/packages/render/validator/RenderIdentifierConsistencyValidator.cpp branches/libsbml-experimental/src/sbml/packages/render/validator/RenderIdentifierConsistencyValidator.h branches/libsbml-experimental/src/sbml/packages/render/validator/RenderSBMLError.h branches/libsbml-experimental/src/sbml/packages/render/validator/RenderSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/render/validator/RenderValidator.cpp branches/libsbml-experimental/src/sbml/packages/render/validator/RenderValidator.h branches/libsbml-experimental/src/sbml/packages/render/validator/constraints/Makefile.in branches/libsbml-experimental/src/sbml/packages/render/validator/constraints/RenderConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/render/validator/constraints/RenderConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/render/validator/constraints/RenderIdentifierConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/render/validator/constraints/RenderIdentifierConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/packages/render/validator/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/render/validator/test/TestFile.cpp branches/libsbml-experimental/src/sbml/packages/render/validator/test/TestFile.h branches/libsbml-experimental/src/sbml/packages/render/validator/test/TestRenderConsistencyValidator.cpp branches/libsbml-experimental/src/sbml/packages/render/validator/test/TestValidator.cpp branches/libsbml-experimental/src/sbml/packages/render/validator/test/TestValidator.h branches/libsbml-experimental/src/sbml/packages/render/validator/test/test-data/Makefile.in branches/libsbml-experimental/src/sbml/packages/render-register.h branches/libsbml-experimental/src/sbml/packages/req/common/ReqExtensionTypes.h branches/libsbml-experimental/src/sbml/packages/req/common/reqfwd.h branches/libsbml-experimental/src/sbml/packages/req/extension/ReqExtension.cpp branches/libsbml-experimental/src/sbml/packages/req/extension/ReqExtension.h branches/libsbml-experimental/src/sbml/packages/req/extension/ReqSBMLDocumentPlugin.cpp branches/libsbml-experimental/src/sbml/packages/req/extension/ReqSBMLDocumentPlugin.h branches/libsbml-experimental/src/sbml/packages/req/extension/ReqSBasePlugin.cpp branches/libsbml-experimental/src/sbml/packages/req/extension/ReqSBasePlugin.h branches/libsbml-experimental/src/sbml/packages/req/extension/test/CMakeLists.txt branches/libsbml-experimental/src/sbml/packages/req/extension/test/TestReadReqExtension.cpp branches/libsbml-experimental/src/sbml/packages/req/extension/test/TestReqExtension.cpp branches/libsbml-experimental/src/sbml/packages/req/extension/test/TestRunner.c branches/libsbml-experimental/src/sbml/packages/req/extension/test/TestWriteReqExtension.cpp branches/libsbml-experimental/src/sbml/packages/req/sbml/ChangedMath.cpp branches/libsbml-experimental/src/sbml/packages/req/sbml/ChangedMath.h branches/libsbml-experimental/src/sbml/packages/req/validator/ReqConsistencyValidator.cpp branches/libsbml-experimental/src/sbml/packages/req/validator/ReqConsistencyValidator.h branches/libsbml-experimental/src/sbml/packages/req/validator/ReqIdentifierConsistencyValidator.cpp branches/libsbml-experimental/src/sbml/packages/req/validator/ReqIdentifierConsistencyValidator.h branches/libsbml-experimental/src/sbml/packages/req/validator/ReqSBMLError.h branches/libsbml-experimental/src/sbml/packages/req/validator/ReqSBMLErrorTable.h branches/libsbml-experimental/src/sbml/packages/req/validator/ReqValidator.cpp branches/libsbml-experimental/src/sbml/packages/req/validator/ReqValidator.h branches/libsbml-experimental/src/sbml/packages/req/validator/constraints/ReqConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/req/validator/constraints/ReqIdentifierConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/packages/req-register.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialCompartmentMappingUnitSizesCheck.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialCompartmentMappingUnitSizesCheck.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSampledVolumeRangeOverlapCheck.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSampledVolumeRangeOverlapCheck.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSampledVolumeValueNotInRangeCheck.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSampledVolumeValueNotInRangeCheck.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSpatialSymbolReferenceUniqueRefCheck.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSpatialSymbolReferenceUniqueRefCheck.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueBoundaryConditionsCheck.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueBoundaryConditionsCheck.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueDiffusionCoefficientsCheck.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueDiffusionCoefficientsCheck.h branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueSampledVolumeValueCheck.cpp branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueSampledVolumeValueCheck.h branches/libsbml-experimental/src/sbml/packages/spatial-register.h branches/libsbml-experimental/src/sbml/units/test/TestDerivedUnitDefinitions_undefined.cpp branches/libsbml-experimental/src/sbml/units/test/TestFormulaUnitsData_map.cpp branches/libsbml-experimental/src/sbml/units/test/TestUnitFormulaFormatter3.cpp branches/libsbml-experimental/src/sbml/util/CallbackRegistry.h branches/libsbml-experimental/src/sbml/util/MathFilter.h branches/libsbml-experimental/src/sbml/validator/L3v2CompatibilityValidator.h branches/libsbml-experimental/src/sbml/validator/constraints/CiElementNot0DComp.cpp branches/libsbml-experimental/src/sbml/validator/constraints/ConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/FunctionDefinitionRecursion.cpp branches/libsbml-experimental/src/sbml/validator/constraints/IdNameNewOnSBase.cpp branches/libsbml-experimental/src/sbml/validator/constraints/IdNameNewOnSBase.h branches/libsbml-experimental/src/sbml/validator/constraints/IdentifierConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/InternalConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/L1CompatibilityConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/L2v1CompatibilityConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/L2v2CompatibilityConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/L2v3CompatibilityConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/L2v4CompatibilityConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/L3v1CompatibilityConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/L3v2CompatibilityConstraints.cpp branches/libsbml-experimental/src/sbml/validator/constraints/L3v2CompatibilityConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/MathMLConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/ModelUnitsDangling.cpp branches/libsbml-experimental/src/sbml/validator/constraints/ModelUnitsDangling.h branches/libsbml-experimental/src/sbml/validator/constraints/ModelingPracticeConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/OverdeterminedConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/RateOfAssignmentMathCheck.cpp branches/libsbml-experimental/src/sbml/validator/constraints/RateOfAssignmentMathCheck.h branches/libsbml-experimental/src/sbml/validator/constraints/RateOfCiTargetMathCheck.cpp branches/libsbml-experimental/src/sbml/validator/constraints/RateOfCiTargetMathCheck.h branches/libsbml-experimental/src/sbml/validator/constraints/RateOfCompartmentMathCheck.cpp branches/libsbml-experimental/src/sbml/validator/constraints/RateOfCompartmentMathCheck.h branches/libsbml-experimental/src/sbml/validator/constraints/RateOfCycles.h branches/libsbml-experimental/src/sbml/validator/constraints/ReportEmptyListOf.cpp branches/libsbml-experimental/src/sbml/validator/constraints/ReportEmptyListOf.h branches/libsbml-experimental/src/sbml/validator/constraints/SBOConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/StrictUnitConsistencyConstraints.cpp branches/libsbml-experimental/src/sbml/validator/constraints/StrictUnitConsistencyConstraintsDeclared.cxx branches/libsbml-experimental/src/sbml/validator/constraints/UnitConsistencyConstraintsDeclared.cxx Property Changed: ---------------- branches/libsbml-experimental/COPYING.html branches/libsbml-experimental/LICENSE.html branches/libsbml-experimental/VERSION_PACKAGES.ac branches/libsbml-experimental/arrays-package.cmake branches/libsbml-experimental/cmake_uninstall.cmake.in branches/libsbml-experimental/config/config.guess branches/libsbml-experimental/config/config.sub branches/libsbml-experimental/config/csharp.m4 branches/libsbml-experimental/config/dolt.m4 branches/libsbml-experimental/config/doxygen.m4 branches/libsbml-experimental/config/expat.m4 branches/libsbml-experimental/config/java.m4 branches/libsbml-experimental/config/libcheck.m4 branches/libsbml-experimental/config/libtool.m4 branches/libsbml-experimental/config/libxml.m4 branches/libsbml-experimental/config/ltmain.sh branches/libsbml-experimental/config/machine.m4 branches/libsbml-experimental/config/makefile-common-actions.mk branches/libsbml-experimental/config/matlab.m4 branches/libsbml-experimental/config/octave.m4 branches/libsbml-experimental/config/perl.m4 branches/libsbml-experimental/config/platform.m4 branches/libsbml-experimental/config/printJavaDataModel.java branches/libsbml-experimental/config/python.m4 branches/libsbml-experimental/config/ruby.m4 branches/libsbml-experimental/config/runldpath.m4 branches/libsbml-experimental/config/swig.m4 branches/libsbml-experimental/config/xercesc.m4 branches/libsbml-experimental/config/zlib.m4 branches/libsbml-experimental/configure.ac branches/libsbml-experimental/dev/misc-files/create_matlab_dir/makeSFDir.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-arrays.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-distrib.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-dyn.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-multi.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-render.bat branches/libsbml-experimental/dev/packages/create_archives/create-zip-req.bat branches/libsbml-experiment... [truncated message content] |