public static void GetDefaultSelection(this SubBlockSelector sbs, SelectionType SType, int iCell) { SpeciesId A = ((XdgAggregationBasis)sbs.GetMapping.AggBasis[0]).UsedSpecies[0]; SpeciesId B = ((XdgAggregationBasis)sbs.GetMapping.AggBasis[0]).UsedSpecies[1]; sbs.CellSelector(iCell, false); //do not change this, selection corresponds to hardcoded masking //see GetSubIndices switch (SType) { case SelectionType.degrees: sbs.ModeSelector(p => p == 1); break; case SelectionType.species: sbs.SpeciesSelector(A); break; case SelectionType.variables: sbs.VariableSelector(1); break; case SelectionType.all_combined: sbs.ModeSelector(p => p == 1); sbs.SpeciesSelector(A); sbs.VariableSelector(1); break; } }
private static void DefaultSpeciesSplit(this SubBlockSelector sbs, bool upper) { if (sbs.GetMapping.AggBasis[0] is XdgAggregationBasis) { SpeciesId[] SIdc = ((XdgAggregationBasis)sbs.GetMapping.AggBasis[0]).UsedSpecies; SpeciesId[] OtherSpec = (SIdc.Length - 1).ForLoop(i => SIdc[i + 1]); if (upper) { sbs.SpeciesSelector(SIdc[0]); } else { sbs.SpeciesSelector(OtherSpec); } } else { throw new NotSupportedException(); } }