Exemple #1
0
        private static CartesianModel GenerateModelWithoutAnomalyData(ModelSettings settings, Func <NonMeshedModel> genNonMeshed)
        {
            var nonMeshed = genNonMeshed();
            var converter = new NonMeshedToCartesianModelConverter(nonMeshed);
            var mesh      = settings.Mesh;

            converter.SetManualBoundaries(settings.ManualBoundaries);

            var cartesian = converter.ConvertWithoutAnomalyData(mesh);

            return(cartesian);
        }
Exemple #2
0
        private static CartesianModel GenerateModel(Mpi mpi, ModelSettings settings, Func <NonMeshedModel> genNonMeshed)
        {
            var nonMeshed = genNonMeshed();
            var converter = new NonMeshedToCartesianModelConverter(nonMeshed);
            var mesh      = settings.Mesh;

            converter.SetManualBoundaries(settings.ManualBoundaries);

            var nxStart  = 0;
            var nxLength = mesh.Nx;

            if (mpi != null && mpi.IsParallel)
            {
                nxStart  = mpi.CalcLocalHalfNxStart(mesh.Nx);
                nxLength = mpi.CalcLocalHalfNxLength(mesh.Nx);
            }

            var cartesian = converter.Convert(mesh, nxStart, nxLength);

            return(cartesian);
        }