-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import numpy as np | ||
|
||
import pytest | ||
|
||
def test_linear_elasticity_lfem(p, n): | ||
""" | ||
@brief Lagrange 元求解线弹性问题 | ||
""" | ||
from fealpy.pde.linear_elasticity_model import BoxDomainData2d | ||
from fealpy.mesh import TriangleMesh | ||
from fealpy.functionspace import LagrangeFESpace as Space | ||
from fealpy.functionspace import LagrangeFiniteElementSpace as OldSpace | ||
from fealpy.fem import LinearElasticityOperatorIntegrator | ||
from fealpy.fem import BilinearForm | ||
from fealpy.fem import LinearForm | ||
|
||
pde = BoxDomainData2d() | ||
domain = pde.domain() | ||
mesh = TriangleMesh.from_box(box=domain, nx=n, ny=n) | ||
space = Space(mesh, p=p) | ||
|
||
bform = BilinearForm(space) | ||
bform.add_domain_integrator(LinearElasticityOperatorIntegrator(pde.lam) | ||
bform.assembly() | ||
|
||
|