Esempio n. 1
0
        /// <summary>
        /// performs tecplot output of field <see cref="u"/>
        /// </summary>
        /// <param name="timestepNo"></param>
        /// <param name="phystime"></param>
        protected override void PlotCurrentState(double phystime, int timestepNo)
        {
            Tecplot plt2 = new Tecplot(base.GridDat, false, false, 3);

            switch (GridDat.SpatialDimension)
            {
            case 2:
                plt2.PlotFields("transport_Recon_" + timestepNo, "Scalar Transport", phystime, new Field[] { u, dx_u_byflux, dy_u_byflux, du_dx_Analytical, du_dy_Analytical });
                break;

            case 3:
                plt2.PlotFields("transport_Recon_" + timestepNo, "Scalar Transport", phystime, new Field[] { u, dx_u_byflux, dy_u_byflux, dz_u_byflux, du_dx_Analytical, du_dy_Analytical, du_dz_Analytical });
                break;
            }
        }
Esempio n. 2
0
        protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int superSampling = 0)
        {
            string filename = "MatrixTest." + timestepNo;

            //Tecplot.PlotFields(new DGField[] { u1, u2, Phi, Amarker, Bmarker, MPIrank }, filename, 0, superSampling);
            Tecplot.PlotFields(new DGField[] { u1, u2, Phi, Amarker, Bmarker, MPIrank }, filename, 0, superSampling);
        }
Esempio n. 3
0
        protected override void PlotCurrentState(double physTime, int timestepNo)
        {
            //var fields = new Field[] { f1, df1_dx_Analytical, df1_dx_Numerical, df1_dy_Analytical, df1_dy_Numerical };
            var fields = new Field[] { f1, df1_dx_Numerical, df1_dy_Numerical };

            Tecplot.PlotFields(fields, GridDat, "derivatives", "derivatives", 0.0, 4);
        }
Esempio n. 4
0
        private void PlotCurrentState(double physTime, TimestepNumber timestepNo, int superSampling, SubGrid subGrid)
        {
            Tecplot tecplot = new Tecplot(GridData, true, false, (uint)superSampling, subGrid.VolumeMask);
            //Tecplot tecplot = new Tecplot(m_Context, true, false, (uint)superSampling, null);
            string path = Path.Combine(Path.GetFullPath("."), "plot_" + testCase.GetType().Name);

            tecplot.PlotFields(path, physTime, m_IOFields);
        }
Esempio n. 5
0
 /// <summary>
 /// Usual plotting
 /// </summary>
 protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int superSampling = 0)
 {
     Tecplot.PlotFields(
         ArrayTools.Cat <DGField>(
             f1Gradient_Analytical, f1Gradient_Numerical, f1,
             GridData.BoundaryMark(), Laplace_f1_Numerical, Laplace_f2_Numerical, f2),
         "derivatives", 0.0, superSampling);
 }
Esempio n. 6
0
        protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int susamp)
        {
            var Fields = ArrayTools.Cat <DGField>(this.GradientU, this.Phi, this.u, this.rhs, this.residual, this.uEx, this.uErr);

            if (this.MGColoring != null && this.MGColoring.Length > 0)
            {
                Fields = ArrayTools.Cat <DGField>(Fields, this.MGColoring);
            }
            Tecplot.PlotFields(Fields, "XPoisson" + timestepNo.ToString(), physTime, susamp);
            Tecplot.PlotFields(Fields, "grid" + timestepNo.ToString(), physTime, 0);
        }
        protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int superSampling = 0)
        {
            string filename = "AdaptiveMeshRefinementTest." + timestepNo;

            Tecplot.PlotFields(base.m_RegisteredFields.ToArray(), filename, physTime, superSampling);


            //DGField[] RefinedFields = new[] { Refined_u, Refined_TestData, Refined_Grad_u[0], Refined_Grad_u[1], Refined_MagGrad_u };
            //string filename2 = "RefinedGrid." + timestepNo;
            //Tecplot.PlotFields(RefinedFields, filename2, physTime, superSampling);
        }
Esempio n. 8
0
        /// <summary>
        /// Operator stability analysis
        /// </summary>
        override public IDictionary <string, double> OperatorAnalysis()
        {
            var ana = new BoSSS.Solution.AdvancedSolvers.Testing.OpAnalysisBase(this.LsTrk,
                                                                                this.Op_Matrix, this.Op_Affine,
                                                                                this.u.Mapping, Op_Agglomeration,
                                                                                this.Op_mass.GetMassMatrix(this.u.Mapping, new double[] { 1.0 }, false, this.LsTrk.SpeciesIdS.ToArray()),
                                                                                this.OpConfig, this.Op);

            Tecplot.PlotFields(new DGField[] { ana.StencilCondNumbersV() }, "stencilCn", 0.0, 1);

            return(ana.GetNamedProperties());
        }
Esempio n. 9
0
        public static void Plot(IGrid grid)
        {
            EdgeMask boundaryEdges = EdgeMask.GetFullMask(grid.iGridData, MaskType.Logical);

            boundaryEdges.SaveToTextFile(
                "edges.txt",
                false,
                (double[] CoordGlobal, int LogicalItemIndex, int GeomItemIndex) => grid.iGridData.iGeomEdges.EdgeTags[GeomItemIndex]);
            Tecplot          plt1  = new Tecplot(grid.iGridData, true, false, 0);
            Basis            b     = new Basis(grid.iGridData, 0);
            SinglePhaseField field = new SinglePhaseField(b, "u");

            plt1.PlotFields("grid", 0, field);
        }
Esempio n. 10
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="physTime"></param>
 /// <param name="timestepNo"></param>
 protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int superSampling = 0)
 {
     Tecplot.PlotFields(m_IOFields, "SIMPLE-TimeStep" + timestepNo, physTime, superSampling);
 }
Esempio n. 11
0
        protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int susamp)
        {
            var Fields = new DGField[] { this.Phi, this.u, this.rhs, this.Residual, this.V[0], this.V[1], this.CutMarker, this.DOFMarker, this.NearMarker };

            Tecplot.PlotFields(Fields, "XdgTimesteppingTest" + timestepNo.ToString(), physTime, susamp);
        }
Esempio n. 12
0
        protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int superSampling = 0)
        {
            string filename = "ZwoLsTest." + timestepNo;

            Tecplot.PlotFields(new DGField[] { u, du_dx, Phi0, Phi1, Amarker, Bmarker, Xmarker, du_dx_Exact, ERR, XERR }, filename, 0, superSampling);
        }
Esempio n. 13
0
 protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int superSampling = 0)
 {
     Tecplot.PlotFields(new DGField[] { this.Pressure, this.LevSet }, "XNSE_prj" + timestepNo, physTime, superSampling);
 }
Esempio n. 14
0
        protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int superSampling = 0)
        {
            Tecplot plt1 = new Tecplot(GridData, true, false, (uint)superSampling);

            plt1.PlotFields("ALTSTests_" + timestepNo, physTime, m_IOFields);
        }
Esempio n. 15
0
        protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int superSampling = 0)
        {
            string filename = "LoadBalancingTest." + timestepNo;

            Tecplot.PlotFields(base.m_RegisteredFields.ToArray(), filename, physTime, superSampling);
        }
Esempio n. 16
0
        /// <summary>
        /// performs Tecplot output of field <see cref="u"/>
        /// </summary>
        protected override void PlotCurrentState(double phystime, TimestepNumber timestepNo, int superSampling)
        {
            Tecplot plt1 = new Tecplot(GridData, true, false, (uint)superSampling);

            plt1.PlotFields("transport." + timestepNo, phystime, u, mpi_rank);
        }
Esempio n. 17
0
        /// <summary>
        /// Starts the export.
        /// </summary>
        public override string YouMust()
        {
            Console.Write("Starting export process... ");
            //// BoSSS.PlotGenerator currently does not support plots without a
            //// session...
            //FieldStateConfiguration fsConfig = new FieldStateConfiguration();
            //fsConfig.BasePaths = new string[] { Grid.Database.Path };
            //fsConfig.SessionGuid = Guid.Empty;
            //fsConfig.FieldNames = new List<string>();
            //fsConfig.TimeSteps = new List<TimestepNumber>();
            //fsConfig.SuperSampling = SuperSampling;
            //fsConfig.ReconstructionType = FieldStateConfiguration.ReconstructionTypes.None;
            //fsConfig.GhostLevel = GhostLevels;
            //fsConfig.NumberOfProcesses = NumberOfProcesses;
            //fsConfig.ExportFormat = ExportFormat;

            //string sRootpath = Utils.GetExportOutputPath();
            //string plotDirPath = Path.Combine(
            //    sRootpath, "grids", Grid.ID.ToString());

            //Perform(fsConfig, plotDirPath);

            //
            // Temporary hack
            //

            string plotDirPath = AlternativeDirectoryName;

            if (AlternativeDirectoryName == null)
            {
                plotDirPath = Path.Combine(
                    Utils.GetExportOutputPath(),
                    "grids",
                    Grid.ID.ToString());
            }

            // create the subdirectory if necessary
            if (!Directory.Exists(plotDirPath))
            {
                Directory.CreateDirectory(plotDirPath);
            }


            // Calculate sum of edge tags for each cell (for bc debugging)
            int[] tagSum = new int[GridDat.Cells.NoOfLocalUpdatedCells];
            for (int e = 0; e < GridDat.Edges.Count; e++)
            {
                byte tag = GridDat.Edges.EdgeTags[e];
                if (tag != 0)
                {
                    Debug.Assert(GridDat.Edges.CellIndices[e, 1] < 0);

                    int cell = GridDat.Edges.CellIndices[e, 0];
                    if (cell < GridDat.Cells.NoOfLocalUpdatedCells)
                    {
                        tagSum[cell] += tag;
                    }
                }
            }

            DGField tagSumField = new SinglePhaseField(new Basis(GridDat, 0), "edgeTagSum");

            for (int i = 0; i < tagSum.Length; i++)
            {
                tagSumField.SetMeanValue(i, tagSum[i]);
            }

            DGField[] partitioningFields = new DGField[GridDat.Grid.PredefinedGridPartitioning.Count];
            int       fieldIndex         = 0;

            foreach (var namePartitioningPair in GridDat.Grid.PredefinedGridPartitioning)
            {
                Partitioning currentPartitioning = GridDat.Grid.CellPartitioning;
                var          cellToRankMap       = dbDriver.LoadVector <int>(namePartitioningPair.Value.Guid, ref currentPartitioning);

                DGField partitioningField = new SinglePhaseField(
                    new Basis(GridDat, 0),
                    "partitioning_" + namePartitioningPair.Key);

                for (int i = 0; i < cellToRankMap.Count(); i++)
                {
                    partitioningField.SetMeanValue(i, cellToRankMap[i]);
                }

                partitioningFields[fieldIndex] = partitioningField;
                fieldIndex++;
            }

            Tecplot.PlotFields(
                partitioningFields.Concat(tagSumField).ToArray(),
                Path.Combine(plotDirPath, "grid"),
                0.0,
                SuperSampling);

            Console.WriteLine(" Data will be written to the following directory:");
            return(plotDirPath);
        }
Esempio n. 18
0
 protected override void PlotCurrentState(double physTime, TimestepNumber timestepNo, int superSampling = 0)
 {
     Tecplot.PlotFields(new DGField[] { this.Result, this.origin }, "SpecFEM-" + timestepNo, physTime, superSampling);
 }
 protected override void PlotCurrentState(double phystime, TimestepNumber timestepNo, int superSampling = 0)
 {
     Tecplot.PlotFields(new DGField[] { this.Phi }, "NastyLevset", phystime, superSampling);
 }