当前位置: 首页>>代码示例>>C++>>正文


C++ Domain::getInteriorPoint方法代码示例

本文整理汇总了C++中Domain::getInteriorPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ Domain::getInteriorPoint方法的具体用法?C++ Domain::getInteriorPoint怎么用?C++ Domain::getInteriorPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Domain的用法示例。


在下文中一共展示了Domain::getInteriorPoint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: readSpatialSBML


//.........这里部分代码省略.........

	// get a Geometry object via SpatialModelPlugin object.
	Geometry* geometry2 = mplugin2->getGeometry();
	cout << "Geometry coordSystem: "      << geometry2->getCoordinateSystem()      << endl;
    
	// get a CoordComponent object via the Geometry object.	
	CoordinateComponent* coordComp = geometry2->getCoordinateComponent(0);
	std::cout << "CoordComponent Id: " << coordComp->getId() << std::endl;
  std::cout << "CoordComponent type: " << CoordinateKind_toString( coordComp->getType()) << std::endl;
	std::cout << "CoordComponent sbmlUnit: " << coordComp->getUnit() << std::endl;
  if (coordComp->isSetBoundaryMin())
  {
  Boundary* minX = coordComp->getBoundaryMin();
	std::cout << "minX name: " << minX->getId() << std::endl;
	std::cout << "minX value: " << minX->getValue() << std::endl;
  }
  if (coordComp->isSetBoundaryMax())
  {
	Boundary* maxX = coordComp->getBoundaryMax();
	std::cout << "maxX name: " << maxX->getId() << std::endl;
	std::cout << "maxX value: " << maxX->getValue() << std::endl;
  }

	// get a DomainType object via the Geometry object.	
	DomainType* domainType2 = geometry2->getDomainType(0);
	std::cout << "DomainType Id: " << domainType2->getId() << std::endl;
	std::cout << "DomainType spatialDim: " << domainType2->getSpatialDimension() << std::endl;

	// get a Domain object via the Geometry object.	
	Domain* domain = geometry2->getDomain(0);
	std::cout << "Domain1 Id: " << domain->getId() << std::endl;
	std::cout << "Domain1 domainType: " << domain->getDomainType() << std::endl;
	// get an internal point via the domain object
	InteriorPoint* internalPt = domain->getInteriorPoint(0);
	std::cout << "InternalPt_1 coord1: " << internalPt->getCoord1() << std::endl;

	// get a Domain object via the Geometry object.	
	domain = geometry2->getDomain(1);
	std::cout << "Domain2 Id: " << domain->getId() << std::endl;
	std::cout << "Domain2 domainType: " << domain->getDomainType() << std::endl;
	// get an internal point via the domain object
	internalPt = domain->getInteriorPoint(0);
	std::cout << "InternalPt_2 coord1: " << internalPt->getCoord1() << std::endl;

	// get an AdjacentDomains object via the Geometry object.	
	AdjacentDomains* adjDomain = geometry2->getAdjacentDomains(0);
	std::cout << "AdjDomain Id: " << adjDomain->getId() << std::endl;
	std::cout << "AdjDomain domain1: " << adjDomain->getDomain1() << std::endl;
	std::cout << "AdjDomain domain2: " << adjDomain->getDomain2() << std::endl;

	// get an AnalyticGeometry object via the Geometry object.
	GeometryDefinition* gd;
	for (unsigned int i = 0; i < geometry2->getNumGeometryDefinitions(); i++) {
		gd = geometry2->getGeometryDefinition(i);
		if (gd->isAnalyticGeometry()) {
			AnalyticGeometry* analyticalGeom = static_cast<AnalyticGeometry*>(gd);
			std::cout << "AnalGeom Id: " << analyticalGeom->getId() << std::endl;

			// analVol from analGeom.
			AnalyticVolume* av = analyticalGeom->getAnalyticVolume(0);
			std::cout << "AnalVol Id: " << av->getId() << std::endl;
			std::cout << "AnalVol domainType: " << av->getDomainType() << std::endl;
			std::cout << "AnalVol funcType: " << av->getFunctionType() << std::endl;
			std::cout << "AnalVol ordinal: " << av->getOrdinal() << std::endl;
			const ASTNode* mathNode = av->getMath();
			char* mathStr = writeMathMLToString(mathNode);
开发者ID:kirichoi,项目名称:roadrunner,代码行数:67,代码来源:example1.cpp

示例2: readSpatialSBML


//.........这里部分代码省略.........
	mplugin2 = static_cast<SpatialModelPlugin*>(model2->getPlugin("spatial"));
	cout << "URI: "      << mplugin2->getURI()      << endl;
	cout << "prefix: "      << mplugin2->getPrefix()      << endl;

	// get a Geometry object via SpatialModelPlugin object.
	Geometry* geometry2 = mplugin2->getGeometry();
	cout << "Geometry coordSystem: "      << geometry2->getCoordinateSystem()      << endl;
    
	// get a CoordComponent object via the Geometry object.	
	CoordinateComponent* coordComp = geometry2->getCoordinateComponent(0);
	std::cout << "CoordComponent spatialId: " << coordComp->getSpatialId() << std::endl;
	std::cout << "CoordComponent compType: " << coordComp->getComponentType() << std::endl;
	std::cout << "CoordComponent sbmlUnit: " << coordComp->getSbmlUnit() << std::endl;
	std::cout << "CoordComponent index: " << coordComp->getIndex() << std::endl;
	BoundaryMin* minX = coordComp->getBoundaryMin();
	std::cout << "minX name: " << minX->getSpatialId() << std::endl;
	std::cout << "minX value: " << minX->getValue() << std::endl;
	BoundaryMax* maxX = coordComp->getBoundaryMax();
	std::cout << "maxX name: " << maxX->getSpatialId() << std::endl;
	std::cout << "maxX value: " << maxX->getValue() << std::endl;

	// get a DomainType object via the Geometry object.	
	DomainType* domainType2 = geometry2->getDomainType(0);
	std::cout << "DomainType spatialId: " << domainType2->getSpatialId() << std::endl;
	std::cout << "DomainType spatialDim: " << domainType2->getSpatialDimensions() << std::endl;

	// get a Domain object via the Geometry object.	
	Domain* domain = geometry2->getDomain(0);
	std::cout << "Domain1 spatialId: " << domain->getSpatialId() << std::endl;
	std::cout << "Domain1 implicit: " << domain->getImplicit() << std::endl;
	std::cout << "Domain1 domainType: " << domain->getDomainType() << std::endl;
	std::cout << "Domain1 Shape: " << domain->getShapeId() << std::endl;
	// get an internal point via the domain object
	InteriorPoint* internalPt = domain->getInteriorPoint(0);
	std::cout << "InternalPt_1 coord1: " << internalPt->getCoord1() << std::endl;

	// get a Domain object via the Geometry object.	
	domain = geometry2->getDomain(1);
	std::cout << "Domain2 spatialId: " << domain->getSpatialId() << std::endl;
	std::cout << "Domain2 implicit: " << domain->getImplicit() << std::endl;
	std::cout << "Domain2 domainType: " << domain->getDomainType() << std::endl;
	std::cout << "Domain2 Shape: " << domain->getShapeId() << std::endl;
	// get an internal point via the domain object
	internalPt = domain->getInteriorPoint(0);
	std::cout << "InternalPt_2 coord1: " << internalPt->getCoord1() << std::endl;

	// get an AdjacentDomains object via the Geometry object.	
	AdjacentDomains* adjDomain = geometry2->getAdjacentDomains(0);
	std::cout << "AdjDomain spatialId: " << adjDomain->getSpatialId() << std::endl;
	std::cout << "AdjDomain domain1: " << adjDomain->getDomain1() << std::endl;
	std::cout << "AdjDomain domain2: " << adjDomain->getDomain2() << std::endl;

	// get the different GeometryDefinition objects via the Geometry object.
	GeometryDefinition* gd;
	for (unsigned int i = 0; i < geometry2->getNumGeometryDefinitions(); i++) {
		gd = geometry2->getGeometryDefinition(i);
		if (gd->isAnalyticGeometry()) {
			AnalyticGeometry* analyticalGeom = static_cast<AnalyticGeometry*>(gd);
			std::cout << "AnalGeom spatialId: " << analyticalGeom->getSpatialId() << std::endl;

			// analVol from analGeom.
			AnalyticVolume* av = analyticalGeom->getAnalyticVolume(0);
			std::cout << "AnalVol spatialId: " << av->getSpatialId() << std::endl;
			std::cout << "AnalVol domainType: " << av->getDomainType() << std::endl;
			std::cout << "AnalVol funcType: " << av->getFunctionType() << std::endl;
			std::cout << "AnalVol ordinal: " << av->getOrdinal() << std::endl;
开发者ID:kirichoi,项目名称:roadrunner,代码行数:67,代码来源:spatialExtTest.cpp

示例3: readSBMLFromFile


//.........这里部分代码省略.........
    fail_unless(minX->getId()	  == "Xmin");
    fail_unless(minX->getValue()		  == 0);
    fail_unless(minX->getPackageName() == "spatial");

    Boundary *maxX = coordComp->getBoundaryMax();
    fail_unless(maxX->getId()   == "Xmax");
    fail_unless(maxX->getValue()		  == 10);
    fail_unless(maxX->getPackageName() == "spatial");

    // geometry domainType
    fail_unless(geometry->getNumDomainTypes() == 1);
    fail_unless(geometry->getListOfDomainTypes()->getPackageName() == "spatial");

    DomainType *domainType = geometry->getDomainType(0);
    fail_unless(domainType->getId()         == "dtype1");
    fail_unless(domainType->getSpatialDimensions() == 3);
    fail_unless(domainType->getPackageName()		  == "spatial");

    // geometry domains
    fail_unless(geometry->getNumDomains() == 2);
    fail_unless(geometry->getListOfDomains()->getPackageName() == "spatial");

    Domain* domain = geometry->getDomain(0);
    fail_unless(domain->getId()   == "domain1");
    fail_unless(domain->getDomainType() == "dtype1");
    //fail_unless(domain->getImplicit()    == false);
    //fail_unless(domain->getShapeId()     == "circle");
    fail_unless(domain->getPackageName() == "spatial");

    // interiorPoints in Domain
    fail_unless(domain->getNumInteriorPoints() == 1);
    fail_unless(domain->getListOfInteriorPoints()->getPackageName() == "spatial");

    InteriorPoint* interiorPt = domain->getInteriorPoint(0);
    fail_unless(interiorPt->getCoord1()		== 1);
    fail_unless(interiorPt->getPackageName() == "spatial");

    // second domain in geometry
    domain = geometry->getDomain(1);
    fail_unless(domain->getId()   == "domain2");
    fail_unless(domain->getDomainType() == "dtype1");
    //fail_unless(domain->getImplicit()    == false);
    //fail_unless(domain->getShapeId()     == "square");
    fail_unless(domain->getPackageName() == "spatial");

    // Domain : interiorPoints
    fail_unless(domain->getNumInteriorPoints() == 1);
    fail_unless(domain->getListOfInteriorPoints()->getPackageName() == "spatial");

    interiorPt = domain->getInteriorPoint(0);
    fail_unless(interiorPt->getCoord1()		== 5);
    fail_unless(interiorPt->getPackageName() == "spatial");

    // geometry adjacentDomains
    fail_unless(geometry->getNumAdjacentDomains() == 1);
    fail_unless(geometry->getListOfAdjacentDomains()->getPackageName() == "spatial");

    AdjacentDomains* adjDomain = geometry->getAdjacentDomains(0);
    fail_unless(adjDomain->getId()   == "adjDomain1");
    fail_unless(adjDomain->getDomain1()     == "domain1");
    fail_unless(adjDomain->getDomain2()     == "domain2");
    fail_unless(adjDomain->getPackageName() == "spatial");

    // geometry : geometryDefinitions
    fail_unless(geometry->getNumGeometryDefinitions() == 2);
    fail_unless(geometry->getListOfGeometryDefinitions()->getPackageName() == "spatial");
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:67,代码来源:TestReadSpatialExtension.cpp


注:本文中的Domain::getInteriorPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。