本文整理汇总了C#中ParseTreeNode.FindDictEntries方法的典型用法代码示例。如果您正苦于以下问题:C# ParseTreeNode.FindDictEntries方法的具体用法?C# ParseTreeNode.FindDictEntries怎么用?C# ParseTreeNode.FindDictEntries使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParseTreeNode
的用法示例。
在下文中一共展示了ParseTreeNode.FindDictEntries方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseOptions
private void ParseOptions(ParseTreeNode node, FvSolutionData rawData)
{
foreach (ParseTreeNode rootEntryNode in node.FindDictEntries(null))
{
var identifier = rootEntryNode.GetEntryIdentifier();
switch (identifier)
{
case "nCorrectors":
rawData.Options.nCorrectors = rootEntryNode.GetBasicValInt();
break;
case "nNonOrthogonalCorrectors":
rawData.Options.nNonOrthogonalCorrectors = rootEntryNode.GetBasicValInt();
break;
case "pdRefOn":
rawData.Options.pdRefOn = rootEntryNode.GetBasicValBool();
break;
case "pdRefCell":
rawData.Options.pdRefCell = rootEntryNode.GetBasicValInt();
break;
case "pdRefValue":
rawData.Options.pdRefValue = rootEntryNode.GetBasicValInt();
break;
case "tempEqnOn":
rawData.Options.tempEqnOn = rootEntryNode.GetBasicValBool();
break;
}
}
}
示例2: ParseSolvers
private void ParseSolvers(ParseTreeNode node, FvSolutionData rawData)
{
foreach (ParseTreeNode rootEntryNode in node.FindDictEntries(null))
{
var s = new MLinearSolver();
s.Name = rootEntryNode.GetEntryIdentifier();
rawData.Solvers.Add(s);
ParseSolver(rootEntryNode.ChildNodes[2], s);
}
}
示例3: ParsePatches
private void ParsePatches(ParseTreeNode node, FieldData rawData)
{
foreach (ParseTreeNode rootEntryNode in node.FindDictEntries(null))
{
var s = new BoundaryPatch();
s.Name = rootEntryNode.GetEntryIdentifier();
rawData.Patches.Add(s);
ParsePatch(rootEntryNode.ChildNodes[2], s);
}
}
示例4: ParseSolver
private void ParseSolver(ParseTreeNode node, MLinearSolver s)
{
foreach (ParseTreeNode rootEntryNode in node.FindDictEntries(null))
{
var identifier = rootEntryNode.GetEntryIdentifier();
switch (identifier)
{
case "solver":
s.solver = rootEntryNode.GetBasicValEnum<LinearSolver>();
break;
case "smoother":
s.smoother = rootEntryNode.GetBasicValEnum<Smoother>();
break;
case "agglomerator":
s.agglomerator = rootEntryNode.GetBasicValEnum<Agglomerator>();
break;
case "tolerance":
s.tolerance = rootEntryNode.GetBasicValDecimal();
break;
case "relTol":
s.relTol = rootEntryNode.GetBasicValDecimal();
break;
case "nPreSweeps":
s.nPreSweeps = rootEntryNode.GetBasicValInt();
break;
case "nPostSweeps":
s.nPostSweeps = rootEntryNode.GetBasicValInt();
break;
case "nFinestSweeps":
s.nFinestSweeps = rootEntryNode.GetBasicValInt();
break;
case "cacheAgglomeration":
s.cacheAgglomeration = rootEntryNode.GetBasicValBool();
break;
case "nCellsInCoarsestLevel":
s.nCellsInCoarsestLevel = rootEntryNode.GetBasicValInt();
break;
case "mergeLevels":
s.mergeLevels = rootEntryNode.GetBasicValInt();
break;
}
}
}
示例5: ParsePatch
private void ParsePatch(ParseTreeNode node, BoundaryPatch s)
{
foreach (ParseTreeNode rootEntryNode in node.FindDictEntries(null))
{
var identifier = rootEntryNode.GetEntryIdentifier();
switch (identifier)
{
case "type":
s.PatchType = rootEntryNode.GetBasicValEnum<PatchType>();
break;
case "rho":
s.Rho = rootEntryNode.GetBasicValString();
break;
case "gradient":
s.GradientFieldType = GetFieldType(rootEntryNode);
s.GradientValue = GetFieldValue(rootEntryNode.ChildNodes[2].ChildNodes[0]);
break;
case "value":
s.ValueFieldType = GetFieldType(rootEntryNode);
s.ValueValue = GetFieldValue(rootEntryNode.ChildNodes[2].ChildNodes[0]);
break;
}
}
}