code
stringlengths
768
64.5k
apis
list
extract_api
stringlengths
180
29k
import numpy as nm from sfepy.linalg import dot_sequences from sfepy.terms.terms import Term, terms class DivGradTerm(Term): r""" Diffusion term. :Definition: .. math:: \int_{\Omega} \nu\ \nabla \ul{v} : \nabla \ul{u} \mbox{ , } \int_{\Omega} \nu\ \nabla \ul{u} : \nabla \ul{w} \\ ...
[ "sfepy.linalg.dot_sequences" ]
[((11757, 11785), 'numpy.ascontiguousarray', 'nm.ascontiguousarray', (['div_bf'], {}), '(div_bf)\n', (11777, 11785), True, 'import numpy as nm\n'), ((1821, 1863), 'numpy.ones', 'nm.ones', (['(1, n_qp, 1, 1)'], {'dtype': 'nm.float64'}), '((1, n_qp, 1, 1), dtype=nm.float64)\n', (1828, 1863), True, 'import numpy as nm\n')...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 28 09:33:53 2020 @author: dhulls """ 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, St...
[ "sfepy.discrete.Equations", "sfepy.discrete.conditions.EssentialBC", "sfepy.solvers.ls.ScipyDirect", "sfepy.discrete.Equation", "sfepy.solvers.nls.Newton", "sfepy.discrete.conditions.Conditions", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.Integral", "sfepy.discrete.fem.Field.from_args", ...
[((253, 273), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (268, 273), False, 'import sys\n'), ((912, 928), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (926, 928), False, 'from argparse import ArgumentParser\n'), ((1183, 1237), 'sfepy.discrete.fem.Mesh.from_file', 'Mesh.from_fi...
r""" Piezo-elasticity problem - linear elastic material with piezoelectric effects. Find :math:`\ul{u}`, :math:`\phi` such that: .. math:: - \omega^2 \int_{Y} \rho\ \ul{v} \cdot \ul{u} + \int_{Y} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u}) - \int_{Y_2} g_{kij}\ e_{ij}(\ul{v}) \nabla_k \phi = 0 \;, \qu...
[ "sfepy.discrete.fem.MeshIO.any_from_filename" ]
[((1055, 1080), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (1070, 1080), False, 'import os\n'), ((1086, 1146), 'sfepy.discrete.fem.MeshIO.any_from_filename', 'MeshIO.any_from_filename', (['filename_mesh'], {'prefix_dir': 'conf_dir'}), '(filename_mesh, prefix_dir=conf_dir)\n', (1110, 1146)...
#!/usr/bin/env python """ Convert a mesh file from one SfePy-supported format to another. Examples:: $ ./script/convert_mesh.py meshes/3d/cylinder.mesh new.vtk $ ./script/convert_mesh.py meshes/3d/cylinder.mesh new.vtk -s2.5 $ ./script/convert_mesh.py meshes/3d/cylinder.mesh new.vtk -s0.5,2,1 $ ./script/conve...
[ "sfepy.base.base.nm.eye", "sfepy.base.base.nm.repeat", "sfepy.discrete.fem.meshio.output_mesh_formats", "sfepy.discrete.fem.Mesh.from_region", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.fem.FEDomain", "sfepy.base.base.output", "sfepy.discrete.fem.Mesh.from_data", "sfepy.base.base.nm.array"...
[((665, 685), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (680, 685), False, 'import sys\n'), ((3246, 3331), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '__doc__', 'formatter_class': 'RawDescriptionHelpFormatter'}), '(description=__doc__, formatter_class=RawDescriptionHelpF...
# This example implements macroscopic homogenized model 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. ...
[ "sfepy.homogenization.micmac.get_homog_coefs_linear", "sfepy.homogenization.utils.define_box_regions", "sfepy.discrete.fem.mesh.Mesh.from_file" ]
[((4957, 4986), 'sfepy.discrete.fem.mesh.Mesh.from_file', 'Mesh.from_file', (['filename_mesh'], {}), '(filename_mesh)\n', (4971, 4986), False, 'from sfepy.discrete.fem.mesh import Mesh\n'), ((5012, 5049), 'os.path.join', 'osp.join', (['data_dir', '"""perf_BDB_mes.py"""'], {}), "(data_dir, 'perf_BDB_mes.py')\n", (5020, ...
#!/usr/bin/env python """ Dispersion analysis of a heterogeneous finite scale periodic cell. The periodic cell mesh has to contain two subdomains Y1 (with the cell ids 1), Y2 (with the cell ids 2), so that different material properties can be defined in each of the subdomains (see ``--pars`` option). The command line ...
[ "sfepy.base.conf.dict_from_string", "sfepy.solvers.ts.TimeStepper", "sfepy.linalg.utils.output_array_stats", "sfepy.base.ioutils.remove_files_patterns", "sfepy.base.base.Struct.__init__", "sfepy.base.ioutils.ensure_path", "sfepy.discrete.fem.periodic.set_accuracy", "sfepy.mechanics.matcoefs.lame_from_...
[((4031, 4051), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (4046, 4051), False, 'import sys\n'), ((5102, 5210), 'sfepy.mechanics.units.apply_unit_multipliers', 'apply_unit_multipliers', (['pars', "['stress', 'one', 'density', 'stress', 'one', 'density']", 'unit_multipliers'], {}), "(pars, ['str...
from __future__ import absolute_import from copy import copy import numpy as nm from sfepy.base.testing import TestCommon from sfepy.base.base import ordered_iteritems from sfepy import data_dir filename_meshes = [data_dir + '/meshes/elements/%s_2.mesh' % geom for geom in ['1_2', '2_3', '2_4', '3_...
[ "sfepy.discrete.Variables", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.Integral", "sfepy.discrete.fem.Field.from_args", "sfepy.base.base.ordered_iteritems", "sfepy.terms.Term.new", "sfepy.solvers.ts.TimeStepper", "sfepy.discrete.FieldVariable", "sfepy.mechanics.tensors.dim2sym", "sfepy.d...
[((801, 813), 'sfepy.mechanics.tensors.dim2sym', 'dim2sym', (['dim'], {}), '(dim)\n', (808, 813), False, 'from sfepy.mechanics.tensors import dim2sym\n'), ((4849, 4869), 'sfepy.discrete.Materials', 'Materials', (['materials'], {}), '(materials)\n', (4858, 4869), False, 'from sfepy.discrete import FieldVariable, Materia...
""" Basic uniform mesh refinement functions. """ import numpy as nm from sfepy.discrete.fem import Mesh def refine_2_3(mesh_in): """ Refines mesh out of triangles by cutting cutting each edge in half and making 4 new finer triangles out of one coarser one. """ cmesh = mesh_in.cmesh # Unique e...
[ "sfepy.discrete.fem.Mesh.from_data", "sfepy.discrete.fem.FEDomain" ]
[((979, 1072), 'sfepy.discrete.fem.Mesh.from_data', 'Mesh.from_data', (["(mesh_in.name + '_r')", 'coors', 'None', '[new_conn]', '[new_mat_id]', 'mesh_in.descs'], {}), "(mesh_in.name + '_r', coors, None, [new_conn], [new_mat_id],\n mesh_in.descs)\n", (993, 1072), False, 'from sfepy.discrete.fem import Mesh\n'), ((217...
from __future__ import print_function from __future__ import absolute_import import numpy as nm import sys from six.moves import range sys.path.append('.') from sfepy.base.base import output, assert_ from sfepy.base.ioutils import ensure_path from sfepy.linalg import cycle from sfepy.discrete.fem.mesh import Mesh from...
[ "sfepy.linalg.cycle", "sfepy.discrete.fem.mesh.Mesh.from_data", "sfepy.base.ioutils.ensure_path", "sfepy.discrete.fem.mesh.Mesh.from_file", "sfepy.discrete.fem.periodic.match_grid_plane", "sfepy.base.base.output", "sfepy.base.base.assert_", "sfepy.mesh.mesh_tools.elems_q2t" ]
[((135, 155), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (150, 155), False, 'import sys\n'), ((756, 773), 'numpy.asarray', 'nm.asarray', (['shape'], {}), '(shape)\n', (766, 773), True, 'import numpy as nm\n'), ((799, 821), 'sfepy.base.base.assert_', 'assert_', (['(1 <= dim <= 3)'], {}), '(1 <= ...
# 30.05.2007, c # last revision: 25.02.2008 from __future__ import absolute_import from sfepy import data_dir import six filename_mesh = data_dir + '/meshes/2d/square_unit_tri.mesh' material_1 = { 'name' : 'coef', 'values' : { 'val' : 1.0, }, } material_2 = { 'name' : 'm', 'values' : { ...
[ "sfepy.applications.solve_pde", "sfepy.linalg.rotation_matrix2d", "sfepy.discrete.Material.from_conf", "sfepy.discrete.evaluate.BasicEvaluator" ]
[((2386, 2421), 'sfepy.applications.solve_pde', 'solve_pde', (['conf'], {'save_results': '(False)'}), '(conf, save_results=False)\n', (2395, 2421), False, 'from sfepy.applications import solve_pde\n'), ((2813, 2831), 'six.iteritems', 'six.iteritems', (['sol'], {}), '(sol)\n', (2826, 2831), False, 'import six\n'), ((404...
import numpy as nm from sfepy.mechanics.matcoefs import stiffness_from_youngpoisson from sfepy.discrete.fem.meshio import UserMeshIO from sfepy.mesh.mesh_generators import gen_block_mesh from sfepy import data_dir def mesh_hook(mesh, mode): if mode == 'read': mesh = gen_block_mesh([0.0098, 0.0011, 0.1], [...
[ "sfepy.discrete.fem.meshio.UserMeshIO", "sfepy.mesh.mesh_generators.gen_block_mesh", "sfepy.mechanics.matcoefs.stiffness_from_youngpoisson" ]
[((1406, 1427), 'sfepy.discrete.fem.meshio.UserMeshIO', 'UserMeshIO', (['mesh_hook'], {}), '(mesh_hook)\n', (1416, 1427), False, 'from sfepy.discrete.fem.meshio import UserMeshIO\n'), ((281, 381), 'sfepy.mesh.mesh_generators.gen_block_mesh', 'gen_block_mesh', (['[0.0098, 0.0011, 0.1]', '[5, 3, 17]', '[0, 0, 0.05]'], {'...
# -*- coding: utf-8 -*- """ Fields for Discontinous Galerkin method """ import numpy as nm import six from numpy.lib.stride_tricks import as_strided from six.moves import range from sfepy.base.base import (output, assert_, Struct) from sfepy.discrete import Integral, PolySpace from sfepy.discrete.common.fields import ...
[ "sfepy.discrete.fem.mappings.VolumeMapping", "sfepy.base.base.Struct.__init__", "sfepy.discrete.Integral", "sfepy.base.base.Struct", "sfepy.discrete.common.fields.parse_shape", "sfepy.discrete.PolySpace.any_from_args" ]
[((3017, 3054), 'six.iteritems', 'six.iteritems', (['region.domain.geom_els'], {}), '(region.domain.geom_els)\n', (3030, 3054), False, 'import six\n'), ((1255, 1369), 'numpy.lib.stride_tricks.as_strided', 'as_strided', (['u'], {'shape': '(n_cell, n_el_nod, 1)', 'strides': '(n_el_nod * ustride1, ustride1, ustride1)', 'w...
from __future__ import absolute_import input_name = '../examples/multi_physics/piezo_elasticity.py' output_name = 'test_piezo_elasticity.vtk' from tests_basic import TestInput class Test( TestInput ): def from_conf( conf, options ): return TestInput.from_conf( conf, options, cls = Test ) from_conf =...
[ "sfepy.discrete.Problem.from_conf" ]
[((256, 300), 'tests_basic.TestInput.from_conf', 'TestInput.from_conf', (['conf', 'options'], {'cls': 'Test'}), '(conf, options, cls=Test)\n', (275, 300), False, 'from tests_basic import TestInput\n'), ((458, 491), 'sfepy.discrete.Problem.from_conf', 'Problem.from_conf', (['self.test_conf'], {}), '(self.test_conf)\n', ...
""" Finite element reference mappings. """ import numpy as nm from sfepy import Config from sfepy.base.base import get_default, output from sfepy.base.mem_usage import raise_if_too_large from sfepy.discrete.common.mappings import Mapping from sfepy.discrete.common.extmods.mappings import CMapping from sfepy.discrete i...
[ "sfepy.base.base.get_default", "sfepy.discrete.common.extmods.mappings.CMapping", "sfepy.discrete.PolySpace.any_from_args", "sfepy.Config" ]
[((2744, 2784), 'sfepy.base.base.get_default', 'get_default', (['poly_space', 'self.poly_space'], {}), '(poly_space, self.poly_space)\n', (2755, 2784), False, 'from sfepy.base.base import get_default, output\n'), ((3041, 3049), 'sfepy.Config', 'Config', ([], {}), '()\n', (3047, 3049), False, 'from sfepy import Config\n...
r""" Incompressible Stokes flow with Navier (slip) boundary conditions, flow driven by a moving wall and a small diffusion for stabilization. This example demonstrates the use of `no-penetration` boundary conditions as well as `edge direction` boundary conditions together with Navier or slip boundary conditions. Find...
[ "sfepy.mesh.mesh_generators.gen_block_mesh", "sfepy.discrete.fem.meshio.UserMeshIO", "sfepy.homogenization.utils.define_box_regions" ]
[((1872, 1893), 'numpy.array', 'nm.array', (['[3, 1, 0.5]'], {}), '([3, 1, 0.5])\n', (1880, 1893), True, 'import numpy as nm\n'), ((2256, 2277), 'sfepy.discrete.fem.meshio.UserMeshIO', 'UserMeshIO', (['mesh_hook'], {}), '(mesh_hook)\n', (2266, 2277), False, 'from sfepy.discrete.fem.meshio import UserMeshIO\n'), ((2289,...
""" Quadratic eigenvalue problem solvers. """ from __future__ import absolute_import import time import numpy as nm import scipy.sparse as sps from sfepy.base.base import output, get_default from sfepy.linalg.utils import max_diff_csr from sfepy.solvers.solvers import QuadraticEVPSolver def standard_call(call): ...
[ "sfepy.base.base.get_default", "sfepy.linalg.utils.max_diff_csr" ]
[((609, 637), 'sfepy.base.base.get_default', 'get_default', (['conf', 'self.conf'], {}), '(conf, self.conf)\n', (620, 637), False, 'from sfepy.base.base import output, get_default\n'), ((654, 684), 'sfepy.base.base.get_default', 'get_default', (['mtx_m', 'self.mtx_m'], {}), '(mtx_m, self.mtx_m)\n', (665, 684), False, '...
from sfepy.terms.terms import * from sfepy.linalg import dot_sequences class NonPenetrationTerm(Term): r""" :Description: Non-penetration condition in the weak sense. :Definition: .. math:: \int_{\Gamma} \lambda \ul{n} \cdot \ul{v} \mbox{ , } \int_{\Gamma} \hat\lambda \ul{n} \cdot ...
[ "sfepy.linalg.dot_sequences" ]
[((2897, 2941), 'sfepy.linalg.dot_sequences', 'dot_sequences', (['ebf_t', 'normals'], {'use_rows': '(True)'}), '(ebf_t, normals, use_rows=True)\n', (2910, 2941), False, 'from sfepy.linalg import dot_sequences\n'), ((2393, 2432), 'sfepy.linalg.dot_sequences', 'dot_sequences', (['ebf_t', 'nl'], {'use_rows': '(True)'}), '...
r""" Diametrically point loaded 2-D disk with postprocessing and probes. See :ref:`sec-primer`. Find :math:`\ul{u}` such that: .. math:: \int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u}) = 0 \;, \quad \forall \ul{v} \;, where .. math:: D_{ijkl} = \mu (\delta_{ik} \delta_{jl}+\delta_{il} \delta_{...
[ "sfepy.postprocess.probes_vtk.Probe", "sfepy.mechanics.matcoefs.stiffness_from_youngpoisson", "sfepy.base.base.Struct" ]
[((1052, 1115), 'sfepy.base.base.Struct', 'Struct', ([], {'name': '"""output_data"""', 'mode': '"""cell"""', 'data': 'strain', 'dofs': 'None'}), "(name='output_data', mode='cell', data=strain, dofs=None)\n", (1058, 1115), False, 'from sfepy.base.base import Struct\n'), ((1177, 1240), 'sfepy.base.base.Struct', 'Struct',...
"""All Sfepy imports go in this module """ import numpy as np from sfepy.base.goptions import goptions from sfepy.discrete.fem import Field from sfepy.discrete.fem import FEDomain as Domain from sfepy.discrete import ( FieldVariable, Material, Integral, Function, Equation, Equations, Problem...
[ "sfepy.discrete.Equations", "sfepy.discrete.conditions.EssentialBC", "sfepy.solvers.ls.ScipyDirect", "sfepy.discrete.Functions", "sfepy.terms.Terms", "sfepy.base.base.output.set_output", "sfepy.discrete.Integral", "sfepy.discrete.fem.Field.from_args", "sfepy.discrete.FieldVariable", "sfepy.discret...
[((698, 727), 'sfepy.base.base.output.set_output', 'output.set_output', ([], {'quiet': '(True)'}), '(quiet=True)\n', (715, 727), False, 'from sfepy.base.base import output\n'), ((3702, 3717), 'numpy.array', 'np.array', (['shape'], {}), '(shape)\n', (3710, 3717), True, 'import numpy as np\n'), ((2537, 2574), 'sfepy.disc...
from __future__ import absolute_import import hashlib import numpy as nm import warnings import scipy.sparse as sps import six from six.moves import range warnings.simplefilter('ignore', sps.SparseEfficiencyWarning) from sfepy.base.base import output, get_default, assert_, try_imports from sfepy.base.timing import ...
[ "sfepy.solvers.solvers.LinearSolver.__init__", "sfepy.solvers.ls_mumps.load_mumps_libraries", "sfepy.base.conf.get_standard_keywords", "sfepy.base.base.output", "sfepy.base.base.assert_", "sfepy.discrete.Problem.from_conf", "sfepy.base.base.get_default", "sfepy.base.base.output.set_output_prefix", "...
[((158, 218), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""', 'sps.SparseEfficiencyWarning'], {}), "('ignore', sps.SparseEfficiencyWarning)\n", (179, 218), False, 'import warnings\n'), ((617, 655), 'sfepy.base.base.get_default', 'get_default', (['solver_class', 'ScipyDirect'], {}), '(solver_class, S...
# coding=utf8 from __future__ import absolute_import import os from sfepy import data_dir import six filename_meshes = ['/meshes/3d/cylinder.mesh', '/meshes/3d/cylinder.vtk', '/meshes/various_formats/small2d.mesh', '/meshes/various_formats/small2d.vtk', ...
[ "sfepy.discrete.fem.meshio.HDF5MeshIO", "sfepy.base.ioutils.Uncached", "sfepy.solvers.ts.TimeStepper", "sfepy.base.ioutils.Cached", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.iga.domain_generators.gen_patch_block_domain", "sfepy.base.base.Struct", "sfepy.base.base.assert_", "sfepy.base.iou...
[((1816, 1837), 'sfepy.discrete.fem.meshio.UserMeshIO', 'UserMeshIO', (['mesh_hook'], {}), '(mesh_hook)\n', (1826, 1837), False, 'from sfepy.discrete.fem.meshio import UserMeshIO\n'), ((2467, 2487), 'os.path.dirname', 'op.dirname', (['__file__'], {}), '(__file__)\n', (2477, 2487), True, 'import os.path as op\n'), ((370...
""" Time stepping solvers. """ import numpy as nm from sfepy.base.base import output, Struct, IndexedStruct, basestr from sfepy.solvers.solvers import make_get_conf, TimeSteppingSolver from sfepy.discrete.mass_operator import MassOperator from sfepy.solvers.ts import TimeStepper, VariableTimeStepper class StationaryS...
[ "sfepy.base.base.invert_dict", "sfepy.base.base.output", "sfepy.solvers.solvers.TimeSteppingSolver.__init__", "sfepy.solvers.solvers.TimeSteppingSolver.process_conf", "sfepy.discrete.mass_operator.MassOperator", "sfepy.solvers.ts.VariableTimeStepper.from_conf", "sfepy.base.base.IndexedStruct", "sfepy....
[((3883, 3901), 'numpy.unique', 'nm.unique', (['is_save'], {}), '(is_save)\n', (3892, 3901), True, 'import numpy as nm\n'), ((616, 674), 'sfepy.solvers.solvers.TimeSteppingSolver.__init__', 'TimeSteppingSolver.__init__', (['self', 'conf'], {'ts': 'None'}), '(self, conf, ts=None, **kwargs)\n', (643, 674), False, 'from s...
import numpy as nm from sfepy.base.conf import transform_functions from sfepy.base.testing import TestCommon def get_vertices(coors, domain=None): x, z = coors[:,0], coors[:,2] return nm.where((z < 0.1) & (x < 0.1))[0] def get_cells(coors, domain=None): return nm.where(coors[:, 0] < 0)[0] class Test(Te...
[ "sfepy.base.conf.transform_functions", "sfepy.discrete.fem.Mesh", "sfepy.discrete.fem.FEDomain" ]
[((195, 226), 'numpy.where', 'nm.where', (['((z < 0.1) & (x < 0.1))'], {}), '((z < 0.1) & (x < 0.1))\n', (203, 226), True, 'import numpy as nm\n'), ((277, 302), 'numpy.where', 'nm.where', (['(coors[:, 0] < 0)'], {}), '(coors[:, 0] < 0)\n', (285, 302), True, 'import numpy as nm\n'), ((536, 606), 'sfepy.discrete.fem.Mesh...
# 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.path as op import numpy as nm from acoustics_macro_utils import get_homogmat from sfepy.homo...
[ "sfepy.discrete.fem.Mesh.from_file", "sfepy.homogenization.utils.define_box_regions" ]
[((476, 496), 'os.path.dirname', 'op.dirname', (['__file__'], {}), '(__file__)\n', (486, 496), True, 'import os.path as op\n'), ((542, 571), 'sfepy.discrete.fem.Mesh.from_file', 'Mesh.from_file', (['filename_mesh'], {}), '(filename_mesh)\n', (556, 571), False, 'from sfepy.discrete.fem import Mesh\n'), ((661, 704), 'sfe...
from __future__ import absolute_import import os import sfepy from sfepy.base.base import load_classes, insert_static_method from .solvers import * from .eigen import eig solver_files = sfepy.get_paths('sfepy/solvers/*.py') remove = ['setup.py', 'solvers.py', 'petsc_worker.py'] solver_files = [name for name in solver_...
[ "sfepy.get_paths", "sfepy.base.base.insert_static_method", "sfepy.base.base.load_classes" ]
[((187, 224), 'sfepy.get_paths', 'sfepy.get_paths', (['"""sfepy/solvers/*.py"""'], {}), "('sfepy/solvers/*.py')\n", (202, 224), False, 'import sfepy\n'), ((398, 554), 'sfepy.base.base.load_classes', 'load_classes', (['solver_files', '[LinearSolver, NonlinearSolver, TimeSteppingSolver, EigenvalueSolver,\n Optimizatio...
from __future__ import absolute_import import os.path as op import numpy as nm import sfepy from sfepy.discrete import FieldVariable from sfepy.discrete.fem import Mesh, FEDomain, Field from sfepy.base.base import assert_ from sfepy.base.testing import TestCommon class Test(TestCommon): @staticmethod def fr...
[ "sfepy.mesh.mesh_generators.gen_block_mesh", "sfepy.discrete.projections.make_l2_projection_data", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.iga.domain_generators.gen_patch_block_domain", "sfepy.discrete.fem.Field.from_args", "sfepy.discrete.fem.FEDomain", "sfepy.base.base.assert_", "sfepy....
[((359, 434), 'sfepy.discrete.fem.Mesh.from_file', 'Mesh.from_file', (['"""meshes/2d/square_unit_tri.mesh"""'], {'prefix_dir': 'sfepy.data_dir'}), "('meshes/2d/square_unit_tri.mesh', prefix_dir=sfepy.data_dir)\n", (373, 434), False, 'from sfepy.discrete.fem import Mesh, FEDomain, Field\n'), ((482, 506), 'sfepy.discrete...
# 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.path as op import numpy as nm from collections.abc import Iterable from scipy.io import save...
[ "sfepy.base.base.Struct" ]
[((697, 717), 'os.path.dirname', 'op.dirname', (['__file__'], {}), '(__file__)\n', (707, 717), True, 'import os.path as op\n'), ((842, 875), 'acoustics_macro_utils.get_region_entities', 'get_region_entities', (["pbvars['p1']"], {}), "(pbvars['p1'])\n", (861, 875), False, 'from acoustics_macro_utils import eval_phi, pos...
#!/usr/bin/env python """ First solve the stationary electric conduction problem. Then use its results to solve the evolutionary heat conduction problem. Run this example as on a command line:: $ python <path_to_this_file>/thermal_electric.py """ from __future__ import absolute_import import sys sys.path.append( ...
[ "sfepy.discrete.Problem.from_conf", "sfepy.base.conf.ProblemConf.from_file", "sfepy.base.conf.get_standard_keywords" ]
[((303, 323), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (318, 323), False, 'import sys\n'), ((697, 724), 'os.path.join', 'os.path.join', (['cwd', '"""output"""'], {}), "(cwd, 'output')\n", (709, 724), False, 'import os\n'), ((3013, 3036), 'sfepy.base.conf.get_standard_keywords', 'get_standard_...
#!/usr/bin/env python """ Plot quadrature points for the given geometry and integration order. """ from __future__ import absolute_import, print_function import sys sys.path.append('.') from argparse import ArgumentParser import sfepy.postprocess.plot_quadrature as pq helps = { 'geometry' : 'reference element...
[ "sfepy.postprocess.plot_quadrature.plt.show", "sfepy.postprocess.plot_quadrature.plot_quadrature" ]
[((165, 185), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (180, 185), False, 'import sys\n'), ((943, 978), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (957, 978), False, 'from argparse import ArgumentParser\n'), ((2550, 2775), 'sfepy....
#!/usr/bin/env python """ Plot quadrature points for the given geometry and integration order. """ from optparse import OptionParser import sfepy.postprocess.plot_quadrature as pq usage = '%prog [options]\n' + __doc__.rstrip() helps = { 'geometry' : 'reference element geometry, one of "2_3", "2_4", "3_4", "3...
[ "sfepy.postprocess.plot_quadrature.plt.show", "sfepy.postprocess.plot_quadrature.plot_quadrature" ]
[((722, 764), 'optparse.OptionParser', 'OptionParser', ([], {'usage': 'usage', 'version': '"""%prog"""'}), "(usage=usage, version='%prog')\n", (734, 764), False, 'from optparse import OptionParser\n'), ((1782, 1907), 'sfepy.postprocess.plot_quadrature.plot_quadrature', 'pq.plot_quadrature', (['None', 'options.geometry'...
""" The Dirichlet, periodic and linear combination boundary condition classes, as well as the initial condition class. """ from __future__ import absolute_import import numpy as nm from sfepy.base.base import basestr, Container, Struct from sfepy.discrete.functions import Function import six def get_condition_value(v...
[ "sfepy.base.base.Struct.__init__" ]
[((1475, 1494), 'six.iteritems', 'six.iteritems', (['conf'], {}), '(conf)\n', (1488, 1494), False, 'import six\n'), ((4772, 4814), 'sfepy.base.base.Struct.__init__', 'Struct.__init__', (['self'], {'name': 'name'}), '(self, name=name, **kwargs)\n', (4787, 4814), False, 'from sfepy.base.base import basestr, Container, St...
import numpy as nm from sfepy.linalg import dot_sequences from sfepy.terms.terms import Term, terms from sfepy.terms.terms_th import THTerm, ETHTerm from sfepy.terms.terms_elastic import CauchyStressTerm class BiotTerm(Term): r""" Biot coupling term with :math:`\alpha_{ij}` given in: * vector form exploi...
[ "sfepy.linalg.dot_sequences", "sfepy.terms.terms.terms.de_cauchy_stress" ]
[((2000, 2022), 'numpy.swapaxes', 'nm.swapaxes', (['mat', '(2)', '(3)'], {}), '(mat, 2, 3)\n', (2011, 2022), True, 'import numpy as nm\n'), ((4783, 4809), 'sfepy.linalg.dot_sequences', 'dot_sequences', (['mat', 'val_qp'], {}), '(mat, val_qp)\n', (4796, 4809), False, 'from sfepy.linalg import dot_sequences\n'), ((4869, ...
r""" Diametrically point loaded 2-D disk. See :ref:`sec-primer`. Find :math:`\ul{u}` such that: .. math:: \int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u}) = 0 \;, \quad \forall \ul{v} \;, where .. math:: D_{ijkl} = \mu (\delta_{ik} \delta_{jl}+\delta_{il} \delta_{jk}) + \lambda \ \delta_{ij...
[ "sfepy.discrete.fem.utils.refine_mesh", "sfepy.mechanics.matcoefs.stiffness_from_youngpoisson" ]
[((691, 735), 'sfepy.discrete.fem.utils.refine_mesh', 'refine_mesh', (['filename_mesh', 'refinement_level'], {}), '(filename_mesh, refinement_level)\n', (702, 735), False, 'from sfepy.discrete.fem.utils import refine_mesh\n'), ((1144, 1190), 'sfepy.mechanics.matcoefs.stiffness_from_youngpoisson', 'stiffness_from_youngp...
""" Friction-slip model formulated as the implicit complementarity problem. To integrate over a (dual) mesh, one needs: * coordinates of element vertices * element connectivity * local base for each element * constant in each sub-triangle of the dual mesh Data for each dual element: * connectivity of its sub-tria...
[ "sfepy.fem.fe_surface.FESurface", "sfepy.linalg.norm_l2_along_axis", "sfepy.fem.utils.compute_nodal_normals", "sfepy.base.compat.unique", "sfepy.fem.Field", "sfepy.fem.mappings.SurfaceMapping", "sfepy.fem.mappings.VolumeMapping" ]
[((1918, 1968), 'sfepy.fem.Field', 'Field', (['"""displacements"""', 'nm.float64', '(3,)', 'omega', '(1)'], {}), "('displacements', nm.float64, (3,), omega, 1)\n", (1923, 1968), False, 'from sfepy.fem import Mesh, Domain, Field, Variables\n'), ((3178, 3239), 'sfepy.fem.utils.compute_nodal_normals', 'compute_nodal_norma...
# -*- coding: utf-8 -*- r""" Linear elasticity with given displacements. Find :math:`\ul{u}` such that: .. math:: \int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u}) = 0 \;, \quad \forall \ul{v} \;, where .. math:: D_{ijkl} = \mu (\delta_{ik} \delta_{jl}+\delta_{il} \delta_{jk}) + \lambda \ \d...
[ "sfepy.mechanics.matcoefs.stiffness_from_lame" ]
[((1770, 1814), 'sfepy.mechanics.matcoefs.stiffness_from_lame', 'stiffness_from_lame', ([], {'dim': '(3)', 'lam': '(10.0)', 'mu': '(1.0)'}), '(dim=3, lam=10.0, mu=1.0)\n', (1789, 1814), False, 'from sfepy.mechanics.matcoefs import stiffness_from_lame\n')]
import os import numpy as nm try: from enthought.tvtk.api import tvtk from enthought.mayavi.sources.vtk_data_source import VTKDataSource from enthought.pyface.timer.api import Timer except: from tvtk.api import tvtk from mayavi.sources.vtk_data_source import VTKDataSource from pyface.timer.ap...
[ "sfepy.postprocess.utils.mlab.pipeline.open", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.fem.meshio.MeshIO.any_from_filename", "sfepy.discrete.fem.meshio.supported_formats.keys" ]
[((4437, 4459), 'os.stat', 'os.stat', (['self.filename'], {}), '(self.filename)\n', (4444, 4459), False, 'import os\n'), ((4873, 4906), 'sfepy.postprocess.utils.mlab.pipeline.open', 'mlab.pipeline.open', (['self.filename'], {}), '(self.filename)\n', (4891, 4906), False, 'from sfepy.postprocess.utils import mlab\n'), ((...
from __future__ import absolute_import import numpy as nm from sfepy.base.base import output, iter_dict_of_lists, Struct, basestr from sfepy.base.timing import Timer import six def parse_approx_order(approx_order): """ Parse the uniform approximation order value (str or int). """ ao_msg = 'unsupport...
[ "sfepy.get_paths", "sfepy.base.base.Struct", "sfepy.discrete.common.global_interp.get_ref_coors", "sfepy.base.multiproc.is_remote_dict", "sfepy.base.timing.Timer", "sfepy.base.base.iter_dict_of_lists", "sfepy.base.base.load_classes", "sfepy.base.base.output" ]
[((1640, 1687), 'sfepy.base.base.iter_dict_of_lists', 'iter_dict_of_lists', (['conn_info'], {'return_keys': '(True)'}), '(conn_info, return_keys=True)\n', (1658, 1687), False, 'from sfepy.base.base import output, iter_dict_of_lists, Struct, basestr\n'), ((1941, 1960), 'six.iteritems', 'six.iteritems', (['conf'], {}), '...
import numpy as nm from sfepy.base.base import output, Struct from sfepy.base.conf import ProblemConf, get_standard_keywords from sfepy.homogenization.homogen_app import HomogenizationApp from sfepy.homogenization.coefficients import Coefficients import tables as pt from sfepy.discrete.fem.meshio import HDF5MeshIO imp...
[ "sfepy.base.conf.ProblemConf.from_file", "sfepy.discrete.fem.meshio.HDF5MeshIO", "sfepy.base.base.Struct", "sfepy.homogenization.coefficients.Coefficients.from_file_hdf5", "sfepy.base.conf.get_standard_keywords", "sfepy.homogenization.homogen_app.HomogenizationApp" ]
[((578, 601), 'sfepy.base.conf.get_standard_keywords', 'get_standard_keywords', ([], {}), '()\n', (599, 601), False, 'from sfepy.base.conf import ProblemConf, get_standard_keywords\n'), ((649, 718), 'sfepy.base.conf.ProblemConf.from_file', 'ProblemConf.from_file', (['micro_filename', 'required', 'other'], {'verbose': '...
#!/usr/bin/env python r""" Parallel assembling and solving of a Poisson's equation, using commands for interactive use. Find :math:`u` such that: .. math:: \int_{\Omega} \nabla v \cdot \nabla u = \int_{\Omega} v f \;, \quad \forall s \;. Important Notes --------------- - This example requires petsc4py, ...
[ "sfepy.parallel.parallel.assemble_rhs_to_petsc", "sfepy.mesh.mesh_generators.gen_block_mesh", "sfepy.parallel.parallel.create_gather_scatter", "sfepy.base.ioutils.ensure_path", "sfepy.parallel.parallel.create_local_petsc_vector", "sfepy.discrete.fem.Mesh.from_region", "sfepy.discrete.fem.Mesh.from_file"...
[((2114, 2134), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (2129, 2134), False, 'import sys\n'), ((3216, 3263), 'sfepy.discrete.fem.Mesh.from_region', 'Mesh.from_region', (['omega_gi', 'mesh'], {'localize': '(True)'}), '(omega_gi, mesh, localize=True)\n', (3232, 3263), False, 'from sfepy.discre...
#!/usr/bin/env python r""" This example shows the use of the `dw_tl_he_genyeoh` hyperelastic term, whose contribution to the deformation energy density per unit reference volume is given by .. math:: W = K \, \left( \overline I_1 - 3 \right)^{p} where :math:`\overline I_1` is the first main invariant of the devia...
[ "sfepy.mesh.mesh_generators.gen_block_mesh", "sfepy.solvers.ts_solvers.SimpleTimeSteppingSolver", "sfepy.homogenization.utils.define_box_regions", "sfepy.solvers.nls.Newton", "sfepy.discrete.Problem", "sfepy.discrete.Integral", "sfepy.discrete.fem.Field.from_args", "sfepy.base.base.Struct", "sfepy.d...
[((4494, 4520), 'sys.path.append', 'sys.path.append', (['SFEPY_DIR'], {}), '(SFEPY_DIR)\n', (4509, 4520), False, 'import sys\n'), ((5366, 5546), 'numpy.array', 'np.array', (['[(2 * coef * exp * (stretch ** 2 + 2 / stretch - 3) ** (exp - 1) * (stretch -\n stretch ** -2) if stretch ** 2 + 2 / stretch > 3 else 0.0) for...
#!/usr/bin/env python """ Convert a mesh file from one SfePy-supported format to another. Examples:: $ ./script/convert_mesh.py meshes/3d/cylinder.mesh new.vtk $ ./script/convert_mesh.py meshes/3d/cylinder.mesh new.vtk -s2.5 $ ./script/convert_mesh.py meshes/3d/cylinder.mesh new.vtk -s0.5,2,1 $ ./script/conve...
[ "sfepy.discrete.fem.meshio.output_mesh_formats", "sfepy.base.base.nm.diag", "sfepy.discrete.fem.Mesh.from_file", "sfepy.base.base.nm.array", "sfepy.base.base.nm.eye", "sfepy.discrete.fem.meshio.MeshIO.for_format", "sfepy.discrete.fem.FEDomain", "sfepy.base.base.output" ]
[((393, 413), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (408, 413), False, 'import sys\n'), ((1680, 1705), 'optparse.OptionParser', 'OptionParser', ([], {'usage': 'usage'}), '(usage=usage)\n', (1692, 1705), False, 'from optparse import OptionParser\n'), ((3131, 3158), 'sfepy.discrete.fem.Mesh....
""" Problem description file handling. Notes ----- Short syntax: key is suffixed with '__<number>' to prevent collisions with long syntax keys -> both cases can be used in a single input. """ from __future__ import absolute_import import re import numpy as nm from sfepy.base.base import (Struct, IndexedStruct, dict_...
[ "sfepy.base.base.import_file", "sfepy.base.base.output", "sfepy.base.base.get_default", "sfepy.base.parse_conf.create_bnf", "sfepy.base.base.Struct", "sfepy.base.base.update_dict_recursively", "sfepy.base.base.copy", "sfepy.base.base.dict_to_struct", "sfepy.base.base.assert_" ]
[((1517, 1534), 'sfepy.base.base.Struct', 'Struct', ([], {'name': 'name'}), '(name=name)\n', (1523, 1534), False, 'from sfepy.base.base import Struct, IndexedStruct, dict_to_struct, output, copy, update_dict_recursively, import_file, assert_, get_default, basestr\n'), ((8742, 8774), 'sfepy.base.base.dict_to_struct', 'd...
""" Nonlinear solvers. """ import time import numpy as nm import numpy.linalg as nla from sfepy.base.base import output, get_default, debug, Struct from sfepy.base.log import Log, get_logging_conf from sfepy.solvers.solvers import SolverMeta, NonlinearSolver def check_tangent_matrix(conf, vec_x0, fun, fun_grad): ...
[ "sfepy.base.log.get_logging_conf", "sfepy.base.base.get_default", "sfepy.solvers.solvers.NonlinearSolver.__init__", "sfepy.base.base.Struct", "sfepy.base.plotutils.plot_matrix_diff", "sfepy.base.log.Log", "sfepy.base.base.debug", "sfepy.base.base.output" ]
[((772, 792), 'numpy.zeros_like', 'nm.zeros_like', (['vec_r'], {}), '(vec_r)\n', (785, 792), True, 'import numpy as nm\n'), ((1258, 1270), 'time.clock', 'time.clock', ([], {}), '()\n', (1268, 1270), False, 'import time\n'), ((1275, 1305), 'sfepy.base.base.output', 'output', (['mtx_a', '""".. analytical"""'], {}), "(mtx...
from __future__ import absolute_import from sfepy import data_dir import six filename_mesh = data_dir + '/meshes/3d/special/cube_cylinder.mesh' if 0: from sfepy.discrete.fem.utils import refine_mesh refinement_level = 1 filename_mesh = refine_mesh(filename_mesh, refinement_level) material_2 = { 'name...
[ "sfepy.discrete.Problem.from_conf", "sfepy.discrete.fem.utils.refine_mesh", "sfepy.solvers.Solver.any_from_conf", "sfepy.discrete.state.State", "sfepy.base.base.IndexedStruct" ]
[((250, 294), 'sfepy.discrete.fem.utils.refine_mesh', 'refine_mesh', (['filename_mesh', 'refinement_level'], {}), '(filename_mesh, refinement_level)\n', (261, 294), False, 'from sfepy.discrete.fem.utils import refine_mesh\n'), ((4007, 4030), 'sfepy.discrete.Problem.from_conf', 'Problem.from_conf', (['conf'], {}), '(con...
from __future__ import absolute_import import numpy as nm from sfepy.base.base import output, assert_, get_default, Struct from sfepy.homogenization.coefs_base import CorrSolution, \ TCorrectorsViaPressureEVP, CorrMiniApp from sfepy.solvers.ts import TimeStepper from six.moves import range class PressureRHSVecto...
[ "sfepy.homogenization.coefs_base.CorrSolution", "sfepy.base.base.get_default", "sfepy.base.base.assert_" ]
[((416, 450), 'sfepy.base.base.get_default', 'get_default', (['problem', 'self.problem'], {}), '(problem, self.problem)\n', (427, 450), False, 'from sfepy.base.base import output, assert_, get_default, Struct\n'), ((1204, 1238), 'sfepy.base.base.get_default', 'get_default', (['problem', 'self.problem'], {}), '(problem,...
""" Quantum oscillator. See :ref:`quantum-quantum_common`. """ from __future__ import absolute_import from sfepy.linalg import norm_l2_along_axis from examples.quantum.quantum_common import common def get_exact(n_eigs, box_size, dim): if dim == 2: eigs = [1] + [2]*2 + [3]*3 + [4]*4 + [5]*5 + [6]*6 e...
[ "sfepy.linalg.norm_l2_along_axis" ]
[((696, 754), 'examples.quantum.quantum_common.common', 'common', (['fun_v'], {'get_exact': 'get_exact', 'n_eigs': 'n_eigs', 'tau': 'tau'}), '(fun_v, get_exact=get_exact, n_eigs=n_eigs, tau=tau)\n', (702, 754), False, 'from examples.quantum.quantum_common import common\n'), ((536, 582), 'sfepy.linalg.norm_l2_along_axis...
""" Notes ----- Important attributes of continuous (order > 0) :class:`Field` and :class:`SurfaceField` instances: - `vertex_remap` : `econn[:, :n_vertex] = vertex_remap[conn]` - `vertex_remap_i` : `conn = vertex_remap_i[econn[:, :n_vertex]]` where `conn` is the mesh vertex connectivity, `econn` is the region-local ...
[ "sfepy.discrete.fem.fields_base.FEField.remove_extra_dofs", "sfepy.discrete.fem.fields_base.FEField.extend_dofs", "sfepy.discrete.fem.extmods.bases.evaluate_in_rc", "sfepy.discrete.common.dof_info.expand_nodes_to_dofs", "sfepy.discrete.fem.global_interp.get_ref_coors", "sfepy.base.base.output", "sfepy.d...
[((2552, 2572), 'numpy.array', 'nm.array', (['facet_desc'], {}), '(facet_desc)\n', (2560, 2572), True, 'import numpy as nm\n'), ((2711, 2753), 'numpy.arange', 'nm.arange', (['facets.shape[0]'], {'dtype': 'nm.int32'}), '(facets.shape[0], dtype=nm.int32)\n', (2720, 2753), True, 'import numpy as nm\n'), ((2911, 2948), 'sf...
#!/usr/bin/env python import sys sys.path.append('.') from optparse import OptionParser from sfepy.base.base import nm, output from sfepy.fem import Mesh from sfepy.fem.meshio import io_table, supported_capabilities usage = """%prog [options] filename_in filename_out Convert a mesh file from one SfePy-supported form...
[ "sfepy.base.base.output", "sfepy.base.base.nm.array", "sfepy.base.base.nm.diag", "sfepy.fem.meshio.supported_capabilities.iteritems", "sfepy.base.base.nm.eye", "sfepy.fem.Mesh.from_file" ]
[((33, 53), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (48, 53), False, 'import sys\n'), ((773, 819), 'sfepy.base.base.output', 'output', (['"""Supported writable mesh formats are:"""'], {}), "('Supported writable mesh formats are:')\n", (779, 819), False, 'from sfepy.base.base import nm, outpu...
#!/usr/bin/env python # This code was adapted from http://sfepy.org/doc-devel/mat_optim.html. """ Compare various elastic materials w.r.t. uniaxial tension/compression test. Requires Matplotlib. """ from __future__ import absolute_import from argparse import ArgumentParser, RawDescriptionHelpFormatter import sys impo...
[ "sfepy.base.conf.get_standard_keywords", "sfepy.base.base.output.set_output", "sfepy.discrete.Problem.from_conf", "sfepy.base.conf.ProblemConf.from_file", "sfepy.discrete.fem.meshio.UserMeshIO", "sfepy.mesh.mesh_generators.gen_block_mesh", "sfepy.base.plotutils.plt.show", "sfepy.mechanics.matcoefs.sti...
[((327, 347), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (342, 347), False, 'import sys\n'), ((1326, 1347), 'sfepy.discrete.fem.meshio.UserMeshIO', 'UserMeshIO', (['mesh_hook'], {}), '(mesh_hook)\n', (1336, 1347), False, 'from sfepy.discrete.fem.meshio import UserMeshIO\n'), ((4671, 4702), 'num...
import numpy as nm from sfepy.base.base import output, get_default, assert_, Struct def get_print_info(n_step): if n_step > 1: n_digit = int(nm.log10(n_step - 1) + 1) else: n_digit = 1 format = '%%%dd of %%%dd' % (n_digit, n_digit) suffix = '%%0%dd' % n_digit return n_digit, for...
[ "sfepy.base.base.output", "sfepy.base.base.get_default" ]
[((1084, 1108), 'sfepy.base.base.get_default', 'get_default', (['dt', '(t1 - t0)'], {}), '(dt, t1 - t0)\n', (1095, 1108), False, 'from sfepy.base.base import output, get_default, assert_, Struct\n'), ((1689, 1715), 'sfepy.base.base.get_default', 'get_default', (['step', 'ts.step'], {}), '(step, ts.step)\n', (1700, 1715...
r""" Elastic contact sphere simulating an indentation test. Find :math:`\ul{u}` such that: .. math:: \int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u}) + \int_{\Gamma} \ul{v} \cdot f(d(\ul{u})) \ul{n}(\ul{u}) = 0 \;, where .. math:: D_{ijkl} = \mu (\delta_{ik} \delta_{jl} + \delta_{il} \delta_{jk...
[ "sfepy.discrete.fem.MeshIO.any_from_filename", "sfepy.mechanics.contact_bodies.plot_points", "sfepy.mechanics.contact_bodies.ContactSphere" ]
[((2053, 2078), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (2068, 2078), False, 'import os\n'), ((2088, 2148), 'sfepy.discrete.fem.MeshIO.any_from_filename', 'MeshIO.any_from_filename', (['filename_mesh'], {'prefix_dir': 'conf_dir'}), '(filename_mesh, prefix_dir=conf_dir)\n', (2112, 2148)...
""" Global interpolation functions. """ import time import numpy as nm from sfepy.base.base import output, get_default_attr from sfepy.discrete.fem.mesh import make_inverse_connectivity from sfepy.discrete.fem.extmods.bases import find_ref_coors def get_ref_coors(field, coors, strategy='kdtree', close_limit=0.1, cach...
[ "sfepy.base.base.output", "sfepy.discrete.fem.extmods.bases.find_ref_coors", "sfepy.base.base.get_default_attr", "sfepy.discrete.fem.mesh.make_inverse_connectivity" ]
[((1856, 1898), 'sfepy.base.base.get_default_attr', 'get_default_attr', (['cache', '"""ref_coors"""', 'None'], {}), "(cache, 'ref_coors', None)\n", (1872, 1898), False, 'from sfepy.base.base import output, get_default_attr\n'), ((1940, 1977), 'sfepy.base.base.get_default_attr', 'get_default_attr', (['cache', '"""mesh""...
""" Biot problem with the non-penetration BC on the Walls boundary region. The non-penetration condition is enforced weakly using the Lagrange multiplier approach. There is also a rigid body movement constraint imposed on the Outlet region using the linear combination boundary conditions. """ from biot_npbc import cinc...
[ "sfepy.base.base.Struct" ]
[((699, 774), 'sfepy.base.base.Struct', 'Struct', ([], {'name': '"""output_data"""', 'var_name': '"""p"""', 'mode': '"""cell"""', 'data': 'dvel', 'dofs': 'None'}), "(name='output_data', var_name='p', mode='cell', data=dvel, dofs=None)\n", (705, 774), False, 'from sfepy.base.base import Struct\n'), ((891, 968), 'sfepy.b...
r""" Thermo-elasticity with a given temperature distribution. Uses `dw_biot` term with an isotropic coefficient for thermo-elastic coupling. For given body temperature :math:`T` and background temperature :math:`T_0` find :math:`\ul{u}` such that: .. math:: \int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u}) ...
[ "sfepy.base.base.Struct", "sfepy.mechanics.matcoefs.stiffness_from_lame" ]
[((3335, 3393), 'numpy.array', 'np.array', (['[[1], [1], [1], [0], [0], [0]]'], {'dtype': 'np.float64'}), '([[1], [1], [1], [0], [0], [0]], dtype=np.float64)\n', (3343, 3393), True, 'import numpy as np\n'), ((1516, 1579), 'sfepy.base.base.Struct', 'Struct', ([], {'name': '"""output_data"""', 'mode': '"""cell"""', 'data...
import numpy as nm from sfepy.linalg import dot_sequences from sfepy.terms.terms import Term, terms class PiezoCouplingTerm(Term): r""" Piezoelectric coupling term. Can be evaluated. :Definition: .. math:: \int_{\Omega} g_{kij}\ e_{ij}(\ul{v}) \nabla_k p \mbox{ , } \int_{\Omega} g_{k...
[ "sfepy.linalg.dot_sequences" ]
[((3897, 3933), 'sfepy.linalg.dot_sequences', 'dot_sequences', (['mat', 'grad'], {'mode': '"""ATB"""'}), "(mat, grad, mode='ATB')\n", (3910, 3933), False, 'from sfepy.linalg import dot_sequences\n'), ((1536, 1576), 'numpy.array', 'nm.array', (['[0]'], {'ndmin': '(4)', 'dtype': 'nm.float64'}), '([0], ndmin=4, dtype=nm.f...
# -*- coding: utf-8 r""" Homogenization of the Darcy flow in a thin porous layer. The reference cell is composed of the matrix representing the dual porosity and of two disconnected channels representing the primary porosity, see paper [1]. [1] <NAME>, <NAME>: Modeling Tissue Perfusion Using a Homogenized Model with L...
[ "sfepy.homogenization.recovery.compute_p_from_macro", "sfepy.base.base.Struct" ]
[((5156, 5189), 'six.iteritems', 'six.iteritems', (["pb_def['channels']"], {}), "(pb_def['channels'])\n", (5169, 5189), False, 'import six\n'), ((6949, 6982), 'six.iteritems', 'six.iteritems', (["pb_def['channels']"], {}), "(pb_def['channels'])\n", (6962, 6982), False, 'import six\n'), ((10860, 10893), 'six.iteritems',...
#!/usr/bin/env python # This code was adapted from http://sfepy.org/doc-devel/mat_optim.html. from __future__ import print_function from __future__ import absolute_import import sys sys.path.append('.') import matplotlib as mlp import matplotlib.pyplot as plt from matplotlib.collections import PolyCollection from mp...
[ "sfepy.base.conf.get_standard_keywords", "sfepy.base.base.output.set_output", "sfepy.base.conf.ProblemConf.from_file", "sfepy.base.base.Struct", "sfepy.homogenization.homogen_app.HomogenizationApp", "sfepy.applications.PDESolverApp" ]
[((184, 204), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (199, 204), False, 'import sys\n'), ((7258, 7293), 'numpy.array', 'np.array', (['[x0[0], 0.45, x0[1], 0.0]'], {}), '([x0[0], 0.45, x0[1], 0.0])\n', (7266, 7293), True, 'import numpy as np\n'), ((7662, 7697), 'numpy.array', 'np.array', (['...
""" Linearization of higher order solutions for the purposes of visualization. """ from __future__ import absolute_import import numpy as nm from sfepy.linalg import dot_sequences from sfepy.discrete.fem.refine import refine_reference from six.moves import range def get_eval_dofs(dofs, dof_conn, ps, ori=None): ""...
[ "sfepy.linalg.dot_sequences", "sfepy.discrete.fem.refine.refine_reference" ]
[((2121, 2153), 'sfepy.discrete.fem.refine.refine_reference', 'refine_reference', (['ps.geometry', '(1)'], {}), '(ps.geometry, 1)\n', (2137, 2153), False, 'from sfepy.discrete.fem.refine import refine_reference\n'), ((2207, 2222), 'numpy.arange', 'nm.arange', (['n_el'], {}), '(n_el)\n', (2216, 2222), True, 'import nump...
#!/usr/bin/env python # 12.01.2007, c """ Solve partial differential equations given in a SfePy problem definition file. Example problem definition files can be found in ``examples/`` directory of the SfePy top-level directory. This script works with all the examples except those in ``examples/standalone/``. Both nor...
[ "sfepy.base.conf.get_standard_keywords", "sfepy.solvers.solver_table.keys", "sfepy.base.conf.ProblemConf.from_file_and_options", "sfepy.base.base.output.set_output", "sfepy.applications.PDESolverApp", "sfepy.base.base.debug_on_error" ]
[((2913, 2998), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '__doc__', 'formatter_class': 'RawDescriptionHelpFormatter'}), '(description=__doc__, formatter_class=RawDescriptionHelpFormatter\n )\n', (2927, 2998), False, 'from argparse import ArgumentParser, RawDescriptionHelpFormatter\n'), ((668...
r""" Incompressible Stokes flow with Navier (slip) boundary conditions, flow driven by a moving wall and a small diffusion for stabilization. This example demonstrates the use of `no-penetration` and `edge direction` boundary conditions together with Navier or slip boundary conditions. Alternatively the `no-penetratio...
[ "sfepy.base.base.assert_", "sfepy.discrete.fem.meshio.UserMeshIO", "sfepy.homogenization.utils.define_box_regions", "sfepy.mesh.mesh_generators.gen_block_mesh" ]
[((5428, 5464), 'sfepy.base.base.assert_', 'assert_', (["(mode in {'lcbc', 'penalty'})"], {}), "(mode in {'lcbc', 'penalty'})\n", (5435, 5464), False, 'from sfepy.base.base import assert_, output\n'), ((5469, 5513), 'sfepy.base.base.assert_', 'assert_', (["(term_mode in {'original', 'einsum'})"], {}), "(term_mode in {'...
#!/usr/bin/env python """ Diametrically point loaded 2-D disk, using commands for interactive use. See :ref:`sec-primer`. The script combines the functionality of all the ``its2D_?.py`` examples and allows setting various simulation parameters, namely: - material parameters - displacement field approximation order - ...
[ "sfepy.discrete.conditions.EssentialBC", "sfepy.discrete.probes.LineProbe", "sfepy.mechanics.matcoefs.stiffness_from_youngpoisson", "sfepy.discrete.Integral", "sfepy.postprocess.viewer.Viewer", "sfepy.discrete.projections.project_by_component", "sfepy.solvers.ls.ScipyDirect", "sfepy.discrete.Integrals...
[((984, 1004), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (999, 1004), False, 'import sys\n'), ((2837, 2849), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (2847, 2849), True, 'import matplotlib.pyplot as plt\n'), ((2854, 2863), 'matplotlib.pyplot.clf', 'plt.clf', ([], {}), '()\n'...
""" Computational domain for isogeometric analysis. """ import os.path as op import numpy as nm from sfepy.base.base import Struct from sfepy.discrete.common.domain import Domain import sfepy.discrete.iga as iga import sfepy.discrete.iga.io as io from sfepy.discrete.iga.extmods.igac import eval_in_tp_coors class Nur...
[ "sfepy.discrete.iga.io.read_iga_data", "sfepy.discrete.fem.Mesh.from_data", "sfepy.base.base.Struct", "sfepy.discrete.common.domain.Domain.__init__", "sfepy.discrete.iga.get_bezier_element_entities", "sfepy.discrete.fem.geometry_element.create_geometry_elements", "sfepy.discrete.fem.extmods.cmesh.CMesh....
[((472, 585), 'sfepy.base.base.Struct.__init__', 'Struct.__init__', (['self'], {'name': '"""nurbs"""', 'knots': 'knots', 'degrees': 'degrees', 'cps': 'cps', 'weights': 'weights', 'cs': 'cs', 'conn': 'conn'}), "(self, name='nurbs', knots=knots, degrees=degrees, cps=cps,\n weights=weights, cs=cs, conn=conn)\n", (487, ...
import re from copy import copy import numpy as nm from sfepy.base.base import (as_float_or_complex, get_default, assert_, Container, Struct, basestr, goptions) from sfepy.base.compat import in1d # Used for imports in term files. from sfepy.terms.extmods import terms from sfepy.linalg i...
[ "sfepy.base.base.Container.append", "sfepy.base.base.Struct", "sfepy.terms.extmods.terms.append", "sfepy.terms.term_table.keys", "sfepy.base.base.get_default", "sfepy.discrete.Integrals", "sfepy.terms.extmods.terms.errclear", "sfepy.base.base.Container.insert", "sfepy.linalg.split_range", "sfepy.d...
[((353, 391), 're.compile', 're.compile', (['"""^([^\\\\(\\\\}]*)\\\\((.*)\\\\)$"""'], {}), "('^([^\\\\(\\\\}]*)\\\\((.*)\\\\)$')\n", (363, 391), False, 'import re\n'), ((411, 434), 're.compile', 're.compile', (['"""^virtual$"""'], {}), "('^virtual$')\n", (421, 434), False, 'import re\n'), ((456, 494), 're.compile', 'r...
""" Functions to visualize quadrature points in reference elements. """ import numpy as nm import matplotlib.pyplot as plt from sfepy.base.base import output from sfepy.postprocess.plot_dofs import _get_axes, _to2d from sfepy.postprocess.plot_facets import plot_geometry def _get_qp(geometry, order): from sfepy.d...
[ "sfepy.postprocess.plot_dofs._to2d", "sfepy.discrete.fem.geometry_element.GeometryElement", "sfepy.base.base.output", "sfepy.postprocess.plot_dofs._get_axes", "sfepy.discrete.fem.Mesh.from_data", "sfepy.discrete.Integral", "sfepy.discrete.fem.Field.from_args", "sfepy.postprocess.plot_facets.plot_geome...
[((423, 451), 'sfepy.discrete.Integral', 'Integral', (['"""aux"""'], {'order': 'order'}), "('aux', order=order)\n", (431, 451), False, 'from sfepy.discrete import Integral\n'), ((540, 650), 'sfepy.base.base.output', 'output', (['"""geometry:"""', 'geometry', '"""order:"""', 'order', '"""num. points:"""', 'coors.shape[0...
import numpy as np from sfepy.base.goptions import goptions from sfepy.discrete.fem import Field try: from sfepy.discrete.fem import FEDomain as Domain except ImportError: from sfepy.discrete.fem import Domain from sfepy.discrete import (FieldVariable, Material, Integral, Function, E...
[ "sfepy.discrete.conditions.EssentialBC", "sfepy.base.base.output.set_output", "sfepy.discrete.Integral", "sfepy.solvers.ls.ScipyDirect", "sfepy.discrete.Equations", "sfepy.discrete.fem.Field.from_args", "sfepy.discrete.Equation", "sfepy.discrete.Function", "sfepy.mechanics.matcoefs.stiffness_from_la...
[((839, 868), 'sfepy.base.base.output.set_output', 'output.set_output', ([], {'quiet': '(True)'}), '(quiet=True)\n', (856, 868), False, 'from sfepy.base.base import output\n'), ((6954, 6970), 'numpy.array', 'np.array', (['strain'], {}), '(strain)\n', (6962, 6970), True, 'import numpy as np\n'), ((6999, 7021), 'numpy.ar...
""" Utility functions based on igakit. """ import numpy as nm from sfepy.base.base import Struct from sfepy.discrete.fem import Mesh from sfepy.mesh.mesh_generators import get_tensor_product_conn def create_linear_fe_mesh(nurbs, pars=None): """ Convert a NURBS object into a nD-linear tensor product FE mesh. ...
[ "sfepy.base.base.Struct", "sfepy.discrete.fem.Mesh.from_data" ]
[((2365, 2404), 'numpy.zeros', 'nm.zeros', (['conn.shape[0]'], {'dtype': 'nm.int32'}), '(conn.shape[0], dtype=nm.int32)\n', (2373, 2404), True, 'import numpy as nm\n'), ((2416, 2478), 'sfepy.discrete.fem.Mesh.from_data', 'Mesh.from_data', (['"""nurbs"""', 'coors', 'None', '[conn]', '[mat_id]', '[desc]'], {}), "('nurbs'...
#!/usr/bin/env python # 12.01.2007, c from __future__ import absolute_import from argparse import ArgumentParser import sfepy from sfepy.base.base import output from sfepy.base.conf import ProblemConf, get_standard_keywords from sfepy.homogenization.band_gaps_app import AcousticBandGapsApp from sfepy.base.plotutils im...
[ "sfepy.base.conf.get_standard_keywords", "sfepy.homogenization.band_gaps_app.AcousticBandGapsApp", "sfepy.base.base.output", "sfepy.base.conf.ProblemConf.from_file", "sfepy.base.base.debug_on_error" ]
[((820, 836), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (834, 836), False, 'from argparse import ArgumentParser\n'), ((2449, 2472), 'sfepy.base.conf.get_standard_keywords', 'get_standard_keywords', ([], {}), '()\n', (2470, 2472), False, 'from sfepy.base.conf import ProblemConf, get_standard_keyword...
""" This module is not a test file. It contains classes grouping some common functionality, that is used in several test files. """ from __future__ import absolute_import from sfepy.base.base import IndexedStruct from sfepy.base.testing import TestCommon import os.path as op class NLSStatus(IndexedStruct): """ ...
[ "sfepy.base.conf.get_standard_keywords", "sfepy.applications.assign_standard_hooks", "sfepy.base.base.IndexedStruct.__setitem__", "sfepy.base.conf.ProblemConf.from_file", "sfepy.base.base.Struct", "sfepy.applications.solve_pde", "sfepy.base.base.IndexedStruct" ]
[((455, 496), 'sfepy.base.base.IndexedStruct.__setitem__', 'IndexedStruct.__setitem__', (['self', 'key', 'val'], {}), '(self, key, val)\n', (480, 496), False, 'from sfepy.base.base import IndexedStruct\n'), ((1153, 1176), 'sfepy.base.conf.get_standard_keywords', 'get_standard_keywords', ([], {}), '()\n', (1174, 1176), ...
""" IGA domain generators. """ import numpy as nm from sfepy.base.base import output, Struct import sfepy.discrete.iga as iga from sfepy.discrete.iga.domain import NurbsPatch def gen_patch_block_domain(dims, shape, centre, degrees, continuity=None, name='block', verbose=True): """ G...
[ "sfepy.discrete.iga.get_patch_box_regions", "sfepy.base.base.output", "sfepy.discrete.iga.combine_bezier_extraction", "sfepy.base.base.Struct", "sfepy.discrete.iga.compute_bezier_extraction", "sfepy.discrete.iga.create_connectivity" ]
[((1252, 1286), 'numpy.asarray', 'nm.asarray', (['dims'], {'dtype': 'nm.float64'}), '(dims, dtype=nm.float64)\n', (1262, 1286), True, 'import numpy as nm\n'), ((1299, 1332), 'numpy.asarray', 'nm.asarray', (['shape'], {'dtype': 'nm.int32'}), '(shape, dtype=nm.int32)\n', (1309, 1332), True, 'import numpy as nm\n'), ((134...
""" Notes ----- Important attributes of continuous (order > 0) :class:`Field` and :class:`SurfaceField` instances: - `vertex_remap` : `econn[:, :n_vertex] = vertex_remap[conn]` - `vertex_remap_i` : `conn = vertex_remap_i[econn[:, :n_vertex]]` where `conn` is the mesh vertex connectivity, `econn` is the region-local ...
[ "sfepy.discrete.fem.mesh.Mesh.from_data", "sfepy.discrete.integrals.Integral", "sfepy.base.base.Struct", "sfepy.discrete.fem.linearizer.get_eval_coors", "sfepy.discrete.fem.meshio.convert_complex_output", "sfepy.discrete.fem.linearizer.create_output", "sfepy.discrete.fem.poly_spaces.PolySpace.any_from_a...
[((2582, 2610), 'numpy.dot', 'nm.dot', (['bf', 'mesh_coors[conn]'], {}), '(bf, mesh_coors[conn])\n', (2588, 2610), True, 'import numpy as nm\n'), ((2630, 2655), 'numpy.swapaxes', 'nm.swapaxes', (['ecoors', '(0)', '(1)'], {}), '(ecoors, 0, 1)\n', (2641, 2655), True, 'import numpy as nm\n'), ((2805, 2846), 'numpy.zeros',...
from __future__ import absolute_import import os.path as op import shutil import numpy as nm from sfepy.base.base import ordered_iteritems, output, set_defaults, assert_ from sfepy.base.base import Struct from sfepy.homogenization.engine import HomogenizationEngine from sfepy.homogenization.homogen_app import Homogen...
[ "sfepy.base.base.set_defaults", "sfepy.applications.PDESolverApp.__init__", "sfepy.base.base.output", "sfepy.base.base.Struct", "sfepy.homogenization.homogen_app.HomogenizationApp.setup_options", "sfepy.base.plotutils.plt.rcParams.update", "sfepy.homogenization.engine.HomogenizationEngine", "sfepy.bas...
[((2230, 2249), 'sfepy.base.plotutils.plt.figure', 'plt.figure', (['fig_num'], {}), '(fig_num)\n', (2240, 2249), False, 'from sfepy.base.plotutils import plt\n'), ((3188, 3207), 'sfepy.base.plotutils.plt.figure', 'plt.figure', (['fig_num'], {}), '(fig_num)\n', (3198, 3207), False, 'from sfepy.base.plotutils import plt\...
#!/usr/bin/env python 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, ...
[ "sfepy.discrete.conditions.EssentialBC", "sfepy.discrete.Integral", "sfepy.postprocess.viewer.Viewer", "sfepy.solvers.ls.ScipyDirect", "sfepy.discrete.Equations", "sfepy.discrete.fem.Field.from_args", "sfepy.discrete.Equation", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.fem.FEDomain", "s...
[((166, 186), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (181, 186), False, 'import sys\n'), ((980, 996), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (994, 996), False, 'from argparse import ArgumentParser\n'), ((1275, 1333), 'sfepy.discrete.fem.Mesh.from_file', 'Mesh.from_fi...
from __future__ import absolute_import import numpy as nm import numpy.linalg as nla from sfepy.base.base import output, get_default, pause, Struct from sfepy.base.log import Log, get_logging_conf from sfepy.base.timing import Timer from sfepy.solvers.solvers import OptimizationSolver import scipy.optimize as sopt i...
[ "sfepy.base.timing.Timer", "sfepy.base.base.Struct", "sfepy.base.base.get_default", "sfepy.base.log.Log", "sfepy.base.base.output", "sfepy.solvers.solvers.OptimizationSolver.__init__", "sfepy.base.log.get_logging_conf", "sfepy.base.base.pause" ]
[((712, 778), 'sfepy.base.base.output', 'output', (["('opt: iter: %d, of: %e (||ofg||: %e)' % (it, of, ofg_norm))"], {}), "('opt: iter: %d, of: %e (||ofg||: %e)' % (it, of, ofg_norm))\n", (718, 778), False, 'from sfepy.base.base import output, get_default, pause, Struct\n'), ((1149, 1156), 'sfepy.base.timing.Timer', 'T...
from sfepy.base.base import Struct from sfepy.solvers import Solver class MassOperator(Struct): """ Encapsulation of action and inverse action of a mass matrix operator :math:`M`. """ def __init__(self, problem, options): self.mtx_mass = problem.evaluate(options.mass, mode='weak', ...
[ "sfepy.solvers.Solver.any_from_conf" ]
[((559, 630), 'sfepy.solvers.Solver.any_from_conf', 'Solver.any_from_conf', (['problem.ls_conf'], {'mtx': 'self.mtx_mass', 'presolve': '(True)'}), '(problem.ls_conf, mtx=self.mtx_mass, presolve=True)\n', (579, 630), False, 'from sfepy.solvers import Solver\n')]
""" Module for handling state variables. """ import numpy as nm from sfepy.base.base import Struct class State(Struct): """ Class holding/manipulating the state variables and corresponding DOF vectors. Manipulating the state class changes the underlying variables, and hence also the corresponding...
[ "sfepy.base.base.Struct.__init__" ]
[((1635, 1698), 'sfepy.base.base.Struct.__init__', 'Struct.__init__', (['self'], {'variables': 'variables', 'vec': 'vec', 'r_vec': 'None'}), '(self, variables=variables, vec=vec, r_vec=None)\n', (1650, 1698), False, 'from sfepy.base.base import Struct\n'), ((9457, 9477), 'numpy.linalg.norm', 'nm.linalg.norm', (['wvec']...
from sfepy.terms.extmods import terms from sfepy.terms.cache import DataCache from sfepy.base.base import nm, pause, debug class ExpHistoryDataCache(DataCache): """History for exponential decay convolution kernels. The decay argument is F(\Delta t), F(t_0=0) is assumed to be 1.0. """ name = 'exp_histo...
[ "sfepy.terms.cache.DataCache.init_datas", "sfepy.terms.cache.DataCache.__init__" ]
[((430, 525), 'sfepy.terms.cache.DataCache.__init__', 'DataCache.__init__', (['self', 'name', 'arg_names', "['history', 'increment', 'decay']", 'history_sizes'], {}), "(self, name, arg_names, ['history', 'increment', 'decay'],\n history_sizes)\n", (448, 525), False, 'from sfepy.terms.cache import DataCache\n'), ((82...
from __future__ import absolute_import import numpy as nm from sfepy.base.base import assert_ from sfepy.linalg import norm_l2_along_axis as norm from sfepy.linalg import dot_sequences, insert_strided_axis from sfepy.discrete.fem.poly_spaces import PolySpace from sfepy.discrete.fem.mappings import VolumeMapping from s...
[ "sfepy.linalg.norm_l2_along_axis", "sfepy.discrete.fem.poly_spaces.PolySpace.any_from_args", "sfepy.mechanics.tensors.dim2sym", "sfepy.linalg.insert_strided_axis", "sfepy.linalg.dot_sequences", "sfepy.discrete.fem.mappings.VolumeMapping" ]
[((1263, 1279), 'numpy.cross', 'nm.cross', (['t1', 't2'], {}), '(t1, t2)\n', (1271, 1279), True, 'import numpy as nm\n'), ((1289, 1304), 'numpy.cross', 'nm.cross', (['n', 't1'], {}), '(n, t1)\n', (1297, 1304), True, 'import numpy as nm\n'), ((1466, 1537), 'numpy.concatenate', 'nm.concatenate', (['(t1[:, :, None], t2[:,...
import os.path as op import numpy as nm import sfepy from sfepy.discrete.common import Field import sfepy.discrete.common.global_interp as gi from sfepy.base.testing import TestCommon class Test(TestCommon): @staticmethod def from_conf(conf, options): test = Test(conf=conf, options=options) ...
[ "sfepy.discrete.common.Field.from_args", "sfepy.discrete.common.global_interp.get_ref_coors", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.fem.FEDomain" ]
[((438, 513), 'sfepy.discrete.fem.Mesh.from_file', 'Mesh.from_file', (['"""meshes/3d/special/cross3d.mesh"""'], {'prefix_dir': 'sfepy.data_dir'}), "('meshes/3d/special/cross3d.mesh', prefix_dir=sfepy.data_dir)\n", (452, 513), False, 'from sfepy.discrete.fem import Mesh, FEDomain\n'), ((561, 585), 'sfepy.discrete.fem.FE...
"""Classes for probing values of Variables, for example, along a line.""" from __future__ import absolute_import import numpy as nm import numpy.linalg as nla from sfepy.base.base import get_default, basestr, Struct from sfepy.linalg import make_axis_rotation_matrix, norm_l2_along_axis import six def write_results(fi...
[ "sfepy.base.base.Struct", "sfepy.linalg.make_axis_rotation_matrix", "sfepy.base.base.get_default", "sfepy.base.base.Struct.__init__", "sfepy.linalg.norm_l2_along_axis", "sfepy.base.ioutils.read_array" ]
[((845, 867), 'six.iteritems', 'six.iteritems', (['results'], {}), '(results)\n', (858, 867), False, 'import six\n'), ((1663, 1690), 'sfepy.base.base.get_default', 'get_default', (['only_names', '[]'], {}), '(only_names, [])\n', (1674, 1690), False, 'from sfepy.base.base import get_default, basestr, Struct\n'), ((2218,...
#!/usr/bin/env python """ Compare various elastic materials w.r.t. uniaxial tension/compression test. Requires Matplotlib. """ from optparse import OptionParser import sys sys.path.append('.') import numpy as nm def define(): """Define the problem to solve.""" from sfepy.discrete.fem.meshio import UserMeshIO...
[ "sfepy.base.plotutils.plt.ylabel", "sfepy.mesh.mesh_generators.gen_block_mesh", "sfepy.base.plotutils.plt.xlabel", "sfepy.base.plotutils.plt.legend", "sfepy.base.conf.ProblemConf.from_file", "sfepy.discrete.fem.meshio.UserMeshIO", "sfepy.base.plotutils.plt.grid", "sfepy.base.plotutils.plt.plot", "sf...
[((173, 193), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (188, 193), False, 'import sys\n'), ((779, 800), 'sfepy.discrete.fem.meshio.UserMeshIO', 'UserMeshIO', (['mesh_hook'], {}), '(mesh_hook)\n', (789, 800), False, 'from sfepy.discrete.fem.meshio import UserMeshIO\n'), ((4880, 4922), 'optpars...
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...
[ "sfepy.mechanics.matcoefs.stiffness_from_lame" ]
[((2177, 2235), 'numpy.array', 'np.array', (['[[1], [1], [1], [0], [0], [0]]'], {'dtype': 'np.float64'}), '([[1], [1], [1], [0], [0], [0]], dtype=np.float64)\n', (2185, 2235), True, 'import numpy as np\n'), ((2281, 2319), 'sfepy.mechanics.matcoefs.stiffness_from_lame', 'stiffness_from_lame', (['(3)'], {'lam': 'lam', 'm...
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...
[ "sfepy.base.base.output", "sfepy.applications.Application.__init__", "sfepy.base.base.Struct", "sfepy.applications.PDESolverApp.setup_options", "sfepy.base.base.get_default" ]
[((1859, 1933), 'sfepy.applications.Application.__init__', 'Application.__init__', (['self', 'problem.conf', 'options', 'output_prefix'], {}), '(self, problem.conf, options, output_prefix, **kwargs)\n', (1879, 1933), False, 'from sfepy.applications import PDESolverApp, Application\n'), ((2316, 2348), 'sfepy.application...
# 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...
[ "sfepy.base.base.output", "sfepy.base.base.nm.ones" ]
[((3241, 3290), 'sfepy.base.base.nm.ones', 'nm.ones', (["(vv['p'].field.n_nod,)"], {'dtype': 'nm.float64'}), "((vv['p'].field.n_nod,), dtype=nm.float64)\n", (3248, 3290), False, 'from sfepy.base.base import Struct, debug, nm, output, assert_\n'), ((3458, 3490), 'sfepy.base.base.output', 'output', (["('div( u ) = %.3e' ...
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...
[ "sfepy.discrete.integrals.Integral", "sfepy.linalg.normalize_vectors", "sfepy.discrete.PolySpace.any_from_args", "sfepy.linalg.norm_l2_along_axis", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.fem.FEDomain", "sfepy.base.base.output" ]
[((352, 387), 'numpy.empty', 'nm.empty', (['(n_full,)'], {'dtype': 'nm.int32'}), '((n_full,), dtype=nm.int32)\n', (360, 387), True, 'import numpy as nm\n'), ((428, 471), 'numpy.arange', 'nm.arange', (['indices.shape[0]'], {'dtype': 'nm.int32'}), '(indices.shape[0], dtype=nm.int32)\n', (437, 471), True, 'import numpy as...
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...
[ "sfepy.discrete.fem.Mesh.from_file" ]
[((965, 990), 'numpy.vstack', 'np.vstack', (['(beam_points,)'], {}), '((beam_points,))\n', (974, 990), True, 'import numpy as np\n'), ((1070, 1115), 'numpy.array', 'np.array', (['[b.point_count for b in self.beams]'], {}), '([b.point_count for b in self.beams])\n', (1078, 1115), True, 'import numpy as np\n'), ((1138, 1...
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 ...
[ "sfepy.mechanics.tensors.get_volumetric_tensor", "sfepy.mechanics.tensors.get_deviator", "sfepy.mechanics.tensors.get_trace", "sfepy.mechanics.tensors.get_von_mises_stress" ]
[((433, 470), 'numpy.array', 'nm.array', (['([6.0] * 5)'], {'dtype': 'nm.float64'}), '([6.0] * 5, dtype=nm.float64)\n', (441, 470), True, 'import numpy as nm\n'), ((792, 831), 'sfepy.mechanics.tensors.get_trace', 'tn.get_trace', (['a_full'], {'sym_storage': '(False)'}), '(a_full, sym_storage=False)\n', (804, 831), True...
# 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: ...
[ "sfepy.base.base.output.set_output", "sfepy.base.conf.ProblemConf.from_file", "sfepy.applications.solve_pde" ]
[((1102, 1149), 'os.path.join', 'os.path.join', (['plugindir', '"""AtrialFibrePlugin.ui"""'], {}), "(plugindir, 'AtrialFibrePlugin.ui')\n", (1114, 1149), False, 'import os\n'), ((1160, 1200), 'os.path.join', 'os.path.join', (['plugindir', '"""deformetricaC"""'], {}), "(plugindir, 'deformetricaC')\n", (1172, 1200), Fals...
# 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...
[ "sfepy.homogenization.utils.get_box_volume", "sfepy.mechanics.matcoefs.stiffness_from_youngpoisson_mixed", "sfepy.homogenization.recovery.compute_stress_strain_u", "sfepy.mechanics.matcoefs.bulk_from_youngpoisson", "sfepy.homogenization.utils.define_box_regions", "sfepy.base.base.Struct", "sfepy.homogen...
[((968, 1046), 'sfepy.base.base.Struct', 'Struct', ([], {'name': '"""output_data"""', 'mode': '"""vertex"""', 'data': 'mic_u', 'var_name': '"""u"""', 'dofs': 'None'}), "(name='output_data', mode='vertex', data=mic_u, var_name='u', dofs=None)\n", (974, 1046), False, 'from sfepy.base.base import Struct\n'), ((1132, 1243)...
# 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 #...
[ "sfepy.mechanics.matcoefs.stiffness_from_youngpoisson", "sfepy.homogenization.utils.define_box_regions", "sfepy.base.base.Struct", "sfepy.homogenization.utils.coor_to_sym", "sfepy.discrete.fem.mesh.Mesh.from_file" ]
[((4603, 4632), 'sfepy.discrete.fem.mesh.Mesh.from_file', 'Mesh.from_file', (['filename_mesh'], {}), '(filename_mesh)\n', (4617, 4632), False, 'from sfepy.discrete.fem.mesh import Mesh\n'), ((4834, 4891), 'sfepy.homogenization.utils.define_box_regions', 'define_box_regions', (['mesh.dim', 'bbox[0]', 'bbox[1]'], {'eps':...
# 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...
[ "sfepy.homogenization.coefficients.Coefficients.from_file_hdf5", "sfepy.discrete.fem.Mesh.from_data", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.fem.FEDomain" ]
[((3633, 3675), 'os.path.join', 'os.path.join', (['pb.output_dir', "(fname + '.h5')"], {}), "(pb.output_dir, fname + '.h5')\n", (3645, 3675), False, 'import os\n'), ((7126, 7147), 'sfepy.discrete.fem.Mesh.from_file', 'Mesh.from_file', (['fname'], {}), '(fname)\n', (7140, 7147), False, 'from sfepy.discrete.fem import Me...
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) for key, fc in conf.iteritems(): fun = Function(name = fc.name, ...
[ "sfepy.base.base.OneTypeList", "sfepy.base.base.Struct.__init__" ]
[((205, 226), 'sfepy.base.base.OneTypeList', 'OneTypeList', (['Function'], {}), '(Function)\n', (216, 226), False, 'from sfepy.base.base import OneTypeList, Container, Struct\n'), ((732, 808), 'sfepy.base.base.Struct.__init__', 'Struct.__init__', (['self'], {'name': 'name', 'function': 'function', 'is_constant': 'is_co...
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...
[ "sfepy.base.base.output", "sfepy.discrete.Problem.from_conf" ]
[((3347, 3371), 'numpy.sqrt', 'nm.sqrt', (['(x ** 2 + y ** 2)'], {}), '(x ** 2 + y ** 2)\n', (3354, 3371), True, 'import numpy as nm\n'), ((3381, 3403), 'numpy.where', 'nm.where', (['(r < diameter)'], {}), '(r < diameter)\n', (3389, 3403), True, 'import numpy as nm\n'), ((4097, 4121), 'numpy.linspace', 'nm.linspace', (...
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 ...
[ "sfepy.base.base.output", "sfepy.discrete.fem.meshio.UserMeshIO", "sfepy.homogenization.utils.define_box_regions", "sfepy.discrete.fem.meshio.MeshIO.any_from_filename", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.fem.FEDomain" ]
[((3111, 3132), 'sfepy.discrete.fem.meshio.UserMeshIO', 'UserMeshIO', (['mesh_hook'], {}), '(mesh_hook)\n', (3121, 3132), False, 'from sfepy.discrete.fem.meshio import UserMeshIO, MeshIO\n'), ((3176, 3211), 'sfepy.discrete.fem.meshio.MeshIO.any_from_filename', 'MeshIO.any_from_filename', (['base_mesh'], {}), '(base_mes...
""" 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) self.time_function = time.perf_counter self.reset() if start: self.start() ...
[ "sfepy.base.base.Struct.__init__" ]
[((174, 206), 'sfepy.base.base.Struct.__init__', 'Struct.__init__', (['self'], {'name': 'name'}), '(self, name=name)\n', (189, 206), False, 'from sfepy.base.base import Struct\n')]
""" 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...
[ "sfepy.postprocess.plot_dofs._to2d", "sfepy.postprocess.plot_dofs._get_axes" ]
[((288, 300), 'sfepy.postprocess.plot_dofs._to2d', '_to2d', (['coors'], {}), '(coors)\n', (293, 300), False, 'from sfepy.postprocess.plot_dofs import _get_axes, _to2d\n'), ((331, 349), 'sfepy.postprocess.plot_dofs._get_axes', '_get_axes', (['ax', 'dim'], {}), '(ax, dim)\n', (340, 349), False, 'from sfepy.postprocess.pl...
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...
[ "sfepy.discrete.conditions.EssentialBC", "sfepy.discrete.Integral", "sfepy.postprocess.viewer.Viewer", "sfepy.solvers.ls.ScipyDirect", "sfepy.discrete.Equations", "sfepy.discrete.fem.Field.from_args", "sfepy.discrete.Equation", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.fem.FEDomain", "s...
[((144, 164), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (159, 164), False, 'import sys\n'), ((971, 987), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (985, 987), False, 'from argparse import ArgumentParser\n'), ((1310, 1371), 'sfepy.discrete.fem.Mesh.from_file', 'Mesh.from_fi...
""" 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...
[ "sfepy.base.base.Struct", "sfepy.discrete.conditions.get_condition_value", "sfepy.base.base.Struct.__init__", "sfepy.base.base.assert_" ]
[((570, 601), 'numpy.repeat', 'nm.repeat', (['nods', 'n_dof_per_node'], {}), '(nods, n_dof_per_node)\n', (579, 601), True, 'import numpy as nm\n'), ((663, 704), 'numpy.arange', 'nm.arange', (['n_dof_per_node'], {'dtype': 'nm.int32'}), '(n_dof_per_node, dtype=nm.int32)\n', (672, 704), True, 'import numpy as nm\n'), ((27...
""" 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={}, ...
[ "sfepy.discrete.iga.mappings.SurfaceMapping", "sfepy.discrete.iga.mappings.VolumeMapping", "sfepy.discrete.iga.mappings.IGMapping", "sfepy.base.base.Struct.__init__" ]
[((253, 383), 'sfepy.base.base.Struct.__init__', 'Struct.__init__', (['self'], {'igs': 'igs', 'n_total': 'n_total', 'indx': '{}', 'rindx': '{}', 'n_per_group': '{}', 'shape': '{}', 'values': '{}', 'is_uniform': 'is_uniform'}), '(self, igs=igs, n_total=n_total, indx={}, rindx={},\n n_per_group={}, shape={}, values={}...
# 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...
[ "sfepy.mechanics.tensors.dim2sym", "sfepy.homogenization.utils.define_box_regions", "sfepy.homogenization.micmac.get_homog_coefs_linear", "sfepy.discrete.fem.mesh.Mesh.from_file" ]
[((2373, 2473), 'sfepy.homogenization.micmac.get_homog_coefs_linear', 'get_homog_coefs_linear', (['(0)', '(0)', 'None'], {'micro_filename': 'micro_filename', 'coefs_filename': 'coefs_filename'}), '(0, 0, None, micro_filename=micro_filename,\n coefs_filename=coefs_filename)\n', (2395, 2473), False, 'from sfepy.homoge...
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):...
[ "sfepy.base.base.Struct", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.fem.Field.from_args", "sfepy.discrete.fem.FEDomain" ]
[((228, 265), 'os.path.join', 'os.path.join', (['test.options.out_dir', 'x'], {}), '(test.options.out_dir, x)\n', (240, 265), False, 'import os\n'), ((661, 723), 'os.path.join', 'os.path.join', (['data_dir', "('meshes/elements/%s_1.mesh' % geometry)"], {}), "(data_dir, 'meshes/elements/%s_1.mesh' % geometry)\n", (673, ...