def call( self ): out = solve_direct( self.conf, self.options, problem=self.problem, step_hook=self.step_hook, post_process_hook=self.post_process_hook, post_process_hook_final=self.post_process_hook_final) return out
def call( self ): opts = self.app_options dpb, vec_dp, data = solve_direct( self.conf, self.options, problem = self.problem, step_hook = opts.step_hook, post_process_hook = \ opts.post_process_hook ) if opts.post_process_hook_final is not None: # User postprocessing. opts.post_process_hook_final( dpb, vec_dp, data ) return dpb, vec_dp, data
def test_input( self ): """Does not verify anything!!!""" import os.path as op from sfepy.solvers.generic import solve_direct from sfepy.base.base import Struct self.report( 'solving %s...' % self.conf.input_name ) name = op.join( self.options.out_dir, self.conf.output_name_trunk ) options = Struct( output_filename_trunk = name, output_format ='vtk', save_ebc = False, save_regions = False, save_field_meshes = False, save_region_field_meshes = False, solve_not = False ) dpb, vec_dp, data = solve_direct( self.test_conf, options ) self.report( '%s solved' % self.conf.input_name ) return True
def test_input(self): import numpy as nm from sfepy.solvers.generic import solve_direct self.report('solving %s...' % self.conf.input_name) status = NLSStatus(conditions=[]) out = solve_direct(self.test_conf, self.solver_options, step_hook=self.step_hook, post_process_hook=self.post_process_hook, post_process_hook_final=self.post_process_hook_final, nls_status=status) self.report('%s solved' % self.conf.input_name) ok = self.check_conditions(nm.array(status.conditions)) return ok