PolyFEM
Loading...
Searching...
No Matches
elasticity_rhs Namespace Reference

Functions

 Det (mat)
 
 sigma_fun (j, ee, C, dim)
 
 linear_elasticity (disp_grad, def_grad)
 
 hooke (disp_grad, def_grad)
 
 saint_venant (disp_grad, def_grad)
 
 neo_hookean (disp_grad, def_grad)
 
 divergence (sigma)
 
 parse_args ()
 

Variables

 args = parse_args()
 
list dims = [2, 3]
 
list names = ["linear_elasticity", "hooke", "saint_venant", "neo_hookean"]
 
str cpp = "#include <polyfem/autogen/auto_elasticity_rhs.hpp>\n\n\n"
 
str hpp = "#pragma once\n\n#include <polyfem/utils/ElasticityUtils.hpp>\n#include <polyfem/utils/AutodiffTypes.hpp>\n#include <Eigen/Dense>\n\n"
 
 x = Symbol('x')
 
 y = Symbol('y')
 
 z = Symbol('z')
 
 X = Matrix([x, y])
 
 f = Matrix([Function('f0')(x, y), Function('f1')(x, y)])
 
 disp_grad = f.jacobian(X)
 
tuple def_grad = (eye(dim) + disp_grad)
 
 sigma = hooke(disp_grad, def_grad)
 
 div = divergence(sigma)
 
 c99 = pretty_print.C99_print(div)
 
str signature = "void " + name + "_" + str(dim) + "d_function(const AutodiffHessianPt &pt"
 
 path = os.path.abspath(args.output)
 

Function Documentation

◆ Det()

elasticity_rhs.Det (   mat)

Definition at line 13 of file elasticity_rhs.py.

◆ divergence()

elasticity_rhs.divergence (   sigma)

Definition at line 130 of file elasticity_rhs.py.

◆ hooke()

elasticity_rhs.hooke (   disp_grad,
  def_grad 
)

Definition at line 53 of file elasticity_rhs.py.

References sigma_fun().

Here is the call graph for this function:

◆ linear_elasticity()

elasticity_rhs.linear_elasticity (   disp_grad,
  def_grad 
)

Definition at line 36 of file elasticity_rhs.py.

◆ neo_hookean()

elasticity_rhs.neo_hookean (   disp_grad,
  def_grad 
)

Definition at line 109 of file elasticity_rhs.py.

◆ parse_args()

elasticity_rhs.parse_args ( )

Definition at line 146 of file elasticity_rhs.py.

◆ saint_venant()

elasticity_rhs.saint_venant (   disp_grad,
  def_grad 
)

Definition at line 80 of file elasticity_rhs.py.

References sigma_fun().

Here is the call graph for this function:

◆ sigma_fun()

elasticity_rhs.sigma_fun (   j,
  ee,
  C,
  dim 
)

Definition at line 27 of file elasticity_rhs.py.

Referenced by hooke(), and saint_venant().

Here is the caller graph for this function:

Variable Documentation

◆ args

elasticity_rhs.args = parse_args()

Definition at line 155 of file elasticity_rhs.py.

◆ c99

elasticity_rhs.c99 = pretty_print.C99_print(div)

Definition at line 192 of file elasticity_rhs.py.

◆ cpp

str elasticity_rhs.cpp = "#include <polyfem/autogen/auto_elasticity_rhs.hpp>\n\n\n"

Definition at line 158 of file elasticity_rhs.py.

◆ def_grad

tuple elasticity_rhs.def_grad = (eye(dim) + disp_grad)

Definition at line 179 of file elasticity_rhs.py.

◆ dims

list elasticity_rhs.dims = [2, 3]

Definition at line 156 of file elasticity_rhs.py.

◆ disp_grad

elasticity_rhs.disp_grad = f.jacobian(X)

Definition at line 178 of file elasticity_rhs.py.

◆ div

elasticity_rhs.div = divergence(sigma)

Definition at line 190 of file elasticity_rhs.py.

◆ f

elasticity_rhs.f = Matrix([Function('f0')(x, y), Function('f1')(x, y)])

Definition at line 173 of file elasticity_rhs.py.

◆ hpp

str elasticity_rhs.hpp = "#pragma once\n\n#include <polyfem/utils/ElasticityUtils.hpp>\n#include <polyfem/utils/AutodiffTypes.hpp>\n#include <Eigen/Dense>\n\n"

Definition at line 159 of file elasticity_rhs.py.

◆ names

list elasticity_rhs.names = ["linear_elasticity", "hooke", "saint_venant", "neo_hookean"]

Definition at line 157 of file elasticity_rhs.py.

◆ path

elasticity_rhs.path = os.path.abspath(args.output)

Definition at line 239 of file elasticity_rhs.py.

◆ sigma

elasticity_rhs.sigma = hooke(disp_grad, def_grad)

Definition at line 182 of file elasticity_rhs.py.

◆ signature

str elasticity_rhs.signature = "void " + name + "_" + str(dim) + "d_function(const AutodiffHessianPt &pt"

Definition at line 223 of file elasticity_rhs.py.

◆ x

elasticity_rhs.x = Symbol('x')

Definition at line 163 of file elasticity_rhs.py.

◆ X

elasticity_rhs.X = Matrix([x, y])

Definition at line 172 of file elasticity_rhs.py.

◆ y

elasticity_rhs.y = Symbol('y')

Definition at line 164 of file elasticity_rhs.py.

◆ z

elasticity_rhs.z = Symbol('z')

Definition at line 165 of file elasticity_rhs.py.