Operator: allow to choose time stepping method
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>pull/1/head
parent
6016a10fc2
commit
816553fc34
|
@ -81,6 +81,9 @@ public:
|
||||||
virtual void SetTimestepFactor(double factor);
|
virtual void SetTimestepFactor(double factor);
|
||||||
bool GetTimestepValid() const {return !m_InvaildTimestep;}
|
bool GetTimestepValid() const {return !m_InvaildTimestep;}
|
||||||
|
|
||||||
|
//! Choose a time step method (0=auto, 1=CFL, 3=Rennings)
|
||||||
|
void SetTimeStepMethod(int var) {m_TimeStepVar=var;}
|
||||||
|
|
||||||
//! Set operator to assume a constant material inside a cell (material probing in the cell center)
|
//! Set operator to assume a constant material inside a cell (material probing in the cell center)
|
||||||
void SetCellConstantMaterial() {m_MatCellShiftFaktor=0.5;}
|
void SetCellConstantMaterial() {m_MatCellShiftFaktor=0.5;}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ function FDTD = InitFDTD(varargin)
|
||||||
% CoordSystem: choose coordinate system (0 Cartesian, 1 Cylindrical)
|
% CoordSystem: choose coordinate system (0 Cartesian, 1 Cylindrical)
|
||||||
% TimeStep: force to use a given timestep (dangerous!)
|
% TimeStep: force to use a given timestep (dangerous!)
|
||||||
% TimeStepFactor: reduce the timestep by a given factor (>0 to <=1)
|
% TimeStepFactor: reduce the timestep by a given factor (>0 to <=1)
|
||||||
|
% TimeStepMethod: 1 or 3 chose timestep method (1=CFL, 3=Rennigs (default))
|
||||||
% CellConstantMaterial: set to 1 to assume a material is constant inside
|
% CellConstantMaterial: set to 1 to assume a material is constant inside
|
||||||
% a cell (material probing in cell center)
|
% a cell (material probing in cell center)
|
||||||
%
|
%
|
||||||
|
|
|
@ -666,6 +666,10 @@ int openEMS::SetupFDTD(const char* file)
|
||||||
|
|
||||||
SetupBoundaryConditions(BC);
|
SetupBoundaryConditions(BC);
|
||||||
|
|
||||||
|
int TS_method=0;
|
||||||
|
if (FDTD_Opts->QueryIntAttribute("TimeStepMethod",&TS_method)==TIXML_SUCCESS)
|
||||||
|
FDTD_Op->SetTimeStepMethod(TS_method);
|
||||||
|
|
||||||
double timestep=0;
|
double timestep=0;
|
||||||
FDTD_Opts->QueryDoubleAttribute("TimeStep",×tep);
|
FDTD_Opts->QueryDoubleAttribute("TimeStep",×tep);
|
||||||
if (timestep)
|
if (timestep)
|
||||||
|
|
Loading…
Reference in New Issue