prompt stringlengths 174 59.5k | completion stringlengths 7 228 | api stringlengths 12 64 |
|---|---|---|
#!/usr/bin/env python
"""
Transient Laplace equation (heat equation) with non-constant initial conditions
given by a function, using commands for interactive use.
The script allows setting various simulation parameters, namely:
- the diffusivity coefficient
- the max. initial condition value
- temperature field appro... | output(tss_status) | sfepy.base.base.output |
#!/usr/bin/env python
"""
Transient Laplace equation (heat equation) with non-constant initial conditions
given by a function, using commands for interactive use.
The script allows setting various simulation parameters, namely:
- the diffusivity coefficient
- the max. initial condition value
- temperature field appro... | Conditions([ic]) | sfepy.discrete.conditions.Conditions |
#!/usr/bin/env python
"""
Transient Laplace equation (heat equation) with non-constant initial conditions
given by a function, using commands for interactive use.
The script allows setting various simulation parameters, namely:
- the diffusivity coefficient
- the max. initial condition value
- temperature field appro... | output('refine %d...' % ii) | sfepy.base.base.output |
#!/usr/bin/env python
"""
Transient Laplace equation (heat equation) with non-constant initial conditions
given by a function, using commands for interactive use.
The script allows setting various simulation parameters, namely:
- the diffusivity coefficient
- the max. initial condition value
- temperature field appro... | Conditions([ebc1, ebc2]) | sfepy.discrete.conditions.Conditions |
#!/usr/bin/env python
"""
Transient Laplace equation (heat equation) with non-constant initial conditions
given by a function, using commands for interactive use.
The script allows setting various simulation parameters, namely:
- the diffusivity coefficient
- the max. initial condition value
- temperature field appro... | output('probe %d (%s):' % (ii, probes[ii].name)) | sfepy.base.base.output |
#!/usr/bin/env python
"""
Transient Laplace equation (heat equation) with non-constant initial conditions
given by a function, using commands for interactive use.
The script allows setting various simulation parameters, namely:
- the diffusivity coefficient
- the max. initial condition value
- temperature field appro... | ordered_iteritems(results) | sfepy.base.base.ordered_iteritems |
#!/usr/bin/env python
"""
Transient Laplace equation (heat equation) with non-constant initial conditions
given by a function, using commands for interactive use.
The script allows setting various simulation parameters, namely:
- the diffusivity coefficient
- the max. initial condition value
- temperature field appro... | output(key + ':') | sfepy.base.base.output |
import numpy as np
from sfepy.base.conf import ProblemConf
from sfepy.discrete.problem import Problem
from sfepy.mesh.mesh_generators import gen_block_mesh
from sfepy.postprocess.viewer import Viewer
from scipy.interpolate import interpn
import matplotlib.pyplot as plt
from matplotlib import ticker
... | gen_block_mesh(dims, nums, center_location) | sfepy.mesh.mesh_generators.gen_block_mesh |
import numpy as np
from sfepy.base.conf import ProblemConf
from sfepy.discrete.problem import Problem
from sfepy.mesh.mesh_generators import gen_block_mesh
from sfepy.postprocess.viewer import Viewer
from scipy.interpolate import interpn
import matplotlib.pyplot as plt
from matplotlib import ticker
... | ProblemConf.from_file(prob_file) | sfepy.base.conf.ProblemConf.from_file |
import numpy as np
from sfepy.base.conf import ProblemConf
from sfepy.discrete.problem import Problem
from sfepy.mesh.mesh_generators import gen_block_mesh
from sfepy.postprocess.viewer import Viewer
from scipy.interpolate import interpn
import matplotlib.pyplot as plt
from matplotlib import ticker
... | Problem.from_conf(conf) | sfepy.discrete.problem.Problem.from_conf |
import numpy as np
from sfepy.base.conf import ProblemConf
from sfepy.discrete.problem import Problem
from sfepy.mesh.mesh_generators import gen_block_mesh
from sfepy.postprocess.viewer import Viewer
from scipy.interpolate import interpn
import matplotlib.pyplot as plt
from matplotlib import ticker
... | Viewer('curr_run_demo.vtk') | sfepy.postprocess.viewer.Viewer |
# 04.08.2009
#!
#! Homogenization: Linear Elasticity
#! =================================
#$ \centerline{Example input file, \today}
#! Homogenization of heterogeneous linear elastic material
import sfepy.discrete.fem.periodic as per
from sfepy.mechanics.matcoefs import stiffness_from_youngpoisson
from sfepy.homogeni... | stiffness_from_youngpoisson(dim, 7.0e9, 0.4) | sfepy.mechanics.matcoefs.stiffness_from_youngpoisson |
from sfepy.base.testing import TestCommon, assert_, debug
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_tensors(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True... | ElasticConstants(lam=1.0, mu=1.5) | sfepy.mechanics.matcoefs.ElasticConstants |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | output('dumping to VTK...') | sfepy.base.base.output |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | MeshIO.any_from_filename(filename) | sfepy.discrete.fem.meshio.MeshIO.any_from_filename |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | Mesh.from_file(filename, io=io) | sfepy.discrete.fem.mesh.Mesh.from_file |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | output('...done') | sfepy.base.base.output |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | MeshIO.any_from_filename(filename) | sfepy.discrete.fem.meshio.MeshIO.any_from_filename |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | output('extracting selected data...', verbose=verbose) | sfepy.base.base.output |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | output('selection:', extract, verbose=verbose) | sfepy.base.base.output |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | OneTypeList(Struct) | sfepy.base.base.OneTypeList |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | Mesh.from_file(filename) | sfepy.discrete.fem.mesh.Mesh.from_file |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | MeshIO.any_from_filename(filename) | sfepy.discrete.fem.meshio.MeshIO.any_from_filename |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | output('...done', verbose=verbose) | sfepy.base.base.output |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | write_dict_hdf5(filename_out, ths) | sfepy.base.ioutils.write_dict_hdf5 |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | get_trunk(filename) | sfepy.base.ioutils.get_trunk |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | output(mode, nname, verbose=verbose) | sfepy.base.base.output |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | output('linearizing...') | sfepy.base.base.output |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | output('...done') | sfepy.base.base.output |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | output('no time stepping info found, assuming single step') | sfepy.base.base.output |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | output(ts.format % (step, max_step)) | sfepy.base.base.output |
from __future__ import absolute_import
import numpy as nm
from sfepy.base.base import output, OneTypeList, Struct
from sfepy.discrete.fem.mesh import Mesh
from sfepy.discrete.fem.meshio import MeshIO
from sfepy.solvers.ts import TimeStepper
from sfepy.base.ioutils import get_trunk, write_dict_hdf5
import six
from six.... | output('max. refinement per group:', val.levels) | sfepy.base.base.output |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | _get_axes(ax, dim) | sfepy.postprocess.plot_dofs._get_axes |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | _get_axes(ax, dim) | sfepy.postprocess.plot_dofs._get_axes |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | la.get_perpendiculars(cp.normal) | sfepy.linalg.get_perpendiculars |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | la.insert_strided_axis(self.mtx, 0, points.shape[0]) | sfepy.linalg.insert_strided_axis |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | la.flag_points_in_polygon2d(self.bounds2d, points2d) | sfepy.linalg.flag_points_in_polygon2d |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | la.norm_l2_along_axis(points - self.centre, squared=True) | sfepy.linalg.norm_l2_along_axis |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | la.norm_l2_along_axis(vecs) | sfepy.linalg.norm_l2_along_axis |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | la.norm_l2_along_axis(vecs) | sfepy.linalg.norm_l2_along_axis |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | la.make_axis_rotation_matrix(rot_axis, rot_angle) | sfepy.linalg.make_axis_rotation_matrix |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | la.insert_strided_axis(mtx, 0, self.bounds.shape[0]) | sfepy.linalg.insert_strided_axis |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | la.dot_sequences(mm, self.bounds) | sfepy.linalg.dot_sequences |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | la.dot_sequences(mm, points) | sfepy.linalg.dot_sequences |
import numpy as nm
from sfepy.base.base import assert_, Struct
import sfepy.linalg as la
class ContactPlane(Struct):
def __init__(self, anchor, normal, bounds):
Struct.__init__(self, anchor=nm.array(anchor, dtype=nm.float64),
bounds=nm.asarray(bounds, dtype=nm.float64))
se... | la.dot_sequences(points, self.normal) | sfepy.linalg.dot_sequences |
#!/usr/bin/env python
# 12.01.2007, c
import os.path as op
import shutil
from optparse import OptionParser
import sfepy
from sfepy.base.base import *
from sfepy.base.conf import ProblemConf, get_standard_keywords
from sfepy.fem import ProblemDefinition
from sfepy.fem.evaluate import assemble_by_blocks
from sfepy.homo... | get_standard_keywords() | sfepy.base.conf.get_standard_keywords |
#!/usr/bin/env python
# 12.01.2007, c
import os.path as op
import shutil
from optparse import OptionParser
import sfepy
from sfepy.base.base import *
from sfepy.base.conf import ProblemConf, get_standard_keywords
from sfepy.fem import ProblemDefinition
from sfepy.fem.evaluate import assemble_by_blocks
from sfepy.homo... | ProblemDefinition.from_conf(dconf, init_equations=False) | sfepy.fem.ProblemDefinition.from_conf |
#!/usr/bin/env python
# 12.01.2007, c
import os.path as op
import shutil
from optparse import OptionParser
import sfepy
from sfepy.base.base import *
from sfepy.base.conf import ProblemConf, get_standard_keywords
from sfepy.fem import ProblemDefinition
from sfepy.fem.evaluate import assemble_by_blocks
from sfepy.homo... | plt.show() | sfepy.base.plotutils.plt.show |
#!/usr/bin/env python
# 12.01.2007, c
import os.path as op
import shutil
from optparse import OptionParser
import sfepy
from sfepy.base.base import *
from sfepy.base.conf import ProblemConf, get_standard_keywords
from sfepy.fem import ProblemDefinition
from sfepy.fem.evaluate import assemble_by_blocks
from sfepy.homo... | plt.show() | sfepy.base.plotutils.plt.show |
import numpy as nm
from sfepy.base.base import Struct
class SplineBox(Struct):
"""
B-spline geometry parametrization. Geometry can be modified
by moving spline control points.
"""
@staticmethod
def mmax(x, y):
n = len(x)
aux = nm.zeros((2,n), dtype=nm.int)
aux[0,:] = x[... | Struct.__init__(self, name=name, **kwargs) | sfepy.base.base.Struct.__init__ |
import numpy as nm
from sfepy.terms.terms import Term, terms
from sfepy.base.base import get_default
def grad_as_vector(grad):
grad = grad.transpose((0, 1, 3, 2))
sh = grad.shape
return grad.reshape((sh[0], sh[1], sh[2] * sh[3], 1))
class AdjDivGradTerm(Term):
r"""
Gateaux differential of :math:`... | get_default(term_mode, 1) | sfepy.base.base.get_default |
import numpy as nm
from sfepy.terms.terms import Term, terms
from sfepy.base.base import get_default
def grad_as_vector(grad):
grad = grad.transpose((0, 1, 3, 2))
sh = grad.shape
return grad.reshape((sh[0], sh[1], sh[2] * sh[3], 1))
class AdjDivGradTerm(Term):
r"""
Gateaux differential of :math:`... | get_default(term_mode, 1) | sfepy.base.base.get_default |
import numpy as nm
from sfepy.terms.terms import Term, terms
from sfepy.base.base import get_default
def grad_as_vector(grad):
grad = grad.transpose((0, 1, 3, 2))
sh = grad.shape
return grad.reshape((sh[0], sh[1], sh[2] * sh[3], 1))
class AdjDivGradTerm(Term):
r"""
Gateaux differential of :math:`... | get_default(term_mode, 1) | sfepy.base.base.get_default |
import numpy as nm
from sfepy.terms.terms import Term, terms
from sfepy.base.base import get_default
def grad_as_vector(grad):
grad = grad.transpose((0, 1, 3, 2))
sh = grad.shape
return grad.reshape((sh[0], sh[1], sh[2] * sh[3], 1))
class AdjDivGradTerm(Term):
r"""
Gateaux differential of :math:`... | get_default(term_mode, 1) | sfepy.base.base.get_default |
import numpy as nm
from sfepy.terms.terms import Term, terms
from sfepy.base.base import get_default
def grad_as_vector(grad):
grad = grad.transpose((0, 1, 3, 2))
sh = grad.shape
return grad.reshape((sh[0], sh[1], sh[2] * sh[3], 1))
class AdjDivGradTerm(Term):
r"""
Gateaux differential of :math:`... | get_default(term_mode, 1) | sfepy.base.base.get_default |
import numpy as nm
from sfepy.terms.terms import Term, terms
from sfepy.base.base import get_default
def grad_as_vector(grad):
grad = grad.transpose((0, 1, 3, 2))
sh = grad.shape
return grad.reshape((sh[0], sh[1], sh[2] * sh[3], 1))
class AdjDivGradTerm(Term):
r"""
Gateaux differential of :math:`... | get_default(term_mode, 1) | sfepy.base.base.get_default |
import numpy as nm
from sfepy.terms.terms import Term, terms
from sfepy.base.base import get_default
def grad_as_vector(grad):
grad = grad.transpose((0, 1, 3, 2))
sh = grad.shape
return grad.reshape((sh[0], sh[1], sh[2] * sh[3], 1))
class AdjDivGradTerm(Term):
r"""
Gateaux differential of :math:`... | get_default(term_mode, 1) | sfepy.base.base.get_default |
import numpy as nm
from sfepy.terms.terms import Term, terms
from sfepy.base.base import get_default
def grad_as_vector(grad):
grad = grad.transpose((0, 1, 3, 2))
sh = grad.shape
return grad.reshape((sh[0], sh[1], sh[2] * sh[3], 1))
class AdjDivGradTerm(Term):
r"""
Gateaux differential of :math:`... | get_default(term_mode, 1) | sfepy.base.base.get_default |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | Mesh.from_file(pb.conf.filename_mesh) | sfepy.discrete.fem.Mesh.from_file |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | FEDomain('domain', mesh) | sfepy.discrete.fem.FEDomain |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | FieldVariable('g', 'unknown', field) | sfepy.discrete.FieldVariable |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | FieldVariable('f', 'test', field, primary_var_name='g') | sfepy.discrete.FieldVariable |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | Integral('i', order=2) | sfepy.discrete.Integral |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | Material('m', function=set_grad) | sfepy.discrete.Material |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | Term.new('dw_volume_dot(f, g)', integral, omega, f=f, g=g) | sfepy.terms.Term.new |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | Equation('balance', t1 - t2) | sfepy.discrete.Equation |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | Equations([eq]) | sfepy.discrete.Equations |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | ScipyDirect({}) | sfepy.solvers.ls.ScipyDirect |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | IndexedStruct() | sfepy.base.base.IndexedStruct |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | Newton({'eps_a': 1e-15}, lin_solver=ls, status=nls_status) | sfepy.solvers.nls.Newton |
# This example implements homogenization of piezoeletric porous media.
# The mathematical model and numerical results are described in:
#
# <NAME>., <NAME>.
# Homogenization of the fluid-saturated piezoelectric porous media.
# International Journal of Solids and Structures
# Volume 147, 15 August 2018, Pages 110-125
#... | Problem('elasticity', equations=eqs) | sfepy.discrete.Problem |
import os
import numpy as nm
from sfepy.base.testing import TestCommon
from sfepy import data_dir
# n_cell, n_face, n_edge, n_vertex
# d1 -> d2 : num, n_incident
expected = {
'2_3_2.mesh' : ([4, 5, 2, 0], {
(0, 0) : (4, 10),
(0, 1) : (4, 10),
(0, 2) : (4, 6),
(1, 0) : (5, 10),
... | create_geometry_elements() | sfepy.discrete.fem.geometry_element.create_geometry_elements |
import os
import numpy as nm
from sfepy.base.testing import TestCommon
from sfepy import data_dir
# n_cell, n_face, n_edge, n_vertex
# d1 -> d2 : num, n_incident
expected = {
'2_3_2.mesh' : ([4, 5, 2, 0], {
(0, 0) : (4, 10),
(0, 1) : (4, 10),
(0, 2) : (4, 6),
(1, 0) : (5, 10),
... | Mesh.from_file(filename) | sfepy.discrete.fem.Mesh.from_file |
import os
import numpy as nm
from sfepy.base.testing import TestCommon
from sfepy import data_dir
# n_cell, n_face, n_edge, n_vertex
# d1 -> d2 : num, n_incident
expected = {
'2_3_2.mesh' : ([4, 5, 2, 0], {
(0, 0) : (4, 10),
(0, 1) : (4, 10),
(0, 2) : (4, 6),
(1, 0) : (5, 10),
... | CMesh.from_mesh(mesh) | sfepy.discrete.fem.extmods.cmesh.CMesh.from_mesh |
import os
import numpy as nm
from sfepy.base.testing import TestCommon
from sfepy import data_dir
# n_cell, n_face, n_edge, n_vertex
# d1 -> d2 : num, n_incident
expected = {
'2_3_2.mesh' : ([4, 5, 2, 0], {
(0, 0) : (4, 10),
(0, 1) : (4, 10),
(0, 2) : (4, 6),
(1, 0) : (5, 10),
... | get_cmem_usage() | sfepy.discrete.fem.extmods.cmesh.get_cmem_usage |
import os
import numpy as nm
from sfepy.base.testing import TestCommon
from sfepy import data_dir
# n_cell, n_face, n_edge, n_vertex
# d1 -> d2 : num, n_incident
expected = {
'2_3_2.mesh' : ([4, 5, 2, 0], {
(0, 0) : (4, 10),
(0, 1) : (4, 10),
(0, 2) : (4, 6),
(1, 0) : (5, 10),
... | get_cmem_usage() | sfepy.discrete.fem.extmods.cmesh.get_cmem_usage |
import os
import numpy as nm
from sfepy.base.testing import TestCommon
from sfepy import data_dir
# n_cell, n_face, n_edge, n_vertex
# d1 -> d2 : num, n_incident
expected = {
'2_3_2.mesh' : ([4, 5, 2, 0], {
(0, 0) : (4, 10),
(0, 1) : (4, 10),
(0, 2) : (4, 6),
(1, 0) : (5, 10),
... | get_cmem_usage() | sfepy.discrete.fem.extmods.cmesh.get_cmem_usage |
import numpy as nm
from sfepy.base.base import assert_
from sfepy.linalg import dot_sequences
from sfepy.terms.terms import Term, terms
class ZeroTerm(Term):
r"""
A do-nothing term useful for introducing additional variables into the
equations.
:Definition:
.. math::
0
:Arguments:
... | assert_(virtual.n_components == 1) | sfepy.base.base.assert_ |
import numpy as nm
from sfepy.base.base import assert_
from sfepy.linalg import dot_sequences
from sfepy.terms.terms import Term, terms
class ZeroTerm(Term):
r"""
A do-nothing term useful for introducing additional variables into the
equations.
:Definition:
.. math::
0
:Arguments:
... | dot_sequences(val_qp, normal) | sfepy.linalg.dot_sequences |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Mesh.from_file(data_dir + '/meshes/2d/square_unit_tri.mesh') | sfepy.discrete.fem.Mesh.from_file |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | FEDomain('domain', mesh) | sfepy.discrete.fem.FEDomain |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Field.from_args('fu', nm.float64, 'vector', omega, approx_order=2) | sfepy.discrete.fem.Field.from_args |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | FieldVariable('u', 'unknown', fu) | sfepy.discrete.FieldVariable |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Field.from_args('fp', nm.float64, 'scalar', omega, approx_order=2) | sfepy.discrete.fem.Field.from_args |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | FieldVariable('p', 'unknown', fp) | sfepy.discrete.FieldVariable |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Function('match_y_line', match_y_line) | sfepy.discrete.Function |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Functions([match_y_line]) | sfepy.discrete.Functions |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Conditions([pbc]) | sfepy.discrete.conditions.Conditions |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | match_y_line(coors0, coors1) | sfepy.discrete.fem.periodic.match_y_line |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | expand_nodes_to_equations(nods0[i0], bc.dofs[0], var.dofs) | sfepy.discrete.common.dof_info.expand_nodes_to_equations |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | expand_nodes_to_equations(nods1[i1], bc.dofs[1], var.dofs) | sfepy.discrete.common.dof_info.expand_nodes_to_equations |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Integral('i', order=1) | sfepy.discrete.Integral |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | FieldVariable('v', 'test', u.field, primary_var_name='u') | sfepy.discrete.FieldVariable |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | FieldVariable('q', 'test', p.field, primary_var_name='p') | sfepy.discrete.FieldVariable |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Term.new('dw_laplace(q, p)', integral, omega, q=q, p=p) | sfepy.terms.Term.new |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Equation('aux', t1 + t2) | sfepy.discrete.Equation |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Equations([eq]) | sfepy.discrete.Equations |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Problem('test', equations=eqs, auto_solvers=False) | sfepy.discrete.Problem |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Conditions(all_ebcs) | sfepy.discrete.conditions.Conditions |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | expand_nodes_to_equations(nods, cond.dofs[0], var.dofs) | sfepy.discrete.common.dof_info.expand_nodes_to_equations |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.