fedoo.Problem

class Problem(A=None, B=0, D=0, mesh=None, name='MainProblem', space=None)

Base class to define a problem that generate a linear system and to solve the linear system with some defined boundary conditions.

The linear problem is written under the form: A*X = B+D where:

  • A is a square matrix build with the associated assembly object calling

    assembly.get_global_matrix()

  • X is the column vector containing the degrees of freedom (solution after solving)

  • B is a column vector used to set Neumann boundary conditions

  • D is a column vector build with the associated assembly object calling

    assembly.get_global_vector()

Parameters:
  • A (scipy sparse matrix) – Matrix that define the discretized linear system to solve.

  • B (np.ndarray or 0) – if 0, B is initialized to a zeros array with de adequat shape.

  • D (np.ndarray or 0) – if 0, D is ignored.

  • mesh (fedoo Mesh) – mesh associated to the problem.

  • name (str) – name of the problem.

  • space (ModelingSpace(Optional)) – ModelingSpace on which the problem is defined.

  • name – name of the problem.

__init__(A=None, B=0, D=0, mesh=None, name='MainProblem', space=None)

Methods

Problem.add_global_dof(variable_names[, ...])

Add global degrees of freedom to the problem.

Problem.add_output(filename, assembly[, ...])

Add output requirement for automatic saving during nlsolve.

Problem.apply_boundary_conditions([t_fact, ...])

Problem.get_A()

Problem.get_B()

Problem.get_D()

Problem.get_X()

Problem.get_active()

Return the active Problem.

Problem.get_all()

Return the list of all problems.

Problem.get_dof_solution([name])

Problem.get_ext_forces([name, include_mpc])

Return the nodal Forces in global coordinates system.

Problem.get_results(*args, **kargs)

Extract some results from the current problem.

Problem.init_bc_start_value()

Problem.make_active()

Define the problem instance as the active Problem.

Problem.save_results([iterOutput])

Problem.set_A(A)

Problem.set_B(B)

Problem.set_D(D)

Problem.set_X(value)

Problem.set_active(name)

Define the active Problem from its name.

Problem.set_dof_solution(name, value)

Problem.set_solver([solver])

Define the solver for the linear system resolution.

Problem.solve(**kargs)

Problem.update_boundary_conditions()

Problem.active

Problem.global_dof

Problem.n_dof

Problem.n_global_dof

Problem.n_node_dof

Problem.name

Return the name of the Problem.

Problem.results

Problem.solver

Return the current solver used for the problem.

Problem.space

Return the ModelingSpace associated to the Problem if defined.

Problem.bc

Boundary conditions defined on the problem.