test_class.file: singa-simulation/src/test/java/bio/singa/simulation/model/modules/concentration/imlementations/transport/PorousDiffusionTest.java
test_class.identifier: PorousDiffusionTest
test_case.body: @Test
      @Disabled("migration to two compartment model")
      void testPorousDiffusion() {
  
          Simulation simulation = new Simulation();
  
          GridImageReader imageReader = GridImageReader.readTemplate(Resources.getResourceAsFileLocation("grids/membrane_10x2.png"));
          int[][] sectionArray = imageReader.getGrid();
  
          Environment.setSimulationExtend(1000);
          ComparableQuantity<Length> systemExtend = Quantities.getQuantity(1000, NANO(METRE));
          Environment.setSystemExtend(systemExtend);
          Environment.setNodeSpacingToDiameter(systemExtend, 10);
  
          GridMembraneBuilder gmb = new GridMembraneBuilder(sectionArray);
          int red = Color.RED.getRGB();
          int blue = Color.BLUE.getRGB();
          Map<Integer, CellRegion> subsectionMap = new HashMap<>();
          subsectionMap.put(red, CYTOPLASM_REGION);
          subsectionMap.put(blue, CellRegions.EXTRACELLULAR_REGION);
  
          Map<Pair<Integer>, CellRegion> membraneMap = new HashMap<>();
          membraneMap.put(new Pair<>(blue, red), CELL_OUTER_MEMBRANE_REGION);
          membraneMap.put(new Pair<>(red, blue), CELL_INNER_MEMBRANE_REGION);
  
          gmb.setRegionMapping(subsectionMap);
          gmb.setMembraneMapping(membraneMap);
          gmb.createTopology();
  
          AutomatonGraph graph = gmb.getGraph();
          simulation.setGraph(graph);
          MembraneLayer membraneLayer = new MembraneLayer();
          Membrane membrane = gmb.getMembranes().get(CELL_OUTER_MEMBRANE_REGION);
          membraneLayer.addMembrane(membrane);
          simulation.setMembraneLayer(membraneLayer);
  
          simulation.setGraph(graph);
  
          ChemicalEntity camp = SimpleEntity.create("CAMP")
                  .assignFeature(ConcentrationDiffusivity.of(32.0, SQUARE_MICROMETRE_PER_SECOND).build())
                  .build();
  
          PorousDiffusion.inSimulation(simulation)
                  .cargo(new Cargo(camp))
                  .region(new AffectedRegion(CELL_OUTER_MEMBRANE_REGION))
                  .membraneThickness(new MembraneTickness(Quantities.getQuantity(100, NANO(METRE))))
                  .poreMembraneRatio(new Ratio(0.5))
                  .identifier("porous diffusion")
                  .build();
  
          ConcentrationBuilder.create(simulation)
                  .entity(camp)
                  .subsection(EXTRACELLULAR_REGION)
                  .concentrationValue(1.0)
                  .microMolar()
                  .build();
  
          AutomatonNode node = simulation.getGraph().getNode(0, 0);
          double previousOuterConcentration = UnitRegistry.convert(Quantities.getQuantity(1.0, MICRO_MOLE_PER_LITRE)).getValue().doubleValue();
          double previousInnerConcentration = 0.0;
          for (int i = 0; i < 10; i++) {
              simulation.nextEpoch();
              // outer assertions
              double currentOuterConcentration = node.getConcentrationContainer().get(CellTopology.OUTER, camp);
              assertTrue(currentOuterConcentration < previousOuterConcentration);
              previousOuterConcentration = currentOuterConcentration;
              // inner assertions
              double currentInnerConcentration = node.getConcentrationContainer().get(CellTopology.INNER, camp);
              assertTrue(currentInnerConcentration > previousInnerConcentration);
              previousInnerConcentration = currentInnerConcentration;
          }
  
      }
test_case.class_method_signature: PorousDiffusionTest.testPorousDiffusion()
test_case.full_signature: @Test @Disabled("migration to two compartment model") void testPorousDiffusion()
test_case.identifier: testPorousDiffusion
test_case.invocations: readTemplate getResourceAsFileLocation getGrid setSimulationExtend getQuantity NANO setSystemExtend setNodeSpacingToDiameter getRGB getRGB put put put put setRegionMapping setMembraneMapping createTopology getGraph setGraph get getMembranes addMembrane setMembraneLayer setGraph build assignFeature create build of build identifier poreMembraneRatio membraneThickness region cargo inSimulation getQuantity NANO build microMolar concentrationValue subsection entity create getNode getGraph doubleValue getValue convert getQuantity nextEpoch get getConcentrationContainer assertTrue get getConcentrationContainer assertTrue
test_case.modifiers: @Test @Disabled("migration to two compartment model")
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPorousDiffusion()
focal_class.declarator: region
focal_class.modifier: private
focal_class.original_string: private CellRegion region;
focal_class.type: CellRegion
focal_class.var_name: region
focal_class.declarator: cargo
focal_class.modifier: private
focal_class.original_string: private ChemicalEntity cargo;
focal_class.type: ChemicalEntity
focal_class.var_name: cargo
focal_class.declarator: poreMembraneRatio
focal_class.modifier: private
focal_class.original_string: private double poreMembraneRatio;
focal_class.type: double
focal_class.var_name: poreMembraneRatio
focal_class.declarator: membraneThickness
focal_class.modifier: private
focal_class.original_string: private double membraneThickness;
focal_class.type: double
focal_class.var_name: membraneThickness
focal_class.file: singa-simulation/src/main/java/bio/singa/simulation/model/modules/concentration/imlementations/transport/PorousDiffusion.java
focal_class.identifier: PorousDiffusion
focal_class.class_method_signature: PorousDiffusion.inSimulation(Simulation simulation)
focal_class.full_signature: public static FeatureStep inSimulation(Simulation simulation)
focal_class.identifier: inSimulation
focal_class.modifiers: public static
focal_class.parameters: (Simulation simulation)
focal_class.return: FeatureStep
focal_class.signature: FeatureStep inSimulation(Simulation simulation)
focal_class.class_method_signature: PorousDiffusion.PorousDiffusion()
focal_class.full_signature: public  PorousDiffusion()
focal_class.identifier: PorousDiffusion
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  PorousDiffusion()
focal_class.class_method_signature: PorousDiffusion.postConstruct()
focal_class.full_signature: private void postConstruct()
focal_class.identifier: postConstruct
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void postConstruct()
focal_class.class_method_signature: PorousDiffusion.getRegion()
focal_class.full_signature: private CellRegion getRegion()
focal_class.identifier: getRegion
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: CellRegion
focal_class.signature: CellRegion getRegion()
focal_class.class_method_signature: PorousDiffusion.getCargo()
focal_class.full_signature: private ChemicalEntity getCargo()
focal_class.identifier: getCargo
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: ChemicalEntity
focal_class.signature: ChemicalEntity getCargo()
focal_class.class_method_signature: PorousDiffusion.getPoreMembraneRatio()
focal_class.full_signature: private double getPoreMembraneRatio()
focal_class.identifier: getPoreMembraneRatio
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getPoreMembraneRatio()
focal_class.class_method_signature: PorousDiffusion.getMembraneThickness()
focal_class.full_signature: private double getMembraneThickness()
focal_class.identifier: getMembraneThickness
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getMembraneThickness()
focal_class.class_method_signature: PorousDiffusion.isCorrectRegion(Updatable updatable)
focal_class.full_signature: private boolean isCorrectRegion(Updatable updatable)
focal_class.identifier: isCorrectRegion
focal_class.modifiers: private
focal_class.parameters: (Updatable updatable)
focal_class.return: boolean
focal_class.signature: boolean isCorrectRegion(Updatable updatable)
focal_class.class_method_signature: PorousDiffusion.calculateDeltas(ConcentrationContainer container)
focal_class.full_signature: private Map<ConcentrationDeltaIdentifier, ConcentrationDelta> calculateDeltas(ConcentrationContainer container)
focal_class.identifier: calculateDeltas
focal_class.modifiers: private
focal_class.parameters: (ConcentrationContainer container)
focal_class.return: Map<ConcentrationDeltaIdentifier, ConcentrationDelta>
focal_class.signature: Map<ConcentrationDeltaIdentifier, ConcentrationDelta> calculateDeltas(ConcentrationContainer container)
focal_class.class_method_signature: PorousDiffusion.calculateVelocity(ConcentrationContainer container)
focal_class.full_signature: private double calculateVelocity(ConcentrationContainer container)
focal_class.identifier: calculateVelocity
focal_class.modifiers: private
focal_class.parameters: (ConcentrationContainer container)
focal_class.return: double
focal_class.signature: double calculateVelocity(ConcentrationContainer container)
focal_class.class_method_signature: PorousDiffusion.getCargoDifference(ConcentrationContainer container)
focal_class.full_signature: private double getCargoDifference(ConcentrationContainer container)
focal_class.identifier: getCargoDifference
focal_class.modifiers: private
focal_class.parameters: (ConcentrationContainer container)
focal_class.return: double
focal_class.signature: double getCargoDifference(ConcentrationContainer container)
focal_class.class_method_signature: PorousDiffusion.getBuilder(Simulation simulation)
focal_class.full_signature: public static ModuleBuilder getBuilder(Simulation simulation)
focal_class.identifier: getBuilder
focal_class.modifiers: public static
focal_class.parameters: (Simulation simulation)
focal_class.return: ModuleBuilder
focal_class.signature: ModuleBuilder getBuilder(Simulation simulation)
focal_class.superclass: extends ConcentrationBasedModule<UpdatableDeltaFunction>
focal_method.body: public PorousDiffusion() {
  
      }
focal_method.class_method_signature: PorousDiffusion.PorousDiffusion()
focal_method.full_signature: public  PorousDiffusion()
focal_method.identifier: PorousDiffusion
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.signature:  PorousDiffusion()