コード例 #1
0
ファイル: MeshGenerator.cs プロジェクト: rohitvuppala/BoSSS
 public MeshGenerator(MeshingAlgorithm.State settings)
 {
     cutter          = new Cutter <T>();
     boundingBox     = settings.BoundingBox;
     boundaryLines   = BoundaryLine.ToLines(settings.Boundary);
     boundaryHandler = new PeriodicBoundaryHandler <T>(settings.PeriodicMap);
 }
コード例 #2
0
ファイル: VoronoiMesher.cs プロジェクト: rohitvuppala/BoSSS
 void CreateSetupForMeshingAlgorithm()
 {
     mesherSettings = new MeshingAlgorithm.State
     {
         Boundary                = settings.Boundary.Polygon,
         BoundingBox             = settings.Boundary.BoundingBox,
         NumberOfLloydIterations = settings.NumberOfLloydIterations,
     };
     mesherSettings.PeriodicMap = PeriodicMapGenerator.GeneratePeriodicMap(
         mesherSettings,
         settings.Boundary);
 }
コード例 #3
0
        public static PeriodicMap GeneratePeriodicMap(MeshingAlgorithm.State settings, VoronoiBoundary boundary)
        {
            PeriodicMap map = null;

            IDictionary <int, int> periodicBoundaryMap = ExtractPeriodicBoundaryMap(boundary.EdgeTags);

            if (periodicBoundaryMap.Count > 0)
            {
                IDictionary <int, Transformation> periodicBoundaryTransformationMap = CreatePeriodicTransformationsFrom(
                    settings.Boundary,
                    periodicBoundaryMap);
                map = new PeriodicMap
                {
                    PeriodicBoundaryCorrelation     = periodicBoundaryMap,
                    PeriodicBoundaryTransformations = periodicBoundaryTransformationMap,
                };
                AddPeriodicCorners(map, boundary);
            }
            return(map);
        }