Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synthesis for channels, inputs/outputs, T-junctions #3

Merged
merged 21 commits into from
Jul 14, 2015

Conversation

mtrberzi
Copy link
Member

No description provided.

import org.manifold.compiler.back.microfluidics.strategies.multiphase.TJunctionDeviceStrategy;
import org.manifold.compiler.middle.Schematic;

public class MultiPhaseStrategySet extends TranslationStrategy {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the name MultiPhaseStrategySet too general for this code? It seems to be restricted to a combination of DropletConstraintStrategy and TJunctionDeviceStrategy. I see a few possibilities here:
0. Everything is just fine.

  1. Rename the class to something more specific.
  2. Generalize the code using type parameters (but still a pair of strategies).
  3. Generalize the code using a collection to hold the strategies.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea for this class is that as we create new strategies for different multi-phase devices, we add them here to isolate them from the single-phase devices.

@drayside
Copy link
Member

I have a perhaps odd habit of declaring everything final, including method parameters and local variables. I think it's a good discipline to help focus on where mutation is happening. Of course, I think it would be better if this were the default, and variables that could be re-assigned needed to be declared as such.

@drayside
Copy link
Member

I didn't fully grasp how Divij's question about the area of nodes and channels is handled in this code.

};

Schematic schematic = UtilSchematicConstruction
.instantiateSchematic("test");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should change the name to something more specific instead of "test". In this case it could be tjunction_test or something. In the singlephase-electrophoresis branch I had to make this change explicitly because once there are multiple tests, it helps for this to be specified.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is tjunction_test more informative or specific than testTJunctionSynthesis? I don't understand your comment about why it is necessary to specify this when there are multiple tests.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the function is fine, I am referring to the label used for instantiation in line 40. The label, which in this case is "test", used to instantiate the schematic also works as the prefix for the *.smt2 that is generated by the backend. When there are a number of tests being run, it creates multiple smt2 files, when it's useful to have labels that provide more information about the specific schematic the smt2 files describes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see the issue -- I'll fix this next commit.

@mtrberzi
Copy link
Member Author

Opened #5

@mtrberzi
Copy link
Member Author

mtrberzi commented Jul 7, 2015

Okay, now this is ready to review; I disabled the experimental stuff and kept the version of the code that has it all in another branch. (The stuff is disabled selectively, so we can boolean-flag it back on if we want to revisit.)

Closes #13.

@mtrberzi
Copy link
Member Author

mtrberzi commented Jul 7, 2015

Two more things I have to do, are not run the multi-phase stuff for non-multi-phase devices and constrain input and output pressures to be strictly positive.

@mtrberzi
Copy link
Member Author

mtrberzi commented Jul 7, 2015

Latest commit closes #14.

@mtrberzi
Copy link
Member Author

This was signed off, so merging.

mtrberzi added a commit that referenced this pull request Jul 14, 2015
Synthesis for channels, inputs/outputs, T-junctions
@mtrberzi mtrberzi merged commit bfe4def into master Jul 14, 2015
@mtrberzi mtrberzi deleted the tjunction-synthesis branch July 14, 2015 13:42
@mtrberzi mtrberzi restored the tjunction-synthesis branch October 21, 2015 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants