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-11-21 00:51:34
|
Revision: 26170 http://sourceforge.net/p/sbml/code/26170 Author: luciansmith Date: 2019-11-21 00:51:29 +0000 (Thu, 21 Nov 2019) Log Message: ----------- Add support for spatial rule 21753. 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/1221507-pass-00-03.xml Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-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-11-21 00:27:04 UTC (rev 26169) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-21 00:51:29 UTC (rev 26170) @@ -175,6 +175,7 @@ , SpatialSampledVolumeNeedsMaxWithMin = 1221750 , SpatialSampledVolumeNeedsMinWithMax = 1221751 , SpatialSampledVolumeSampledValueMinMax = 1221752 +, SpatialSampledVolumeMinLessThanMax = 1221753 , SpatialAnalyticGeometryAllowedCoreAttributes = 1221801 , SpatialAnalyticGeometryAllowedCoreElements = 1221802 , SpatialAnalyticGeometryAllowedElements = 1221803 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-21 00:27:04 UTC (rev 26169) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-21 00:51:29 UTC (rev 26170) @@ -1368,6 +1368,16 @@ } }, + // 1221753 + { SpatialSampledVolumeMinLessThanMax, + "A <sampleVolume> 'minValue' must be less than or equal to the 'maxValue'.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attribute 'minValue' of a <sampledVolume> must have a value less than or equal to the value of the 'maxValue' attribute of that <sampledVolume>.", + { "L3V1 Spatial V1 Section" + } + }, + // 1221801 { SpatialAnalyticGeometryAllowedCoreAttributes, "Core attributes allowed on <analyticGeometry>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-21 00:27:04 UTC (rev 26169) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-21 00:51:29 UTC (rev 26170) @@ -1328,6 +1328,34 @@ END_CONSTRAINT +// 1221753 +START_CONSTRAINT(SpatialSampledVolumeMinLessThanMax, SampledVolume, svol) +{ + bool fail = false; + pre(svol.isSetMinValue()); + pre(svol.isSetMaxValue()); + if (svol.getMaxValue() < svol.getMinValue()) { + stringstream ss_msg; + ss_msg << "A <sampledVolume>"; + if (svol.isSetId()) + { + ss_msg << " with id '" << svol.getId() << "'"; + } + ss_msg << " has a 'spatial:maxValue' attribute of '"; + ss_msg << svol.getMaxValue(); + ss_msg << "', which is less than '"; + ss_msg << svol.getMinValue(); + ss_msg << "', the value of the attribute 'spatial:minValue'"; + msg = ss_msg.str(); + fail = true; + + } + + 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-11-21 00:27:04 UTC (rev 26169) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-21 00:51:29 UTC (rev 26170) @@ -81,6 +81,7 @@ addConstraint(new VConstraintInteriorPointSpatialInteriorPointTwoCoordsIn2DGeometry(*this)); addConstraint(new VConstraintInteriorPointSpatialInteriorPointThreeCoordsIn3DGeometry(*this)); addConstraint(new VConstraintAdjacentDomainsSpatialAdjacentDomainsMustBeAdjacent(*this)); +addConstraint(new VConstraintSampledVolumeSpatialSampledVolumeMinLessThanMax(*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/1221507-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221507-pass-00-03.xml 2019-11-21 00:27:04 UTC (rev 26169) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221507-pass-00-03.xml 2019-11-21 00:51:29 UTC (rev 26170) @@ -11,7 +11,7 @@ <spatial:listOfGeometryDefinitions> <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> <spatial:listOfSampledVolumes sboTerm="SBO:0000001"> - <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0.5"/> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0.5" spatial:minValue="0"/> </spatial:listOfSampledVolumes> </spatial:sampledFieldGeometry> </spatial:listOfGeometryDefinitions> Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-fail-01-01.xml 2019-11-21 00:51:29 UTC (rev 26170) @@ -0,0 +1,26 @@ +<?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:listOfGeometryDefinitions> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:minValue="0.5" spatial:maxValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="3" spatial:samplesLength="3">0 0 1</spatial:sampledField> + </spatial:listOfSampledFields> + </spatial:geometry> + </model> +</sbml> Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-pass-00-01.xml 2019-11-21 00:51:29 UTC (rev 26170) @@ -0,0 +1,26 @@ +<?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:listOfGeometryDefinitions> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:minValue="0" spatial:maxValue="0.5"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="3" spatial:samplesLength="3">0 0 1</spatial:sampledField> + </spatial:listOfSampledFields> + </spatial:geometry> + </model> +</sbml> Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221753-pass-00-02.xml 2019-11-21 00:51:29 UTC (rev 26170) @@ -0,0 +1,26 @@ +<?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:listOfGeometryDefinitions> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:minValue="0.5" spatial:maxValue="0.5"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="3" spatial:samplesLength="3">0 0 1</spatial:sampledField> + </spatial:listOfSampledFields> + </spatial:geometry> + </model> +</sbml> |
From: <luc...@us...> - 2019-11-21 00:27:05
|
Revision: 26169 http://sourceforge.net/p/sbml/code/26169 Author: luciansmith Date: 2019-11-21 00:27:04 +0000 (Thu, 21 Nov 2019) Log Message: ----------- Fix wording of spatial rule 21905. 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-11-21 00:20:51 UTC (rev 26168) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-21 00:27:04 UTC (rev 26169) @@ -1486,8 +1486,8 @@ LIBSBML_SEV_ERROR, "The value of the attribute 'spatial:functionType' of an <analyticVolume> " "object must conform to the syntax of SBML data type 'FunctionKind' and may " - "only take on the allowed values of 'FunctionKind' defined in SBML; that " - "is, the value must be one of the following: 'layered'.", + "only take on the allowed value of 'FunctionKind' defined in SBML; that " + "is, the value must be 'layered'.", { "L3V1 Spatial V1 Section" } }, |
From: <luc...@us...> - 2019-11-21 00:20:54
|
Revision: 26168 http://sourceforge.net/p/sbml/code/26168 Author: luciansmith Date: 2019-11-21 00:20:51 +0000 (Thu, 21 Nov 2019) Log Message: ----------- Add partial support for spatial rule 21150, and fix the five billion old models that violated it. 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/1220301-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220301-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-05.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-07.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-09.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221104-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221104-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221105-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221105-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221201-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221201-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221201-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221201-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221202-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221202-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221202-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221203-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221203-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221203-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221203-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221204-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221204-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-pass-00-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-pass-00-05.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-pass-00-06.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223350-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223350-fail-02-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223350-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223450-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223450-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223450-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223450-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223451-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223451-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223451-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223451-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223452-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223452-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223452-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223452-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223454-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223454-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223504-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223504-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-05.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-06.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-07.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-08.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-09.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-10.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-11.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-12.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-13.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-14.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-15.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-16.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-17.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-18.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-02-19.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-02-20.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-02-21.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-pass-00-03.xml Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221150-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221150-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-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-21 00:20:51 UTC (rev 26168) @@ -120,6 +120,7 @@ , SpatialAdjacentDomainsDomain1MustBeDomain = 1221104 , SpatialAdjacentDomainsDomain2MustBeDomain = 1221105 , SpatialAdjacentDomainsNameMustBeString = 1221106 +, SpatialAdjacentDomainsMustBeAdjacent = 1221150 , SpatialGeometryDefinitionAllowedCoreAttributes = 1221201 , SpatialGeometryDefinitionAllowedCoreElements = 1221202 , SpatialGeometryDefinitionAllowedAttributes = 1221203 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-21 00:20:51 UTC (rev 26168) @@ -722,6 +722,16 @@ } }, + // 1221150 + { SpatialAdjacentDomainsMustBeAdjacent, + "The domains in AdjacentDomains must be adjacent.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "The attributes 'domain1' and 'domain2' of an <adjacentDomains> must reference two different domains that are spatially adjacent.", + { "L3V1 Spatial V1 Section" + } + }, + // 1221201 { SpatialGeometryDefinitionAllowedCoreAttributes, "Core attributes allowed on <geometryDefinition>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-21 00:20:51 UTC (rev 26168) @@ -1301,6 +1301,33 @@ END_CONSTRAINT +// 1221150 +START_CONSTRAINT(SpatialAdjacentDomainsMustBeAdjacent, AdjacentDomains, adom) +{ + bool fail = false; + pre(adom.isSetDomain1()); + pre(adom.isSetDomain2()); + if (adom.getDomain1() == adom.getDomain2()) { + msg = "An <adjacentDomain>"; + if (adom.isSetId()) + { + msg += " with id '" + adom.getId() + "'"; + } + msg += " defines both 'domain1' and 'domain2' to be '"; + msg += adom.getDomain1() + "'."; + fail = true; + } + + //NOTE: It would be fantastic if we could actually measure space and figure out if these + // domains were adjacent, but that's well well beyond the capabilities of this + // software. Other spatially-aware simulators can test this themselves and use this error + // ID to report it, if they want. + + 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-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-21 00:20:51 UTC (rev 26168) @@ -80,9 +80,10 @@ addConstraint(new VConstraintInteriorPointSpatialInteriorPointOneCoordIn1DGeometry(*this)); addConstraint(new VConstraintInteriorPointSpatialInteriorPointTwoCoordsIn2DGeometry(*this)); addConstraint(new VConstraintInteriorPointSpatialInteriorPointThreeCoordsIn3DGeometry(*this)); +addConstraint(new VConstraintAdjacentDomainsSpatialAdjacentDomainsMustBeAdjacent(*this)); //Constraints defined in their own class ('global constraints') -addConstraint(new SpatialCompartmentMappingUnitSizesCheck(1221351, *this)); +addConstraint(new SpatialCompartmentMappingUnitSizesCheck(SpatialCompartmentMappingUnitSizesSum, *this)); addConstraint(new SpatialSpatialSymbolReferenceUniqueRefCheck(SpatialSpatialSymbolReferenceUniqueRef, *this)); addConstraint(new SpatialUniqueDiffusionCoefficientsCheck(SpatialNoDiffusionCoefficientOverlap, *this)); addConstraint(new SpatialUniqueAdvectionCoefficientsCheck(SpatialAdvectionCoefficientsMustBeUnique, *this)); Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220301-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220301-fail-01-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220301-fail-01-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220301-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220301-pass-00-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220301-pass-00-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-02.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-02.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-03.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-03.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-04.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-04.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-05.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-05.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-05.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-07.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-07.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-07.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-09.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-09.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-09.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-02.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-02.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-04.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-04.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -26,9 +26,9 @@ </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> - <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> - </spatial:listOfAdjacentDomains> + + + <spatial:listOfGeometryDefinitions> <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> <spatial:listOfAnalyticVolumes> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-fail-01-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-fail-01-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains foo="someString" spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + <spatial:adjacentDomains foo="someString" spatial:domain1="domain_1" spatial:domain2="domain_2" spatial:id="adjacentDomains_1"/> </spatial:listOfAdjacentDomains> </spatial:geometry> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_2" spatial:id="adjacentDomains_1"/> </spatial:listOfAdjacentDomains> </spatial:geometry> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-02.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-02.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains metaid="someString" spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + <spatial:adjacentDomains metaid="someString" spatial:domain1="domain_1" spatial:domain2="domain_2" spatial:id="adjacentDomains_1"/> </spatial:listOfAdjacentDomains> </spatial:geometry> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-03.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221101-pass-00-03.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains sboTerm="SBO:0000001" spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + <spatial:adjacentDomains sboTerm="SBO:0000001" spatial:domain1="domain_1" spatial:domain2="domain_2" spatial:id="adjacentDomains_1"/> </spatial:listOfAdjacentDomains> </spatial:geometry> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_2" spatial:id="adjacentDomains_1"/> </spatial:listOfAdjacentDomains> </spatial:geometry> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-02.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-02.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_2" spatial:id="adjacentDomains_1"> <annotation/> </spatial:adjacentDomains> </spatial:listOfAdjacentDomains> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-03.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221102-pass-00-03.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_2" spatial:id="adjacentDomains_1"> <notes/> </spatial:adjacentDomains> </spatial:listOfAdjacentDomains> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:foo="someString" spatial:id="adjacentDomains_1"/> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_2" spatial:foo="someString" spatial:id="adjacentDomains_1"/> </spatial:listOfAdjacentDomains> </spatial:geometry> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-02.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-02.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1"/> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_2"/> </spatial:listOfAdjacentDomains> </spatial:geometry> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-03.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-03.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + <spatial:adjacentDomains spatial:domain2="domain_2" spatial:id="adjacentDomains_1"/> </spatial:listOfAdjacentDomains> </spatial:geometry> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-04.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-fail-01-04.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,6 +25,11 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> <spatial:adjacentDomains spatial:domain1="domain_1" spatial:id="adjacentDomains_1"/> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-pass-00-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221103-pass-00-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_2" spatial:id="adjacentDomains_1"/> </spatial:listOfAdjacentDomains> </spatial:geometry> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221104-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221104-fail-01-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221104-fail-01-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="someString" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + <spatial:adjacentDomains spatial:domain1="someString" spatial:domain2="domain_2" spatial:id="adjacentDomains_1"/> </spatial:listOfAdjacentDomains> </spatial:geometry> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221104-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221104-pass-00-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221104-pass-00-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> - <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_2" spatial:id="adjacentDomains_1"/> </spatial:listOfAdjacentDomains> </spatial:geometry> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221105-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221105-fail-01-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221105-fail-01-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,6 +25,11 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatial:coord2="0.5" spatial:coord3="0.5"/> + </spatial:listOfInteriorPoints> + </spatial:domain> </spatial:listOfDomains> <spatial:listOfAdjacentDomains> <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="someString" spatial:id="adjacentDomains_1"/> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221105-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221105-pass-00-01.xml 2019-11-20 23:38:03 UTC (rev 26167) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221105-pass-00-01.xml 2019-11-21 00:20:51 UTC (rev 26168) @@ -25,9 +25,14 @@ <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_2"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0.5" spatia... [truncated message content] |
From: <luc...@us...> - 2019-11-20 23:38:05
|
Revision: 26167 http://sourceforge.net/p/sbml/code/26167 Author: luciansmith Date: 2019-11-20 23:38:03 +0000 (Wed, 20 Nov 2019) Log Message: ----------- Add support for spatial rules 20951 and 20952, and fix other models that now fail it. 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/1220903-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220903-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-pass-00-02.xml Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220905-fail-01-01-1220952.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220906-fail-01-01-1220952.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-pass-00-01.xml Removed Paths: ------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220905-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220906-fail-01-01.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-20 22:13:31 UTC (rev 26166) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-20 23:38:03 UTC (rev 26167) @@ -104,6 +104,8 @@ , SpatialInteriorPointCoord2MustBeDouble = 1220905 , SpatialInteriorPointCoord3MustBeDouble = 1220906 , SpatialInteriorPointOneCoordIn1DGeometry = 1220950 +, SpatialInteriorPointTwoCoordsIn2DGeometry = 1220951 +, SpatialInteriorPointThreeCoordsIn3DGeometry = 1220952 , SpatialBoundaryAllowedCoreAttributes = 1221001 , SpatialBoundaryAllowedCoreElements = 1221002 , SpatialBoundaryAllowedAttributes = 1221003 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 22:13:31 UTC (rev 26166) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 23:38:03 UTC (rev 26167) @@ -532,7 +532,7 @@ // 1220950 { SpatialInteriorPointOneCoordIn1DGeometry, - "The 'coord3' attribute must be Double.", + "Only one 'coord' attribute in 1D geometry.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, "If the <geometry> of the <model> has exactly one <coordinateComponent> child, an <interiorPoint> object must define the attribute 'coord1', and must not define the attributes 'coord2' and 'coord3'.", @@ -540,6 +540,26 @@ } }, + // 1220951 + { SpatialInteriorPointTwoCoordsIn2DGeometry, + "Exactly two 'coord' attributes in 2D geometry.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the <geometry> of the <model> has exactly two <coordinateComponent> children, an <interiorPoint> object must define the attributes 'coord1' and 'coord2', and must not define the attribute 'coord3'.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1220952 + { SpatialInteriorPointThreeCoordsIn3DGeometry, + "Exactly three 'coord' attributes in 3D geometry.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the <geometry> of the <model> has exactly three <coordinateComponent> children, an <interiorPoint> object must define the attributes 'coord1', 'coord2', and 'coord3'.", + { "L3V1 Spatial V1 Section" + } + }, + // 1221001 { SpatialBoundaryAllowedCoreAttributes, "Core attributes allowed on <boundary>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 22:13:31 UTC (rev 26166) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 23:38:03 UTC (rev 26167) @@ -1181,7 +1181,7 @@ END_CONSTRAINT -// 1221650 +// 1220950 START_CONSTRAINT(SpatialInteriorPointOneCoordIn1DGeometry, InteriorPoint, ipoint) { SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); @@ -1222,6 +1222,85 @@ END_CONSTRAINT +// 1220951 +START_CONSTRAINT(SpatialInteriorPointTwoCoordsIn2DGeometry, InteriorPoint, ipoint) +{ + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + pre(geometry->getNumCoordinateComponents()==2); + + bool fail = false; + stringstream wrongvals; + if (!ipoint.isSetCoord2()) { + fail = true; + wrongvals << " doesn't define the coord2 attribute"; + } + if (ipoint.isSetCoord3()) { + if (fail) { + wrongvals << ", and has a "; + } + else { + wrongvals << " defines a "; + } + wrongvals << "coord3 with a value of '"; + wrongvals << ipoint.getCoord3(); + wrongvals << "'"; + fail = true; + } + if (fail) { + msg = "An <interiorPoint>"; + if (ipoint.isSetId()) + { + msg += " with id '" + ipoint.getId() + "'"; + } + msg += wrongvals.str(); + msg += ", but the <listOfCoordinateComponents> has exactly two children."; + } + + inv(fail == false); +} +END_CONSTRAINT + + +// 1220952 +START_CONSTRAINT(SpatialInteriorPointThreeCoordsIn3DGeometry, InteriorPoint, ipoint) +{ + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + pre(geometry->getNumCoordinateComponents()==3); + + bool fail = false; + stringstream wrongvals; + if (!ipoint.isSetCoord2()) { + fail = true; + wrongvals << " doesn't define the coord2 attribute"; + } + if (!ipoint.isSetCoord3()) { + if (fail) { + wrongvals << ", and also"; + } + wrongvals << " doesn't define the coord3 attribute"; + fail = true; + } + if (fail) { + msg = "An <interiorPoint>"; + if (ipoint.isSetId()) + { + msg += " with id '" + ipoint.getId() + "'"; + } + msg += wrongvals.str(); + msg += ", but the <listOfCoordinateComponents> has exactly three children."; + } + + 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-11-20 22:13:31 UTC (rev 26166) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-20 23:38:03 UTC (rev 26167) @@ -78,6 +78,8 @@ addConstraint(new VConstraintParameterSpatialDomainTypeNoAssignment(*this)); addConstraint(new VConstraintParameterSpatialDomainNoAssignment(*this)); addConstraint(new VConstraintInteriorPointSpatialInteriorPointOneCoordIn1DGeometry(*this)); +addConstraint(new VConstraintInteriorPointSpatialInteriorPointTwoCoordsIn2DGeometry(*this)); +addConstraint(new VConstraintInteriorPointSpatialInteriorPointThreeCoordsIn3DGeometry(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(1221351, *this)); Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220903-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220903-pass-00-02.xml 2019-11-20 22:13:31 UTC (rev 26166) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220903-pass-00-02.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -22,7 +22,7 @@ <spatial:listOfDomains> <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> <spatial:listOfInteriorPoints> - <spatial:interiorPoint spatial:coord1="0" spatial:coord3="0"/> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220903-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220903-pass-00-03.xml 2019-11-20 22:13:31 UTC (rev 26166) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220903-pass-00-03.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -22,7 +22,7 @@ <spatial:listOfDomains> <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> <spatial:listOfInteriorPoints> - <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0"/> + <spatial:interiorPoint spatial:coord1="0" spatial:coord2="0" spatial:coord3="0"/> </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> Copied: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220905-fail-01-01-1220952.xml (from rev 26166, branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220905-fail-01-01.xml) =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220905-fail-01-01-1220952.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220905-fail-01-01-1220952.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -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: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="someString" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + </spatial:geometry> + </model> +</sbml> + Deleted: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220905-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220905-fail-01-01.xml 2019-11-20 22:13:31 UTC (rev 26166) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220905-fail-01-01.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -1,32 +0,0 @@ -<?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="someString" spatial:coord3="0"/> - </spatial:listOfInteriorPoints> - </spatial:domain> - </spatial:listOfDomains> - </spatial:geometry> - </model> -</sbml> - Copied: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220906-fail-01-01-1220952.xml (from rev 26166, branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220906-fail-01-01.xml) =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220906-fail-01-01-1220952.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220906-fail-01-01-1220952.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -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: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="someString"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + </spatial:geometry> + </model> +</sbml> + Deleted: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220906-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220906-fail-01-01.xml 2019-11-20 22:13:31 UTC (rev 26166) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220906-fail-01-01.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -1,32 +0,0 @@ -<?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="someString"/> - </spatial:listOfInteriorPoints> - </spatial:domain> - </spatial:listOfDomains> - </spatial:geometry> - </model> -</sbml> - Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-01.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -0,0 +1,28 @@ +<?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="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:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-02.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -0,0 +1,28 @@ +<?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="1"/> + </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:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-fail-01-03.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -0,0 +1,28 @@ +<?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="1"/> + </spatial:listOfDomainTypes> + <spatial:listOfDomains> + <spatial:domain spatial:domainType="domainType_1" spatial:id="domain_1"> + <spatial:listOfInteriorPoints> + <spatial:interiorPoint spatial:coord1="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220951-pass-00-01.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -0,0 +1,28 @@ +<?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="1"/> + </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:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-01.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -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: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:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-02.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -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: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:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-fail-01-03.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -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: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:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220952-pass-00-01.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -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: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:geometry> + </model> +</sbml> + Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-01.xml 2019-11-20 22:13:31 UTC (rev 26166) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-01.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -18,7 +18,7 @@ <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:interiorPoint spatial:coord1="0" spatial:coord2="0"/> </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-pass-00-01.xml 2019-11-20 22:13:31 UTC (rev 26166) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-pass-00-01.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -18,7 +18,7 @@ <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:interiorPoint spatial:coord1="0" spatial:coord2="0"/> </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-pass-00-02.xml 2019-11-20 22:13:31 UTC (rev 26166) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-pass-00-02.xml 2019-11-20 23:38:03 UTC (rev 26167) @@ -18,7 +18,7 @@ <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:interiorPoint spatial:coord1="0" spatial:coord2="0"/> </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> |
From: <luc...@us...> - 2019-11-20 22:13:32
|
Revision: 26166 http://sourceforge.net/p/sbml/code/26166 Author: luciansmith Date: 2019-11-20 22:13:31 +0000 (Wed, 20 Nov 2019) Log Message: ----------- Add support for spatial rule 20950, and fix old models that violated it. 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/1223455-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223455-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223455-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-03.xml Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-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-11-20 21:28:51 UTC (rev 26165) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-20 22:13:31 UTC (rev 26166) @@ -103,6 +103,7 @@ , SpatialInteriorPointCoord1MustBeDouble = 1220904 , SpatialInteriorPointCoord2MustBeDouble = 1220905 , SpatialInteriorPointCoord3MustBeDouble = 1220906 +, SpatialInteriorPointOneCoordIn1DGeometry = 1220950 , SpatialBoundaryAllowedCoreAttributes = 1221001 , SpatialBoundaryAllowedCoreElements = 1221002 , SpatialBoundaryAllowedAttributes = 1221003 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 21:28:51 UTC (rev 26165) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 22:13:31 UTC (rev 26166) @@ -530,6 +530,16 @@ } }, + // 1220950 + { SpatialInteriorPointOneCoordIn1DGeometry, + "The 'coord3' attribute must be Double.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If the <geometry> of the <model> has exactly one <coordinateComponent> child, an <interiorPoint> object must define the attribute 'coord1', and must not define the attributes 'coord2' and 'coord3'.", + { "L3V1 Spatial V1 Section" + } + }, + // 1221001 { SpatialBoundaryAllowedCoreAttributes, "Core attributes allowed on <boundary>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 21:28:51 UTC (rev 26165) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 22:13:31 UTC (rev 26166) @@ -1181,6 +1181,47 @@ END_CONSTRAINT +// 1221650 +START_CONSTRAINT(SpatialInteriorPointOneCoordIn1DGeometry, InteriorPoint, ipoint) +{ + SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geometry = plug->getGeometry(); + pre(geometry->getNumCoordinateComponents()==1); + + bool fail = false; + stringstream wrongvals; + if (ipoint.isSetCoord2()) { + fail = true; + wrongvals << "coord2 with a value of '"; + wrongvals << ipoint.getCoord2(); + wrongvals << "'"; + } + if (ipoint.isSetCoord3()) { + if (fail) { + wrongvals << ", and a "; + } + wrongvals << "coord3 with a value of '"; + wrongvals << ipoint.getCoord3(); + wrongvals << "'"; + fail = true; + } + if (fail) { + msg = "An <interiorPoint>"; + if (ipoint.isSetId()) + { + msg += " with id '" + ipoint.getId() + "'"; + } + msg += " defines a " + wrongvals.str(); + msg += ", but the <listOfCoordinateComponents> has exactly one child."; + } + + 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-11-20 21:28:51 UTC (rev 26165) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-20 22:13:31 UTC (rev 26166) @@ -77,6 +77,7 @@ addConstraint(new VConstraintParameterSpatialBoundaryMustBeConstant(*this)); addConstraint(new VConstraintParameterSpatialDomainTypeNoAssignment(*this)); addConstraint(new VConstraintParameterSpatialDomainNoAssignment(*this)); +addConstraint(new VConstraintInteriorPointSpatialInteriorPointOneCoordIn1DGeometry(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(1221351, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-01.xml 2019-11-20 22:13:31 UTC (rev 26166) @@ -0,0 +1,24 @@ +<?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:coord2="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-02.xml 2019-11-20 22:13:31 UTC (rev 26166) @@ -0,0 +1,24 @@ +<?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:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-fail-01-03.xml 2019-11-20 22:13:31 UTC (rev 26166) @@ -0,0 +1,24 @@ +<?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:coord2="0" spatial:coord3="0"/> + </spatial:listOfInteriorPoints> + </spatial:domain> + </spatial:listOfDomains> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220950-pass-00-01.xml 2019-11-20 22:13:31 UTC (rev 26166) @@ -0,0 +1,24 @@ +<?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:geometry> + </model> +</sbml> + Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223455-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223455-fail-01-01.xml 2019-11-20 21:28:51 UTC (rev 26165) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223455-fail-01-01.xml 2019-11-20 22:13:31 UTC (rev 26166) @@ -14,7 +14,7 @@ <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:interiorPoint spatial:coord1="0"/> </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223455-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223455-fail-01-02.xml 2019-11-20 21:28:51 UTC (rev 26165) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223455-fail-01-02.xml 2019-11-20 22:13:31 UTC (rev 26166) @@ -14,7 +14,7 @@ <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:interiorPoint spatial:coord1="0"/> </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223455-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223455-pass-00-01.xml 2019-11-20 21:28:51 UTC (rev 26165) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223455-pass-00-01.xml 2019-11-20 22:13:31 UTC (rev 26166) @@ -14,7 +14,7 @@ <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:interiorPoint spatial:coord1="0"/> </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-02.xml 2019-11-20 21:28:51 UTC (rev 26165) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-02.xml 2019-11-20 22:13:31 UTC (rev 26166) @@ -14,7 +14,7 @@ <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:interiorPoint spatial:coord1="0"/> </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-03.xml 2019-11-20 21:28:51 UTC (rev 26165) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223456-fail-01-03.xml 2019-11-20 22:13:31 UTC (rev 26166) @@ -14,7 +14,7 @@ <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:interiorPoint spatial:coord1="0"/> </spatial:listOfInteriorPoints> </spatial:domain> </spatial:listOfDomains> |
From: <luc...@us...> - 2019-11-20 21:28:53
|
Revision: 26165 http://sourceforge.net/p/sbml/code/26165 Author: luciansmith Date: 2019-11-20 21:28:51 +0000 (Wed, 20 Nov 2019) Log Message: ----------- Fix the names of all attributes from xOne, xTwo, xThree to x1, x2, x3. 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-11-20 21:10:39 UTC (rev 26164) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 21:28:51 UTC (rev 26165) @@ -489,8 +489,8 @@ LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, "An <interiorPoint> object must have the required attribute " - "'spatial:coordOne', and may have the optional attributes " - "'spatial:coordTwo' and 'spatial:coordThree'. No other attributes from the " + "'spatial:coord1', and may have the optional attributes " + "'spatial:coord2' and 'spatial:coord3'. No other attributes from the " "SBML Level 3 Spatial Processes namespaces are permitted on an " "<interiorPoint> object. ", { "L3V1 Spatial V1 Section" @@ -502,7 +502,7 @@ "The 'coord1' attribute must be Double.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The attribute 'spatial:coordOne' on an <interiorPoint> must have a value " + "The attribute 'spatial:coord1' on an <interiorPoint> must have a value " "of data type 'double'.", { "L3V1 Spatial V1 Section" } @@ -513,7 +513,7 @@ "The 'coord2' attribute must be Double.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The attribute 'spatial:coordTwo' on an <interiorPoint> must have a value " + "The attribute 'spatial:coord2' on an <interiorPoint> must have a value " "of data type 'double'.", { "L3V1 Spatial V1 Section" } @@ -524,7 +524,7 @@ "The 'coord3' attribute must be Double.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The attribute 'spatial:coordThree' on an <interiorPoint> must have a value " + "The attribute 'spatial:coord3' on an <interiorPoint> must have a value " "of data type 'double'.", { "L3V1 Spatial V1 Section" } @@ -649,7 +649,7 @@ LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, "An <adjacentDomains> object must have the required attributes " - "'spatial:id', 'spatial:domainOne' and 'spatial:domainTwo', and may have " + "'spatial:id', 'spatial:domain1' and 'spatial:domain2', and may have " "the optional attribute 'spatial:name'. No other attributes from the SBML " "Level 3 Spatial Processes namespaces are permitted on an <adjacentDomains> " "object. ", @@ -662,7 +662,7 @@ "The attribute 'domain1' must point to Domain object.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The value of the attribute 'spatial:domainOne' of an <adjacentDomains> " + "The value of the attribute 'spatial:domain1' of an <adjacentDomains> " "object must be the identifier of an existing <domain> object defined in " "the enclosing <model> object.", { "L3V1 Spatial V1 Section" @@ -674,7 +674,7 @@ "The attribute 'domain2' must point to Domain object.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The value of the attribute 'spatial:domainTwo' of an <adjacentDomains> " + "The value of the attribute 'spatial:domain2' of an <adjacentDomains> " "object must be the identifier of an existing <domain> object defined in " "the enclosing <model> object.", { "L3V1 Spatial V1 Section" @@ -1057,10 +1057,10 @@ LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, "A <sampledField> object must have the required attributes 'spatial:id', " - "'spatial:dataType', 'spatial:numSamplesOne', 'spatial:interpolationType', " + "'spatial:dataType', 'spatial:numSamples1', 'spatial:interpolationType', " "'spatial:compression', 'spatial:samples' and 'spatial:samplesLength', and " - "may have the optional attributes 'spatial:name', 'spatial:numSamplesTwo' " - "and 'spatial:numSamplesThree'. No other attributes from the SBML Level 3 " + "may have the optional attributes 'spatial:name', 'spatial:numSamples2' " + "and 'spatial:numSamples3'. No other attributes from the SBML Level 3 " "Spatial Processes namespaces are permitted on a <sampledField> object. ", { "L3V1 Spatial V1 Section" } @@ -1085,7 +1085,7 @@ "The 'numSamples1' attribute must be Integer.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The attribute 'spatial:numSamplesOne' on a <sampledField> must have a " + "The attribute 'spatial:numSamples1' on a <sampledField> must have a " "value of data type 'integer'.", { "L3V1 Spatial V1 Section" } @@ -1157,7 +1157,7 @@ "The 'numSamples2' attribute must be Integer.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The attribute 'spatial:numSamplesTwo' on a <sampledField> must have a " + "The attribute 'spatial:numSamples2' on a <sampledField> must have a " "value of data type 'integer'.", { "L3V1 Spatial V1 Section" } @@ -1168,7 +1168,7 @@ "The 'numSamples3' attribute must be Integer.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The attribute 'spatial:numSamplesThree' on a <sampledField> must have a " + "The attribute 'spatial:numSamples3' on a <sampledField> must have a " "value of data type 'integer'.", { "L3V1 Spatial V1 Section" } @@ -2511,8 +2511,8 @@ LIBSBML_SEV_ERROR, "A <diffusionCoefficient> object must have the required attributes " "'spatial:variable' and 'spatial:type', and may have the optional " - "attributes 'spatial:coordinateReferenceOne' and " - "'spatial:coordinateReferenceTwo'. No other attributes from the SBML Level " + "attributes 'spatial:coordinateReference1' and " + "'spatial:coordinateReference2'. No other attributes from the SBML Level " "3 Spatial Processes namespaces are permitted on a <diffusionCoefficient> " "object. ", { "L3V1 Spatial V1 Section" @@ -2550,7 +2550,7 @@ "The 'coordinateReference1' attribute must be CoordinateKindEnum.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The value of the attribute 'spatial:coordinateReferenceOne' of a " + "The value of the attribute 'spatial:coordinateReference1' of a " "<diffusionCoefficient> object must conform to the syntax of SBML data type " "'CoordinateKind' and may only take on the allowed values of " "'CoordinateKind' defined in SBML; that is, the value must be one of the " @@ -2564,7 +2564,7 @@ "The 'coordinateReference2' attribute must be CoordinateKindEnum.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - "The value of the attribute 'spatial:coordinateReferenceTwo' of a " + "The value of the attribute 'spatial:coordinateReference2' of a " "<diffusionCoefficient> object must conform to the syntax of SBML data type " "'CoordinateKind' and may only take on the allowed values of " "'CoordinateKind' defined in SBML; that is, the value must be one of the " |
From: <luc...@us...> - 2019-11-20 21:10:41
|
Revision: 26164 http://sourceforge.net/p/sbml/code/26164 Author: luciansmith Date: 2019-11-20 21:10:39 +0000 (Wed, 20 Nov 2019) Log Message: ----------- Wording tweak. 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-11-20 21:09:49 UTC (rev 26163) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 21:10:39 UTC (rev 26164) @@ -345,7 +345,7 @@ // 1220753 { SpatialDomainTypeNoAssignment, - "DomainTypes can't be assigned.", + "DomainTypes can't be assigned values.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, "If a <parameter> has a child <spatialSymbolReference> that points to a <domainType>, that <parameter> may not be the target of an <initialAssignment>, <eventAssignment>, <rateRule>, or <assignmentRule>, may not be determined by an <algebraicRule>, and may not have the 'value' attribute.", @@ -451,7 +451,7 @@ // 1220753 { SpatialDomainNoAssignment, - "Domains can't be assigned.", + "Domains can't be assigned values.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, "If a <parameter> has a child <spatialSymbolReference> that points to a <domain>, that <parameter> may not be the target of an <initialAssignment>, <eventAssignment>, <rateRule>, or <assignmentRule>, may not be determined by an <algebraicRule>, and may not have the 'value' attribute.", |
From: <luc...@us...> - 2019-11-20 21:09:51
|
Revision: 26163 http://sourceforge.net/p/sbml/code/26163 Author: luciansmith Date: 2019-11-20 21:09:49 +0000 (Wed, 20 Nov 2019) Log Message: ----------- Add support for spatial rule 20850. 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/1220850-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-05.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-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-11-20 20:33:03 UTC (rev 26162) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-20 21:09:49 UTC (rev 26163) @@ -96,6 +96,7 @@ , SpatialDomainNameMustBeString = 1220806 , SpatialDomainLOInteriorPointsAllowedCoreElements = 1220807 , SpatialDomainLOInteriorPointsAllowedCoreAttributes = 1220808 +, SpatialDomainNoAssignment = 1220850 , SpatialInteriorPointAllowedCoreAttributes = 1220901 , SpatialInteriorPointAllowedCoreElements = 1220902 , SpatialInteriorPointAllowedAttributes = 1220903 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 20:33:03 UTC (rev 26162) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 21:09:49 UTC (rev 26163) @@ -449,6 +449,16 @@ } }, + // 1220753 + { SpatialDomainNoAssignment, + "Domains can't be assigned.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If a <parameter> has a child <spatialSymbolReference> that points to a <domain>, that <parameter> may not be the target of an <initialAssignment>, <eventAssignment>, <rateRule>, or <assignmentRule>, may not be determined by an <algebraicRule>, and may not have the 'value' attribute.", + { "L3V1 Spatial V1 Section" + } + }, + // 1220901 { SpatialInteriorPointAllowedCoreAttributes, "Core attributes allowed on <interiorPoint>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 20:33:03 UTC (rev 26162) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 21:09:49 UTC (rev 26163) @@ -1108,6 +1108,79 @@ END_CONSTRAINT +// 1220753 +START_CONSTRAINT(SpatialDomainNoAssignment, Parameter, param) +{ + bool fail = false; + pre(param.isSetId()); + string paramid = param.getId(); + const SpatialParameterPlugin* spp = static_cast<const SpatialParameterPlugin*>(param.getPlugin("spatial")); + pre(spp != NULL); + pre(spp->isSetSpatialSymbolReference()); + const SpatialSymbolReference* ssr = spp->getSpatialSymbolReference(); + pre(ssr != NULL); + pre(ssr->isSetSpatialRef()); + string refstr = ssr->getSpatialRef(); + const SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geom = plug->getGeometry(); + pre(geom != NULL); + ListOfDomains* lod = const_cast<ListOfDomains*>(geom->getListOfDomains()); + pre(lod != NULL); + const SBase* ref = lod->getElementBySId(refstr); + pre(ref != NULL); + pre(ref->getTypeCode() == SBML_SPATIAL_DOMAIN); + + msg = "A <spatialSymbolReference> has a spatialRef of '"; + msg += refstr + "', which points to a domain, but its parent <parameter>"; + if (param.isSetId()) { + msg += " (with the id '" + param.getId() + "')"; + } + + if (param.isSetValue()) { + msg += " sets its 'value' attribute."; + fail = true; + } + + else if (m.getInitialAssignment(paramid) != NULL) { + msg += " is set by an <initialAssignment>."; + fail = true; + } + + else if (m.getRateRule(paramid) != NULL) { + msg += " is set by a <rateRule>."; + fail = true; + } + + else if (m.getAssignmentRule(paramid) != NULL) { + msg += " is set by an <assignmentRule>."; + fail = true; + } + + else { + for (unsigned long e = 0; e < m.getNumEvents(); e++) { + const Event* event = m.getEvent(e); + if (event->getEventAssignment(paramid) != NULL) { + msg += " is set by an <eventAssignment>"; + if (event->isSetId()) { + msg += " in the <event> with an id of '"; + msg += event->getId() + "'"; + } + msg += "."; + fail = true; + break; + } + } + } + + //NOTE: we don't check if it's determined by an algebraic rule, because that's too expensive and unlikely. + + 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-11-20 20:33:03 UTC (rev 26162) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-20 21:09:49 UTC (rev 26163) @@ -76,6 +76,7 @@ addConstraint(new VConstraintCoordinateComponentSpatialBoundaryMinLessThanMax(*this)); addConstraint(new VConstraintParameterSpatialBoundaryMustBeConstant(*this)); addConstraint(new VConstraintParameterSpatialDomainTypeNoAssignment(*this)); +addConstraint(new VConstraintParameterSpatialDomainNoAssignment(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(1221351, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-01.xml 2019-11-20 21:09:49 UTC (rev 26163) @@ -0,0 +1,37 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="false" id="x" value="5"> + <spatial:spatialSymbolReference spatial:spatialRef="domain_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-02.xml 2019-11-20 21:09:49 UTC (rev 26163) @@ -0,0 +1,48 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="false" id="x"> + <spatial:spatialSymbolReference spatial:spatialRef="domain_1"/> + </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment symbol="x"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <times/> + <cn type="integer"> 3 </cn> + <cn type="integer"> 2 </cn> + </apply> + </math> + </initialAssignment> + </listOfInitialAssignments> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-03.xml 2019-11-20 21:09:49 UTC (rev 26163) @@ -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:geometry> + <listOfParameters> + <parameter constant="false" id="x"> + <spatial:spatialSymbolReference spatial:spatialRef="domain_1"/> + </parameter> + </listOfParameters> + <listOfRules> + <rateRule variable="x"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <cn type="integer"> 3 </cn> + </math> + </rateRule> + </listOfRules> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-04.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-04.xml 2019-11-20 21:09:49 UTC (rev 26163) @@ -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:geometry> + <listOfParameters> + <parameter constant="false" id="x"> + <spatial:spatialSymbolReference spatial:spatialRef="domain_1"/> + </parameter> + </listOfParameters> + <listOfRules> + <assignmentRule variable="x"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <cn type="integer"> 3 </cn> + </math> + </assignmentRule> + </listOfRules> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-05.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-05.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-fail-01-05.xml 2019-11-20 21:09:49 UTC (rev 26163) @@ -0,0 +1,57 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="false" id="x"> + <spatial:spatialSymbolReference spatial:spatialRef="domain_1"/> + </parameter> + </listOfParameters> + <listOfEvents> + <event id="_E0" useValuesFromTriggerTime="true"> + <trigger initialValue="true" persistent="true"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <gt/> + <csymbol encoding="text" definitionURL="http://www.sbml.org/sbml/symbols/time"> time </csymbol> + <cn type="integer"> 2 </cn> + </apply> + </math> + </trigger> + <listOfEventAssignments> + <eventAssignment variable="x"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <cn type="integer"> 3 </cn> + </math> + </eventAssignment> + </listOfEventAssignments> + </event> + </listOfEvents> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220850-pass-00-01.xml 2019-11-20 21:09:49 UTC (rev 26163) @@ -0,0 +1,37 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="false" id="x"> + <spatial:spatialSymbolReference spatial:spatialRef="domain_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + |
From: <luc...@us...> - 2019-11-20 20:33:04
|
Revision: 26162 http://sourceforge.net/p/sbml/code/26162 Author: luciansmith Date: 2019-11-20 20:33:03 +0000 (Wed, 20 Nov 2019) Log Message: ----------- Add support for spatial rule 20753. Also clean up some of the other rules. 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/1220753-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-05.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-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-11-20 18:37:19 UTC (rev 26161) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-20 20:33:03 UTC (rev 26162) @@ -87,6 +87,7 @@ , SpatialDomainTypeDimensionsMustMatch3DGeometry = 1220750 , SpatialDomainTypeDimensionsMustMatch2DGeometry = 1220751 , SpatialDomainTypeDimensionsMustMatch1DGeometry = 1220752 +, SpatialDomainTypeNoAssignment = 1220753 , SpatialDomainAllowedCoreAttributes = 1220801 , SpatialDomainAllowedCoreElements = 1220802 , SpatialDomainAllowedAttributes = 1220803 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 18:37:19 UTC (rev 26161) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 20:33:03 UTC (rev 26162) @@ -343,6 +343,16 @@ } }, + // 1220753 + { SpatialDomainTypeNoAssignment, + "DomainTypes can't be assigned.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If a <parameter> has a child <spatialSymbolReference> that points to a <domainType>, that <parameter> may not be the target of an <initialAssignment>, <eventAssignment>, <rateRule>, or <assignmentRule>, may not be determined by an <algebraicRule>, and may not have the 'value' attribute.", + { "L3V1 Spatial V1 Section" + } + }, + // 1220801 { SpatialDomainAllowedCoreAttributes, "Core attributes allowed on <domain>.", @@ -591,7 +601,7 @@ // 1221051 { SpatialBoundaryUnitsShouldMatchCoordinateComponent, - "Any Boundary must be constant.", + "Boundary units should match their CoordinateComponent.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, "If a <parameter> has a child <spatialSymbolReference> that points to a Boundary, the units of that <parameter> should be equal to the units of the Boundary's parent <coordinateComponent>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 18:37:19 UTC (rev 26161) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 20:33:03 UTC (rev 26162) @@ -1010,8 +1010,14 @@ pre(ssr != NULL); pre(ssr->isSetSpatialRef()); string refstr = ssr->getSpatialRef(); - Model* modvar = const_cast<Model*>(&m); - const SBase* ref = modvar->getElementBySId(refstr); + const SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geom = plug->getGeometry(); + pre(geom != NULL); + ListOfCoordinateComponents* locc = const_cast<ListOfCoordinateComponents*>(geom->getListOfCoordinateComponents()); + pre(locc != NULL); + const SBase* ref = locc->getElementBySId(refstr); pre(ref != NULL); pre(ref->getTypeCode() == SBML_SPATIAL_BOUNDARY); if (!param.isSetConstant() || param.getConstant() == false) { @@ -1029,6 +1035,79 @@ END_CONSTRAINT +// 1220753 +START_CONSTRAINT(SpatialDomainTypeNoAssignment, Parameter, param) +{ + bool fail = false; + pre(param.isSetId()); + string paramid = param.getId(); + const SpatialParameterPlugin* spp = static_cast<const SpatialParameterPlugin*>(param.getPlugin("spatial")); + pre(spp != NULL); + pre(spp->isSetSpatialSymbolReference()); + const SpatialSymbolReference* ssr = spp->getSpatialSymbolReference(); + pre(ssr != NULL); + pre(ssr->isSetSpatialRef()); + string refstr = ssr->getSpatialRef(); + const SpatialModelPlugin *plug = (SpatialModelPlugin*)(m.getPlugin("spatial")); + pre(plug != NULL); + pre(plug->isSetGeometry()); + const Geometry* geom = plug->getGeometry(); + pre(geom != NULL); + ListOfDomainTypes* lodt = const_cast<ListOfDomainTypes*>(geom->getListOfDomainTypes()); + pre(lodt != NULL); + const SBase* ref = lodt->getElementBySId(refstr); + pre(ref != NULL); + pre(ref->getTypeCode() == SBML_SPATIAL_DOMAINTYPE); + + msg = "A <spatialSymbolReference> has a spatialRef of '"; + msg += refstr + "', which points to a domainType, but its parent <parameter>"; + if (param.isSetId()) { + msg += " (with the id '" + param.getId() + "')"; + } + + if (param.isSetValue()) { + msg += " sets its 'value' attribute."; + fail = true; + } + + else if (m.getInitialAssignment(paramid) != NULL) { + msg += " is set by an <initialAssignment>."; + fail = true; + } + + else if (m.getRateRule(paramid) != NULL) { + msg += " is set by a <rateRule>."; + fail = true; + } + + else if (m.getAssignmentRule(paramid) != NULL) { + msg += " is set by an <assignmentRule>."; + fail = true; + } + + else { + for (unsigned long e = 0; e < m.getNumEvents(); e++) { + const Event* event = m.getEvent(e); + if (event->getEventAssignment(paramid) != NULL) { + msg += " is set by an <eventAssignment>"; + if (event->isSetId()) { + msg += " in the <event> with an id of '"; + msg += event->getId() + "'"; + } + msg += "."; + fail = true; + break; + } + } + } + + //NOTE: we don't check if it's determined by an algebraic rule, because that's too expensive and unlikely. + + 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-11-20 18:37:19 UTC (rev 26161) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-20 20:33:03 UTC (rev 26162) @@ -75,6 +75,7 @@ addConstraint(new VConstraintBoundaryConditionSpatialBoundaryConditionVariableMustBeSpecies(*this)); addConstraint(new VConstraintCoordinateComponentSpatialBoundaryMinLessThanMax(*this)); addConstraint(new VConstraintParameterSpatialBoundaryMustBeConstant(*this)); +addConstraint(new VConstraintParameterSpatialDomainTypeNoAssignment(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(1221351, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-01.xml 2019-11-20 20:33:03 UTC (rev 26162) @@ -0,0 +1,30 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="false" id="x" value="3"> + <spatial:spatialSymbolReference spatial:spatialRef="domainType_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-02.xml 2019-11-20 20:33:03 UTC (rev 26162) @@ -0,0 +1,41 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="false" id="x"> + <spatial:spatialSymbolReference spatial:spatialRef="domainType_1"/> + </parameter> + </listOfParameters> + <listOfInitialAssignments> + <initialAssignment symbol="x"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <times/> + <cn type="integer"> 3 </cn> + <cn type="integer"> 2 </cn> + </apply> + </math> + </initialAssignment> + </listOfInitialAssignments> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-03.xml 2019-11-20 20:33:03 UTC (rev 26162) @@ -0,0 +1,37 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="false" id="x"> + <spatial:spatialSymbolReference spatial:spatialRef="domainType_1"/> + </parameter> + </listOfParameters> + <listOfRules> + <rateRule variable="x"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <cn type="integer"> 3 </cn> + </math> + </rateRule> + </listOfRules> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-04.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-04.xml 2019-11-20 20:33:03 UTC (rev 26162) @@ -0,0 +1,37 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="false" id="x"> + <spatial:spatialSymbolReference spatial:spatialRef="domainType_1"/> + </parameter> + </listOfParameters> + <listOfRules> + <assignmentRule variable="x"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <cn type="integer"> 3 </cn> + </math> + </assignmentRule> + </listOfRules> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-05.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-05.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-fail-01-05.xml 2019-11-20 20:33:03 UTC (rev 26162) @@ -0,0 +1,50 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="false" id="x"> + <spatial:spatialSymbolReference spatial:spatialRef="domainType_1"/> + </parameter> + </listOfParameters> + <listOfEvents> + <event id="_E0" useValuesFromTriggerTime="true"> + <trigger initialValue="true" persistent="true"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <gt/> + <csymbol encoding="text" definitionURL="http://www.sbml.org/sbml/symbols/time"> time </csymbol> + <cn type="integer"> 2 </cn> + </apply> + </math> + </trigger> + <listOfEventAssignments> + <eventAssignment variable="x"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <cn type="integer"> 3 </cn> + </math> + </eventAssignment> + </listOfEventAssignments> + </event> + </listOfEvents> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220753-pass-00-01.xml 2019-11-20 20:33:03 UTC (rev 26162) @@ -0,0 +1,30 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="false" id="x"> + <spatial:spatialSymbolReference spatial:spatialRef="domainType_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + |
From: <luc...@us...> - 2019-11-20 18:37:21
|
Revision: 26161 http://sourceforge.net/p/sbml/code/26161 Author: luciansmith Date: 2019-11-20 18:37:19 +0000 (Wed, 20 Nov 2019) Log Message: ----------- Add definition of spatial validation warning 21052. Again, no implementation at this point. 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-11-20 18:32:43 UTC (rev 26160) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-20 18:37:19 UTC (rev 26161) @@ -108,6 +108,7 @@ , SpatialBoundaryNameMustBeString = 1221005 , SpatialBoundaryMinLessThanMax = 1221050 , SpatialBoundaryMustBeConstant = 1221051 +, SpatialBoundaryUnitsShouldMatchCoordinateComponent = 1221052 , SpatialAdjacentDomainsAllowedCoreAttributes = 1221101 , SpatialAdjacentDomainsAllowedCoreElements = 1221102 , SpatialAdjacentDomainsAllowedAttributes = 1221103 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 18:32:43 UTC (rev 26160) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 18:37:19 UTC (rev 26161) @@ -589,6 +589,16 @@ } }, + // 1221051 + { SpatialBoundaryUnitsShouldMatchCoordinateComponent, + "Any Boundary must be constant.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If a <parameter> has a child <spatialSymbolReference> that points to a Boundary, the units of that <parameter> should be equal to the units of the Boundary's parent <coordinateComponent>.", + { "L3V1 Spatial V1 Section" + } + }, + // 1221101 { SpatialAdjacentDomainsAllowedCoreAttributes, "Core attributes allowed on <adjacentDomains>.", |
From: <luc...@us...> - 2019-11-20 18:32:44
|
Revision: 26160 http://sourceforge.net/p/sbml/code/26160 Author: luciansmith Date: 2019-11-20 18:32:43 +0000 (Wed, 20 Nov 2019) Log Message: ----------- Add support for spatial rule 21051. 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/SpatialValidator.cpp 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/1223304-pass-00-03.xml Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221051-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221051-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-11-20 02:25:08 UTC (rev 26159) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-20 18:32:43 UTC (rev 26160) @@ -107,6 +107,7 @@ , SpatialBoundaryValueMustBeDouble = 1221004 , SpatialBoundaryNameMustBeString = 1221005 , SpatialBoundaryMinLessThanMax = 1221050 +, SpatialBoundaryMustBeConstant = 1221051 , SpatialAdjacentDomainsAllowedCoreAttributes = 1221101 , SpatialAdjacentDomainsAllowedCoreElements = 1221102 , SpatialAdjacentDomainsAllowedAttributes = 1221103 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 02:25:08 UTC (rev 26159) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 18:32:43 UTC (rev 26160) @@ -579,6 +579,16 @@ } }, + // 1221051 + { SpatialBoundaryMustBeConstant, + "Any Boundary must be constant.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If a <parameter> has a child <spatialSymbolReference> that points to a Boundary, the 'constant' attribute of that <parameter> must have a value of 'true'.", + { "L3V1 Spatial V1 Section" + } + }, + // 1221101 { SpatialAdjacentDomainsAllowedCoreAttributes, "Core attributes allowed on <adjacentDomains>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialValidator.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialValidator.cpp 2019-11-20 02:25:08 UTC (rev 26159) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialValidator.cpp 2019-11-20 18:32:43 UTC (rev 26160) @@ -144,6 +144,7 @@ ConstraintSet<Model> mModel; ConstraintSet<Reaction> mReaction; ConstraintSet<Species> mSpecies; + ConstraintSet<Parameter> mParameters; ConstraintSet<DomainType> mDomainType; ConstraintSet<Domain> mDomain; ConstraintSet<InteriorPoint> mInteriorPoint; @@ -241,6 +242,12 @@ return; } + if (dynamic_cast< TConstraint<Parameter>* >(c) != NULL) + { + mParameters.add(static_cast< TConstraint<Parameter>* >(c) ); + return; + } + if (dynamic_cast< TConstraint<DomainType>* >(c) != NULL) { mDomainType.add(static_cast< TConstraint<DomainType>* >(c) ); @@ -762,6 +769,14 @@ } + bool + visit(const Parameter& x) + { + v.mSpatialConstraints->mParameters.applyTo(m, x); + return !v.mSpatialConstraints->mParameters.empty(); + } + + virtual void visit (const Model &x) { v.mSpatialConstraints->mModel.applyTo(m, x); Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 02:25:08 UTC (rev 26159) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 18:32:43 UTC (rev 26160) @@ -999,6 +999,36 @@ END_CONSTRAINT +// 1221051 +START_CONSTRAINT(SpatialBoundaryMustBeConstant, Parameter, param) +{ + bool fail = false; + const SpatialParameterPlugin* spp = static_cast<const SpatialParameterPlugin*>(param.getPlugin("spatial")); + pre(spp != NULL); + pre(spp->isSetSpatialSymbolReference()); + const SpatialSymbolReference* ssr = spp->getSpatialSymbolReference(); + pre(ssr != NULL); + pre(ssr->isSetSpatialRef()); + string refstr = ssr->getSpatialRef(); + Model* modvar = const_cast<Model*>(&m); + const SBase* ref = modvar->getElementBySId(refstr); + pre(ref != NULL); + pre(ref->getTypeCode() == SBML_SPATIAL_BOUNDARY); + if (!param.isSetConstant() || param.getConstant() == false) { + fail = true; + msg = "A <spatialSymbolReference> has a spatialRef of '"; + msg += refstr + "', which points to a boundary, but its parent <parameter>"; + if (param.isSetId()) { + msg += " (with the id '" + param.getId() + "')"; + } + msg += " is not set 'constant=true'."; + } + + 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-11-20 02:25:08 UTC (rev 26159) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-20 18:32:43 UTC (rev 26160) @@ -74,6 +74,7 @@ addConstraint(new VConstraintAdvectionCoefficientSpatialAdvectionCoefficientVariableMustBeSpecies(*this)); addConstraint(new VConstraintBoundaryConditionSpatialBoundaryConditionVariableMustBeSpecies(*this)); addConstraint(new VConstraintCoordinateComponentSpatialBoundaryMinLessThanMax(*this)); +addConstraint(new VConstraintParameterSpatialBoundaryMustBeConstant(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(1221351, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221051-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221051-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221051-fail-01-01.xml 2019-11-20 18:32:43 UTC (rev 26160) @@ -0,0 +1,27 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:spatialSymbolReference spatial:spatialRef="boundary_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221051-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221051-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221051-pass-00-01.xml 2019-11-20 18:32:43 UTC (rev 26160) @@ -0,0 +1,27 @@ +<?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:geometry> + <listOfParameters> + <parameter constant="true" id="id_3"> + <spatial:spatialSymbolReference spatial:spatialRef="boundary_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-pass-00-03.xml 2019-11-20 02:25:08 UTC (rev 26159) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223304-pass-00-03.xml 2019-11-20 18:32:43 UTC (rev 26160) @@ -67,7 +67,7 @@ <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> - <parameter constant="false" id="id_3"> + <parameter constant="true" id="id_3"> <spatial:spatialSymbolReference spatial:spatialRef="boundary_1"/> </parameter> </listOfParameters> |
From: <luc...@us...> - 2019-11-20 02:25:09
|
Revision: 26159 http://sourceforge.net/p/sbml/code/26159 Author: luciansmith Date: 2019-11-20 02:25:08 +0000 (Wed, 20 Nov 2019) Log Message: ----------- New validation rules, and cleaning up some old ones. Modified Paths: -------------- trunk/specifications/sbml-level-3/version-1/spatial/specification/apdx-validation.tex Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/apdx-validation.tex =================================================================== --- trunk/specifications/sbml-level-3/version-1/spatial/specification/apdx-validation.tex 2019-11-20 00:58:14 UTC (rev 26158) +++ trunk/specifications/sbml-level-3/version-1/spatial/specification/apdx-validation.tex 2019-11-20 02:25:08 UTC (rev 26159) @@ -168,6 +168,9 @@ \validRule{spatial-20650}{\changed{If the attribute \token{spatial:\-isLocal} of a \Reaction is \val{true}, the \Reaction must also define a value for the \token{com\-part\-ment} attribute. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{extended-reaction-class}.)}} +\consistencyRule{spatial-20651}{\changed{The units of a \KineticLaw of a \Reaction with a \token{spatial:isLocal} attribute value of \val{true} should be $concentration/time$ instead of $substance/time$. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{extended-reaction-class}.)}} + \subsubsection*{Rules for \class{DomainType} object} \validRule{spatial-20701}{A \DomainType object may have the optional @@ -323,7 +326,11 @@ SBML Level~3 Specification for Spatial Processes, Version~1, \sec{boundary-class}.)} +\validRule{spatial-21050}{\changed{If set, the \token{value} attribute of a <boundaryMin> must be less than or equal to the \token{value} attribute of a <boundaryMax> of the same \CoordinateComponent. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, +\sec{coordinatecomponent-class}.)}} + \subsubsection*{Rules for \class{AdjacentDomains} object} \validRule{spatial-21101}{An \AdjacentDomains object may have the @@ -1382,7 +1389,7 @@ \validRule{spatial-23452}{\changed{A \DiffusionCoefficient with an attribute \token{spa\-tial:\-type} value of \val{anisotropic} must define the attribute \token{spa\-tial:\-coordinateReference1}, and must not define the attribute \token{spa\-tial:\-coordinateReference2}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} -\consistencyRule{spatial-23453}{\changed{The units of a \Parameter with a \DiffusionCoefficient child should be length\sup{2}/time. +\consistencyRule{spatial-23453}{\changed{The units of a \Parameter with a \DiffusionCoefficient child should be $length^2/time$. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} \validRule{spatial-23454}{\changed{The \DiffusionCoefficient attribute 'spatial:coordinateReference2', if defined, must have a value different from that of the attribute 'spatial:coordinateReference1'. @@ -1433,7 +1440,7 @@ Level~3 Specification for Spatial Processes, Version~1, \sec{advectioncoefficient-class}.)} -\consistencyRule{spatial-23550}{\changed{The units of a \Parameter with an \AdvectionCoefficient child should be length/time. +\consistencyRule{spatial-23550}{\changed{The units of a \Parameter with an \AdvectionCoefficient child should be $length/time$. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{advectioncoefficient-class}.)}} @@ -1491,11 +1498,26 @@ Spatial Processes, Version~1, \sec{boundarycondition-class}.)} \validRule{spatial-23650}{\changed{A \BoundaryCondition must define a value for either the attribute \token{spa\-tial:\-coordinateBoundary} or \token{spa\-tial:\-boun\-da\-ry\-Do\-main\-Type}, but not both. -(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{boundarycondition-class}.)}} -\validRule{spatial-23650}{\changed{For every combination of species and boundary, there must be at most exactly one \BoundaryCondition of type \val{Neumann}, or exactly one \BoundaryCondition of type \val{Dirichlet}, or exactly three \BoundaryCondition elements, one of each of the three \val{Robin_} types. -(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} +\validRule{spatial-23651}{\changed{For every combination of species and boundary, there must be at most exactly one \BoundaryCondition of type \val{Neumann}, or exactly one \BoundaryCondition of type \val{Dirichlet}, or exactly three \BoundaryCondition elements, one of each of the three \val{Robin\_} types. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{boundarycondition-class}.)}} +\consistencyRule{spatial-23652}{\changed{The units of a \Parameter with a \BoundaryCondition child of type \val{Dirichlet} should be the units of concentration of the referenced \Species. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{boundarycondition-class}.)}} + +\consistencyRule{spatial-23653}{\changed{The units of a \Parameter with a \BoundaryCondition child of type \val{Neumann} should be the units of concentration of the referenced \Species, times $length/time$. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{boundarycondition-class}.)}} + +\consistencyRule{spatial-23654}{\changed{The units of a \Parameter with a \BoundaryCondition child of type \val{Robin\_valueCoefficient} should scale with the other \val{Robin\_} boundary conditions for the same species and boundary, with suggested base units of dimensionless. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{boundarycondition-class}.)}} + +\consistencyRule{spatial-23655}{\changed{The units of a \Parameter with a \BoundaryCondition child of type \val{Robin\_inwardNormalGradientCoefficient} should scale with the other \val{Robin\_} boundary conditions for the same species and boundary, with suggested base units of $1/length$. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{boundarycondition-class}.)}} + +\consistencyRule{spatial-23656}{\changed{The units of a \Parameter with a \BoundaryCondition child of type \val{Robin\_sum} should scale with the other \val{Robin\_} boundary conditions for the same species and boundary, with suggested base units of the concentration of the referenced \Species. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{boundarycondition-class}.)}} + \subsubsection*{Rules for \class{Geometry} object} \validRule{spatial-23701}{A \Geometry object may have the optional SBML @@ -1526,8 +1548,8 @@ \validRule{spatial-23705}{The value of the attribute \token{spatial:\-coordinateSystem} of a \Geometry object must conform to the syntax of SBML data type \primtype{GeometryKind} and may only take -on the allowed values of \primtype{GeometryKind} defined in SBML; that -is, the value must be one of the following: \val{cartesian}. (Reference: +on the allowed \changed{value} of \primtype{GeometryKind} defined in SBML; that +is, the value \changed{must be \val{cartesian}}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{geometry-class}.)} |
From: <luc...@us...> - 2019-11-20 00:58:16
|
Revision: 26158 http://sourceforge.net/p/sbml/code/26158 Author: luciansmith Date: 2019-11-20 00:58:14 +0000 (Wed, 20 Nov 2019) Log Message: ----------- Add support for spatial rule 21050. 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/1221050-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-fail-03-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-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-11-20 00:04:08 UTC (rev 26157) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-20 00:58:14 UTC (rev 26158) @@ -106,6 +106,7 @@ , SpatialBoundaryAllowedAttributes = 1221003 , SpatialBoundaryValueMustBeDouble = 1221004 , SpatialBoundaryNameMustBeString = 1221005 +, SpatialBoundaryMinLessThanMax = 1221050 , SpatialAdjacentDomainsAllowedCoreAttributes = 1221101 , SpatialAdjacentDomainsAllowedCoreElements = 1221102 , SpatialAdjacentDomainsAllowedAttributes = 1221103 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 00:04:08 UTC (rev 26157) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 00:58:14 UTC (rev 26158) @@ -569,6 +569,16 @@ } }, + // 1221050 + { SpatialBoundaryMinLessThanMax, + "The 'boundaryMin' must be less than or equal to 'boundaryMax'.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "If set, the 'value' attribute of a <boundaryMin> must be less than or equal to the 'value' attribute of the <boundaryMax> of the same CoordinateComponent.", + { "L3V1 Spatial V1 Section" + } + }, + // 1221101 { SpatialAdjacentDomainsAllowedCoreAttributes, "Core attributes allowed on <adjacentDomains>.", Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 00:04:08 UTC (rev 26157) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-20 00:58:14 UTC (rev 26158) @@ -970,6 +970,35 @@ END_CONSTRAINT +// 1221050 +START_CONSTRAINT(SpatialBoundaryMinLessThanMax, CoordinateComponent, cc) +{ + bool fail = false; + pre(cc.isSetBoundaryMax()); + pre(cc.isSetBoundaryMin()); + const Boundary* boundary = cc.getBoundaryMax(); + pre(boundary->isSetValue()); + double maxval = boundary->getValue(); + boundary = cc.getBoundaryMin(); + pre(boundary->isSetValue()); + double minval = boundary->getValue(); + if (minval > maxval) { + fail = true; + stringstream ss_msg; + ss_msg << "A <coordinateComponent>"; + if (cc.isSetId()) + { + ss_msg << " with id '" << cc.getId() << "'"; + } + ss_msg << " has a child <maxBoundary> with a value of " << maxval << ", which is less than the child <maxBoundary> value of " << minval << "."; + msg = ss_msg.str(); + } + + inv(fail == false); +} +END_CONSTRAINT + + // 122__ //START_CONSTRAINT(Spatial, Class, class) //{ @@ -980,7 +1009,17 @@ //END_CONSTRAINT +// 122__ +//START_CONSTRAINT(Spatial, Class, class) +//{ +// bool fail = false; +// +// inv(fail == false); +//} +//END_CONSTRAINT + + /** @endcond */ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-20 00:04:08 UTC (rev 26157) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-20 00:58:14 UTC (rev 26158) @@ -73,6 +73,7 @@ addConstraint(new VConstraintDiffusionCoefficientSpatialDiffusionCoefficientCoordinateReferenceNoZIn2D(*this)); addConstraint(new VConstraintAdvectionCoefficientSpatialAdvectionCoefficientVariableMustBeSpecies(*this)); addConstraint(new VConstraintBoundaryConditionSpatialBoundaryConditionVariableMustBeSpecies(*this)); +addConstraint(new VConstraintCoordinateComponentSpatialBoundaryMinLessThanMax(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(1221351, *this)); Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-fail-01-01.xml 2019-11-20 00:58:14 UTC (rev 26158) @@ -0,0 +1,14 @@ +<?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="1"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="0"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-fail-03-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-fail-03-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-fail-03-02.xml 2019-11-20 00:58:14 UTC (rev 26158) @@ -0,0 +1,22 @@ +<?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="1"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="0"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_2" spatial:type="cartesianY" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="1"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="0"/> + </spatial:coordinateComponent> + <spatial:coordinateComponent spatial:id="coordinateComponent_3" spatial:type="cartesianZ" spatial:unit="dimensionless"> + <spatial:boundaryMin spatial:id="boundary_1" spatial:value="1"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="0"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-pass-00-01.xml 2019-11-20 00:58:14 UTC (rev 26158) @@ -0,0 +1,14 @@ +<?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:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-pass-00-02.xml 2019-11-20 00:58:14 UTC (rev 26158) @@ -0,0 +1,14 @@ +<?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="0"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + </spatial:geometry> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-pass-00-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1221050-pass-00-03.xml 2019-11-20 00:58:14 UTC (rev 26158) @@ -0,0 +1,14 @@ +<?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="1"/> + <spatial:boundaryMax spatial:id="boundary_2" spatial:value="1"/> + </spatial:coordinateComponent> + </spatial:listOfCoordinateComponents> + </spatial:geometry> + </model> +</sbml> + |
From: <luc...@us...> - 2019-11-20 00:04:10
|
Revision: 26157 http://sourceforge.net/p/sbml/code/26157 Author: luciansmith Date: 2019-11-20 00:04:08 +0000 (Wed, 20 Nov 2019) Log Message: ----------- Fix wording for spatial validation rule 23705. 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-11-20 00:03:33 UTC (rev 26156) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 00:04:08 UTC (rev 26157) @@ -2902,8 +2902,8 @@ LIBSBML_SEV_ERROR, "The value of the attribute 'spatial:coordinateSystem' of a <geometry> " "object must conform to the syntax of SBML data type 'GeometryKind' and may " - "only take on the allowed values of 'GeometryKind' defined in SBML; that " - "is, the value must be one of the following: 'cartesian'.", + "only take on the allowed value of 'GeometryKind' defined in SBML; that " + "is, the value must be 'cartesian'.", { "L3V1 Spatial V1 Section" } }, |
From: <luc...@us...> - 2019-11-20 00:03:35
|
Revision: 26156 http://sourceforge.net/p/sbml/code/26156 Author: luciansmith Date: 2019-11-20 00:03:33 +0000 (Wed, 20 Nov 2019) Log Message: ----------- Add definition of spatial validation warning 20651. Again, no implementation at this point. 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-11-19 23:28:47 UTC (rev 26155) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-20 00:03:33 UTC (rev 26156) @@ -78,6 +78,7 @@ , SpatialReactionAllowedAttributes = 1220601 , SpatialReactionIsLocalMustBeBoolean = 1220602 , SpatialLocalReactionMustDefineCompartment = 1220650 +, SpatialLocalReactionUnits = 1220651 , SpatialDomainTypeAllowedCoreAttributes = 1220701 , SpatialDomainTypeAllowedCoreElements = 1220702 , SpatialDomainTypeAllowedAttributes = 1220703 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-19 23:28:47 UTC (rev 26155) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-20 00:03:33 UTC (rev 26156) @@ -244,6 +244,16 @@ } }, + // 1220651 + { SpatialLocalReactionUnits, + "Local spatial reactions should have units of concentration/time.", + LIBSBML_CAT_UNITS_CONSISTENCY, + LIBSBML_SEV_WARNING, + "The units of a <kineticLaw> of a <reaction> with a 'spatial:isLocal' attribute value of 'true' should be concentration/time instead of substance/time.", + { "L3V1 Spatial V1 Section" + } + }, + // 1220701 { SpatialDomainTypeAllowedCoreAttributes, "Core attributes allowed on <domainType>.", |
From: <luc...@us...> - 2019-11-19 23:28:48
|
Revision: 26155 http://sourceforge.net/p/sbml/code/26155 Author: luciansmith Date: 2019-11-19 23:28:47 +0000 (Tue, 19 Nov 2019) Log Message: ----------- Add Boundary condition units warnings into the error table. No actual implementation support, but now they're there when needed. 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-11-19 22:47:13 UTC (rev 26154) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-19 23:28:47 UTC (rev 26155) @@ -292,6 +292,11 @@ , SpatialBoundaryConditionBoundaryDomainTypeMustBeDomainType = 1223607 , SpatialBoundaryConditionBoundaryDomainTypeOrCoordinateBoundary = 1223650 , SpatialBoundaryConditionsMustBeUnique = 1223651 +, SpatialDirichletUnits = 1223652 +, SpatialNeumannUnits = 1223653 +, SpatialRobinValueCoefficientUnits = 1223654 +, SpatialInwardNormalGradientCoefficientUnits = 1223655 +, SpatialRobinSumUnits = 1223656 , SpatialGeometryAllowedCoreAttributes = 1223701 , SpatialGeometryAllowedCoreElements = 1223702 , SpatialGeometryAllowedAttributes = 1223703 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-19 22:47:13 UTC (rev 26154) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-19 23:28:47 UTC (rev 26155) @@ -2776,14 +2776,64 @@ // 1223651 { SpatialBoundaryConditionsMustBeUnique, - "For every combination of species and boundary, there must be at most exactly one <boundaryCondition> of type 'Neumann', or exactly one <boundaryCondition> of type 'Dirichlet', or exactly three <boundaryCondition> elements, one of each of the three 'Robin' types.", + "Each BoundaryCondition must define only one boundary.", LIBSBML_CAT_GENERAL_CONSISTENCY, LIBSBML_SEV_ERROR, - ".", + "For every combination of species and boundary, there must be at most exactly one <boundaryCondition> of type 'Neumann', or exactly one <boundaryCondition> of type 'Dirichlet', or exactly three <boundaryCondition> elements, one of each of the three 'Robin' types.", { "L3V1 Spatial V1 Section" } }, + // 1223652 + { SpatialDirichletUnits, + "A 'Dirichlet' BoundaryCondition's units should be concentration.", + LIBSBML_CAT_UNITS_CONSISTENCY, + LIBSBML_SEV_WARNING, + "The units of a <parameter> with a <boundaryCondition> child of type 'Dirichlet' should be the units of concentration of the referenced <species>.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1223653 + { SpatialNeumannUnits, + "A 'Neumann' BoundaryCondition's units should be concentration*length/time.", + LIBSBML_CAT_UNITS_CONSISTENCY, + LIBSBML_SEV_WARNING, + "The units of a <parameter> with a <boundaryCondition> child of type 'Neumann' should be the units of concentration of the referenced <species>, times length/time.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1223654 + { SpatialRobinValueCoefficientUnits, + "A 'Robin_valueCoefficient' BoundaryCondition's units should scale with dimensionless.", + LIBSBML_CAT_UNITS_CONSISTENCY, + LIBSBML_SEV_WARNING, + "The units of a <parameter> with a <boundaryCondition> child of type 'Robin_valueCoefficient' should should scale with the other 'Robin' boundary conditions for the same species and boundary, with suggested base units of dimensionless.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1223655 + { SpatialInwardNormalGradientCoefficientUnits, + "A 'Robin_inwardNormalGradientCoefficient' BoundaryCondition's units should scale with 1/length.", + LIBSBML_CAT_UNITS_CONSISTENCY, + LIBSBML_SEV_WARNING, + "The units of a <parameter> with a <boundaryCondition> child of type 'Robin_inwardNormalGradientCoefficient' should should scale with the other 'Robin' boundary conditions for the same species and boundary, with suggested base units of 1/length.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1223656 + { SpatialRobinSumUnits, + "A 'Robin_sum' BoundaryCondition's units should scale with concentration.", + LIBSBML_CAT_UNITS_CONSISTENCY, + LIBSBML_SEV_WARNING, + "The units of a <parameter> with a <boundaryCondition> child of type 'Robin_sum' should should scale with the other 'Robin' boundary conditions for the same species and boundary, with suggested base units of the concentration of the referenced <species>.", + { "L3V1 Spatial V1 Section" + } + }, + // 1223701 { SpatialGeometryAllowedCoreAttributes, "Core attributes allowed on <geometry>.", |
From: <luc...@us...> - 2019-11-19 22:47:15
|
Revision: 26154 http://sourceforge.net/p/sbml/code/26154 Author: luciansmith Date: 2019-11-19 22:47:13 +0000 (Tue, 19 Nov 2019) Log Message: ----------- New validation rules and small updates to the main text. Modified Paths: -------------- trunk/specifications/sbml-level-3/version-1/spatial/specification/apdx-validation.tex trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/apdx-validation.tex =================================================================== --- trunk/specifications/sbml-level-3/version-1/spatial/specification/apdx-validation.tex 2019-11-19 22:44:01 UTC (rev 26153) +++ trunk/specifications/sbml-level-3/version-1/spatial/specification/apdx-validation.tex 2019-11-19 22:47:13 UTC (rev 26154) @@ -140,7 +140,11 @@ SBML Level~3 Specification for Spatial Processes, Version~1, \sec{extended-species-class}.)} +\validRule{spatial-20450}{\changed{The \Compartment of any \Species that has a value of 'true' for the 'spatial:isSpatial' attribute must have a child \CompartmentMapping. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, +\sec{extended-species-class}.)}} + \subsubsection*{Rules for extended \class{Parameter} object} \validRule{spatial-20501}{\changed{A \Parameter object may contain up to one child element from the SBML Level 3 Spatial Processes namespace: a \SpatialSymbolReference, an \AdvectionCoefficient, a \BoundaryCondition, or a \DiffusionCoefficient.} @@ -161,7 +165,7 @@ SBML Level~3 Specification for Spatial Processes, Version~1, \sec{extended-reaction-class}.)} -\validRule{spatial-20650}{\changed{If the attribute \token{spatial:\-isLocal} on a \Reaction is \val{true}, it must also have a defined \token{com\-part\-ment} attribute. +\validRule{spatial-20650}{\changed{If the attribute \token{spatial:\-isLocal} of a \Reaction is \val{true}, the \Reaction must also define a value for the \token{com\-part\-ment} attribute. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{extended-reaction-class}.)}} \subsubsection*{Rules for \class{DomainType} object} @@ -194,13 +198,13 @@ SBML Level~3 Specification for Spatial Processes, Version~1, \sec{domaintype-class}.)} -\validRule{spatial-20750}{\changed{If the \Geometry of the \Model has exactly three \CoordinateComponent children, the \token{spa\-tial:\-spa\-tial\-Di\-men\-sions} attribute of a \DomainType may only have a value of \val{2} or \val{3}. +\validRule{spatial-20750}{\changed{If the \Geometry of the \Model has exactly three \CoordinateComponent children, the attribute \token{spa\-tial:\-spa\-tial\-Di\-men\-sions} of a \DomainType may only have a value of \val{2} or \val{3}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{domaintype-class}.)}} -\validRule{spatial-20751}{\changed{If the \Geometry of the \Model has exactly two \CoordinateComponent children, the \token{spa\-tial:\-spa\-tial\-Di\-men\-sions} attribute of a \DomainType may only have a value of \val{1} or \val{2}. +\validRule{spatial-20751}{\changed{If the \Geometry of the \Model has exactly two \CoordinateComponent children, the attribute \token{spa\-tial:\-spa\-tial\-Di\-men\-sions} of a \DomainType may only have a value of \val{1} or \val{2}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{domaintype-class}.)}} -\validRule{spatial-20752}{\changed{If the \Geometry of the \Model has exactly one \CoordinateComponent child, the \token{spa\-tial:\-spa\-tial\-Di\-men\-sions} attribute of a \DomainType may only have a value of \val{0} or \val{1}. +\validRule{spatial-20752}{\changed{If the \Geometry of the \Model has exactly one \CoordinateComponent child, the attribute \token{spa\-tial:\-spa\-tial\-Di\-men\-sions} of a \DomainType may only have a value of \val{0} or \val{1}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{domaintype-class}.)}} \subsubsection*{Rules for \class{Domain} object} @@ -431,7 +435,19 @@ (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{compartmentmapping-class}.)} +\validRule{spatial-21350}{\changed{The value of the attribute 'spatial:unitSize' on a \CompartmentMapping must have a value between 0 and 1. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, +\sec{compartmentmapping-class}.)}} +\consistencyRule{spatial-21351}{\changed{The values of the 'spatial:unitSize' attributes of every \CompartmentMapping with the same 'spatial:domainType' should sum to 1. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, +\sec{compartmentmapping-class}.)}} + +\consistencyRule{spatial-21351}{\changed{If a \Parameter has a child \SpatialSymbolReference that points to a \CompartmentMapping, the units of that \Parameter should be equivalent to the units of the parent \Compartment of the \CompartmentMapping, divided by the units of the \DomainType referenced by the \CompartmentMapping. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, +\sec{compartmentmapping-class}.)}} + + \subsubsection*{Rules for \class{CoordinateComponent} object} \validRule{spatial-21401}{A \CoordinateComponent object may have the @@ -610,13 +626,13 @@ of data type \token{in\-te\-ger}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{sampledfield-class}.)} -\validRule{spatial-21650}{\changed{If the \Geometry of the \Model has exactly one \CoordinateComponent child, a \SampledField object must define the \token{spa\-tial:\-numSamples1} attribute, and must not define the \token{spa\-tial:\-numSamples2} and \token{spa\-tial:\-numSamples3} attributes. +\validRule{spatial-21650}{\changed{If the \Geometry of the \Model has exactly one \CoordinateComponent child, a \SampledField object must define the attribute \token{spa\-tial:\-numSamples1}, and must not define the attributes \token{spa\-tial:\-numSamples2} nor \token{spa\-tial:\-numSamples3}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{sampledfield-class}.)}} -\validRule{spatial-21651}{\changed{If the \Geometry of the \Model has exactly two \CoordinateComponent children, a \SampledField object must define the \token{spa\-tial:\-numSamples1} and \token{spa\-tial:\-numSamples2} attributes, and must not define the \token{spa\-tial:\-numSamples3} attribute. +\validRule{spatial-21651}{\changed{If the \Geometry of the \Model has exactly two \CoordinateComponent children, a \SampledField object must define the attributes \token{spa\-tial:\-numSamples1} and \token{spa\-tial:\-numSamples2}, and must not define the attribute \token{spa\-tial:\-numSamples3}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{sampledfield-class}.)}} -\validRule{spatial-21652}{\changed{If the \Geometry of the \Model has exactly three \CoordinateComponent children, a \SampledField object must define the \token{spa\-tial:\-numSamples1}, \token{spa\-tial:\-numSamples2}, and \token{spa\-tial:\-numSamples3} attributes. +\validRule{spatial-21652}{\changed{If the \Geometry of the \Model has exactly three \CoordinateComponent children, a \SampledField object must define the attributes \token{spa\-tial:\-numSamples1}, \token{spa\-tial:\-numSamples2}, and \token{spa\-tial:\-numSamples3}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{sampledfield-class}.)}} \subsubsection*{Rules for \class{SampledVolume} object} @@ -1263,10 +1279,10 @@ a \ListOfCSGNodes object. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{listofcsgnodes-class}.)} -\validRule{spatial-23250}{\changed{If the \token{spa\-tial:\-operationType} attribute of a \CSGSetOperator has the value \val{difference}, it must also define the \token{spa\-tial:\-componentA} and \token{spa\-tial:\-componentB} attributes. +\validRule{spatial-23250}{\changed{If the \token{spa\-tial:\-operationType} attribute of a \CSGSetOperator has the value \val{difference}, it must also define values for the attributes \token{spa\-tial:\-componentA} and \token{spa\-tial:\-componentB}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{csgsetoperator-class}.)}} -\validRule{spatial-23251}{\changed{If the \token{spa\-tial:\-operationType} attribute of a \CSGSetOperator has the value \val{union} or \val{in\-ter\-sec\-tion}, it must not define the \token{spa\-tial:\-componentA} nor the \token{spa\-tial:\-componentB} attributes. +\validRule{spatial-23251}{\changed{If the attribute \token{spa\-tial:\-operationType} of a \CSGSetOperator has the value \val{union} or \val{in\-ter\-sec\-tion}, it must not define values for the attributes \token{spa\-tial:\-componentA} nor \token{spa\-tial:\-componentB}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{csgsetoperator-class}.)}} \subsubsection*{Rules for \class{SpatialSymbolReference} object} @@ -1291,11 +1307,16 @@ \validRule{spatial-23304}{The value of the attribute \token{spatial:\-spatialRef} of a \SpatialSymbolReference object must be -the identifier of an existing \Geometry object defined in the enclosing +the identifier of an existing \changed{\CompartmentMapping, \CoordinateComponent, \Boundary, \DomainType, \Domain, or \SampledField object} defined in the enclosing \Model object. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{spatialsymbolreference-class}.)} +\validRule{spatial-23350}{\changed{Every \SpatialSymbolReference in a \Model must +reference a unique spatial element. +(Reference: SBML Level~3 Specification for Spatial +Processes, Version~1, \sec{spatialsymbolreference-class}.)}} + \subsubsection*{Rules for \class{DiffusionCoefficient} object} \validRule{spatial-23401}{A \DiffusionCoefficient object may have the @@ -1352,15 +1373,30 @@ \val{cartesianZ}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)} -\validRule{spatial-23450}{\changed{A \DiffusionCoefficient with an attribute \token{spa\-tial:\-type} with the value \val{isotropic} may not define the \token{spa\-tial:\-co\-or\-di\-nate\-Re\-fer\-ence1} nor \token{spa\-tial:\-coordinateReference2} at\-trib\-utes. +\validRule{spatial-23450}{\changed{A \DiffusionCoefficient with an attribute \token{spa\-tial:\-type} value of \val{isotropic} may not define the attributes \token{spa\-tial:\-co\-or\-di\-nate\-Re\-fer\-ence1} nor \token{spa\-tial:\-coordinateReference2}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} -\validRule{spatial-23451}{\changed{A \DiffusionCoefficient with an attribute \token{spa\-tial:\-type} with the value \val{tensor} must define the \token{spa\-tial:\-co\-or\-di\-nate\-Reference1} and \token{spa\-tial:\-coordinateReference2} attributes. +\validRule{spatial-23451}{\changed{A \DiffusionCoefficient with an attribute \token{spa\-tial:\-type} value of \val{tensor} must define the attributes \token{spa\-tial:\-co\-or\-di\-nate\-Reference1} and \token{spa\-tial:\-coordinateReference2}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} -\validRule{spatial-23452}{\changed{A \DiffusionCoefficient with an attribute \token{spa\-tial:\-type} with the value \val{anisotropic} must define the \token{spa\-tial:\-coordinateReference1} attribute, and must not define the \token{spa\-tial:\-coordinateReference2} attribute. +\validRule{spatial-23452}{\changed{A \DiffusionCoefficient with an attribute \token{spa\-tial:\-type} value of \val{anisotropic} must define the attribute \token{spa\-tial:\-coordinateReference1}, and must not define the attribute \token{spa\-tial:\-coordinateReference2}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} +\consistencyRule{spatial-23453}{\changed{The units of a \Parameter with a \DiffusionCoefficient child should be length\sup{2}/time. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} + +\validRule{spatial-23454}{\changed{The \DiffusionCoefficient attribute 'spatial:coordinateReference2', if defined, must have a value different from that of the attribute 'spatial:coordinateReference1'. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} + +\validRule{spatial-23455}{\changed{The \DiffusionCoefficient attributes 'spatial:coordinateReference1' and 'spatial:coordinateReference2' may not have a value of 'cartesianY' if the Geometry has exactly one CoordinateComponent child. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} + +\validRule{spatial-23456}{\changed{The \DiffusionCoefficient attributes 'spatial:coordinateReference1' and 'spatial:coordinateReference2' may not have a value of 'cartesianZ' if the Geometry has exactly one or two CoordinateComponent children. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} + +\validRule{spatial-23457}{\changed{Any Species may only have a single DiffusionCoefficient that applies to any given axis. A DiffusionCoefficient of type 'isotropic' is considered to apply to all the axes in the Geometry, and other types to all axes they reference. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} + \subsubsection*{Rules for \class{AdvectionCoefficient} object} \validRule{spatial-23501}{An \AdvectionCoefficient object may have the @@ -1397,7 +1433,15 @@ Level~3 Specification for Spatial Processes, Version~1, \sec{advectioncoefficient-class}.)} +\consistencyRule{spatial-23550}{\changed{The units of a \Parameter with an \AdvectionCoefficient child should be length/time. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, +\sec{advectioncoefficient-class}.)}} +\validRule{spatial-23551}{\changed{No two \AdvectionCoefficient elements in the same \Model may have the same values for the attributes \token{species:variable} and \token{species:coordinate}. Only one advection coefficient may be defined per species per axis. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, +\sec{advectioncoefficient-class}.)}} + + \subsubsection*{Rules for \class{BoundaryCondition} object} \validRule{spatial-23601}{A \BoundaryCondition object may have the @@ -1446,9 +1490,12 @@ enclosing \Model object. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{boundarycondition-class}.)} -\validRule{spatial-23650}{\changed{A \BoundaryCondition must have a defined \token{spa\-tial:\-coordinateBoundary} or \token{spa\-tial:\-boun\-da\-ry\-Do\-main\-Type} attribute, but may not define both. +\validRule{spatial-23650}{\changed{A \BoundaryCondition must define a value for either the attribute \token{spa\-tial:\-coordinateBoundary} or \token{spa\-tial:\-boun\-da\-ry\-Do\-main\-Type}, but not both. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} +\validRule{spatial-23650}{\changed{For every combination of species and boundary, there must be at most exactly one \BoundaryCondition of type \val{Neumann}, or exactly one \BoundaryCondition of type \val{Dirichlet}, or exactly three \BoundaryCondition elements, one of each of the three \val{Robin_} types. +(Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{diffusioncoefficient-class}.)}} + \subsubsection*{Rules for \class{Geometry} object} \validRule{spatial-23701}{A \Geometry object may have the optional SBML @@ -1567,13 +1614,13 @@ \validRule{spatial-23751}{\changed{A \ListOfCoordinateComponents must have exactly one, two, or three children. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{listofcoordinatecomponents-class}.)}} -\validRule{spatial-23752}{\changed{If a \ListOfCoordinateComponents object has exactly one \CoordinateComponents child, that child must have a \token{spa\-tial:\-type} with the value \val{cartesianX}. +\validRule{spatial-23752}{\changed{If a \ListOfCoordinateComponents object has exactly one \CoordinateComponents child, that child must have a \token{spa\-tial:\-type} attribute with the value \val{cartesianX}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{listofcoordinatecomponents-class}.)}} -\validRule{spatial-23753}{\changed{If a \ListOfCoordinateComponents object has exactly two \CoordinateComponents children, one of them must have a \token{spa\-tial:\-type} with the value \val{cartesianX}, and the other must have a \token{spa\-tial:\-type} with the value \val{cartesianY}. +\validRule{spatial-23753}{\changed{If a \ListOfCoordinateComponents object has exactly two \CoordinateComponents children, one of them must have a \token{spa\-tial:\-type} attribute with the value \val{cartesianX}, and the other must have a \token{spa\-tial:\-type} attribute with the value \val{cartesianY}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{listofcoordinatecomponents-class}.)}} -\validRule{spatial-23754}{\changed{If a \ListOfCoordinateComponents object has exactly three \CoordinateComponents children, one of them must have a \token{spa\-tial:\-type} with the value \val{cartesianX}, one must have a \token{spa\-tial:\-type} with the value \val{cartesianY}, and one must have a \token{spa\-tial:\-type} with the value \val{cartesianZ}. +\validRule{spatial-23754}{\changed{If a \ListOfCoordinateComponents object has exactly three \CoordinateComponents children, one of them must have a \token{spa\-tial:\-type} attribute with the value \val{cartesianX}, one must have a \token{spa\-tial:\-type} attribute with the value \val{cartesianY}, and one must have a \token{spa\-tial:\-type} attribute with the value \val{cartesianZ}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{listofcoordinatecomponents-class}.)}} \subsubsection*{Rules for \class{MixedGeometry} object} @@ -1622,7 +1669,7 @@ SBML Level~3 Specification for Spatial Processes, Version~1, \sec{listofordinalmappings-class}.)} -\validRule{spatial-23850}{\changed{Every \GeometryDefinition child of a \MixedGeometry must have a \token{spa\-tial:\-isActive} attribute with a value of \val{false}. +\validRule{spatial-23850}{\changed{Every \GeometryDefinition child of a \MixedGeometry must have a \token{spa\-tial:\-isActive} attribute value of \val{false}. (Reference: SBML Level~3 Specification for Spatial Processes, Version~1, \sec{mixedgeometry-class}.)}} \subsubsection*{Rules for \class{OrdinalMapping} object} Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex =================================================================== --- trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex 2019-11-19 22:44:01 UTC (rev 26153) +++ trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex 2019-11-19 22:47:13 UTC (rev 26154) @@ -252,7 +252,7 @@ A \Parameter is extended with a \SpatialSymbolReference element, when a symbol from the defined spatial geometry (\token{id} of any element contained in \Geometry) is required to be used in the SBML core model. Typically, the \SpatialSymbolReference is used to represent the coordinate components defined in the \Geometry's listOfCoordinateComponents. For example, if the \Geometry is defined in a 2-dimensional Cartesian coordinate system with X and Y defined as coordinate components, two \Parameters (one each for \CoordinateComponents X and Y) are created in the model. The value of the parameter is not required to be set. For each of these parameters, a \SpatialSymbolReference object is created. \subsubsection{The \fixttspace\tokenNC{spatialRef} attribute} -The \token{spatialRef} attribute of \SpatialSymbolReference, is of type \primtype{SpIdRef} and refers to the \primtype{SpId} of any element defined in the \Geometry of the model. +The \token{spatialRef} attribute of \SpatialSymbolReference, is of type \primtype{SpIdRef} and refers to the \primtype{SpId} of any element \changed{with mathematical meaning} defined in the \Geometry of the model. \subsection{The \class{DiffusionCoefficient} class} \label{diffusioncoefficient-class} @@ -268,9 +268,16 @@ The required \token{type} attribute of \DiffusionCoefficient is of type \primtype{DiffusionKind} and indicates whether the diffusion coefficient is \val{isotropic} (i.e. applies equally in all dimensions/directions), \val{anisotropic} (i.e. applies only for a single coordinate), or \val{tensor} (i.e. applies only for a particular pair of coordinates). Coefficients of type \val{isotropic} may not have any \token{coordinateReference} attributes defined, since diffusion is defined for all axes. Coefficients of type \val{anisotropic} must define the \token{coordinateReference1} attribute and not the \token{coordinateReference2} attribute, and applies in the direction of that axis. Coefficients of type \val{tensor} must define both the attributes \token{coordinateReference1} and \token{coordinateReference2}, defining diffusion in relation to the direction due to a gradient in the diagonal term of the diffusion tensor for the two coordinates. In no case may \token{coordinateReference2} be defined but not \token{coordinateReference1}. \subsubsection{\DiffusionCoefficient uniqueness} -Only one \DiffusionCoefficient may be defined per \Species per axis or pair of valid axes in the \Compartment in which it resides. Since isotropic diffusion is defined for all axes at once, this means that if an isotropic \DiffusionCoefficient is defined for a \Species, it may have no other diffusuion coefficients. +Only one \DiffusionCoefficient may be defined per \Species per axis or pair of valid axes in the \Compartment in which it resides. Since isotropic diffusion is defined for all axes at once, this means that if an isotropic \DiffusionCoefficient is defined for a \Species, it may have no other diffusuion coefficients. \changed{Similarly, if a tensor \DiffusionCoefficient is defined for a \Species for a pair of axes, the model must not also define an anisotopic \DiffusionCoefficient for either of those axes. This means that the following types of diffusion coefficients are allowed in a three-dimensional \Geometry:} +\begin{blockChanged} +\begin{itemize} + \item A single isotropic diffusion coefficient. + \item Up to three anisotropic diffusion coefficients, one per pair of axes. + \item Up to three tensor diffusion coefficients, one per axis. + \item One anisotropic diffusion coefficient for one pair of axes, and a second tensor diffusion coefficient, for the third axis. +\end{itemize} +\end{blockChanged} - \subsection{The \class{AdvectionCoefficient} class} \label{advectioncoefficient-class} The \AdvectionCoefficient is the extension to \Parameter in SBML core that is used to represent transport velocity of a species, if it exists. The transport velocity for the species is defined in a manner similar to the diffusion constant with a unit of length/time (regardless of the units of the corresponding \Species' \val{compartment} attribute). A \Parameter is created in SBML code for the velocity with an \AdvectionCoefficient child to identify the \Species whose velocity is represented by the \Parameter; its initial value is set either through the \token{value} attribute or an \InitialAssignment. If the advection coefficient changes in time or space, this can be modeled with a \Rule or \Event. @@ -504,13 +511,13 @@ \subsubsection{The \fixttspace\tokenNC{spatialDimensions} attribute} The \token{spatialDimensions} attribute of the \DomainType is of type \primtype{int} and can take on a value of 0, 1, 2, or 3. The spatial dimension is specified for a \DomainType, rather than being repeated for each \Domain that is represented by the \DomainType. -If the \token{spatialDimensions} attribute of a \DomainType is a lower dimensionality than the \Geometry to which it refers (via the \Domain), it is considered to describe the surface of that \Geometry in the 3D case, or the perimeter of that \Geometry in the 2D case. Since there is no defined perimeter of a 3D object, it is illegal to have a \DomainType with a \token{spatialDimensions} of \val{1} where the corresponding \Geometry is three-dimensional. +The \token{spatialDimensions} attribute of a \DomainType \changed{may be the same dimensionality as the \Geometry to which it refers (via the \Domain), or may be one less. In the latter case,} it is considered to describe the surface of that \Geometry in the 3D case, the perimeter of the \Geometry in the 2D case, \changed{or the end point of the \Geometry in the 1D case}. Since there is no defined perimeter of a 3D object, it is illegal to have a \DomainType with a \token{spatialDimensions} of \val{1} where the corresponding \Geometry is three-dimensional. \changed{Similarly, there is no end point of a 3D or 2D object, making it illegal to have a \DomainType with a \token{spatialDimensions} of \val{0} where the corresponding \Geometry is two- or three-dimensional. A \DomainType may also not have a higher dimensionality than the \Geometry.} \subsection{The \class{Domain} class} \label{domain-class} \label{listofinteriorpoints-class} -\Domains represent contiguous regions identified by the same \DomainType. One, two and three dimensional domains are contiguous linear regions, surface regions, and volume regions (respectively), bounded by the limits of the coordinate system (e.g. min/max of x,y,z) and adjacent domains corresponding to different domain types. \Domain is shown in \fig{Domain-uml}. +\Domains represent contiguous regions identified by the same \DomainType. One, two, and three dimensional domains are contiguous linear regions, surface regions, and volume regions (respectively), bounded by the limits of the coordinate system (e.g. min/max of x,y,z) and adjacent domains corresponding to different domain types. \Domain is shown in \fig{Domain-uml}. \begin{figure}[ht] \includegraphics{figs/Domain-uml} @@ -591,7 +598,7 @@ \subsection{The \class{GeometryDefinition} class} \label{geometrydefinition-class} -A \Geometry can specify a list of \GeometryDefinitions. The \GeometryDefinition is an abstract class that is the general term for the container which defines the concrete geometric constructs represented by the \Geometry. Four types of \GeometryDefinitions have been identified - \AnalyticGeometry, \SampledFieldGeometry, \ParametricGeometry, \CSGeometry (Constructed Solid Geometry) - and are elaborated in the following sections. The definition of the \GeometryDefinition element is displayed in \fig{GeometryDefinition-uml}. The spatial dimension of the \GeometryDefinition must match the \token{spatialDimensions} of the \DomainType defined for the associated \Domain. +A \Geometry can specify a list of \GeometryDefinitions. The \GeometryDefinition is an abstract class that is the general term for the container which defines the concrete geometric constructs represented by the \Geometry. Four types of \GeometryDefinitions have been identified - \AnalyticGeometry, \SampledFieldGeometry, \ParametricGeometry, \CSGeometry (Constructed Solid Geometry). \changed{In addition, a \MixedGeometry may combine elements of any of the other four basic types. These geometries} are elaborated in the following sections. The definition of the \GeometryDefinition element is displayed in \fig{GeometryDefinition-uml}. The spatial dimension of the \GeometryDefinition must match the \token{spatialDimensions} of the \DomainType defined for the associated \Domain. \begin{figure}[ht] \includegraphics{figs/GeometryDefinition-uml} @@ -873,7 +880,7 @@ \subsection{The \class{CSGTranslation} class} \label{csgtranslation-class} -The \CSGTranslation element represents a translation transformation on a \CSGNode (a transformation or set operation on one or a set of \CSGPrimitives) or a \CSGPrimitive along the axes defined in the \Geometry. This element has 3 attributes: +The \CSGTranslation element represents a translation transformation on a \CSGNode (a transformation or set operation on one or a set of \CSGPrimitives) or a \CSGPrimitive along the axes defined in the \Geometry. This element has \changed{three} attributes: \subsubsection{The \fixttspace\tokenNC{translateX} attribute} The \token{translateX} required attribute is of type \primtype{double}. It represents the translation of the \CSGNode along the x-axis (the \CoordinateComponent with the \token{type} of \val{cartesianX}). @@ -903,7 +910,7 @@ \label{csgscale-class} The \CSGScale element represents a scale transformation on a \CSGNode (a transformation or set operation on one or a set of \CSGPrimitives) or a \CSGPrimitive along the axes defined in the \Geometry. All scaling occurs collectively for the component primitive shapes, and the expansion occurs from the geometrical center of the object, i.e. the center of the smallest bounding box that would contain the current volume of the object. This means, for example, that if the child of the \CSGScale object is a hemisphere, defined as the intersection of a sphere and a cube, the bounding box would be half the size of a box that would have included the original entire sphere. -This element has 3 attributes: +This element has \changed{three} attributes: \subsubsection{The \fixttspace\tokenNC{scaleX} attribute} The \token{scaleX} required attribute is of type \primtype{double}. It represents the amount of scaling of the \CSGNode along the x-axis (the \CoordinateComponent with the \token{type} of \val{cartesianX}). @@ -1013,7 +1020,7 @@ The \token{dataType} attribute is of type \primtype{DataKind} and is optional. It is used to specify the type of the data being stored\changed{, so that the uncompressed data can be stored in an appropriate storage type. The three main value types are \val{uint} for unsigned integers, \val{int} for signed integers, and \val{double} for double-precision floating point values. For backwards compatibility, and for cases where storage space might be an issue, other values may also be used:} \val{float} to indicate single-precision (32-bit) floating point values, and \val{uint8}, \val{uint16}, and \val{uint32} to indicate 8-bit, 16-bit, and 32-bit unsigned integer values, respectively. \subsubsection{The \fixttspace\tokenNC{ArrayData} text child} -The \token{ArrayData} text child of the \SpatialPoints is in \token{arrayData} format, and represents an ordered list of sets of coordinates that will be used as the vertices of \ParametricObject elements in this \ParametricGeometry, with \val{0} representing the first such coordinate, \val{1} the second, etc. The list will define vertexes with as many values as there are \CoordinateComponent children of the parent \Geometry: three values for representing the X, Y, and Z coordinates (respectively) of 3-dimensional geometries, or two values for representing the X and Y coordinates (respectively) of 2-dimensional geometries. (\ParametricGeometry elements cannot be created in 1-dimensional geometries.) It is suggested, but not required, that if the data is uncompressed, that the grouped points be separated from each other with the use of a semicolon. If the data is compressed, a semicolon is not to be used. +The \token{ArrayData} text child of the \SpatialPoints is in \token{arrayData} format, and represents an ordered list of sets of coordinates that will be used as the vertices of \ParametricObject elements in this \ParametricGeometry, with \val{0} representing the first such coordinate, \val{1} the second, etc. The list will define vertexes with as many values as there are \CoordinateComponent children of the parent \Geometry: three values for representing the X, Y, and Z coordinates (respectively) of 3-dimensional geometries, or two values for representing the X and Y coordinates (respectively) of 2-dimensional geometries. (\ParametricGeometry elements cannot be created in 1-dimensional geometries.) It is suggested, but not required, that if the data is uncompressed, that the grouped points be separated from each other with the use of a semicolon. \begin{blockChanged} \subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} @@ -1047,7 +1054,7 @@ \subsubsection{The \fixttspace\tokenNC{PointIndex} text child} -The \token{PointIndex} text child of the \ParametricObject is in \token{arrayData} format, and represents an ordered list of indices that refer to elements in the \SpatialPoints array and are interpreted by considering the \token{polygonType} attribute of the \ParametricObject with a value of \val{triangle} indicating that the data is to be grouped in sets of three, and a value of \val{quadrilateral} indicating that the data is to be grouped in sets of four. The sequence of indices must follow adjacent edges, with an implied edge between the first and last vertex. Additionally, the order of that sequence should be consistently clockwise or counter-clockwise for any contiguous surface. This can be accomplished by ensuring that when an edge is used for two different faces, the order of that edge is reversed for the second face. It is suggested, but not required, that if the data is uncompressed, that the grouped points be separated from each other with the use of a semicolon. If the data is compressed, a semicolon is not to be used. Each set of indices that define a polygon face should each refer to a different location. This means that one should not re-use index values with a single polygon face, nor should one use two index values in the same face that are mapped to the same location. +The \token{PointIndex} text child of the \ParametricObject is in \token{arrayData} format, and represents an ordered list of indices that refer to elements in the \SpatialPoints array and are interpreted by considering the \token{polygonType} attribute of the \ParametricObject with a value of \val{triangle} indicating that the data is to be grouped in sets of three, and a value of \val{quadrilateral} indicating that the data is to be grouped in sets of four. The sequence of indices must follow adjacent edges, with an implied edge between the first and last vertex. Additionally, the order of that sequence should be consistently clockwise or counter-clockwise for any contiguous surface. This can be accomplished by ensuring that when an edge is used for two different faces, the order of that edge is reversed for the second face. It is suggested, but not required, that if the data is uncompressed, that the grouped points be separated from each other with the use of a semicolon. Each set of indices that define a polygon face should each refer to a different location. This means that one should not re-use index values with a single polygon face, nor should one use two index values in the same face that are mapped to the same location. \subsection{A \class{ParametricGeometry} example} \label{parametricgeometry-example} |
From: <luc...@us...> - 2019-11-19 22:44:04
|
Revision: 26153 http://sourceforge.net/p/sbml/code/26153 Author: luciansmith Date: 2019-11-19 22:44:01 +0000 (Tue, 19 Nov 2019) Log Message: ----------- Add support for spatial rule 23651 (and fix old models that violated it). 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/1220501-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-pass-00-01.xml Added Paths: ----------- 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/test/test-data/general-constraints/1223651-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-05.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-06.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-07.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-08.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-09.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-10.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-11.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-12.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-13.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-14.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-15.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-16.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-17.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-18.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-02-19.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-02-20.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-02-21.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-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-11-19 21:24:24 UTC (rev 26152) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-19 22:44:01 UTC (rev 26153) @@ -291,6 +291,7 @@ , SpatialBoundaryConditionCoordinateBoundaryMustBeBoundary = 1223606 , SpatialBoundaryConditionBoundaryDomainTypeMustBeDomainType = 1223607 , SpatialBoundaryConditionBoundaryDomainTypeOrCoordinateBoundary = 1223650 +, SpatialBoundaryConditionsMustBeUnique = 1223651 , SpatialGeometryAllowedCoreAttributes = 1223701 , SpatialGeometryAllowedCoreElements = 1223702 , SpatialGeometryAllowedAttributes = 1223703 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-19 21:24:24 UTC (rev 26152) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-19 22:44:01 UTC (rev 26153) @@ -2774,6 +2774,16 @@ } }, + // 1223651 + { SpatialBoundaryConditionsMustBeUnique, + "For every combination of species and boundary, there must be at most exactly one <boundaryCondition> of type 'Neumann', or exactly one <boundaryCondition> of type 'Dirichlet', or exactly three <boundaryCondition> elements, one of each of the three 'Robin' types.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + ".", + { "L3V1 Spatial V1 Section" + } + }, + // 1223701 { SpatialGeometryAllowedCoreAttributes, "Core attributes allowed on <geometry>.", Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueBoundaryConditionsCheck.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueBoundaryConditionsCheck.cpp (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueBoundaryConditionsCheck.cpp 2019-11-19 22:44:01 UTC (rev 26153) @@ -0,0 +1,225 @@ +/** +* @cond doxygenLibsbmlInternal +* +* @file SpatialUniqueBoundaryConditionsCheck.cpp +* @brief Ensure that spatial compartment mappings' unit sizes sum to one. +* @author Sarah Keating, Lucian Smith +* +* <!-------------------------------------------------------------------------- +* 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 "SpatialUniqueBoundaryConditionsCheck.h" +#include <sbml/packages/spatial/extension/SpatialParameterPlugin.h> + +#include <set> +#include <map> + +/** @cond doxygenIgnored */ +using namespace std; +/** @endcond */ + +LIBSBML_CPP_NAMESPACE_BEGIN +#ifdef __cplusplus + + +/* +* Creates a new Constraint with the given constraint id. +*/ +SpatialUniqueBoundaryConditionsCheck::SpatialUniqueBoundaryConditionsCheck(unsigned int id, SpatialValidator & v): + TConstraint<Model>(id, v) +{ +} + +/* +* Destroys this Constraint. +*/ +SpatialUniqueBoundaryConditionsCheck::~SpatialUniqueBoundaryConditionsCheck () +{ +} + + +/* +* Checks that all ids on the following Model objects are unique: +* event assignments and assignment rules. +*/ +void +SpatialUniqueBoundaryConditionsCheck::check_(const Model& m, const Model&) +{ + if (m.getLevel() < 3) { + return; + } + set<pair<string, string> > dirichlet_targets, neumann_targets, robin_in_targets, robin_value_targets, robin_sum_targets; + for (unsigned long p = 0; p < m.getNumParameters(); p++) { + const Parameter* param = m.getParameter(p); + const SpatialParameterPlugin* spp = static_cast<const SpatialParameterPlugin*>(param->getPlugin("spatial")); + if (spp == NULL) { + continue; + } + if (spp->isSetBoundaryCondition()) { + const BoundaryCondition* bc = spp->getBoundaryCondition(); + if (!bc->isSetVariable()) { + continue; + } + string var = bc->getVariable(); + msg = "A <boundaryCondition>"; + if (bc->isSetId()) { + msg += " with an id of '" + bc->getId() + "'"; + } + msg += " has a variable of '"; + msg += var + "'"; + string target = ""; + if (bc->isSetCoordinateBoundary()) { + target = bc->getCoordinateBoundary(); + msg += " and a coordinateBoundary of '"; + msg += target + "'"; + } + else if (bc->isSetBoundaryDomainType()) { + target = bc->getBoundaryDomainType(); + msg += " and a boundaryDomain of '"; + msg += target + "'"; + } + if (target == "") { + continue; + } + pair<string, string> bc_pair = make_pair(var, target); + msg += ", with a type of '" + bc->getTypeAsString() + "'"; + BoundaryKind_t bk = bc->getType(); + if (dirichlet_targets.find(bc_pair) != dirichlet_targets.end()) { + msg += ", but another <boundaryCondition> of type 'Dirichlet' already exists for that species boundary."; + logFailure(m); + continue; + } + if (neumann_targets.find(bc_pair) != neumann_targets.end()) { + msg += ", but another <boundaryCondition> of type 'Neumann' already exists for that species boundary."; + logFailure(m); + continue; + } + if (robin_in_targets.find(bc_pair) != robin_in_targets.end()) { + if (bk != SPATIAL_BOUNDARYKIND_ROBIN_SUM && bk != SPATIAL_BOUNDARYKIND_ROBIN_VALUE_COEFFICIENT) { + msg += ", but another <boundaryCondition> of type 'Robin_inwardNormalGradientCoefficient' already exists for that species boundary."; + logFailure(m); + continue; + } + } + if (robin_value_targets.find(bc_pair) != robin_value_targets.end()) { + if (bk != SPATIAL_BOUNDARYKIND_ROBIN_SUM && bk != SPATIAL_BOUNDARYKIND_ROBIN_INWARD_NORMAL_GRADIENT_COEFFICIENT) { + msg += ", but another <boundaryCondition> of type 'Robin_valueCoefficient' already exists for that species boundary."; + logFailure(m); + continue; + } + } + if (robin_sum_targets.find(bc_pair) != robin_sum_targets.end()) { + if (bk != SPATIAL_BOUNDARYKIND_ROBIN_INWARD_NORMAL_GRADIENT_COEFFICIENT && bk != SPATIAL_BOUNDARYKIND_ROBIN_VALUE_COEFFICIENT) { + msg += ", but another <boundaryCondition> of type 'Robin_sum' already exists for that species boundary."; + logFailure(m); + continue; + } + } + + + switch (bk) { + case SPATIAL_BOUNDARYKIND_DIRICHLET: + dirichlet_targets.insert(bc_pair); + break; + case SPATIAL_BOUNDARYKIND_NEUMANN: + neumann_targets.insert(bc_pair); + break; + case SPATIAL_BOUNDARYKIND_ROBIN_INWARD_NORMAL_GRADIENT_COEFFICIENT: + robin_in_targets.insert(bc_pair); + break; + case SPATIAL_BOUNDARYKIND_ROBIN_SUM: + robin_sum_targets.insert(bc_pair); + break; + case SPATIAL_BOUNDARYKIND_ROBIN_VALUE_COEFFICIENT: + robin_value_targets.insert(bc_pair); + break; + } + } + } + + //Now check for exactly three Robin boundaries: + for (set<pair<string, string> >::iterator r_i_pair = robin_in_targets.begin(); r_i_pair != robin_in_targets.end(); r_i_pair++) { + pair<string, string> rip = *r_i_pair; + string msg1 = "A <boundaryCondition> has a variable of '"; + msg1 += rip.first + "' and a target of '" + rip.second; + msg1 += "', with a type of 'Robin_inwardNormalGradientCoefficient', but there is no corresponding <boundaryCondition> with the same variable and target with type '"; + if (robin_sum_targets.find(rip) == robin_sum_targets.end()) { + msg = msg1 + "Robin_sum'."; + logFailure(m); + robin_sum_targets.insert(rip); + } + if (robin_value_targets.find(rip) == robin_value_targets.end()) { + msg = msg1 + "Robin_valueCoefficient'."; + logFailure(m); + robin_value_targets.insert(rip); + } + } + + for (set<pair<string, string> >::iterator r_i_pair = robin_sum_targets.begin(); r_i_pair != robin_sum_targets.end(); r_i_pair++) { + pair<string, string> rip = *r_i_pair; + string msg1 = "A <boundaryCondition> has a variable of '"; + msg1 += rip.first + "' and a target of '" + rip.second; + msg1 += "', with a type of 'Robin_sum', but there is no corresponding <boundaryCondition> with the same variable and target with type '"; + if (robin_in_targets.find(rip) == robin_in_targets.end()) { + msg = msg1 + "Robin_inwardNormalGradientCoefficient'."; + logFailure(m); + robin_in_targets.insert(rip); + } + if (robin_value_targets.find(rip) == robin_value_targets.end()) { + msg = msg1 + "Robin_valueCoefficient'."; + logFailure(m); + robin_value_targets.insert(rip); + } + } + + for (set<pair<string, string> >::iterator r_i_pair = robin_value_targets.begin(); r_i_pair != robin_value_targets.end(); r_i_pair++) { + pair<string, string> rip = *r_i_pair; + string msg1 = "A <boundaryCondition> has a variable of '"; + msg1 += rip.first + "' and a target of '" + rip.second; + msg1 += "', with a type of 'Robin_valueCoefficient', but there is no corresponding <boundaryCondition> with the same variable and target with type '"; + if (robin_in_targets.find(rip) == robin_in_targets.end()) { + msg = msg1 + "Robin_inwardNormalGradientCoefficient'."; + logFailure(m); + robin_in_targets.insert(rip); + } + if (robin_sum_targets.find(rip) == robin_sum_targets.end()) { + msg = msg1 + "Robin_sum'."; + logFailure(m); + robin_sum_targets.insert(rip); + } + } +} + + +#endif /* __cplusplus */ + +LIBSBML_CPP_NAMESPACE_END +/** @endcond */ Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueBoundaryConditionsCheck.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueBoundaryConditionsCheck.h (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueBoundaryConditionsCheck.h 2019-11-19 22:44:01 UTC (rev 26153) @@ -0,0 +1,69 @@ +/** +* @cond doxygenLibsbmlInternal +* +* @file SpatialUniqueBoundaryConditionsCheck.h +* @brief Ensure that spatial compartment mappings' unit sizes sum to one. +* @author Sarah Keating, Lucian Smith +* +* <!-------------------------------------------------------------------------- +* 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 2011-2012 jointly by the following organizations: +* 1. California Institute of Technology, Pasadena, CA, USA +* 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK +* +* 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 +* ---------------------------------------------------------------------- -->*/ + +#ifndef SpatialUniqueBoundaryConditionsCheck_h +#define SpatialUniqueBoundaryConditionsCheck_h + + +#ifdef __cplusplus + +#include <sbml/validator/VConstraint.h> +#include <sbml/packages/spatial/validator/SpatialValidator.h> + +LIBSBML_CPP_NAMESPACE_BEGIN + +class DiffusionCoefficient; + +class SpatialUniqueBoundaryConditionsCheck: public TConstraint<Model> +{ +public: + + /** + * Creates a new Constraint with the given constraint id. + */ + SpatialUniqueBoundaryConditionsCheck (unsigned int id, SpatialValidator& v); + + /** + * Destroys this Constraint. + */ + virtual ~SpatialUniqueBoundaryConditionsCheck (); + + +protected: + + virtual void check_ (const Model& m, const Model& object); +}; + +LIBSBML_CPP_NAMESPACE_END + +#endif /* __cplusplus */ +#endif /* SpatialUniqueBoundaryConditionsCheck_h */ +/** @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-11-19 21:24:24 UTC (rev 26152) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-19 22:44:01 UTC (rev 26153) @@ -48,6 +48,7 @@ #include <sbml/packages/spatial/validator/SpatialSpatialSymbolReferenceUniqueRefCheck.h> #include <sbml/packages/spatial/validator/SpatialUniqueDiffusionCoefficientsCheck.h> #include <sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.h> +#include <sbml/packages/spatial/validator/SpatialUniqueBoundaryConditionsCheck.h> #include <sbml/Species.h> #endif /* AddingConstraintsToValidator */ @@ -60,6 +61,7 @@ EXTERN_CONSTRAINT(ErrorEnumValue, SpatialSpatialSymbolReferenceUniqueRefCheck); EXTERN_CONSTRAINT(ErrorEnumValue, SpatialUniqueDiffusionCoefficientsCheck); EXTERN_CONSTRAINT(ErrorEnumValue, SpatialUniqueAdvectionCoefficientsCheck); +EXTERN_CONSTRAINT(ErrorEnumValue, SpatialUniqueBoundaryConditionsCheck); Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-19 21:24:24 UTC (rev 26152) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-19 22:44:01 UTC (rev 26153) @@ -42,6 +42,7 @@ #include "sbml/packages/spatial/validator/SpatialSpatialSymbolReferenceUniqueRefCheck.h" #include "sbml/packages/spatial/validator/SpatialUniqueDiffusionCoefficientsCheck.h" #include "sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.h" +#include "sbml/packages/spatial/validator/SpatialUniqueBoundaryConditionsCheck.h" //Constraints declared in SpatialConsistencyConstraints.cpp addConstraint(new VConstraintDomainSpatialDomainDomainTypeMustBeDomainType(*this)); @@ -78,6 +79,7 @@ addConstraint(new SpatialSpatialSymbolReferenceUniqueRefCheck(SpatialSpatialSymbolReferenceUniqueRef, *this)); addConstraint(new SpatialUniqueDiffusionCoefficientsCheck(SpatialNoDiffusionCoefficientOverlap, *this)); addConstraint(new SpatialUniqueAdvectionCoefficientsCheck(SpatialAdvectionCoefficientsMustBeUnique, *this)); +addConstraint(new SpatialUniqueBoundaryConditionsCheck(SpatialBoundaryConditionsMustBeUnique, *this)); /** @endcond */ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-03.xml 2019-11-19 21:24:24 UTC (rev 26152) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-03.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -68,8 +68,8 @@ </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> - <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_valueCoefficient" spatial:variable="species_1"/> - <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_valueCoefficient" spatial:variable="species_1"/> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_1"/> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_1"/> </parameter> </listOfParameters> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml 2019-11-19 21:24:24 UTC (rev 26152) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -69,7 +69,7 @@ <listOfParameters> <parameter constant="false" id="id_3"> <spatial:spatialSymbolReference spatial:spatialRef="coordinateComponent_2"/> - <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_valueCoefficient" spatial:variable="species_1"/> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_1"/> </parameter> </listOfParameters> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml 2019-11-19 21:24:24 UTC (rev 26152) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -69,7 +69,7 @@ <listOfParameters> <parameter constant="false" id="id_3"> <spatial:advectionCoefficient spatial:coordinate="cartesianX" spatial:variable="species_1"/> - <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_valueCoefficient" spatial:variable="species_1"/> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_1"/> </parameter> </listOfParameters> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml 2019-11-19 21:24:24 UTC (rev 26152) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -68,7 +68,7 @@ </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> - <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_valueCoefficient" spatial:variable="species_1"/> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_1"/> <spatial:diffusionCoefficient spatial:coordinateReference1="cartesianX" spatial:coordinateReference2="cartesianY" spatial:type="tensor" spatial:variable="species_1"/> </parameter> </listOfParameters> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml 2019-11-19 21:24:24 UTC (rev 26152) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -68,7 +68,7 @@ </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> - <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_valueCoefficient" spatial:variable="species_1"/> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_1"/> </parameter> </listOfParameters> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-fail-01-01.xml 2019-11-19 21:24:24 UTC (rev 26152) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-fail-01-01.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -68,7 +68,7 @@ </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> - <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_valueCoefficient" spatial:variable="species_2"/> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_2"/> </parameter> </listOfParameters> </model> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-pass-00-01.xml 2019-11-19 21:24:24 UTC (rev 26152) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-pass-00-01.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -68,7 +68,7 @@ </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> - <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_valueCoefficient" spatial:variable="species_1"/> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_1"/> </parameter> </listOfParameters> </model> Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-01.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -0,0 +1,79 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_1"/> + </parameter> + <parameter constant="false" id="id_4"> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Dirichlet" spatial:variable="species_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-02.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -0,0 +1,79 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_1"/> + </parameter> + <parameter constant="false" id="id_4"> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_sum" spatial:variable="species_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-03.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -0,0 +1,79 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_1"/> + </parameter> + <parameter constant="false" id="id_4"> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_inwardNormalGradientCoefficient" spatial:variable="species_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-04.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-04.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -0,0 +1,79 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Neumann" spatial:variable="species_1"/> + </parameter> + <parameter constant="false" id="id_4"> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_valueCoefficient" spatial:variable="species_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-05.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-05.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223651-fail-01-05.xml 2019-11-19 22:44:01 UTC (rev 26153) @@ -0,0 +1,79 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:domai... [truncated message content] |
From: <luc...@us...> - 2019-11-19 21:24:26
|
Revision: 26152 http://sourceforge.net/p/sbml/code/26152 Author: luciansmith Date: 2019-11-19 21:24:24 +0000 (Tue, 19 Nov 2019) Log Message: ----------- Having 'getTypeAsString' as a static function was incorrect: fixed. A static function would return the same value for all instances of the class, regardless of the actual value of mType. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/distrib/sbml/UncertParameter.cpp branches/libsbml-experimental/src/sbml/packages/spatial/sbml/BoundaryCondition.cpp branches/libsbml-experimental/src/sbml/packages/spatial/sbml/BoundaryCondition.h branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CoordinateComponent.cpp branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CoordinateComponent.h branches/libsbml-experimental/src/sbml/packages/spatial/sbml/DiffusionCoefficient.cpp Modified: branches/libsbml-experimental/src/sbml/packages/distrib/sbml/UncertParameter.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/distrib/sbml/UncertParameter.cpp 2019-11-19 00:01:00 UTC (rev 26151) +++ branches/libsbml-experimental/src/sbml/packages/distrib/sbml/UncertParameter.cpp 2019-11-19 21:24:24 UTC (rev 26152) @@ -234,8 +234,7 @@ std::string UncertParameter::getTypeAsString() const { - std::string code_str = UncertType_toString(mType); - return code_str; + return UncertType_toString(mType); } Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/BoundaryCondition.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/BoundaryCondition.cpp 2019-11-19 00:01:00 UTC (rev 26151) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/BoundaryCondition.cpp 2019-11-19 21:24:24 UTC (rev 26152) @@ -156,11 +156,10 @@ /* * Returns the value of the "type" attribute of this BoundaryCondition. */ -const std::string& +std::string BoundaryCondition::getTypeAsString() const { - static const std::string code_str = BoundaryKind_toString(mType); - return code_str; + return BoundaryKind_toString(mType); } Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/BoundaryCondition.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/BoundaryCondition.h 2019-11-19 00:01:00 UTC (rev 26151) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/BoundaryCondition.h 2019-11-19 21:24:24 UTC (rev 26152) @@ -220,7 +220,7 @@ * @li @c "Dirichlet" * @li @c "invalid BoundaryKind value" */ - const std::string& getTypeAsString() const; + std::string getTypeAsString() const; /** Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CoordinateComponent.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CoordinateComponent.cpp 2019-11-19 00:01:00 UTC (rev 26151) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CoordinateComponent.cpp 2019-11-19 21:24:24 UTC (rev 26152) @@ -205,11 +205,10 @@ /* * Returns the value of the "type" attribute of this CoordinateComponent. */ -const std::string& +std::string CoordinateComponent::getTypeAsString() const { - static const std::string code_str = CoordinateKind_toString(mType); - return code_str; + return CoordinateKind_toString(mType); } Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CoordinateComponent.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CoordinateComponent.h 2019-11-19 00:01:00 UTC (rev 26151) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CoordinateComponent.h 2019-11-19 21:24:24 UTC (rev 26152) @@ -220,7 +220,7 @@ * @li @c "cartesianZ" * @li @c "invalid CoordinateKind value" */ - const std::string& getTypeAsString() const; + std::string getTypeAsString() const; /** Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/DiffusionCoefficient.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/DiffusionCoefficient.cpp 2019-11-19 00:01:00 UTC (rev 26151) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/DiffusionCoefficient.cpp 2019-11-19 21:24:24 UTC (rev 26152) @@ -160,8 +160,7 @@ std::string DiffusionCoefficient::getTypeAsString() const { - std::string code_str = DiffusionKind_toString(mType); - return code_str; + return DiffusionKind_toString(mType); } |
From: <luc...@us...> - 2019-11-19 00:01:03
|
Revision: 26151 http://sourceforge.net/p/sbml/code/26151 Author: luciansmith Date: 2019-11-19 00:01:00 +0000 (Tue, 19 Nov 2019) Log Message: ----------- Add support for spatial rule 23604 (and fix old models that violated it). Modified Paths: -------------- 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/1220501-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-04.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-07.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-04.xml Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-pass-00-01.xml Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-18 23:16:18 UTC (rev 26150) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-19 00:01:00 UTC (rev 26151) @@ -945,6 +945,29 @@ END_CONSTRAINT +// 1223604 +START_CONSTRAINT(SpatialBoundaryConditionVariableMustBeSpecies, BoundaryCondition, bc) +{ + bool fail = false; + pre(bc.isSetVariable()); + + if (m.getSpecies(bc.getVariable()) == NULL) { + fail = true; + stringstream ss_msg; + ss_msg << "A <boundaryCondition>"; + if (bc.isSetId()) + { + ss_msg << " with id '" << bc.getId() << "'"; + } + ss_msg << " references a variable '" << bc.getVariable() << "', which is not the ID of a <species> in the <model>."; + msg = ss_msg.str(); + } + + 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-11-18 23:16:18 UTC (rev 26150) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-19 00:01:00 UTC (rev 26151) @@ -71,6 +71,7 @@ addConstraint(new VConstraintDiffusionCoefficientSpatialDiffusionCoefficientCoordinateReferenceNoYIn1D(*this)); addConstraint(new VConstraintDiffusionCoefficientSpatialDiffusionCoefficientCoordinateReferenceNoZIn2D(*this)); addConstraint(new VConstraintAdvectionCoefficientSpatialAdvectionCoefficientVariableMustBeSpecies(*this)); +addConstraint(new VConstraintBoundaryConditionSpatialBoundaryConditionVariableMustBeSpecies(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(1221351, *this)); Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-01.xml 2019-11-18 23:16:18 UTC (rev 26150) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-01.xml 2019-11-19 00:01:00 UTC (rev 26151) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-03.xml 2019-11-18 23:16:18 UTC (rev 26150) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-03.xml 2019-11-19 00:01:00 UTC (rev 26151) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-04.xml 2019-11-18 23:16:18 UTC (rev 26150) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-04.xml 2019-11-19 00:01:00 UTC (rev 26151) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml 2019-11-18 23:16:18 UTC (rev 26150) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-06.xml 2019-11-19 00:01:00 UTC (rev 26151) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-07.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-07.xml 2019-11-18 23:16:18 UTC (rev 26150) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-07.xml 2019-11-19 00:01:00 UTC (rev 26151) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml 2019-11-18 23:16:18 UTC (rev 26150) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-10.xml 2019-11-19 00:01:00 UTC (rev 26151) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-01.xml 2019-11-18 23:16:18 UTC (rev 26150) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-01.xml 2019-11-19 00:01:00 UTC (rev 26151) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml 2019-11-18 23:16:18 UTC (rev 26150) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-03.xml 2019-11-19 00:01:00 UTC (rev 26151) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-04.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-04.xml 2019-11-18 23:16:18 UTC (rev 26150) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-04.xml 2019-11-19 00:01:00 UTC (rev 26151) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-fail-01-01.xml 2019-11-19 00:01:00 UTC (rev 26151) @@ -0,0 +1,76 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_valueCoefficient" spatial:variable="species_2"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223604-pass-00-01.xml 2019-11-19 00:01:00 UTC (rev 26151) @@ -0,0 +1,76 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:boundaryCondition spatial:boundaryDomainType="domainType_1" spatial:coordinateBoundary="boundary_2" spatial:type="Robin_valueCoefficient" spatial:variable="species_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + |
From: <luc...@us...> - 2019-11-18 23:16:20
|
Revision: 26150 http://sourceforge.net/p/sbml/code/26150 Author: luciansmith Date: 2019-11-18 23:16:18 +0000 (Mon, 18 Nov 2019) Log Message: ----------- Add spatial validation rule 23551, and implemented support for 23504. 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/1220501-fail-01-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-05.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-09.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-02.xml Added Paths: ----------- 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/test/test-data/general-constraints/1223504-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223504-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-fail-01-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-01.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-02.xml branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-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-11-18 19:19:51 UTC (rev 26149) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLError.h 2019-11-18 23:16:18 UTC (rev 26150) @@ -281,6 +281,8 @@ , SpatialAdvectionCoefficientAllowedAttributes = 1223503 , SpatialAdvectionCoefficientVariableMustBeSpecies = 1223504 , SpatialAdvectionCoefficientCoordinateMustBeCoordinateKindEnum= 1223505 +, SpatialAdvectionCoefficientUnits = 1223550 +, SpatialAdvectionCoefficientsMustBeUnique = 1223551 , SpatialBoundaryConditionAllowedCoreAttributes = 1223601 , SpatialBoundaryConditionAllowedCoreElements = 1223602 , SpatialBoundaryConditionAllowedAttributes = 1223603 Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-18 19:19:51 UTC (rev 26149) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialSBMLErrorTable.h 2019-11-18 23:16:18 UTC (rev 26150) @@ -2655,6 +2655,26 @@ } }, + // 1223550 + { SpatialAdvectionCoefficientUnits, + "The units of an advection coefficient should be length/time.", + LIBSBML_CAT_UNITS_CONSISTENCY, + LIBSBML_SEV_WARNING, + "The units of a <parameter> with an <advectionCoefficient> child should be length/time.", + { "L3V1 Spatial V1 Section" + } + }, + + // 1223551 + { SpatialAdvectionCoefficientsMustBeUnique, + "The 'coordinate' attribute must be CoordinateKindEnum.", + LIBSBML_CAT_GENERAL_CONSISTENCY, + LIBSBML_SEV_ERROR, + "No two <advectionCoefficient> elements in the same <model> may have the same values for the attributes 'species:variable' and 'species:coordinate'. Only one advection coefficient may be defined per species per axis.", + { "L3V1 Spatial V1 Section" + } + }, + // 1223601 { SpatialBoundaryConditionAllowedCoreAttributes, "Core attributes allowed on <boundaryCondition>.", Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.cpp (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.cpp 2019-11-18 23:16:18 UTC (rev 26150) @@ -0,0 +1,116 @@ +/** +* @cond doxygenLibsbmlInternal +* +* @file SpatialUniqueAdvectionCoefficientsCheck.cpp +* @brief Ensure that spatial compartment mappings' unit sizes sum to one. +* @author Sarah Keating, Lucian Smith +* +* <!-------------------------------------------------------------------------- +* 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 "SpatialUniqueAdvectionCoefficientsCheck.h" +#include <sbml/packages/spatial/extension/SpatialParameterPlugin.h> + +#include <set> +#include <map> + +/** @cond doxygenIgnored */ +using namespace std; +/** @endcond */ + +LIBSBML_CPP_NAMESPACE_BEGIN +#ifdef __cplusplus + + +/* +* Creates a new Constraint with the given constraint id. +*/ +SpatialUniqueAdvectionCoefficientsCheck::SpatialUniqueAdvectionCoefficientsCheck(unsigned int id, SpatialValidator & v): + TConstraint<Model>(id, v) +{ +} + +/* +* Destroys this Constraint. +*/ +SpatialUniqueAdvectionCoefficientsCheck::~SpatialUniqueAdvectionCoefficientsCheck () +{ +} + + +/* +* Checks that all ids on the following Model objects are unique: +* event assignments and assignment rules. +*/ +void +SpatialUniqueAdvectionCoefficientsCheck::check_ (const Model& m, const Model&) +{ + if (m.getLevel() < 3) { + return; + } + set<pair<string, CoordinateKind_t> > species_coordinate; + for (unsigned long p = 0; p < m.getNumParameters(); p++) { + const Parameter* param = m.getParameter(p); + const SpatialParameterPlugin* spp = static_cast<const SpatialParameterPlugin*>(param->getPlugin("spatial")); + if (spp == NULL) { + continue; + } + if (spp->isSetAdvectionCoefficient()) { + const AdvectionCoefficient* advc = spp->getAdvectionCoefficient(); + if (!advc->isSetVariable()) { + continue; + } + if (!advc->isSetCoordinate()) { + continue; + } + string var = advc->getVariable(); + CoordinateKind_t ckind = advc->getCoordinate(); + pair<string, CoordinateKind_t> sc_pair = make_pair(var, ckind); + if (species_coordinate.find(sc_pair) != species_coordinate.end()) { + msg = "An <advectionCoefficient>"; + if (advc->isSetId()) { + msg += " with an id of '" + advc->getId() + "'"; + } + msg += " has a variable of '"; + msg += var + "' and a coordinate of '" + advc->getCoordinateAsString(); + msg += "', which is already defined by a different <advectionCoefficient>."; + logFailure(m); + } + species_coordinate.insert(sc_pair); + } + } +} + + +#endif /* __cplusplus */ + +LIBSBML_CPP_NAMESPACE_END +/** @endcond */ Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.h (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.h 2019-11-18 23:16:18 UTC (rev 26150) @@ -0,0 +1,69 @@ +/** +* @cond doxygenLibsbmlInternal +* +* @file SpatialUniqueAdvectionCoefficientsCheck.h +* @brief Ensure that spatial compartment mappings' unit sizes sum to one. +* @author Sarah Keating, Lucian Smith +* +* <!-------------------------------------------------------------------------- +* 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 2011-2012 jointly by the following organizations: +* 1. California Institute of Technology, Pasadena, CA, USA +* 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK +* +* 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 +* ---------------------------------------------------------------------- -->*/ + +#ifndef SpatialUniqueAdvectionCoefficientsCheck_h +#define SpatialUniqueAdvectionCoefficientsCheck_h + + +#ifdef __cplusplus + +#include <sbml/validator/VConstraint.h> +#include <sbml/packages/spatial/validator/SpatialValidator.h> + +LIBSBML_CPP_NAMESPACE_BEGIN + +class DiffusionCoefficient; + +class SpatialUniqueAdvectionCoefficientsCheck: public TConstraint<Model> +{ +public: + + /** + * Creates a new Constraint with the given constraint id. + */ + SpatialUniqueAdvectionCoefficientsCheck (unsigned int id, SpatialValidator& v); + + /** + * Destroys this Constraint. + */ + virtual ~SpatialUniqueAdvectionCoefficientsCheck (); + + +protected: + + virtual void check_ (const Model& m, const Model& object); +}; + +LIBSBML_CPP_NAMESPACE_END + +#endif /* __cplusplus */ +#endif /* SpatialUniqueAdvectionCoefficientsCheck_h */ +/** @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-11-18 19:19:51 UTC (rev 26149) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraints.cpp 2019-11-18 23:16:18 UTC (rev 26150) @@ -47,6 +47,7 @@ #include <sbml/packages/spatial/validator/SpatialCompartmentMappingUnitSizesCheck.h> #include <sbml/packages/spatial/validator/SpatialSpatialSymbolReferenceUniqueRefCheck.h> #include <sbml/packages/spatial/validator/SpatialUniqueDiffusionCoefficientsCheck.h> +#include <sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.h> #include <sbml/Species.h> #endif /* AddingConstraintsToValidator */ @@ -58,6 +59,7 @@ EXTERN_CONSTRAINT(ErrorEnumValue, SpatialCompartmentMappingUnitSizesCheck); EXTERN_CONSTRAINT(ErrorEnumValue, SpatialSpatialSymbolReferenceUniqueRefCheck); EXTERN_CONSTRAINT(ErrorEnumValue, SpatialUniqueDiffusionCoefficientsCheck); +EXTERN_CONSTRAINT(ErrorEnumValue, SpatialUniqueAdvectionCoefficientsCheck); @@ -920,7 +922,29 @@ } END_CONSTRAINT +// 1223504 +START_CONSTRAINT(SpatialAdvectionCoefficientVariableMustBeSpecies, AdvectionCoefficient, ac) +{ + bool fail = false; + pre(ac.isSetVariable()); + if (m.getSpecies(ac.getVariable()) == NULL) { + fail = true; + stringstream ss_msg; + ss_msg << "An <advectionCoefficient>"; + if (ac.isSetId()) + { + ss_msg << " with id '" << ac.getId() << "'"; + } + ss_msg << " references a variable '" << ac.getVariable() << "', which is not the ID of a <species> in the <model>."; + msg = ss_msg.str(); + } + + 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-11-18 19:19:51 UTC (rev 26149) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-18 23:16:18 UTC (rev 26150) @@ -41,6 +41,7 @@ #include "sbml/packages/spatial/validator/SpatialCompartmentMappingUnitSizesCheck.h" #include "sbml/packages/spatial/validator/SpatialSpatialSymbolReferenceUniqueRefCheck.h" #include "sbml/packages/spatial/validator/SpatialUniqueDiffusionCoefficientsCheck.h" +#include "sbml/packages/spatial/validator/SpatialUniqueAdvectionCoefficientsCheck.h" //Constraints declared in SpatialConsistencyConstraints.cpp addConstraint(new VConstraintDomainSpatialDomainDomainTypeMustBeDomainType(*this)); @@ -69,11 +70,13 @@ addConstraint(new VConstraintDiffusionCoefficientSpatialDiffusionCoefficientCoordinateReferenceDifference(*this)); addConstraint(new VConstraintDiffusionCoefficientSpatialDiffusionCoefficientCoordinateReferenceNoYIn1D(*this)); addConstraint(new VConstraintDiffusionCoefficientSpatialDiffusionCoefficientCoordinateReferenceNoZIn2D(*this)); +addConstraint(new VConstraintAdvectionCoefficientSpatialAdvectionCoefficientVariableMustBeSpecies(*this)); //Constraints defined in their own class ('global constraints') addConstraint(new SpatialCompartmentMappingUnitSizesCheck(1221351, *this)); addConstraint(new SpatialSpatialSymbolReferenceUniqueRefCheck(SpatialSpatialSymbolReferenceUniqueRef, *this)); addConstraint(new SpatialUniqueDiffusionCoefficientsCheck(SpatialNoDiffusionCoefficientOverlap, *this)); +addConstraint(new SpatialUniqueAdvectionCoefficientsCheck(SpatialAdvectionCoefficientsMustBeUnique, *this)); /** @endcond */ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-02.xml 2019-11-18 19:19:51 UTC (rev 26149) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-02.xml 2019-11-18 23:16:18 UTC (rev 26150) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-05.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-05.xml 2019-11-18 19:19:51 UTC (rev 26149) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-05.xml 2019-11-18 23:16:18 UTC (rev 26150) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml 2019-11-18 19:19:51 UTC (rev 26149) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-08.xml 2019-11-18 23:16:18 UTC (rev 26150) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-09.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-09.xml 2019-11-18 19:19:51 UTC (rev 26149) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-fail-01-09.xml 2019-11-18 23:16:18 UTC (rev 26150) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-02.xml 2019-11-18 19:19:51 UTC (rev 26149) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1220501-pass-00-02.xml 2019-11-18 23:16:18 UTC (rev 26150) @@ -64,7 +64,7 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="id_2" spatial:isSpatial="false"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> </listOfSpecies> <listOfParameters> <parameter constant="false" id="id_3"> Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223504-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223504-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223504-fail-01-01.xml 2019-11-18 23:16:18 UTC (rev 26150) @@ -0,0 +1,76 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:advectionCoefficient spatial:coordinate="cartesianX" spatial:variable="species_2"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223504-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223504-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223504-pass-00-01.xml 2019-11-18 23:16:18 UTC (rev 26150) @@ -0,0 +1,79 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:advectionCoefficient spatial:coordinate="cartesianX" spatial:variable="species_1"/> + </parameter> + <parameter constant="false" id="id_4"> + <spatial:advectionCoefficient spatial:coordinate="cartesianY" spatial:variable="species_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-fail-01-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-fail-01-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-fail-01-01.xml 2019-11-18 23:16:18 UTC (rev 26150) @@ -0,0 +1,79 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:advectionCoefficient spatial:coordinate="cartesianX" spatial:variable="species_1"/> + </parameter> + <parameter constant="false" id="id_4"> + <spatial:advectionCoefficient spatial:coordinate="cartesianX" spatial:variable="species_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-01.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-01.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-01.xml 2019-11-18 23:16:18 UTC (rev 26150) @@ -0,0 +1,79 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="false"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:advectionCoefficient spatial:coordinate="cartesianX" spatial:variable="species_1"/> + </parameter> + <parameter constant="false" id="id_4"> + <spatial:advectionCoefficient spatial:coordinate="cartesianY" spatial:variable="species_1"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-02.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-02.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-02.xml 2019-11-18 23:16:18 UTC (rev 26150) @@ -0,0 +1,80 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="true"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_2" spatial:isSpatial="true"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:advectionCoefficient spatial:coordinate="cartesianX" spatial:variable="species_1"/> + </parameter> + <parameter constant="false" id="id_4"> + <spatial:advectionCoefficient spatial:coordinate="cartesianX" spatial:variable="species_2"/> + </parameter> + </listOfParameters> + </model> +</sbml> + Added: branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-03.xml =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-03.xml (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/test/test-data/general-constraints/1223551-pass-00-03.xml 2019-11-18 23:16:18 UTC (rev 26150) @@ -0,0 +1,80 @@ +<?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:listOfAdjacentDomains> + <spatial:adjacentDomains spatial:domain1="domain_1" spatial:domain2="domain_1" spatial:id="adjacentDomains_1"/> + </spatial:listOfAdjacentDomains> + <spatial:listOfGeometryDefinitions> + <spatial:analyticGeometry spatial:id="geometryDefinition_1" spatial:isActive="false"> + <spatial:listOfAnalyticVolumes> + <spatial:analyticVolume spatial:domainType="domainType_1" spatial:functionType="layered" spatial:id="analyticVolume_1" spatial:ordinal="0"> + <math xmlns="http://www.w3.org/1998/Math/MathML"/> + </spatial:analyticVolume> + </spatial:listOfAnalyticVolumes> + </spatial:analyticGeometry> + <spatial:sampledFieldGeometry spatial:id="geometryDefinition_2" spatial:isActive="false" spatial:sampledField="sampledField_1"> + <spatial:listOfSampledVolumes> + <spatial:sampledVolume spatial:domainType="domainType_1" spatial:id="sampledVolume_1" spatial:maxValue="0" spatial:minValue="0"/> + </spatial:listOfSampledVolumes> + </spatial:sampledFieldGeometry> + <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:mixedGeometry spatial:id="geometryDefinition_4" spatial:isActive="false"> + <spatial:listOfOrdinalMappings> + <spatial:ordinalMapping spatial:geometryDefinition="geometryDefinition_4" spatial:ordinal="0"/> + </spatial:listOfOrdinalMappings> + </spatial:mixedGeometry> + </spatial:listOfGeometryDefinitions> + <spatial:listOfSampledFields> + <spatial:sampledField spatial:compression="uncompressed" spatial:dataType="double" spatial:id="sampledField_1" spatial:interpolationType="nearestNeighbor" spatial:numSamples1="0" spatial:numSamples2="0" spatial:numSamples3="0" spatial:samplesLength="3"/> + </spatial:listOfSampledFields> + </spatial:geometry> + <listOfCompartments> + <compartment constant="false" id="compartment"> + <spatial:compartmentMapping spatial:domainType="domainType_1" spatial:id="compartmentMapping_1" spatial:unitSize="1"/> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_1" spatial:isSpatial="true"/> + <species boundaryCondition="false" compartment="compartment" constant="false" hasOnlySubstanceUnits="false" id="species_2" spatial:isSpatial="true"/> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="id_3"> + <spatial:advectionCoefficient spatial:coordinate="cartesianX" spatial:variable="species_1"/> + </parameter> + <parameter constant="false" id="id_4"> + <spatial:advectionCoefficient spatial:coordinate="cartesianY" spatial:variable="species_2"/> + </parameter> + </listOfParameters> + </model> +</sbml> + |
From: <luc...@us...> - 2019-11-18 19:19:57
|
Revision: 26149 http://sourceforge.net/p/sbml/code/26149 Author: luciansmith Date: 2019-11-18 19:19:51 +0000 (Mon, 18 Nov 2019) Log Message: ----------- Add an 'extended math' package that allows any and all MathML, without understanding any of it. ASTNodeType changed to list all of the options. List obtained from https://www.w3.org/TR/MathML2/appendixc.html Modified Paths: -------------- branches/libsbml-experimental-extendedmath/src/sbml/math/ASTNodeType.h branches/libsbml-experimental-extendedmath/src/sbml/math/L3ParserSettings.cpp Added Paths: ----------- branches/libsbml-experimental-extendedmath/extendedmath-package.cmake branches/libsbml-experimental-extendedmath/src/extendedmath-package.cmake branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/.svnignore branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/Makefile.in branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/Makefile.in branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/extendedmathExtensionTypes.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/extendedmathfwd.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/.svnignore branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/Makefile.in branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/extendedmathASTPlugin.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/extendedmathASTPlugin.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/extendedmathExtension.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/extendedmathExtension.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/extendedmathSBMLDocumentPlugin.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/extendedmathSBMLDocumentPlugin.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/.svnignore branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/CMakeLists.txt branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/Makefile.in branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/TestEMExtension.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/TestReadEMExtension.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/TestReadWriteInfix.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/TestRunner.c branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/TestWriteEMExtension.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/test-data/ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/test-data/em-example1.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/test/test-data/remainingMathML-invalid.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/.svnignore branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/Makefile.in branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/constraints/ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/constraints/.svnignore branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/constraints/EMArgumentsUnitsCheck.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/constraints/EMArgumentsUnitsCheck.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/constraints/EMNumberArgsMathCheck.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/constraints/EMNumberArgsMathCheck.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/constraints/Makefile.in branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/constraints/extendedmathMathMLConsistencyConstraints.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/constraints/extendedmathMathMLConsistencyConstraintsDeclared.cxx branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/constraints/extendedmathUnitConsistencyConstraints.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/constraints/extendedmathUnitConsistencyConstraintsDeclared.cxx branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/extendedmathMathMLConsistencyValidator.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/extendedmathMathMLConsistencyValidator.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/extendedmathSBMLError.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/extendedmathSBMLErrorTable.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/extendedmathUnitConsistencyValidator.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/extendedmathUnitConsistencyValidator.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/extendedmathValidator.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/extendedmathValidator.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/.svnignore branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/CMakeLists.txt branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/Makefile.in branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/TestFile.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/TestFile.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/TestMathConsistencyValidator.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/TestValidator.cpp branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/TestValidator.h branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/.svnignore branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/Makefile.in branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/mathml-constraints/ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/mathml-constraints/.svnignore branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/mathml-constraints/10218-fail-01-01.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/mathml-constraints/10218-fail-01-02.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/mathml-constraints/10218-fail-01-03.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/mathml-constraints/1410218-fail-01-01.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/unit-constraints/ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/unit-constraints/10501-fail-01-01.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/unit-constraints/10501-fail-01-02.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/unit-constraints/10501-fail-01-03.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/unit-constraints/10501-fail-01-04-99508.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/unit-constraints/1410501-fail-01-01.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/unit-constraints/1410501-fail-01-02.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/validator/test/test-data/unit-constraints/1410501-fail-01-03.xml branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath-register.cxx branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath-register.h branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-01.xml branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-02.xml branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-03.xml branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-04.xml branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-05.xml branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-06.xml Removed Paths: ------------- branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-01-10217.xml branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-02-10217.xml branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-03-10217.xml branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-04-10217.xml branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-05-10217.xml branches/libsbml-experimental-extendedmath/src/sbml/validator/test/test-data/sbml-mathml-constraints/10202-fail-01-06-10217.xml Added: branches/libsbml-experimental-extendedmath/extendedmath-package.cmake =================================================================== --- branches/libsbml-experimental-extendedmath/extendedmath-package.cmake (rev 0) +++ branches/libsbml-experimental-extendedmath/extendedmath-package.cmake 2019-11-18 19:19:51 UTC (rev 26149) @@ -0,0 +1,53 @@ +################################################# + # @file extendedmath-package.cmake + # @brief Top-level CMake file for extendedmath package + # @author SBMLTeam + # + # <!-------------------------------------------------------------------------- + # This file is part of libSBML. Please visit http://sbml.org for more + # information about SBML, and the latest version of libSBML. + # + # 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 + # ------------------------------------------------------------------------ --> + # + +option(ENABLE_EXTENDEDMATH "Enable libSBML support for the SBML Level 3 extendedmath ('extendedmath') package." OFF) + + # provide summary status +list(APPEND LIBSBML_PACKAGE_SUMMARY "SBML 'extendedmath' package = ${ENABLE_EXTENDEDMATH}") + +if (ENABLE_EXTENDEDMATH) + add_definitions(-DUSE_EXTENDEDMATH) + set(LIBSBML_PACKAGE_INCLUDES ${LIBSBML_PACKAGE_INCLUDES} "LIBSBML_HAS_PACKAGE_EXTENDEDMATH") + list(APPEND SWIG_EXTRA_ARGS -DUSE_EXTENDEDMATH) + list(APPEND SWIG_SWIGDOCDEFINES --define USE_EXTENDEDMATH) + +else () + + message(FATAL_ERROR + "\nThe extendedmath-package is necessary to use the math constructs " + "not yet in any other package.\n\n" + ) + +endif(ENABLE_EXTENDEDMATH) + Added: branches/libsbml-experimental-extendedmath/src/extendedmath-package.cmake =================================================================== --- branches/libsbml-experimental-extendedmath/src/extendedmath-package.cmake (rev 0) +++ branches/libsbml-experimental-extendedmath/src/extendedmath-package.cmake 2019-11-18 19:19:51 UTC (rev 26149) @@ -0,0 +1,80 @@ +################################################# + # @file extendedmath-package.cmake + # @brief Src CMake file for extendedmath package + # @author SBMLTeam + # + # <!-------------------------------------------------------------------------- + # This file is part of libSBML. Please visit http://sbml.org for more + # information about SBML, and the latest version of libSBML. + # + # 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 + # ------------------------------------------------------------------------ --> + # + +if (ENABLE_EXTENDEDMATH) + +include(${LIBSBML_ROOT_SOURCE_DIR}/extendedmath-package.cmake) + + # build up sources +set(EXTENDEDMATH_SOURCES) + + # go through all directories +foreach(dir common extension sbml validator validator/constraints) + + # add to include directory + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/sbml/packages/extendedmath/${dir}) + + # file sources + file(GLOB current ${CMAKE_CURRENT_SOURCE_DIR}/sbml/packages/extendedmath/${dir}/*.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/sbml/packages/extendedmath/${dir}/*.c + ${CMAKE_CURRENT_SOURCE_DIR}/sbml/packages/extendedmath/${dir}/*.h) + + # add sources + set(EXTENDEDMATH_SOURCES ${EXTENDEDMATH_SOURCES} ${current}) + + # mark headers for installation + file(GLOB extendedmath_headers ${CMAKE_CURRENT_SOURCE_DIR}/sbml/packages/extendedmath/${dir}/*.h) + + install(FILES ${extendedmath_headers} DESTINATION include/sbml/packages/extendedmath/${dir} ) + +endforeach() + + # create source group for IDEs +source_group(extendedmath_package FILES ${EXTENDEDMATH_SOURCES}) + + # add extendedmath sources to SBML sources +SET(LIBSBML_SOURCES ${LIBSBML_SOURCES} ${EXTENDEDMATH_SOURCES}) + +################################################# + # + # add test scripts + # +if (WITH_CHECK) + + add_subdirectory(sbml/packages/extendedmath/validator/test) + add_subdirectory(sbml/packages/extendedmath/extension/test) + +endif() + +endif() + Modified: branches/libsbml-experimental-extendedmath/src/sbml/math/ASTNodeType.h =================================================================== --- branches/libsbml-experimental-extendedmath/src/sbml/math/ASTNodeType.h 2019-11-18 18:01:08 UTC (rev 26148) +++ branches/libsbml-experimental-extendedmath/src/sbml/math/ASTNodeType.h 2019-11-18 19:19:51 UTC (rev 26149) @@ -47,9 +47,10 @@ typedef enum { - EM_L3V2 /*!< Extended math added in l3v2 */ - , EM_DISTRIB /*!< Extended math added by the 'distrib' package */ - , EM_ARRAYS /*!< Extended math added by the 'arrays' package */ + EM_L3V2 /*!< Extended math added in l3v2 */ + , EM_DISTRIB /*!< Extended math added by the 'distrib' package */ + , EM_ARRAYS /*!< Extended math added by the 'arrays' package */ + , EM_REMAINING /*!< Extended math not added by any other package */ , EM_UNKNOWN /*!< Unknown node: will not produce any MathML */ } ExtendedMathType_t; @@ -56,10 +57,10 @@ typedef enum { - ALLOWED_CHILDREN_ANY /*!< Extended math added in l3v2 */ - , ALLOWED_CHILDREN_ATLEAST /*!< Extended math added by the 'distrib' package */ + ALLOWED_CHILDREN_ANY /*!< Any number of children (0+) are allowed */ + , ALLOWED_CHILDREN_ATLEAST /*!< Any number of children above some minimum are allowed */ - , ALLOWED_CHILDREN_EXACTLY /*!< Unknown node: will not produce any MathML */ + , ALLOWED_CHILDREN_EXACTLY /*!< Only specific number(s) of children are allowed */ , ALLOWED_CHILDREN_UNKNOWN } AllowedChildrenType_t; @@ -173,10 +174,10 @@ , AST_DISTRIB_FUNCTION_RAYLEIGH /* Arrays */ - , AST_LINEAR_ALGEBRA_VECTOR + , AST_LINEAR_ALGEBRA_VECTOR = 600 , AST_LINEAR_ALGEBRA_SELECTOR - /* Other arrays-associated things that are not (yet?) in the 'arrays' package */ + /* Other linear algebra elements that are not (yet?) in the 'arrays' package */ , AST_LINEAR_ALGEBRA_MATRIX , AST_LINEAR_ALGEBRA_MATRIXROW , AST_LINEAR_ALGEBRA_DETERMINANT @@ -184,18 +185,89 @@ , AST_LINEAR_ALGEBRA_VECTOR_PRODUCT , AST_LINEAR_ALGEBRA_SCALAR_PRODUCT , AST_LINEAR_ALGEBRA_OUTER_PRODUCT - , AST_LOGICAL_EXISTS + + /* Arithmetic logic */ + , AST_LOGICAL_EXISTS = 700 , AST_LOGICAL_FORALL - , AST_STATISTICS_MEAN + + /* Statistics*/ + , AST_STATISTICS_MEAN = 800 , AST_STATISTICS_MEDIAN , AST_STATISTICS_MODE , AST_STATISTICS_MOMENT - , AST_SERIES_PRODUCT , AST_STATISTICS_SDEV - , AST_SERIES_SUM , AST_STATISTICS_VARIANCE + , AST_STATISTICS_MOMENTABOUT - , AST_UNKNOWN /*!< Unknown node: will not produce any MathML */ + /* Sequences and Series*/ + , AST_SERIES_PRODUCT = 900 + , AST_SERIES_SUM + , AST_SERIES_LIMIT + , AST_SERIES_TENDSTO + + /* Arithmetic algebra */ + , AST_ALGEBRA_GCD = 1000 + , AST_ALGEBRA_CONJUGATE + , AST_ALGEBRA_ARG + , AST_ALGEBRA_REAL + , AST_ALGEBRA_IMAGINARY + , AST_ALGEBRA_LCM + + /* Relations */ + , AST_RELATIONS_EQUIVALENT = 1100 + , AST_RELATIONS_APPROX + , AST_RELATIONS_FACTOROF + + /* Calculus and vector calculus*/ + , AST_CALCULUS_INT = 1200 + , AST_CALCULUS_DIFF + , AST_CALCULUS_PARTIALDIFF + , AST_CALCULUS_LOWLIMIT + , AST_CALCULUS_UPLIMIT + , AST_CALCULUS_DIVERGENCE + , AST_CALCULUS_GRAD + , AST_CALCULUS_CURL + , AST_CALCULUS_LAPLACIAN + + /* Set Theory */ + , AST_SET_THEORY_SET = 1300 + , AST_SET_THEORY_LIST + , AST_SET_THEORY_UNION + , AST_SET_THEORY_INTERSECT + , AST_SET_THEORY_IN + , AST_SET_THEORY_NOTIN + , AST_SET_THEORY_SUBSET + , AST_SET_THEORY_PRSUBSET + , AST_SET_THEORY_NOTSUBSET + , AST_SET_THEORY_NOTPRSUBSET + , AST_SET_THEORY_SETDIFF + , AST_SET_THEORY_CARD + , AST_SET_THEORY_CARTESIANPRODUCT + + /* Constants and symbol elements*/ + , AST_CONSTANT_IMAGINARYI = 1400 + , AST_CONSTANTS_INTEGERS + , AST_CONSTANTS_REALS + , AST_CONSTANTS_RATIONALS + , AST_CONSTANTS_NATURALNUMBERS + , AST_CONSTANTS_COMPLEXES + , AST_CONSTANTS_PRIMES + , AST_CONSTANTS_EMPTYSET + , AST_CONSTANTS_EULERGAMMA + + /* Basic MathML Content elements*/ + , AST_BASIC_CONTENT_INTERVAL = 1500 + , AST_BASIC_CONTENT_INVERSE + , AST_BASIC_CONTENT_CONDITION + , AST_BASIC_CONTENT_DECLARE + , AST_BASIC_CONTENT_COMPOSE + , AST_BASIC_CONTENT_IDENT + , AST_BASIC_CONTENT_DOMAIN + , AST_BASIC_CONTENT_CODOMAIN + , AST_BASIC_CONTENT_IMAGE + , AST_BASIC_CONTENT_DOMAINOFAPPLICATION + + , AST_UNKNOWN = 9999/*!< Unknown node: will not produce any MathML */ } ASTNodeType_t; END_C_DECLS Modified: branches/libsbml-experimental-extendedmath/src/sbml/math/L3ParserSettings.cpp =================================================================== --- branches/libsbml-experimental-extendedmath/src/sbml/math/L3ParserSettings.cpp 2019-11-18 18:01:08 UTC (rev 26148) +++ branches/libsbml-experimental-extendedmath/src/sbml/math/L3ParserSettings.cpp 2019-11-18 19:19:51 UTC (rev 26149) @@ -73,6 +73,7 @@ , mModuloL3v2(L3P_MODULO_IS_PIECEWISE) , 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) @@ -86,6 +87,7 @@ , mParsePackages() { setParsePackageMath(EM_L3V2, l3v2functions); + setParsePackageMath(EM_REMAINING, false); } L3ParserSettings::L3ParserSettings(const L3ParserSettings& source) Added: branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/.svnignore =================================================================== --- branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/.svnignore (rev 0) +++ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/.svnignore 2019-11-18 19:19:51 UTC (rev 26149) @@ -0,0 +1,17 @@ +# WARNING: This .svnignore file is not understood by SVN directly. +# WARNING: It is meant to be used in conjunction with our script in +# WARNING: sbml/trunk/project/scripts/svn-update-from-svnignore.sh +autom4te.cache +Makefile +config.log +config.status +.deps +include +TAGS +CTAGS +libsbml.pc +*.o +*.a +*.so +*.dylib +.libs Added: branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/Makefile.in =================================================================== --- branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/Makefile.in (rev 0) +++ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/Makefile.in 2019-11-18 19:19:51 UTC (rev 26149) @@ -0,0 +1,124 @@ +## @configure_input@ +## +## Filename : Makefile.in +## Description : Makefile template for libsbml extendedmath extension +## Author(s) : Sarah Keating +## Created : 2018-12-01 +## +## <!-------------------------------------------------------------------------- +## This file is part of libSBML. Please visit http://sbml.org for more +## information about SBML, and the latest version of libSBML. +## +## 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 +## +## 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 +## ---------------------------------------------------------------------- --> + +# ----------------------------------------------------------------------------- +# Configuration variables +# ----------------------------------------------------------------------------- +# Some of the following are substituted automatically by `configure'. If +# you are looking at "Makefile", do not edit these values; instead, run the +# configure script at the top level of the src tree. It will recreate +# "Makefile". + +include @top_srcdir@/config/makefile-common-vars.mk + +# `srcdir' points to the current directory, but should be set by configure. +# `subdir' must be set manually to the relative dir under `srcdir'. Don't +# set `subdir' to an absolute path, or some `make' actions will fail. + +srcdir = @srcdir@ +thisdir = src/sbml/packages/extendedmath + +# +# (Warning) +# +# The "sbml" subdir is special because it ends up linking all of +# libsbml-extendedmath. Anything that goes into libsbml-extendedmath needs to appear +# on the `subdirs' list before "sbml". +# +subdirs = common extension validator + +# Variables `headers', `sources', `libraries', `extra_CPPFLAGS', +# `extra_CXXFLAGS', `extra_LDFLAGS' and `distfiles' are used by the default +# rules in `makefile-common-actions.mk' included at the end. + +distfiles = $(sources) $(headers) Makefile.in + +# ----------------------------------------------------------------------------- +# Primary build actions +# ----------------------------------------------------------------------------- + +# The default action is to remake everything. Those rules which are not +# defined below are defined in makefile-common-actions.mk. Targets of the +# form 'foo-recursive' are interpreted by the common makefile rules as meaning +# "go into every subdir and do 'make foo' in each". + +all: Makefile all-recursive + +include: include-recursive + +docs: + +# ----------------------------------------------------------------------------- +# Checking. +# ----------------------------------------------------------------------------- + +check: all check-recursive + +# ----------------------------------------------------------------------------- +# Installation +# ----------------------------------------------------------------------------- + +# This library doesn't actually get installed. The main libsbml library +# (in ../src) slurps in the contents when it's built. + +install: all install-headers install-libraries + +uninstall: all uninstall-headers + +installcheck: all installcheck-headers + +# ----------------------------------------------------------------------------- +# Cleaning. +# ----------------------------------------------------------------------------- + +clean: clean-normal clean-recursive + +distclean: distclean-normal distclean-recursive + +mostlyclean: mostlyclean-normal mostlyclean-recursive + +maintainer-clean: maintainer-clean-normal maintainer-clean-recursive + + +# ----------------------------------------------------------------------------- +# Creating distribution (for libSBML maintainers only) +# ----------------------------------------------------------------------------- + +dist: dist-normal dist-recursive + +distcheck: distcheck-normal distcheck-recursive + + +# ----------------------------------------------------------------------------- +# Miscellaneous +# ----------------------------------------------------------------------------- + +include @top_srcdir@/config/makefile-common-actions.mk + +# ----------------------------------------------------------------------------- +# End. +# ----------------------------------------------------------------------------- Added: branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/Makefile.in =================================================================== --- branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/Makefile.in (rev 0) +++ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/Makefile.in 2019-11-18 19:19:51 UTC (rev 26149) @@ -0,0 +1,139 @@ +## @configure_input@ +## +## Filename : Makefile.in +## Description : Makefile template for libsbml l3v2extendedmath extension +## Author(s) : Sarah Keating +## Created : 2018-12-01 +## +## <!-------------------------------------------------------------------------- +## This file is part of libSBML. Please visit http://sbml.org for more +## information about SBML, and the latest version of libSBML. +## +## 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 +## +## 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 +## ---------------------------------------------------------------------- --> + +# ----------------------------------------------------------------------------- +# Configuration variables +# ----------------------------------------------------------------------------- +# Some of the following are substituted automatically by `configure'. If +# you are looking at "Makefile", do not edit these values; instead, run the +# configure script at the top level of the src tree. It will recreate +# "Makefile". + +include @top_srcdir@/config/makefile-common-vars.mk + +# `srcdir' points to the current directory, but should be set by configure. +# `subdir' must be set manually to the relative dir under `srcdir'. Don't +# set `subdir' to an absolute path, or some `make' actions will fail. + +srcdir = @srcdir@ +thisdir = src/sbml/packages/l3v2extendedmath/common + +subdirs = + +# Variables `headers', `sources', `libraries', `extra_CPPFLAGS', +# `extra_CXXFLAGS', `extra_LDFLAGS' and `distfiles' are used by the default +# rules in `makefile-common-actions.mk' included at the end. + +headers = \ + L3v2extendedmathExtensionTypes.h \ + l3v2extendedmathfwd.h + +header_inst_prefix = packages/l3v2extendedmath/common + +sources = + +extra_CPPFLAGS = -I../../.. + +ifdef USE_EXPAT + extra_CPPFLAGS += $(EXPAT_CPPFLAGS) + extra_LDFLAGS += $(EXPAT_LDFLAGS) + extra_LIBS += $(EXPAT_LIBS) +endif + +ifdef USE_XERCES + extra_CPPFLAGS += $(XERCES_CPPFLAGS) + extra_LDFLAGS += $(XERCES_LDFLAGS) + extra_LIBS += $(XERCES_LIBS) +endif + +ifdef USE_LIBXML + extra_CPPFLAGS += $(LIBXML_CPPFLAGS) + extra_LDFLAGS += $(LIBXML_LDFLAGS) + extra_LIBS += $(LIBXML_LIBS) +endif + + +distfiles = $(sources) $(headers) Makefile.in + +# ----------------------------------------------------------------------------- +# Primary build actions +# ----------------------------------------------------------------------------- + +# The default action is to remake everything. + +all: Makefile default + +# ----------------------------------------------------------------------------- +# Checking. +# ----------------------------------------------------------------------------- + +check: all check-recursive + +# ----------------------------------------------------------------------------- +# Installation +# ----------------------------------------------------------------------------- + +# This library doesn't actually get installed. The main libsbml library +# (in ../src) slurps in the contents when it's built. + +install: all install-headers + +uninstall: all uninstall-headers + +installcheck: all installcheck-headers + +# ----------------------------------------------------------------------------- +# Cleaning. +# ----------------------------------------------------------------------------- + +clean: clean-normal clean-recursive + +distclean: distclean-normal distclean-recursive + +mostlyclean: mostlyclean-normal mostlyclean-recursive + +maintainer-clean: maintainer-clean-normal maintainer-clean-recursive + + +# ----------------------------------------------------------------------------- +# Creating distribution (for libSBML maintainers only) +# ----------------------------------------------------------------------------- + +dist: dist-normal dist-recursive + +distcheck: distcheck-normal distcheck-recursive + + +# ----------------------------------------------------------------------------- +# Miscellaneous +# ----------------------------------------------------------------------------- + +include @top_srcdir@/config/makefile-common-actions.mk + +# ----------------------------------------------------------------------------- +# End. +# ----------------------------------------------------------------------------- Added: branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/extendedmathExtensionTypes.h =================================================================== --- branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/extendedmathExtensionTypes.h (rev 0) +++ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/extendedmathExtensionTypes.h 2019-11-18 19:19:51 UTC (rev 26149) @@ -0,0 +1,53 @@ +/** + * @file extendedmathExtensionTypes.h + * @brief Definition of extendedmathExtensionTypes. + * @author SBMLTeam + * + * <!-------------------------------------------------------------------------- + * 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 + * ------------------------------------------------------------------------ --> + */ + + +#ifndef extendedmathExtensionTypes_H__ +#define extendedmathExtensionTypes_H__ + + +#include <sbml/packages/extendedmath/common/extendedmathfwd.h> + +#include <sbml/packages/extendedmath/extension/extendedmathExtension.h> +#include <sbml/packages/extendedmath/extension/extendedmathSBMLDocumentPlugin.h> +#include <sbml/packages/extendedmath/extension/extendedmathASTPlugin.h> + + + +#endif /* !extendedmathExtensionTypes_H__ */ + + Added: branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/extendedmathfwd.h =================================================================== --- branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/extendedmathfwd.h (rev 0) +++ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/common/extendedmathfwd.h 2019-11-18 19:19:51 UTC (rev 26149) @@ -0,0 +1,73 @@ +/** + * @file extendedmathfwd.h + * @brief Definition of extendedmathfwd. + * @author SBMLTeam + * + * <!-------------------------------------------------------------------------- + * 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 + * ------------------------------------------------------------------------ --> + */ + + +#ifndef extendedmathfwd_H__ +#define extendedmathfwd_H__ + + +/** + * Forward declaration of all opaque C types. + * + * Declaring all types up-front avoids "redefinition of type Foo" compile + * errors and allows our combined C/C++ headers to depend minimally upon each + * other. Put another way, the type definitions below serve the same purpose as + * "class Foo;" forward declarations in C++ code. + */ + +#ifdef __cplusplus +# define CLASS_OR_STRUCT class +#else +# define CLASS_OR_STRUCT struct +#endif /* __cplusplus */ + + +LIBSBML_CPP_NAMESPACE_BEGIN + + +typedef CLASS_OR_STRUCT extendedmathASTPlugin extendedmathASTPlugin_t; + + +LIBSBML_CPP_NAMESPACE_END + + +#undef CLASS_OR_STRUCT + + +#endif /* !extendedmathfwd_H__ */ + + Added: branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/.svnignore =================================================================== --- branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/.svnignore (rev 0) +++ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/.svnignore 2019-11-18 19:19:51 UTC (rev 26149) @@ -0,0 +1,17 @@ +# WARNING: This .svnignore file is not understood by SVN directly. +# WARNING: It is meant to be used in conjunction with our script in +# WARNING: sbml/trunk/project/scripts/svn-update-from-svnignore.sh +autom4te.cache +Makefile +config.log +config.status +.deps +include +TAGS +CTAGS +libsbml.pc +*.o +*.a +*.so +*.dylib +.libs Added: branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/Makefile.in =================================================================== --- branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/Makefile.in (rev 0) +++ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/Makefile.in 2019-11-18 19:19:51 UTC (rev 26149) @@ -0,0 +1,144 @@ +## @configure_input@ +## +## Filename : Makefile.in +## Description : Makefile template for libsbml l3v2extendedmath extension +## Author(s) : Sarah Keating +## Created : 2018-12-01 +## +## <!-------------------------------------------------------------------------- +## This file is part of libSBML. Please visit http://sbml.org for more +## information about SBML, and the latest version of libSBML. +## +## 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 +## +## 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 +## ---------------------------------------------------------------------- --> + +# ----------------------------------------------------------------------------- +# Configuration variables +# ----------------------------------------------------------------------------- +# Some of the following are substituted automatically by `configure'. If +# you are looking at "Makefile", do not edit these values; instead, run the +# configure script at the top level of the src tree. It will recreate +# "Makefile". + +include @top_srcdir@/config/makefile-common-vars.mk + +# `srcdir' points to the current directory, but should be set by configure. +# `subdir' must be set manually to the relative dir under `srcdir'. Don't +# set `subdir' to an absolute path, or some `make' actions will fail. + +srcdir = @srcdir@ +thisdir = src/sbml/packages/l3v2extendedmath/extension + +subdirs = test + +# Variables `headers', `sources', `libraries', `extra_CPPFLAGS', +# `extra_CXXFLAGS', `extra_LDFLAGS' and `distfiles' are used by the default +# rules in `makefile-common-actions.mk' included at the end. + +headers = \ +L3v2extendedmathExtension.h \ +L3v2extendedmathASTPlugin.h \ +L3v2extendedmathSBMLDocumentPlugin.h + +header_inst_prefix = packages/l3v2extendedmath/extension + +sources = \ +L3v2extendedmathExtension.cpp \ +L3v2extendedmathASTPlugin.cpp \ +L3v2extendedmathSBMLDocumentPlugin.cpp + +extra_CPPFLAGS = -I../../.. + +ifdef USE_EXPAT + extra_CPPFLAGS += $(EXPAT_CPPFLAGS) + extra_LDFLAGS += $(EXPAT_LDFLAGS) + extra_LIBS += $(EXPAT_LIBS) +endif + +ifdef USE_XERCES + extra_CPPFLAGS += $(XERCES_CPPFLAGS) + extra_LDFLAGS += $(XERCES_LDFLAGS) + extra_LIBS += $(XERCES_LIBS) +endif + +ifdef USE_LIBXML + extra_CPPFLAGS += $(LIBXML_CPPFLAGS) + extra_LDFLAGS += $(LIBXML_LDFLAGS) + extra_LIBS += $(LIBXML_LIBS) +endif + + +distfiles = $(sources) $(headers) Makefile.in + +# ----------------------------------------------------------------------------- +# Primary build actions +# ----------------------------------------------------------------------------- + +# The default action is to remake everything. + +all: Makefile default + +# ----------------------------------------------------------------------------- +# Checking. +# ----------------------------------------------------------------------------- + +check: all check-recursive + +# ----------------------------------------------------------------------------- +# Installation +# ----------------------------------------------------------------------------- + +# This library doesn't actually get installed. The main libsbml library +# (in ../src) slurps in the contents when it's built. + +install: all install-headers + +uninstall: all uninstall-headers + +installcheck: all installcheck-headers + +# ----------------------------------------------------------------------------- +# Cleaning. +# ----------------------------------------------------------------------------- + +clean: clean-normal clean-recursive + +distclean: distclean-normal distclean-recursive + +mostlyclean: mostlyclean-normal mostlyclean-recursive + +maintainer-clean: maintainer-clean-normal maintainer-clean-recursive + + +# ----------------------------------------------------------------------------- +# Creating distribution (for libSBML maintainers only) +# ----------------------------------------------------------------------------- + +dist: dist-normal dist-recursive + +distcheck: distcheck-normal distcheck-recursive + + +# ----------------------------------------------------------------------------- +# Miscellaneous +# ----------------------------------------------------------------------------- + +include @top_srcdir@/config/makefile-common-actions.mk + +# ----------------------------------------------------------------------------- +# End. +# ----------------------------------------------------------------------------- + Added: branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/extendedmathASTPlugin.cpp =================================================================== --- branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/extendedmathASTPlugin.cpp (rev 0) +++ branches/libsbml-experimental-extendedmath/src/sbml/packages/extendedmath/extension/extendedmathASTPlugin.cpp 2019-11-18 19:19:51 UTC (rev 26149) @@ -0,0 +1,824 @@ +/** + * @file extendedmathASTPlugin.cpp + * @brief Implementation of the extendedmathASTPlugin class. + * @author SBMLTeam + * + * <!-------------------------------------------------------------------------- + * 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/packages/extendedmath/extension/extendedmathASTPlugin.h> +#include <sbml/math/ASTNode.h> +#include <sbml/SBMLNamespaces.h> +#include <sbml/units/UnitFormulaFormatter.h> +#include <sbml/Unit.h> +#include <sbml/validator/constraints/ArgumentsUnitsCheck.h> +#include <sbml/packages/extendedmath/extension/extendedmathExtension.h> + +/** @cond doxygenIgnored */ + +using namespace std; + +/** @endcond */ +LIBSBML_CPP_NAMESPACE_BEGIN + +#ifdef __cplusplus + + +void +extendedmathASTPlugin::populateNodeTypes() +{ + vector<unsigned int> zero, one, two, three, twoorthree; + zero.push_back(0); + one.push_back(1); + two.push_back(2); + three.push_back(3); + twoorthree.push_back(2); + twoorthree.push_back(3); + + ASTNodeValues_t node; + + node.type = AST_LINEAR_ALGEBRA_VECTOR; + node.name = "vector"; + node.csymbolURL = ""; + node.isFunction = false; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_LINEAR_ALGEBRA_SELECTOR; + node.name = "selector"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = two; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_LINEAR_ALGEBRA_MATRIX; + node.name = "matrix"; + node.csymbolURL = ""; + node.isFunction = false; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_LINEAR_ALGEBRA_MATRIXROW; + node.name = "matrixrow"; + node.csymbolURL = ""; + node.isFunction = false; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_LINEAR_ALGEBRA_DETERMINANT; + node.name = "determinant"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_LINEAR_ALGEBRA_TRANSPOSE; + node.name = "transpose"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_LINEAR_ALGEBRA_VECTOR_PRODUCT; + node.name = "vectorproduct"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = two; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_LINEAR_ALGEBRA_SCALAR_PRODUCT; + node.name = "scalarproduct"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = two; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_LINEAR_ALGEBRA_OUTER_PRODUCT; + node.name = "outerproduct"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = two; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_LOGICAL_EXISTS; + node.name = "exists"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = twoorthree; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_LOGICAL_FORALL; + node.name = "forall"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_STATISTICS_MEAN; + node.name = "mean"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_STATISTICS_MEDIAN; + node.name = "median"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_STATISTICS_MODE; + node.name = "mode"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_STATISTICS_MOMENT; + node.name = "moment"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = three; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_STATISTICS_SDEV; + node.name = "sdev"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_STATISTICS_VARIANCE; + node.name = "variance"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_STATISTICS_MOMENTABOUT; + node.name = "momentabout"; + node.csymbolURL = ""; + node.isFunction = false; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_SERIES_PRODUCT; + node.name = "product"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_SERIES_SUM; + node.name = "sum"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_SERIES_LIMIT; + node.name = "limit"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_SERIES_TENDSTO; + node.name = "tendsto"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_ALGEBRA_GCD; + node.name = "gcd"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_ALGEBRA_CONJUGATE; + node.name = "conjugate"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_ALGEBRA_ARG; + node.name = "arg"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_ALGEBRA_REAL; + node.name = "real"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_ALGEBRA_IMAGINARY; + node.name = "imaginary"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_ALGEBRA_LCM; + node.name = "lcm"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_RELATIONS_EQUIVALENT; + node.name = "equivalent"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_RELATIONS_APPROX; + node.name = "approx"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_RELATIONS_FACTOROF; + node.name = "factorof"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = two; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_CALCULUS_INT; + node.name = "int"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_CALCULUS_DIFF; + node.name = "diff"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_CALCULUS_PARTIALDIFF; + node.name = "partialdiff"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_CALCULUS_LOWLIMIT; + node.name = "lowlimit"; + node.csymbolURL = ""; + node.isFunction = false; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_CALCULUS_UPLIMIT; + node.name = "uplimit"; + node.csymbolURL = ""; + node.isFunction = false; + node.allowedChildrenType = ALLOWED_CHILDREN_EXACTLY; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_CALCULUS_DIVERGENCE; + node.name = "divergence"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_CALCULUS_GRAD; + node.name = "grad"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_CALCULUS_CURL; + node.name = "curl"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_CALCULUS_LAPLACIAN; + node.name = "laplacian"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ATLEAST; + node.numAllowedChildren = one; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_SET_THEORY_SET; + node.name = "set"; + node.csymbolURL = ""; + node.isFunction = false; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_SET_THEORY_LIST; + node.name = "list"; + node.csymbolURL = ""; + node.isFunction = false; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_SET_THEORY_UNION; + node.name = "union"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_SET_THEORY_INTERSECT; + node.name = "intersect"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_ANY; + node.numAllowedChildren = zero; + + mPkgASTNodeValues.push_back(node); + + node.type = AST_SET_THEORY_IN; + node.name = "in"; + node.csymbolURL = ""; + node.isFunction = true; + node.allowedChildrenType = ALLOWED_CHILDREN_EX... [truncated message content] |
From: <luc...@us...> - 2019-11-18 18:01:10
|
Revision: 26148 http://sourceforge.net/p/sbml/code/26148 Author: luciansmith Date: 2019-11-18 18:01:08 +0000 (Mon, 18 Nov 2019) Log Message: ----------- New branch for an 'extended math' package, plus changes to core that are necessary to accommodate that. Added Paths: ----------- branches/libsbml-experimental-extendedmath/ |
From: <fbe...@us...> - 2019-11-05 09:42:36
|
Revision: 26147 http://sourceforge.net/p/sbml/code/26147 Author: fbergmann Date: 2019-11-05 09:42:35 +0000 (Tue, 05 Nov 2019) Log Message: ----------- - allow compilation with namespaces Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueDiffusionCoefficientsCheck.h Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueDiffusionCoefficientsCheck.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueDiffusionCoefficientsCheck.h 2019-11-05 09:06:50 UTC (rev 26146) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialUniqueDiffusionCoefficientsCheck.h 2019-11-05 09:42:35 UTC (rev 26147) @@ -38,10 +38,10 @@ #include <sbml/validator/VConstraint.h> #include <sbml/packages/spatial/validator/SpatialValidator.h> +LIBSBML_CPP_NAMESPACE_BEGIN + class DiffusionCoefficient; -LIBSBML_CPP_NAMESPACE_BEGIN - class SpatialUniqueDiffusionCoefficientsCheck: public TConstraint<Model> { public: |
From: <fbe...@us...> - 2019-11-05 09:06:52
|
Revision: 26146 http://sourceforge.net/p/sbml/code/26146 Author: fbergmann Date: 2019-11-05 09:06:50 +0000 (Tue, 05 Nov 2019) Log Message: ----------- - fix include statements Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx Modified: branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-10-25 23:52:06 UTC (rev 26145) +++ branches/libsbml-experimental/src/sbml/packages/spatial/validator/constraints/SpatialConsistencyConstraintsDeclared.cxx 2019-11-05 09:06:50 UTC (rev 26146) @@ -38,9 +38,9 @@ * ------------------------------------------------------------------------ --> */ -#include "sbml\packages\spatial\validator\SpatialCompartmentMappingUnitSizesCheck.h" -#include "sbml\packages\spatial\validator\SpatialSpatialSymbolReferenceUniqueRefCheck.h" -#include "sbml\packages\spatial\validator\SpatialUniqueDiffusionCoefficientsCheck.h" +#include "sbml/packages/spatial/validator/SpatialCompartmentMappingUnitSizesCheck.h" +#include "sbml/packages/spatial/validator/SpatialSpatialSymbolReferenceUniqueRefCheck.h" +#include "sbml/packages/spatial/validator/SpatialUniqueDiffusionCoefficientsCheck.h" //Constraints declared in SpatialConsistencyConstraints.cpp addConstraint(new VConstraintDomainSpatialDomainDomainTypeMustBeDomainType(*this)); |