parameters_processing.py
def load_algebraic_solver_parameters(algebraic_solver_params_file):
  """
  Load PETSC / SLEPc parameters from file.

  :param str algebraic_solver_params_file:  Path to the file with the parameters.
  :return: String that can be processed by Dolfin's parameters system.
  :rtype: str
  """

  alg_solver_args = ""

  if algebraic_solver_params_file:
    try:
      with open (algebraic_solver_params_file, "r") as algebraic_solver_params_file:
        for l in algebraic_solver_params_file:
          s = l.strip().split('#')[0]
          if s:
            if s == "switch_mat":
              alg_solver_args += " --flux_module.eigensolver.switch_mat=True"
            else:
              alg_solver_args += " --petsc." + __stripper.sub("=", s)
    except Exception as e:
      raise RuntimeError("Solver parameters could not be read from "+algebraic_solver_params_file + ".\n" + str(e))

  return alg_solver_args

  Load PETSC / SLEPc parameters from file.

  :param str algebraic_solver_params_file:  Path to the file with the parameters.
  :return: String that can be processed by Dolfin's parameters system.
  :rtype: str
  
Load PETSC / SLEPc parameters from file.
Load PETSC / SLEPc parameters from file .
def load_algebraic_solver_parameters(algebraic_solver_params_file):
  alg_solver_args = ""
  if algebraic_solver_params_file:
    try:
      with open (algebraic_solver_params_file, "r") as algebraic_solver_params_file:
        for l in algebraic_solver_params_file:
          s = l.strip().split('#')[0]
          if s:
            if s == "switch_mat":
              alg_solver_args += " --flux_module.eigensolver.switch_mat=True"
            else:
              alg_solver_args += " --petsc." + __stripper.sub("=", s)
    except Exception as e:
      raise RuntimeError("Solver parameters could not be read from "+algebraic_solver_params_file + ".\n" + str(e))
  return alg_solver_args
def load_algebraic_solver_parameters ( algebraic_solver_params_file ) : alg_solver_args = "" if algebraic_solver_params_file : try : with open ( algebraic_solver_params_file , "r" ) as algebraic_solver_params_file : for l in algebraic_solver_params_file : s = l . strip ( ) . split ( '#' ) [ 0 ] if s : if s == "switch_mat" : alg_solver_args += " --flux_module.eigensolver.switch_mat=True" else : alg_solver_args += " --petsc." + __stripper . sub ( "=" , s ) except Exception as e : raise RuntimeError ( "Solver parameters could not be read from " + algebraic_solver_params_file + ".\n" + str ( e ) ) return alg_solver_args
Load PETSC / SLEPc parameters from file.
Load PETSC / SLEPc parameters from file .
"""
  Load PETSC / SLEPc parameters from file.

  :param str algebraic_solver_params_file:  Path to the file with the parameters.
  :return: String that can be processed by Dolfin's parameters system.
  :rtype: str
  """
String that can be processed by Dolfin's parameters system.
String that can be processed by Dolfin ' s parameters system .
str
algebraic_solver_params_file
Path to the file with the parameters.
Path to the file with the parameters .