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, ...])Return the active Problem.
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.
Define the problem instance as the active Problem.
Problem.save_results([iterOutput])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)Return the name of the Problem.
Return the current solver used for the problem.
Return the ModelingSpace associated to the Problem if defined.
Boundary conditions defined on the problem.