def _iter_execute(self): """ Perform the operations in the iteration loop. """ system = self._system self._solver_info.append_subsolver() system._transfer('nonlinear', 'fwd') with Recording('NonlinearBlockJac', 0, self) as rec: # If this is a parallel group, check for analysis errors and reraise. if len(system._subsystems_myproc) != len( system._subsystems_allprocs): with multi_proc_fail_check(system.comm): for subsys in system._subsystems_myproc: subsys._solve_nonlinear() else: for subsys in system._subsystems_myproc: subsys._solve_nonlinear() system._check_reconf_update() rec.abs = 0.0 rec.rel = 0.0 self._solver_info.pop()
def solve(self): """ Run the solver. """ system = self._system with Recording('NLRunOnce', 0, self) as rec: # If this is a parallel group, transfer all at once then run each subsystem. if len(system._subsystems_myproc) != len( system._subsystems_allprocs): system._transfer('nonlinear', 'fwd') with multi_proc_fail_check(system.comm): for subsys in system._subsystems_myproc: subsys._solve_nonlinear() system._check_reconf_update() # If this is not a parallel group, transfer for each subsystem just prior to running it. else: for isub, subsys in enumerate(system._subsystems_myproc): system._transfer('nonlinear', 'fwd', isub) subsys._solve_nonlinear() system._check_reconf_update() rec.abs = 0.0 rec.rel = 0.0
def _run_apply(self): """ Run the apply_nonlinear method on the system. """ system = self._system # If this is a parallel group, check for analysis errors and reraise. if len(system._subsystems_myproc) != len(system._subsystems_allprocs): with multi_proc_fail_check(system.comm): super(NonlinearBlockJac, self)._run_apply() else: super(NonlinearBlockJac, self)._run_apply()
def solve(self): """ Run the solver. """ system = self._system with Recording('NLRunOnce', 0, self) as rec: # If this is a parallel group, transfer all at once then run each subsystem. if len(system._subsystems_myproc) != len(system._subsystems_allprocs): system._transfer('nonlinear', 'fwd') with multi_proc_fail_check(system.comm): for subsys in system._subsystems_myproc: subsys._solve_nonlinear() system._check_reconf_update() # If this is not a parallel group, transfer for each subsystem just prior to running it. else: self._gs_iter() rec.abs = 0.0 rec.rel = 0.0
def solve(self): """ Run the solver. Returns ------- boolean Failure flag; True if failed to converge, False is successful. float absolute error. float relative error. """ system = self._system with Recording('NLRunOnce', 0, self) as rec: # If this is a parallel group, transfer all at once then run each subsystem. if len(system._subsystems_myproc) != len( system._subsystems_allprocs): system._transfer('nonlinear', 'fwd') with multi_proc_fail_check(system.comm): for subsys in system._subsystems_myproc: subsys._solve_nonlinear() system._check_reconf_update() # If this is not a parallel group, transfer for each subsystem just prior to running it. else: for isub, subsys in enumerate(system._subsystems_myproc): system._transfer('nonlinear', 'fwd', isub) subsys._solve_nonlinear() system._check_reconf_update() rec.abs = 0.0 rec.rel = 0.0 return False, 0.0, 0.0
def _single_iteration(self): """ Perform the operations in the iteration loop. """ system = self._system self._solver_info.append_subsolver() system._transfer('nonlinear', 'fwd') with Recording('NonlinearBlockJac', 0, self) as rec: # If this is a parallel group, check for analysis errors and reraise. if len(system._subsystems_myproc) != len(system._subsystems_allprocs): with multi_proc_fail_check(system.comm): for subsys in system._subsystems_myproc: subsys._solve_nonlinear() else: for subsys in system._subsystems_myproc: subsys._solve_nonlinear() system._check_reconf_update() rec.abs = 0.0 rec.rel = 0.0 self._solver_info.pop()
def solve(self): """ Run the solver. Returns ------- boolean Failure flag; True if failed to converge, False is successful. float absolute error. float relative error. """ system = self._system with Recording('NLRunOnce', 0, self) as rec: # If this is a parallel group, transfer all at once then run each subsystem. if len(system._subsystems_myproc) != len(system._subsystems_allprocs): system._transfer('nonlinear', 'fwd') with multi_proc_fail_check(system.comm): for subsys in system._subsystems_myproc: subsys._solve_nonlinear() system._check_reconf_update() # If this is not a parallel group, transfer for each subsystem just prior to running it. else: for isub, subsys in enumerate(system._subsystems_myproc): system._transfer('nonlinear', 'fwd', isub) subsys._solve_nonlinear() system._check_reconf_update() rec.abs = 0.0 rec.rel = 0.0 return False, 0.0, 0.0