예제 #1
0
        public Feynman GetFirstFeynman(bool activeOnly = true, bool addIfNotPresent = false)
        {
            List <SpecificCountingAnalyzerParams> l = GetFeynmans(activeOnly);

            if (l != null && l.Count > 0)
            {
                return((Feynman)l[0]);
            }
            else
            {
                Feynman t = new Feynman();
                if (addIfNotPresent)
                {
                    Add(t);
                }
                return(t);
            }
        }
예제 #2
0
파일: Cycle.cs 프로젝트: radtek/INCC6
        public bool Transfer(Feynman ryp, FeynmanResult fr)
        {
            if (fr == null)
            {
                return(true);
            }
            bool res = true;

            try
            {
                FeynmanResultExt lfr = new FeynmanResultExt();
                countresults.Add(ryp, lfr);
                lfr.TransferRawResult(fr);
            }
            catch (OutOfMemoryException e)
            {
                ryp.reason = "Feynman transfer " + e.Message;
                res        = false;
                logger?.TraceEvent(LogLevels.Error, 87407, ryp.reason);
            }
            return(res);
        }