class
PDESolver
[source]
PDESolver
(assemble_tensors_when_passed_to_problem
:bool
=False
)
A parent class that inherits all PDE solvers.
Type | Default | Details | |
---|---|---|---|
assemble_tensors_when_passed_to_problem |
bool |
False |
Whether the PDE solver methods pre-assembles any tensors or arrays before solving the PDE for a concrete problem. |
PDESolver.solve_pde
[source]
PDESolver.solve_pde
(solution
:dl4to.solution.Solution
,p
:float
=1.0
,binary
:bool
=False
)
Solves the pde for solution
and SIMP exponent p
. Returns three torch.Tensor
objects: displacements u
, stresses σ
and von Mises stresses σ_vm
.
Type | Default | Details | |
---|---|---|---|
solution |
dl4to.solution.Solution |
The solution for which the PDE should be solved. | |
p |
float |
1.0 |
The SIMP exponent when solving the PDE. Should usually be left at its default value of 1. . |
binary |
bool |
False |
Whether the densities in the solution should be binarized before solving the PDE. |
PDESolver.__call__
[source]
PDESolver.__call__
(solution
:dl4to.solution.Solution
,p
:float
=1.0
,binary
:bool
=False
)
Does the same as the solve_pde
method. Solves the pde for solution
and SIMP exponent p
. Returns three torch.Tensor
objects: displacements u
, stresses σ
and von Mises stresses σ_vm
.
Type | Default | Details | |
---|---|---|---|
solution |
dl4to.solution.Solution |
The solution for which the PDE should be solved. | |
p |
float |
1.0 |
The SIMP exponent when solving the PDE. Should usually be left at its default value of 1. . |
binary |
bool |
False |
Whether the densities in the solution should be binarized before solving the PDE. |
PDESolver.clone
[source]
PDESolver.clone
()
Returns a dl4to.pde.PDESolver
object, which is a deepcopy of the PDE solver.