fedoo.problem.Linear

class Linear(assembly: Assembly, name: str = 'MainProblem', time_step: float | None = None, integrator: GeneralizedAlpha | None = None)

Class that defines linear problems.

This simple class allows a linear problem to be built from an assembly object. The discretized problem is written as A * X = B + D, where A is the matrix built by the assembly, X is the solution vector, B contains the Neumann boundary conditions, and D is the vector built by the assembly.

Parameters:
  • assembly (Assembly-like object or str) – Assembly used to construct the matrix A and vector D, or the name of a registered assembly.

  • name (str, default="MainProblem") – Name of the problem.

  • time_step (float, optional) – Constant time increment used when a second-order integrator is attached. Omit it for the original static behavior.

  • integrator (fedoo.time.Newmark or fedoo.time.GeneralizedAlpha, optional) – Implicit second-order time integrator. The stiffness and consistent mass matrices are assembled once by initialize() and reused at every constant-size increment. Only the right-hand side is rebuilt.

__init__(assembly: Assembly, name: str = 'MainProblem', time_step: float | None = None, integrator: GeneralizedAlpha | None = None)

Methods

Linear.GetElasticEnergy()

returns : sum (0.5 * U.transposed * K * U)

Linear.GetNodalElasticEnergy()

returns : 0.5 * K * U .

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

Add global degrees of freedom to the problem.

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

Add output requirement for automatic saving during nlsolve.

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

Linear.change_assembly(assembling[, update])

Modify the assembly associated to the problem and update the problem (see Assembly.update for more information)

Linear.get_A()

Linear.get_B()

Linear.get_D()

Linear.get_X()

Linear.get_acceleration([name])

Return the current transient acceleration.

Linear.get_active()

Return the active Problem.

Linear.get_all()

Return the list of all problems.

Linear.get_disp([name])

Return the displacement components.

Linear.get_dof_solution([name])

Linear.get_elastic_energy()

returns : sum (0.5 * U.transposed * K * U)

Linear.get_ext_forces([name, include_mpc])

Return the nodal Forces in global coordinates system.

Linear.get_kinetic_energy()

Return 0.5 * velocity.T * M * velocity.

Linear.get_nodal_elastic_energy()

returns : 0.5 * K * U .

Linear.get_results(*args, **kargs)

Extract some results from the current problem.

Linear.get_rot([name])

Return the rotation components.

Linear.get_velocity([name])

Return the current transient velocity.

Linear.init_bc_start_value()

Linear.initialize()

Initialize and cache the optional linear transient operators.

Linear.invalidate_factorization()

Invalidate any cached factorization.

Linear.make_active()

Define the problem instance as the active Problem.

Linear.reset()

Linear.save_results([iterOutput])

Linear.set_A(A)

Linear.set_B(B)

Linear.set_D(D)

Linear.set_X(value)

Linear.set_active(name)

Define the active Problem from its name.

Linear.set_dof_solution(name, value)

Linear.set_initial_acceleration(name, value)

Set a transient initial acceleration component.

Linear.set_initial_displacement(name, value)

Set a transient initial displacement component.

Linear.set_initial_velocity(name, value)

Set a transient initial velocity component.

Linear.set_reuse_factorization([reuse])

Enable or disable factorization reuse for repeated solves.

Linear.set_solver([solver])

Define the solver for the linear system resolution.

Linear.set_time_integrator(evolution, integrator)

Attach a linear implicit second-order time integrator.

Linear.solve(**kargs)

Solve the linear problem and optionally update assembly fields.

Linear.solve_history(tmax[, dt, ...])

Solve a complete cached linear transient history.

Linear.solve_time_increment([...])

Solve and advance one complete linear transient increment.

Linear.update([dtime, compute, update_weakform])

Assemble the matrix including the following modification:

Linear.update_boundary_conditions()

Linear.active

Linear.assembly

Linear.global_dof

Linear.is_dynamic

Whether this linear problem has a time integrator attached.

Linear.n_dof

Linear.n_global_dof

Linear.n_node_dof

Linear.name

Return the name of the Problem.

Linear.results

Linear.solver

Return the current solver used for the problem.

Linear.space

Return the ModelingSpace associated to the Problem if defined.

Linear.time_integrator

Return the attached second-order integrator, or None.

Linear.bc

Boundary conditions defined on the problem.