98 lines
3.4 KiB
C#
98 lines
3.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.ComponentModel;
|
|
using CaeGlobals;
|
|
using DynamicTypeDescriptor;
|
|
|
|
namespace CPSO
|
|
{
|
|
[Serializable]
|
|
public class ViewFrequencyStep : ViewStep
|
|
{
|
|
// Variables
|
|
private CaeModel.FrequencyStep _frequencyStep;
|
|
|
|
|
|
// Properties
|
|
[Category("Data")]
|
|
[OrderedDisplayName(4, 10, "Perturbation")]
|
|
[Description("Perturbation parameter set to On applies preloads from the previous step if it exists.")]
|
|
[Id(5, 1)]
|
|
public bool Perturbation { get { return _frequencyStep.Perturbation; } set { _frequencyStep.Perturbation = value; } }
|
|
//
|
|
[Category("Data")]
|
|
[OrderedDisplayName(5, 10, "Storage")]
|
|
[Description("Store eigenvalues, eigenmodes, mass and stiffness matrix in a binary form in file jobname.eig " +
|
|
"for further use.")]
|
|
[Id(6, 1)]
|
|
public bool Storage { get { return _frequencyStep.Storage; } set { _frequencyStep.Storage = value; } }
|
|
//
|
|
[Category("Data")]
|
|
[OrderedDisplayName(6, 10, "Number of frequencies")]
|
|
[Description("Number of eigenfrequencies to compute.")]
|
|
[Id(7, 1)]
|
|
public int NumOfFrequencies
|
|
{
|
|
get { return _frequencyStep.NumOfFrequencies; }
|
|
set { _frequencyStep.NumOfFrequencies = value; }
|
|
}
|
|
//
|
|
[Category("Data")]
|
|
[OrderedDisplayName(7, 10, "Lower frequency bound")]
|
|
[Description("Lower bound of the frequency range.")]
|
|
[TypeConverter(typeof(StringFrequencyDefaultConverter))]
|
|
[Id(8, 1)]
|
|
public double LowestFrequency
|
|
{
|
|
get { return _frequencyStep.LowerFrequency; }
|
|
set { _frequencyStep.LowerFrequency = value; }
|
|
}
|
|
//
|
|
[Category("Data")]
|
|
[OrderedDisplayName(8, 10, "Upper frequency bound")]
|
|
[Description("Upper bound of the frequency range.")]
|
|
[TypeConverter(typeof(StringFrequencyDefaultConverter))]
|
|
[Id(9, 1)]
|
|
public double UpperFrequency
|
|
{
|
|
get { return _frequencyStep.UpperFrequency; }
|
|
set { _frequencyStep.UpperFrequency = value; }
|
|
}
|
|
|
|
|
|
// Constructors
|
|
public ViewFrequencyStep(CaeModel.FrequencyStep step, bool installProvider = true)
|
|
: base(step)
|
|
{
|
|
_frequencyStep = step;
|
|
//
|
|
if (installProvider)
|
|
{
|
|
InstallProvider();
|
|
UpdateVisibility();
|
|
}
|
|
}
|
|
|
|
|
|
// Methods
|
|
public override CaeModel.Step GetBase()
|
|
{
|
|
return _frequencyStep;
|
|
}
|
|
public override void InstallProvider()
|
|
{
|
|
base.InstallProvider();
|
|
//
|
|
_dctd.RenameBooleanPropertyToOnOff("Perturbation");
|
|
_dctd.RenameBooleanPropertyToYesNo("Storage");
|
|
}
|
|
public override void UpdateVisibility()
|
|
{
|
|
base.UpdateVisibility();
|
|
}
|
|
}
|
|
}
|