TimeStep * NonStationaryTransportProblem :: giveSolutionStepWhenIcApply() { if ( stepWhenIcApply == NULL ) { stepWhenIcApply = new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 0, this->initT-giveDeltaT(giveNumberOfFirstStep()), giveDeltaT(giveNumberOfFirstStep()), 0); //stepWhenIcApply = new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 0, -deltaT, deltaT, 0); } return stepWhenIcApply; }
TimeStep * CBS :: giveSolutionStepWhenIcApply() { if ( !stepWhenIcApply ) { stepWhenIcApply.reset( new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 0, 0.0, deltaT, 0) ); } return stepWhenIcApply.get(); }
TimeStep *IncrementalLinearStatic :: giveNextStep() { if ( !currentStep ) { currentStep.reset( new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 0, 0., this->giveDiscreteTime(1), 0) ); } previousStep = std :: move(currentStep); double dt = this->giveDiscreteTime(previousStep->giveNumber()+1) - previousStep->giveTargetTime(); currentStep.reset( new TimeStep(*previousStep, dt) ); return currentStep.get(); }
TimeStep *TransientTransportProblem :: giveSolutionStepWhenIcApply() { if ( !stepWhenIcApply ) { ///@todo Should we have this->initT ? stepWhenIcApply.reset( new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 0, 0., deltaT, 0) ); // The initial step goes from [-deltaT, 0], so the intrinsic time is at: -deltaT + alpha*deltaT stepWhenIcApply->setIntrinsicTime(-deltaT + alpha * deltaT); } return stepWhenIcApply.get(); }
TimeStep *StructuralMaterialEvaluator :: giveNextStep() { if ( !currentStep ) { // first step -> generate initial step //currentStep = std::make_unique<TimeStep>(*giveSolutionStepWhenIcApply()); currentStep = std::make_unique<TimeStep>(giveNumberOfTimeStepWhenIcApply(), this, 1, 0., this->deltaT, 0); } previousStep = std :: move(currentStep); currentStep = std::make_unique<TimeStep>(*previousStep, this->deltaT); return currentStep.get(); }
TimeStep *StokesFlow :: giveNextStep() { if ( !currentStep ) { // first step -> generate initial step //currentStep.reset( new TimeStep(*giveSolutionStepWhenIcApply()) ); currentStep.reset( new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 1, 0., this->deltaT, 0) ); } previousStep = std :: move(currentStep); currentStep.reset( new TimeStep(*previousStep, this->deltaT) ); return currentStep.get(); }
TimeStep *LinearStatic :: giveNextStep() { if ( !currentStep ) { // first step -> generate initial step //currentStep = std::make_unique<TimeStep>(*giveSolutionStepWhenIcApply()); currentStep = std::make_unique<TimeStep>(giveNumberOfTimeStepWhenIcApply(), this, 1, 0., 1., 0); } previousStep = std :: move(currentStep); currentStep = std::make_unique<TimeStep>(*previousStep, 1.); return currentStep.get(); }
TimeStep * NonStationaryTransportProblem :: giveSolutionStepWhenIcApply(bool force) { if ( master && (!force)) { return master->giveSolutionStepWhenIcApply(); } else { if ( !stepWhenIcApply ) { stepWhenIcApply.reset( new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 0, this->initT - giveDeltaT ( giveNumberOfFirstStep() ), giveDeltaT ( giveNumberOfFirstStep() ), 0) ); //stepWhenIcApply.reset( new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 0, -deltaT, deltaT, 0) ); } return stepWhenIcApply.get(); } }
TimeStep *NonLinearStatic :: giveSolutionStepWhenIcApply(bool force) { if ( master && (!force)) { return master->giveSolutionStepWhenIcApply(); } else { if ( !stepWhenIcApply ) { int inin = giveNumberOfTimeStepWhenIcApply(); // int nFirst = giveNumberOfFirstStep(); stepWhenIcApply.reset(new TimeStep(inin, this, 0, -deltaT, deltaT, 0)); } return stepWhenIcApply.get(); } }
TimeStep *TransientTransportProblem :: giveSolutionStepWhenIcApply(bool force) { if ( master && (!force)) { return master->giveSolutionStepWhenIcApply(); } else { if ( !stepWhenIcApply ) { double dt = this->giveDeltaT(1); stepWhenIcApply.reset( new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 0, 0., dt, 0) ); // The initial step goes from [-dt, 0], so the intrinsic time is at: -deltaT + alpha*dt stepWhenIcApply->setIntrinsicTime(-dt + alpha * dt); } return stepWhenIcApply.get(); } }
TimeStep * SUPG :: giveSolutionStepWhenIcApply(bool force) { if ( master && (!force)) { return master->giveSolutionStepWhenIcApply(); } else { if ( !stepWhenIcApply ) { double dt = deltaT / this->giveVariableScale(VST_Time); stepWhenIcApply.reset( new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 0, 0.0, dt, 0) ); } return stepWhenIcApply.get(); } }
TimeStep *StokesFlow :: giveNextStep() { if ( previousStep ) { delete previousStep; } if ( currentStep == NULL ) { int istep = this->giveNumberOfFirstStep(); // first step -> generate initial step previousStep = new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 0, -this->deltaT, this->deltaT, 0); currentStep = new TimeStep(istep, this, 1, 0.0, this->deltaT, 1); } else { int istep = currentStep->giveNumber() + 1; StateCounterType counter = currentStep->giveSolutionStateCounter() + 1; previousStep = currentStep; double dt = currentStep->giveTimeIncrement(); double totalTime = currentStep->giveTargetTime() + dt; currentStep = new TimeStep(istep, this, 1, totalTime, dt, counter); } return currentStep; }