#include <SaturableAbsorber.hh>
SaturableAbsorber::SaturableAbsorber | ( | string | InFileName, | |
OptSignal * | oOptSignal2 | |||
) |
References ComputeDeltaZMax(), CONSTANT, COUPLED_ODE, CoupledODERelaxationTime, CoupledODESaturationPower, CoupledODEUnsaturatedNepperLoss, DebugFlag, DeltaZMaxInfile, FastSaturableAbsorptionAttenuationCoefficient, FastSaturableAbsorptionNonlinearCoefficient, OptSignal::fft, fft, fftMatrices::fOptSignalX, fftMatrices::fOptSignalY, OptSignal::GetTypeSimulation(), OptSignal::GetUsingOptFiberLocalError(), cfftw::give_N(), InitializedDeltaZInitialFlag, OptFiberLocalErrorWorkSpace::LaserWorkX, LaserWorkX, OptFiberLocalErrorWorkSpace::LaserWorkY, LaserWorkY, LOCAL_ERROR_2ND, LogFile, LogFileSeparator(), LOWER_AND_UPPER, LOWER_ONLY, NumSteps, OptSignal::OFLEWork, oOptSignal, qtPoints, QUADRATIC_NO_LOSS, QUADRATIC_NO_LOSS_ANALYTIC, QUADRATIC_WITH_LOSS, QUADRATIC_WITH_LOSS_ANALYTIC, RATIONAL_QUADRATIC, ReadDouble(), ReadInt(), RelativeErrorGoal, SAF1, SAF2, SaturableAbsorberLength, SCALAR, OptSignal::sfftM, sfftM, OptFiberLocalErrorWorkSpace::sfftM_Coarse, sfftM_Coarse, OptFiberLocalErrorWorkSpace::sfftM_Start, sfftM_Start, fftMatrices::tOptSignalX, fftMatrices::tOptSignalY, TypeSaturableAbsorption, TypeSimulation, TypeStepSizes, VECTOR, WriteTypeSaturableAbsorption(), and WriteTypeStepSizes().
void SaturableAbsorber::Apply | ( | double * | PropagatedLength | ) |
References ApplyHeunsMethod(), ApplyQuadraticNoLossAnalytic(), ApplyQuadraticWithLossAnalytic(), COUPLED_ODE, DebugFlag, OptSignal::GetTotalEnergy(), NO_SAT_ABS, oOptSignal, QUADRATIC_NO_LOSS, QUADRATIC_NO_LOSS_ANALYTIC, QUADRATIC_WITH_LOSS, QUADRATIC_WITH_LOSS_ANALYTIC, RATIONAL_QUADRATIC, SaturableAbsorberLength, TypeSaturableAbsorption, UpdateFreq(), and UpdateTime().
void SaturableAbsorber::ApplyHeunsMethod | ( | void | ) | [private] |
References ApplyHeunsMethodConstantSteps(), ApplyHeunsMethodLocalError(), CONSTANT, LOCAL_ERROR_2ND, and TypeStepSizes.
Referenced by Apply().
void SaturableAbsorber::ApplyHeunsMethodConstantSteps | ( | void | ) | [private] |
References ApplyHeunsSingleStep(), NumSteps, and SaturableAbsorberLength.
Referenced by ApplyHeunsMethod().
void SaturableAbsorber::ApplyHeunsMethodLocalError | ( | void | ) | [private] |
References ApplyHeunsSingleStep(), ComputeRelativeError(), CopyFftMatricesTimeData(), DeltaZInitial, DeltaZMax, InitializedDeltaZInitialFlag, RelativeErrorGoal, SaturableAbsorberLength, sfftM, sfftM_Coarse, sfftM_Start, and sqrt().
Referenced by ApplyHeunsMethod().
void SaturableAbsorber::ApplyHeunsSingleStep | ( | double | StepSizeZ | ) | [private] |
References ComputeSAFunction(), LaserWorkX, LaserWorkY, qtPoints, SAF1, SAF2, SCALAR, sfftM, fftMatrices::tOptSignalX, fftMatrices::tOptSignalY, TypeSimulation, and VECTOR.
Referenced by ApplyHeunsMethodConstantSteps(), and ApplyHeunsMethodLocalError().
void SaturableAbsorber::ApplyQuadraticNoLossAnalytic | ( | void | ) | [private] |
References FastSaturableAbsorptionNonlinearCoefficient, qtPoints, SaturableAbsorberLength, SCALAR, sfftM, sq(), fftMatrices::tOptSignalX, fftMatrices::tOptSignalY, TypeSimulation, and VECTOR.
Referenced by Apply().
void SaturableAbsorber::ApplyQuadraticWithLossAnalytic | ( | void | ) | [private] |
void SaturableAbsorber::ComputeDeltaZMax | ( | void | ) | [private] |
References DeltaZMax, DeltaZMaxInfile, and InitializedDeltaZInitialFlag.
Referenced by SaturableAbsorber().
double SaturableAbsorber::ComputeRelativeError | ( | void | ) | [private] |
If S_c and S_f denote the coarse and fine solutions then The relative error is defined to be RelativeError = | S_c - S_f | / | S_f |
References qtPoints, SCALAR, sfftM, sfftM_Coarse, sq(), sqrt(), fftMatrices::tOptSignalX, fftMatrices::tOptSignalY, TypeSimulation, and VECTOR.
Referenced by ApplyHeunsMethodLocalError().
void SaturableAbsorber::CopyFftMatricesTimeData | ( | fftMatrices * | OrigData, | |
fftMatrices * | CopyOfData | |||
) | [private] |
References qtPoints, SCALAR, fftMatrices::tOptSignalX, fftMatrices::tOptSignalY, TypeSimulation, and VECTOR.
Referenced by ApplyHeunsMethodLocalError().
double SaturableAbsorber::CoupledODESatAbsFunction | ( | double | Power, | |
double | loss | |||
) | [private] |
References CoupledODERelaxationTime, CoupledODESaturationPower, and CoupledODEUnsaturatedNepperLoss.
Referenced by RungaKutta4Step().
double SaturableAbsorber::FastSaturableAbsorptionFunction | ( | cplx | u | ) | [private] |
Fast Saturable Absortion is du/dz = F(u)u where F=FastSaturableAbsorptionFunction
References FastSaturableAbsorptionAttenuationCoefficient, FastSaturableAbsorptionNonlinearCoefficient, QUADRATIC_NO_LOSS, QUADRATIC_WITH_LOSS, RATIONAL_QUADRATIC, sq(), and TypeSaturableAbsorption.
Referenced by ComputeSAFunction().
double SaturableAbsorber::RungaKutta4Step | ( | cplx * | U_XIn, | |
cplx * | U_YIn, | |||
double | x_in, | |||
int | time_index_in | |||
) | [private] |
References CoupledODESatAbsFunction(), OptSignal::GetDeltaTime(), oOptSignal, qtPoints, SCALAR, sq(), TypeSimulation, and VECTOR.
Referenced by ComputeSAFunction().
void SaturableAbsorber::UpdateFreq | ( | void | ) | [inline, private] |
References cfftw::FFT(), fft, fftMatrices::fOptSignalX, fftMatrices::fOptSignalY, sfftM, fftMatrices::tOptSignalX, fftMatrices::tOptSignalY, TypeSimulation, and VECTOR.
Referenced by Apply().
void SaturableAbsorber::UpdateTime | ( | void | ) | [inline, private] |
References fft, fftMatrices::fOptSignalX, fftMatrices::fOptSignalY, cfftw::IFFT(), sfftM, fftMatrices::tOptSignalX, fftMatrices::tOptSignalY, TypeSimulation, and VECTOR.
Referenced by Apply().
string SaturableAbsorber::WriteTypeSaturableAbsorption | ( | void | ) |
References COUPLED_ODE, NO_SAT_ABS, QUADRATIC_NO_LOSS, QUADRATIC_NO_LOSS_ANALYTIC, QUADRATIC_WITH_LOSS, QUADRATIC_WITH_LOSS_ANALYTIC, RATIONAL_QUADRATIC, and TypeSaturableAbsorption.
Referenced by SaturableAbsorber().
string SaturableAbsorber::WriteTypeStepSizes | ( | void | ) |
References CONSTANT, LOCAL_ERROR_2ND, and TypeStepSizes.
Referenced by SaturableAbsorber().
double SaturableAbsorber::CoupledODERelaxationTime [private] |
Relaxation Time parameter in secs for Coupled ODE model.
Referenced by CoupledODESatAbsFunction(), and SaturableAbsorber().
double SaturableAbsorber::CoupledODESaturationPower [private] |
Saturation Power parameter P_{sat} in Watts for Coupled ODE model.
Referenced by CoupledODESatAbsFunction(), and SaturableAbsorber().
double SaturableAbsorber::CoupledODEUnsaturatedNepperLoss [private] |
Unsaturated Loss parameter l_U in m^{-1} for Coupled ODE model.
Referenced by ComputeSAFunction(), CoupledODESatAbsFunction(), and SaturableAbsorber().
int SaturableAbsorber::DebugFlag [private] |
Referenced by Apply(), and SaturableAbsorber().
double SaturableAbsorber::DeltaZInitial [private] |
Referenced by ApplyHeunsMethodLocalError().
double SaturableAbsorber::DeltaZMax [private] |
Referenced by ApplyHeunsMethodLocalError(), and ComputeDeltaZMax().
double SaturableAbsorber::DeltaZMaxInfile [private] |
Referenced by ComputeDeltaZMax(), and SaturableAbsorber().
double SaturableAbsorber::FastSaturableAbsorptionAttenuationCoefficient [private] |
For TypeSaturableAbsorption = QUADRATIC_ANALYTIC or QUADRATIC this is in Watts and represents the maximum instantaneous power of electric field that one can have without singularities occuring for any and SaturableAbsorberLength.
Referenced by ApplyQuadraticWithLossAnalytic(), FastSaturableAbsorptionFunction(), and SaturableAbsorber().
double SaturableAbsorber::FastSaturableAbsorptionNonlinearCoefficient [private] |
For TypeSaturableAbsorption = QUADRATIC_ANALYTIC or QUADRATIC this is in (Wm)^{-1}
Referenced by ApplyQuadraticNoLossAnalytic(), ApplyQuadraticWithLossAnalytic(), FastSaturableAbsorptionFunction(), and SaturableAbsorber().
cfftw* SaturableAbsorber::fft [private] |
Referenced by SaturableAbsorber(), UpdateFreq(), and UpdateTime().
bool SaturableAbsorber::InitializedDeltaZInitialFlag [private] |
Referenced by ApplyHeunsMethodLocalError(), ComputeDeltaZMax(), and SaturableAbsorber().
cplx* SaturableAbsorber::LaserWorkX [private] |
Referenced by ApplyHeunsSingleStep(), and SaturableAbsorber().
cplx* SaturableAbsorber::LaserWorkY [private] |
Referenced by ApplyHeunsSingleStep(), and SaturableAbsorber().
int SaturableAbsorber::NumSteps [private] |
NumSteps for ODE solver.
Referenced by ApplyHeunsMethodConstantSteps(), and SaturableAbsorber().
OptSignal* SaturableAbsorber::oOptSignal [private] |
Referenced by Apply(), RungaKutta4Step(), and SaturableAbsorber().
int SaturableAbsorber::qtPoints [private] |
double SaturableAbsorber::RelativeErrorGoal [private] |
Referenced by ApplyHeunsMethodLocalError(), and SaturableAbsorber().
double* SaturableAbsorber::SAF1 [private] |
Referenced by ApplyHeunsSingleStep(), and SaturableAbsorber().
double* SaturableAbsorber::SAF2 [private] |
Referenced by ApplyHeunsSingleStep(), and SaturableAbsorber().
double SaturableAbsorber::SaturableAbsorberLength [private] |
Length of SaturableAbsorber in meters.
Referenced by Apply(), ApplyHeunsMethodConstantSteps(), ApplyHeunsMethodLocalError(), ApplyQuadraticNoLossAnalytic(), ApplyQuadraticWithLossAnalytic(), and SaturableAbsorber().
fftMatrices SaturableAbsorber::sfftM [private] |
fftMatrices SaturableAbsorber::sfftM_Coarse [private] |
Referenced by ApplyHeunsMethodLocalError(), ComputeRelativeError(), and SaturableAbsorber().
fftMatrices SaturableAbsorber::sfftM_Start [private] |
Referenced by ApplyHeunsMethodLocalError(), and SaturableAbsorber().
Referenced by Apply(), ComputeSAFunction(), FastSaturableAbsorptionFunction(), SaturableAbsorber(), and WriteTypeSaturableAbsorption().
Referenced by ApplyHeunsMethod(), SaturableAbsorber(), and WriteTypeStepSizes().