prompt stringlengths 174 59.5k | completion stringlengths 7 228 | api stringlengths 12 64 |
|---|---|---|
r"""
Thermo-elasticity with a computed temperature demonstrating equation sequence
solver.
Uses `dw_biot` term with an isotropic coefficient for thermo-elastic coupling.
The equation sequence solver (``'ess'`` in ``solvers``) automatically solves
first the temperature distribution and then the elasticity problem with... | stiffness_from_lame(3, lam=lam, mu=mu) | sfepy.mechanics.matcoefs.stiffness_from_lame |
from copy import copy
from sfepy.base.base import output, get_default, Struct
from sfepy.applications import PDESolverApp, Application
from coefs_base import MiniAppBase
def insert_sub_reqs(reqs, levels, req_info):
"""Recursively build all requirements in correct order."""
all_reqs = []
for _, req in enum... | PDESolverApp.setup_options(self) | sfepy.applications.PDESolverApp.setup_options |
from copy import copy
from sfepy.base.base import output, get_default, Struct
from sfepy.applications import PDESolverApp, Application
from coefs_base import MiniAppBase
def insert_sub_reqs(reqs, levels, req_info):
"""Recursively build all requirements in correct order."""
all_reqs = []
for _, req in enum... | get_default(app_options, self.conf.options) | sfepy.base.base.get_default |
from copy import copy
from sfepy.base.base import output, get_default, Struct
from sfepy.applications import PDESolverApp, Application
from coefs_base import MiniAppBase
def insert_sub_reqs(reqs, levels, req_info):
"""Recursively build all requirements in correct order."""
all_reqs = []
for _, req in enum... | Struct() | sfepy.base.base.Struct |
from copy import copy
from sfepy.base.base import output, get_default, Struct
from sfepy.applications import PDESolverApp, Application
from coefs_base import MiniAppBase
def insert_sub_reqs(reqs, levels, req_info):
"""Recursively build all requirements in correct order."""
all_reqs = []
for _, req in enum... | output('computing dependency %s...' % req) | sfepy.base.base.output |
from copy import copy
from sfepy.base.base import output, get_default, Struct
from sfepy.applications import PDESolverApp, Application
from coefs_base import MiniAppBase
def insert_sub_reqs(reqs, levels, req_info):
"""Recursively build all requirements in correct order."""
all_reqs = []
for _, req in enum... | output('...done') | sfepy.base.base.output |
from copy import copy
from sfepy.base.base import output, get_default, Struct
from sfepy.applications import PDESolverApp, Application
from coefs_base import MiniAppBase
def insert_sub_reqs(reqs, levels, req_info):
"""Recursively build all requirements in correct order."""
all_reqs = []
for _, req in enum... | output('computing %s...' % coef_name) | sfepy.base.base.output |
from copy import copy
from sfepy.base.base import output, get_default, Struct
from sfepy.applications import PDESolverApp, Application
from coefs_base import MiniAppBase
def insert_sub_reqs(reqs, levels, req_info):
"""Recursively build all requirements in correct order."""
all_reqs = []
for _, req in enum... | output('...done') | sfepy.base.base.output |
# 26.02.2007, c
# last revision: 25.02.2008
from sfepy import data_dir
filename_mesh = data_dir + '/meshes/3d/elbow2.mesh'
options = {
'nls' : 'newton',
'ls' : 'ls',
'post_process_hook' : 'verify_incompressibility',
}
field_1 = {
'name' : '3_velocity',
'dtype' : 'real',
'shape' : (3,),
'r... | output('div( u ) = %.3e' % zero) | sfepy.base.base.output |
from __future__ import absolute_import
import numpy as nm
import sfepy.linalg as la
from sfepy.discrete.integrals import Integral
from sfepy.discrete import PolySpace
from six.moves import range
def prepare_remap(indices, n_full):
"""
Prepare vector for remapping range `[0, n_full]` to its subset given
by... | Integral('aux', coors=qp_coors, weights=qp_weights) | sfepy.discrete.integrals.Integral |
from __future__ import absolute_import
import numpy as nm
import sfepy.linalg as la
from sfepy.discrete.integrals import Integral
from sfepy.discrete import PolySpace
from six.moves import range
def prepare_remap(indices, n_full):
"""
Prepare vector for remapping range `[0, n_full]` to its subset given
by... | la.normalize_vectors(edge_dirs, eps=1e-12) | sfepy.linalg.normalize_vectors |
from __future__ import absolute_import
import numpy as nm
import sfepy.linalg as la
from sfepy.discrete.integrals import Integral
from sfepy.discrete import PolySpace
from six.moves import range
def prepare_remap(indices, n_full):
"""
Prepare vector for remapping range `[0, n_full]` to its subset given
by... | la.norm_l2_along_axis(normals) | sfepy.linalg.norm_l2_along_axis |
from __future__ import absolute_import
import numpy as nm
import sfepy.linalg as la
from sfepy.discrete.integrals import Integral
from sfepy.discrete import PolySpace
from six.moves import range
def prepare_remap(indices, n_full):
"""
Prepare vector for remapping range `[0, n_full]` to its subset given
by... | la.normalize_vectors(edirs, eps=1e-12) | sfepy.linalg.normalize_vectors |
from __future__ import absolute_import
import numpy as nm
import sfepy.linalg as la
from sfepy.discrete.integrals import Integral
from sfepy.discrete import PolySpace
from six.moves import range
def prepare_remap(indices, n_full):
"""
Prepare vector for remapping range `[0, n_full]` to its subset given
by... | Mesh.from_file(filename) | sfepy.discrete.fem.Mesh.from_file |
from __future__ import absolute_import
import numpy as nm
import sfepy.linalg as la
from sfepy.discrete.integrals import Integral
from sfepy.discrete import PolySpace
from six.moves import range
def prepare_remap(indices, n_full):
"""
Prepare vector for remapping range `[0, n_full]` to its subset given
by... | FEDomain(mesh.name, mesh) | sfepy.discrete.fem.FEDomain |
from __future__ import absolute_import
import numpy as nm
import sfepy.linalg as la
from sfepy.discrete.integrals import Integral
from sfepy.discrete import PolySpace
from six.moves import range
def prepare_remap(indices, n_full):
"""
Prepare vector for remapping range `[0, n_full]` to its subset given
by... | output('refine %d...' % ii) | sfepy.base.base.output |
import numpy as np
import itertools
import os
import scipy.linalg
from sfepy.discrete import fem
from .algo_core import generalized_courant_fischer, spring_energy_matrix_accelerate_3D
import util.geometry_util as geo_util
import util.meshgen as meshgen
from util.timer import SimpleTimer
from visualization.model_visua... | fem.Mesh.from_file(mesh_filename) | sfepy.discrete.fem.Mesh.from_file |
import numpy as np
import itertools
import os
import scipy.linalg
from sfepy.discrete import fem
from .algo_core import generalized_courant_fischer, spring_energy_matrix_accelerate_3D
import util.geometry_util as geo_util
import util.meshgen as meshgen
from util.timer import SimpleTimer
from visualization.model_visua... | fem.Mesh.from_file(mesh_filename) | sfepy.discrete.fem.Mesh.from_file |
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
import sfepy.mechanics.tensors as tn
ok = True
a_full ... | tn.get_trace(a_full, sym_storage=False) | sfepy.mechanics.tensors.get_trace |
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
import sfepy.mechanics.tensors as tn
ok = True
a_full ... | tn.get_trace(a_sym, sym_storage=True) | sfepy.mechanics.tensors.get_trace |
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
import sfepy.mechanics.tensors as tn
ok = True
a_full ... | tn.get_volumetric_tensor(a_full, sym_storage=False) | sfepy.mechanics.tensors.get_volumetric_tensor |
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
import sfepy.mechanics.tensors as tn
ok = True
a_full ... | tn.get_volumetric_tensor(a_sym, sym_storage=True) | sfepy.mechanics.tensors.get_volumetric_tensor |
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
import sfepy.mechanics.tensors as tn
ok = True
a_full ... | tn.get_deviator(a_full, sym_storage=False) | sfepy.mechanics.tensors.get_deviator |
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
import sfepy.mechanics.tensors as tn
ok = True
a_full ... | tn.get_deviator(a_sym, sym_storage=True) | sfepy.mechanics.tensors.get_deviator |
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
import sfepy.mechanics.tensors as tn
ok = True
a_full ... | tn.get_von_mises_stress(a_full, sym_storage=False) | sfepy.mechanics.tensors.get_von_mises_stress |
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
import sfepy.mechanics.tensors as tn
ok = True
a_full ... | tn.get_von_mises_stress(a_sym, sym_storage=True) | sfepy.mechanics.tensors.get_von_mises_stress |
# AtrialFibrePlugin
# Copyright (C) 2018 <NAME>, King's College London, all rights reserved, see LICENSE file
'''
Atrial fibre generation plugin.
'''
import os
import stat
import ast
import shutil
import datetime
import zipfile
import warnings
from itertools import starmap
from collections import defaultdict
try:
... | ProblemConf.from_file(probfile) | sfepy.base.conf.ProblemConf.from_file |
# AtrialFibrePlugin
# Copyright (C) 2018 <NAME>, King's College London, all rights reserved, see LICENSE file
'''
Atrial fibre generation plugin.
'''
import os
import stat
import ast
import shutil
import datetime
import zipfile
import warnings
from itertools import starmap
from collections import defaultdict
try:
... | output.set_output(logfile,True,True) | sfepy.base.base.output.set_output |
# AtrialFibrePlugin
# Copyright (C) 2018 <NAME>, King's College London, all rights reserved, see LICENSE file
'''
Atrial fibre generation plugin.
'''
import os
import stat
import ast
import shutil
import datetime
import zipfile
import warnings
from itertools import starmap
from collections import defaultdict
try:
... | solve_pde(p) | sfepy.applications.solve_pde |
# mixed formulation
# 07.08.2009
#!
#! Homogenization: Linear Elasticity
#! =================================
#$ \centerline{Example input file, \today}
#! Homogenization of heterogeneous linear elastic material - mixed formulation
import numpy as nm
import sfepy.discrete.fem.periodic as per
from sfepy.mechanics.mat... | stiffness_from_youngpoisson_mixed(dim, 7.0e9, 0.4) | sfepy.mechanics.matcoefs.stiffness_from_youngpoisson_mixed |
# mixed formulation
# 07.08.2009
#!
#! Homogenization: Linear Elasticity
#! =================================
#$ \centerline{Example input file, \today}
#! Homogenization of heterogeneous linear elastic material - mixed formulation
import numpy as nm
import sfepy.discrete.fem.periodic as per
from sfepy.mechanics.mat... | stiffness_from_youngpoisson_mixed(dim, 70.0e9, 0.2) | sfepy.mechanics.matcoefs.stiffness_from_youngpoisson_mixed |
# mixed formulation
# 07.08.2009
#!
#! Homogenization: Linear Elasticity
#! =================================
#$ \centerline{Example input file, \today}
#! Homogenization of heterogeneous linear elastic material - mixed formulation
import numpy as nm
import sfepy.discrete.fem.periodic as per
from sfepy.mechanics.mat... | bulk_from_youngpoisson(7.0e9, 0.4) | sfepy.mechanics.matcoefs.bulk_from_youngpoisson |
# 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(filename_mesh) | sfepy.discrete.fem.mesh.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
#... | define_box_regions(mesh.dim, bbox[0], bbox[1], eps=1e-3) | sfepy.homogenization.utils.define_box_regions |
# 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
#... | coor_to_sym(ii, jj, dim) | sfepy.homogenization.utils.coor_to_sym |
# 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
#... | coor_to_sym(ii, jj, dim) | sfepy.homogenization.utils.coor_to_sym |
# 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
#... | stiffness_from_youngpoisson(3, 200e9, 0.25) | sfepy.mechanics.matcoefs.stiffness_from_youngpoisson |
# Vibroacoustics
#
# E.Rohan, V.Lukeš
# Homogenization of the vibro–acoustic transmission on periodically
# perforated elastic plates with arrays of resonators.
# https://arxiv.org/abs/2104.01367 (arXiv:2104.01367v1)
import os
import numpy as nm
from sfepy.base.base import Struct
from sfepy.homogenization.coefficients... | Mesh.from_file(fname) | sfepy.discrete.fem.Mesh.from_file |
# Vibroacoustics
#
# E.Rohan, V.Lukeš
# Homogenization of the vibro–acoustic transmission on periodically
# perforated elastic plates with arrays of resonators.
# https://arxiv.org/abs/2104.01367 (arXiv:2104.01367v1)
import os
import numpy as nm
from sfepy.base.base import Struct
from sfepy.homogenization.coefficients... | FEDomain('domain', mesh3d) | sfepy.discrete.fem.FEDomain |
# Vibroacoustics
#
# E.Rohan, V.Lukeš
# Homogenization of the vibro–acoustic transmission on periodically
# perforated elastic plates with arrays of resonators.
# https://arxiv.org/abs/2104.01367 (arXiv:2104.01367v1)
import os
import numpy as nm
from sfepy.base.base import Struct
from sfepy.homogenization.coefficients... | Coefficients.from_file_hdf5(cfname) | sfepy.homogenization.coefficients.Coefficients.from_file_hdf5 |
import numpy as nm
from sfepy.base.base import OneTypeList, Container, Struct
class Functions(Container):
"""Container to hold all user-defined functions."""
def from_conf(conf):
objs = | OneTypeList(Function) | sfepy.base.base.OneTypeList |
r"""
Poisson equation.
This example demonstrates parametric study capabilities of Application
classes. In particular (written in the strong form):
.. math::
c \Delta t = f \mbox{ in } \Omega,
t = 2 \mbox{ on } \Gamma_1 \;,
t = -2 \mbox{ on } \Gamma_2 \;,
f = 1 \mbox{ in } \Omega_1 \;,
f = 0 \mbox... | Problem.from_conf(conf) | sfepy.discrete.Problem.from_conf |
r"""
Laplace equation with Dirichlet boundary conditions given by a sine function
and constants.
Find :math:`t` such that:
.. math::
\int_{\Omega} c \nabla s \cdot \nabla t
= 0
\;, \quad \forall s \;.
The :class:`sfepy.discrete.fem.meshio.UserMeshIO` class is used to refine the
original two-element mesh ... | UserMeshIO(mesh_hook) | sfepy.discrete.fem.meshio.UserMeshIO |
r"""
Laplace equation with Dirichlet boundary conditions given by a sine function
and constants.
Find :math:`t` such that:
.. math::
\int_{\Omega} c \nabla s \cdot \nabla t
= 0
\;, \quad \forall s \;.
The :class:`sfepy.discrete.fem.meshio.UserMeshIO` class is used to refine the
original two-element mesh ... | MeshIO.any_from_filename(base_mesh) | sfepy.discrete.fem.meshio.MeshIO.any_from_filename |
r"""
Laplace equation with Dirichlet boundary conditions given by a sine function
and constants.
Find :math:`t` such that:
.. math::
\int_{\Omega} c \nabla s \cdot \nabla t
= 0
\;, \quad \forall s \;.
The :class:`sfepy.discrete.fem.meshio.UserMeshIO` class is used to refine the
original two-element mesh ... | Mesh.from_file(base_mesh) | sfepy.discrete.fem.Mesh.from_file |
r"""
Laplace equation with Dirichlet boundary conditions given by a sine function
and constants.
Find :math:`t` such that:
.. math::
\int_{\Omega} c \nabla s \cdot \nabla t
= 0
\;, \quad \forall s \;.
The :class:`sfepy.discrete.fem.meshio.UserMeshIO` class is used to refine the
original two-element mesh ... | FEDomain(mesh.name, mesh) | sfepy.discrete.fem.FEDomain |
r"""
Laplace equation with Dirichlet boundary conditions given by a sine function
and constants.
Find :math:`t` such that:
.. math::
\int_{\Omega} c \nabla s \cdot \nabla t
= 0
\;, \quad \forall s \;.
The :class:`sfepy.discrete.fem.meshio.UserMeshIO` class is used to refine the
original two-element mesh ... | output('refine %d...' % ii) | sfepy.base.base.output |
"""
Elapsed time measurement utilities.
"""
import time
from sfepy.base.base import Struct
class Timer(Struct):
def __init__(self, name='timer', start=False):
| Struct.__init__(self, name=name) | sfepy.base.base.Struct.__init__ |
"""
Functions to visualize the CMesh geometry and topology.
"""
from sfepy.postprocess.plot_dofs import _get_axes, _to2d
def plot_wireframe(ax, cmesh, color='k'):
"""
Plot a finite element mesh as a wireframe using edges connectivity.
"""
coors = cmesh.coors
coors = | _to2d(coors) | sfepy.postprocess.plot_dofs._to2d |
"""
Functions to visualize the CMesh geometry and topology.
"""
from sfepy.postprocess.plot_dofs import _get_axes, _to2d
def plot_wireframe(ax, cmesh, color='k'):
"""
Plot a finite element mesh as a wireframe using edges connectivity.
"""
coors = cmesh.coors
coors = _to2d(coors)
dim = cmesh.dim... | _get_axes(ax, dim) | sfepy.postprocess.plot_dofs._get_axes |
"""
Functions to visualize the CMesh geometry and topology.
"""
from sfepy.postprocess.plot_dofs import _get_axes, _to2d
def plot_wireframe(ax, cmesh, color='k'):
"""
Plot a finite element mesh as a wireframe using edges connectivity.
"""
coors = cmesh.coors
coors = _to2d(coors)
dim = cmesh.dim... | _to2d(coors) | sfepy.postprocess.plot_dofs._to2d |
"""
Functions to visualize the CMesh geometry and topology.
"""
from sfepy.postprocess.plot_dofs import _get_axes, _to2d
def plot_wireframe(ax, cmesh, color='k'):
"""
Plot a finite element mesh as a wireframe using edges connectivity.
"""
coors = cmesh.coors
coors = _to2d(coors)
dim = cmesh.dim... | _get_axes(ax, dim) | sfepy.postprocess.plot_dofs._get_axes |
"""
Functions to visualize the CMesh geometry and topology.
"""
from sfepy.postprocess.plot_dofs import _get_axes, _to2d
def plot_wireframe(ax, cmesh, color='k'):
"""
Plot a finite element mesh as a wireframe using edges connectivity.
"""
coors = cmesh.coors
coors = _to2d(coors)
dim = cmesh.dim... | _to2d(coors) | sfepy.postprocess.plot_dofs._to2d |
"""
Functions to visualize the CMesh geometry and topology.
"""
from sfepy.postprocess.plot_dofs import _get_axes, _to2d
def plot_wireframe(ax, cmesh, color='k'):
"""
Plot a finite element mesh as a wireframe using edges connectivity.
"""
coors = cmesh.coors
coors = _to2d(coors)
dim = cmesh.dim... | _get_axes(ax, dim) | sfepy.postprocess.plot_dofs._get_axes |
"""
Functions to visualize the CMesh geometry and topology.
"""
from sfepy.postprocess.plot_dofs import _get_axes, _to2d
def plot_wireframe(ax, cmesh, color='k'):
"""
Plot a finite element mesh as a wireframe using edges connectivity.
"""
coors = cmesh.coors
coors = _to2d(coors)
dim = cmesh.dim... | _to2d(coors) | sfepy.postprocess.plot_dofs._to2d |
"""
Functions to visualize the CMesh geometry and topology.
"""
from sfepy.postprocess.plot_dofs import _get_axes, _to2d
def plot_wireframe(ax, cmesh, color='k'):
"""
Plot a finite element mesh as a wireframe using edges connectivity.
"""
coors = cmesh.coors
coors = _to2d(coors)
dim = cmesh.dim... | _get_axes(ax, dim) | sfepy.postprocess.plot_dofs._get_axes |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | Mesh.from_file(data_dir + '/meshes/3d/cube_medium_hexa.mesh') | sfepy.discrete.fem.Mesh.from_file |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | FEDomain('domain', mesh) | sfepy.discrete.fem.FEDomain |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | FieldVariable('u', 'unknown', field) | sfepy.discrete.FieldVariable |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | FieldVariable('v', 'test', field, primary_var_name='u') | sfepy.discrete.FieldVariable |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | Material('cs',f=[1e5, 1e-2],c=[0.0, 0.0, 1.2],r=0.8) | sfepy.discrete.Material |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | Integral('i', order=3) | sfepy.discrete.Integral |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | Integral('i', order=2) | sfepy.discrete.Integral |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | Term.new('dw_contact_sphere(cs.f, cs.c, cs.r, v, u)', integral1, Top, cs=cs, v=v, u=u) | sfepy.terms.Term.new |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | Equation('balance', t1 + t2) | sfepy.discrete.Equation |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | Equations([eq]) | sfepy.discrete.Equations |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | ScipyDirect({}) | sfepy.solvers.ls.ScipyDirect |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | IndexedStruct() | sfepy.base.base.IndexedStruct |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | Newton({}, lin_solver=ls, status=nls_status) | sfepy.solvers.nls.Newton |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | Problem('elasticity', equations=eqs) | sfepy.discrete.Problem |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | IndexedStruct() | sfepy.base.base.IndexedStruct |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | Viewer('linear_elasticity.vtk') | sfepy.postprocess.viewer.Viewer |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | stiffness_from_lame(dim=3, lam=5.769, mu=3.846) | sfepy.mechanics.matcoefs.stiffness_from_lame |
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct
from sfepy.discrete import (FieldVariable, Material, Integral, Function,
Equation, E... | Conditions([fix_u]) | sfepy.discrete.conditions.Conditions |
"""
Classes holding information on global DOFs and mapping of all DOFs -
equations (active DOFs).
Helper functions for the equation mapping.
"""
import numpy as nm
import scipy.sparse as sp
from sfepy.base.base import assert_, Struct, basestr
from sfepy.discrete.functions import Function
from sfepy.discrete.condition... | Struct.__init__(self, name=name) | sfepy.base.base.Struct.__init__ |
"""
Classes holding information on global DOFs and mapping of all DOFs -
equations (active DOFs).
Helper functions for the equation mapping.
"""
import numpy as nm
import scipy.sparse as sp
from sfepy.base.base import assert_, Struct, basestr
from sfepy.discrete.functions import Function
from sfepy.discrete.condition... | Struct.__init__(self, name=name, dof_names=dof_names, var_di=var_di) | sfepy.base.base.Struct.__init__ |
"""
Classes holding information on global DOFs and mapping of all DOFs -
equations (active DOFs).
Helper functions for the equation mapping.
"""
import numpy as nm
import scipy.sparse as sp
from sfepy.base.base import assert_, Struct, basestr
from sfepy.discrete.functions import Function
from sfepy.discrete.condition... | get_condition_value(val, functions, 'EBC', bc.name) | sfepy.discrete.conditions.get_condition_value |
"""
Classes holding information on global DOFs and mapping of all DOFs -
equations (active DOFs).
Helper functions for the equation mapping.
"""
import numpy as nm
import scipy.sparse as sp
from sfepy.base.base import assert_, Struct, basestr
from sfepy.discrete.functions import Function
from sfepy.discrete.condition... | get_condition_value(val, functions, 'EBC', bc.name) | sfepy.discrete.conditions.get_condition_value |
"""
Classes holding information on global DOFs and mapping of all DOFs -
equations (active DOFs).
Helper functions for the equation mapping.
"""
import numpy as nm
import scipy.sparse as sp
from sfepy.base.base import assert_, Struct, basestr
from sfepy.discrete.functions import Function
from sfepy.discrete.condition... | get_condition_value(bc.match, functions, 'EPBC', bc.name) | sfepy.discrete.conditions.get_condition_value |
"""
Reference-physical domain mappings.
"""
import numpy as nm
from sfepy.base.base import Struct
class PhysicalQPs(Struct):
"""
Physical quadrature points in a region.
"""
def __init__(self, igs, n_total=0, is_uniform=True):
Struct.__init__(self, igs=igs, n_total=n_total, indx={}, rindx={},
... | mm.VolumeMapping(coors, conn[cells], gel=gel) | sfepy.discrete.iga.mappings.VolumeMapping |
"""
Reference-physical domain mappings.
"""
import numpy as nm
from sfepy.base.base import Struct
class PhysicalQPs(Struct):
"""
Physical quadrature points in a region.
"""
def __init__(self, igs, n_total=0, is_uniform=True):
Struct.__init__(self, igs=igs, n_total=n_total, indx={}, rindx={},
... | mm.IGMapping(region.domain, region.cells) | sfepy.discrete.iga.mappings.IGMapping |
# This example implements 2nd-level homogenization of Biot-Darcy-Brinkman model of flow in deformable
# double porous media.
# The mathematical model is described in:
#
#<NAME>., <NAME>., <NAME>.
#The Biot-Darcy-Brinkman model of flow in deformable double porous media; homogenization and numerical modelling.
# Co... | Mesh.from_file(filename_mesh) | sfepy.discrete.fem.mesh.Mesh.from_file |
# This example implements 2nd-level homogenization of Biot-Darcy-Brinkman model of flow in deformable
# double porous media.
# The mathematical model is described in:
#
#<NAME>., <NAME>., <NAME>.
#The Biot-Darcy-Brinkman model of flow in deformable double porous media; homogenization and numerical modelling.
# Co... | define_box_regions(mesh.dim, bbox[0], bbox[1], eps=1e-3) | sfepy.homogenization.utils.define_box_regions |
# This example implements 2nd-level homogenization of Biot-Darcy-Brinkman model of flow in deformable
# double porous media.
# The mathematical model is described in:
#
#<NAME>., <NAME>., <NAME>.
#The Biot-Darcy-Brinkman model of flow in deformable double porous media; homogenization and numerical modelling.
# Co... | dim2sym(dim) | sfepy.mechanics.tensors.dim2sym |
import os
import numpy as nm
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
test = Test(conf=conf, options=options)
test.join = lambda x: os.path.join(test.options.out_dir, x)
return test
def test_linearization(self):... | Mesh.from_file(name) | sfepy.discrete.fem.Mesh.from_file |
import os
import numpy as nm
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
test = Test(conf=conf, options=options)
test.join = lambda x: os.path.join(test.options.out_dir, x)
return test
def test_linearization(self):... | FEDomain('', mesh) | sfepy.discrete.fem.FEDomain |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Domain('d1', m1) | sfepy.fem.Domain |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Field('f', nm.float64, f[0], d1.regions[f[1]], approx_order=f[2]) | sfepy.fem.Field |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Domain('d2', m2) | sfepy.fem.Domain |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Field('f', nm.float64, f[0], d2.regions[f[1]], approx_order=f[2]) | sfepy.fem.Field |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | transform_variables(variables) | sfepy.base.conf.transform_variables |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | transform_variables(variables) | sfepy.base.conf.transform_variables |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Mesh('source mesh', data_dir + '/meshes/3d/block.mesh') | sfepy.fem.Mesh |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Mesh('target mesh', data_dir + '/meshes/3d/cube_medium_tetra.mesh') | sfepy.fem.Mesh |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Domain('d1', m1) | sfepy.fem.Domain |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Field('scalar_tp', nm.float64, (1,1), omega1, approx_order=1) | sfepy.fem.Field |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Domain('d2', m2) | sfepy.fem.Domain |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Field('scalar_si', nm.float64, (1,1), omega2, approx_order=0) | sfepy.fem.Field |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Mesh('original mesh', data_dir + '/meshes/3d/block.mesh') | sfepy.fem.Mesh |
import os.path as op
from sfepy.base.base import *
from sfepy.base.conf import transform_variables, transform_fields
from sfepy.base.testing import TestCommon
variables = {
'u' : ('unknown field', 'f', 0),
'v' : ('test field', 'f', 'u'),
}
def in_dir(adir):
return lambda x: op.join(adir, x... | Mesh('original mesh', data_dir + '/meshes/3d/cylinder.mesh') | sfepy.fem.Mesh |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.