Example #1
0
 public BoundaryConverter(VoronoiBoundary boundary, PeriodicMap periodicMap = null)
 {
     if (periodicMap != null)
     {
         this.periodicBoundaryConverter = new PeriodicBoundaryConverter(boundary, periodicMap);
     }
     this.boundary = boundary;
 }
 static byte[] ExtractEdgeTags(VoronoiBoundary boundary, PeriodicMap map)
 {
     byte[] voronoiEdgeTags        = boundary.EdgeTags;
     byte[] periodicCornerEdgeTags = GetPeriodicCornerEdgeTags(
         map.PeriodicCornerCorrelation,
         map.PeriodicBoundaryCorrelation);
     byte[] edgeTags = Concat(voronoiEdgeTags, periodicCornerEdgeTags);
     return(edgeTags);
 }
 public PeriodicBoundaryConverter(
     VoronoiBoundary boundary,
     PeriodicMap map)
 {
     edgePairer       = new EdgePairer();
     edgeTags         = ExtractEdgeTags(boundary, map);
     this.boundaryMap =
         CreatePeriodicBoundaryMap <SortedList <byte, AffineTrafo>, LinkedListDictionary <int, bool> >(
             edgeTags,
             map);
 }
Example #4
0
 public PeriodicBoundaryHandler(
     PeriodicMap map = null)
 {
     if (map != null)
     {
         ContainsPeriodicBoundaries = true;
         periodicTrafoMap           = map.PeriodicBoundaryTransformations;
         nodeCloner = new BoundaryNodeMirrorer <T>(map);
         recomposer = new BoundaryRecomposer <T>(map);
     }
     else
     {
         ContainsPeriodicBoundaries = false;
     }
 }
        static PeriodicBoundaryConverterMap CreatePeriodicBoundaryMap <TtrafoDictionary, TinverseDictionary>(
            byte[] edgeTags,
            PeriodicMap map)
            where TtrafoDictionary : IDictionary <byte, AffineTrafo>, new()
            where TinverseDictionary : IDictionary <int, bool>, new()
        {
            var periodicInverseMap = ExtractPeriodicInverseMap <TinverseDictionary>(map.PeriodicBoundaryCorrelation);


            var periodicTrafos = ExtractPeriodicTrafos <TtrafoDictionary>(
                edgeTags,
                periodicInverseMap,
                map.PeriodicBoundaryTransformations);

            var boundaryMap = new PeriodicBoundaryConverterMap()
            {
                PeriodicInverseMap = periodicInverseMap,
                PeriodicTrafos     = periodicTrafos
            };

            return(boundaryMap);
        }
Example #6
0
 public CellPairCollecter(PeriodicMap map)
 {
     this.map = map;
 }
Example #7
0
 public BoundaryRecomposer(PeriodicMap map)
 {
     this.map = map;
 }
Example #8
0
 public GridConverter(VoronoiBoundary boundary, PeriodicMap periodicMap = null)
 {
     this.boundary     = boundary;
     boundaryConverter = new BoundaryConverter(boundary, periodicMap);
 }
Example #9
0
 public PeriodicCornerBoundaryIdentifier(PeriodicMap map)
 {
     CrossingFinder.map = map;
 }
 public PeriodicCornerBoundaryAssigner(PeriodicMap map)
 {
     this.map = map;
 }
Example #11
0
 public BoundaryNodeMirrorer(
     PeriodicMap map)
 {
     this.map = map;
 }