prompt
stringlengths
174
59.5k
completion
stringlengths
7
228
api
stringlengths
12
64
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(variables1)
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(variables2)
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...
make_axis_rotation_matrix([0, 1, 0], angle)
sfepy.linalg.make_axis_rotation_matrix
#!/usr/bin/env python def configuration(parent_package='', top_path=None): import os.path as op from numpy.distutils.misc_util import Configuration from sfepy import Config site_config =
Config()
sfepy.Config
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
Mesh.from_file(data_dir + '/meshes/3d/cylinder.inp')
sfepy.discrete.fem.Mesh.from_file
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
FEDomain('domain', mesh)
sfepy.discrete.fem.FEDomain
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
Field.from_args('fu', nm.float64, 'vector', omega, approx_order=1)
sfepy.discrete.fem.Field.from_args
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
FieldVariable('u', 'unknown', field)
sfepy.discrete.FieldVariable
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
FieldVariable('v', 'test', field, primary_var_name='u')
sfepy.discrete.FieldVariable
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
Integral('i', order=1)
sfepy.discrete.Integral
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
Equation('balance', t1)
sfepy.discrete.Equation
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
Equations([eq])
sfepy.discrete.Equations
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
ScipyDirect({})
sfepy.solvers.ls.ScipyDirect
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
IndexedStruct()
sfepy.base.base.IndexedStruct
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
Newton({}, lin_solver=ls, status=nls_status)
sfepy.solvers.nls.Newton
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
Problem('elasticity', equations=eqs)
sfepy.discrete.Problem
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
IndexedStruct()
sfepy.base.base.IndexedStruct
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
Probe(out,pb.domain.mesh)
sfepy.postprocess.probes_vtk.Probe
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
stiffness_from_youngpoisson(dim=3, young=2, poisson=0.3)
sfepy.mechanics.matcoefs.stiffness_from_youngpoisson
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 25 09:19:35 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...
Conditions([Fixed, Displaced])
sfepy.discrete.conditions.Conditions
""" Functions for a mesh refinement with hanging nodes. Notes ----- Using LCBCs with hanging nodes is not supported. """ from __future__ import absolute_import from six.moves import range, zip import numpy as nm from sfepy.base.base import assert_ from sfepy.discrete import Functions, Function from sfepy.discrete.fe...
Function('get_refine', _get_refine)
sfepy.discrete.Function
""" Functions for a mesh refinement with hanging nodes. Notes ----- Using LCBCs with hanging nodes is not supported. """ from __future__ import absolute_import from six.moves import range, zip import numpy as nm from sfepy.base.base import assert_ from sfepy.discrete import Functions, Function from sfepy.discrete.fe...
Function('get_coarse', _get_coarse)
sfepy.discrete.Function
""" Functions for a mesh refinement with hanging nodes. Notes ----- Using LCBCs with hanging nodes is not supported. """ from __future__ import absolute_import from six.moves import range, zip import numpy as nm from sfepy.base.base import assert_ from sfepy.discrete import Functions, Function from sfepy.discrete.fe...
Functions([get_refine, get_coarse])
sfepy.discrete.Functions
""" Functions for a mesh refinement with hanging nodes. Notes ----- Using LCBCs with hanging nodes is not supported. """ from __future__ import absolute_import from six.moves import range, zip import numpy as nm from sfepy.base.base import assert_ from sfepy.discrete import Functions, Function from sfepy.discrete.fe...
Mesh.from_region(region1, mesh0)
sfepy.discrete.fem.Mesh.from_region
""" Functions for a mesh refinement with hanging nodes. Notes ----- Using LCBCs with hanging nodes is not supported. """ from __future__ import absolute_import from six.moves import range, zip import numpy as nm from sfepy.base.base import assert_ from sfepy.discrete import Functions, Function from sfepy.discrete.fe...
FEDomain('d', mesh1)
sfepy.discrete.fem.FEDomain
""" Functions for a mesh refinement with hanging nodes. Notes ----- Using LCBCs with hanging nodes is not supported. """ from __future__ import absolute_import from six.moves import range, zip import numpy as nm from sfepy.base.base import assert_ from sfepy.discrete import Functions, Function from sfepy.discrete.fe...
Mesh.from_data('a', coors, vgs, [conn], [mat_id], descs)
sfepy.discrete.fem.Mesh.from_data
""" Functions for a mesh refinement with hanging nodes. Notes ----- Using LCBCs with hanging nodes is not supported. """ from __future__ import absolute_import from six.moves import range, zip import numpy as nm from sfepy.base.base import assert_ from sfepy.discrete import Functions, Function from sfepy.discrete.fe...
FEDomain('d', mesh)
sfepy.discrete.fem.FEDomain
""" Functions for a mesh refinement with hanging nodes. Notes ----- Using LCBCs with hanging nodes is not supported. """ from __future__ import absolute_import from six.moves import range, zip import numpy as nm from sfepy.base.base import assert_ from sfepy.discrete import Functions, Function from sfepy.discrete.fe...
assert_(desc in ['2_4', '3_8'])
sfepy.base.base.assert_
from __future__ import absolute_import 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.ex...
Container.__init__(self, objs=objs)
sfepy.base.base.Container.__init__
from __future__ import absolute_import 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.ex...
Container.insert(self, ii, obj)
sfepy.base.base.Container.insert
from __future__ import absolute_import 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.ex...
Container.append(self, obj)
sfepy.base.base.Container.append
from __future__ import absolute_import 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.ex...
Struct.get(self, 'function', None)
sfepy.base.base.Struct.get
from __future__ import absolute_import 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.ex...
get_default(step, self.arg_steps[name])
sfepy.base.base.get_default
from __future__ import absolute_import 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.ex...
get_default(integration, self.geometry_types[name])
sfepy.base.base.get_default
from __future__ import absolute_import 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.ex...
dim2sym(dim)
sfepy.mechanics.tensors.dim2sym
from __future__ import absolute_import 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.ex...
create_adof_conns(conn_info, None)
sfepy.discrete.create_adof_conns
from __future__ import absolute_import 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.ex...
terms.append(term)
sfepy.terms.extmods.terms.append
from __future__ import absolute_import 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.ex...
Integrals()
sfepy.discrete.Integrals
from __future__ import absolute_import 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.ex...
as_float_or_complex(other)
sfepy.base.base.as_float_or_complex
from __future__ import absolute_import 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.ex...
Struct()
sfepy.base.base.Struct
from __future__ import absolute_import 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.ex...
Struct.get(self, 'mode', None)
sfepy.base.base.Struct.get
from __future__ import absolute_import 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.ex...
PhysicalQPs()
sfepy.discrete.common.mappings.PhysicalQPs
from __future__ import absolute_import 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.ex...
get_physical_qps(self.region, self.integral)
sfepy.discrete.common.mappings.get_physical_qps
from __future__ import absolute_import 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.ex...
output('allowed argument shapes for term "%s":' % term_str)
sfepy.base.base.output
from __future__ import absolute_import 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.ex...
output(allowed_shapes)
sfepy.base.base.output
from __future__ import absolute_import 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.ex...
output('actual argument shapes:')
sfepy.base.base.output
from __future__ import absolute_import 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.ex...
output(actual_shapes)
sfepy.base.base.output
from __future__ import absolute_import 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.ex...
terms.errclear()
sfepy.terms.extmods.terms.errclear
from __future__ import absolute_import 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.ex...
terms.errclear()
sfepy.terms.extmods.terms.errclear
from __future__ import absolute_import 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.ex...
terms.errclear()
sfepy.terms.extmods.terms.errclear
from __future__ import absolute_import 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.ex...
assert_(asm_obj.dtype == nm.complex128)
sfepy.base.base.assert_
from __future__ import absolute_import 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.ex...
assert_(val.shape[2] == dc.shape[1])
sfepy.base.base.assert_
from __future__ import absolute_import 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.ex...
Struct(terms=[self])
sfepy.base.base.Struct
from __future__ import absolute_import 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.ex...
assert_(asm_obj.dtype == nm.complex128)
sfepy.base.base.assert_
from __future__ import absolute_import 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.ex...
assert_(val.shape[2:] == (rdc.shape[1], cdc.shape[1]))
sfepy.base.base.assert_
from __future__ import absolute_import 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.ex...
term_table.keys()
sfepy.terms.term_table.keys
from __future__ import absolute_import 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.ex...
term_table.keys()
sfepy.terms.term_table.keys
#%% import numpy as np from sfepy.discrete.fem import Mesh, FEDomain, Field mesh_path = 'C:/Users/lzy71/miniconda3/envs/lego/lib/site-packages/sfepy/meshes/2d/rectangle_tri.mesh' #%% mesh =
Mesh.from_file(mesh_path)
sfepy.discrete.fem.Mesh.from_file
#%% import numpy as np from sfepy.discrete.fem import Mesh, FEDomain, Field mesh_path = 'C:/Users/lzy71/miniconda3/envs/lego/lib/site-packages/sfepy/meshes/2d/rectangle_tri.mesh' #%% mesh = Mesh.from_file(mesh_path) domain =
FEDomain('domain', mesh)
sfepy.discrete.fem.FEDomain
#%% import numpy as np from sfepy.discrete.fem import Mesh, FEDomain, Field mesh_path = 'C:/Users/lzy71/miniconda3/envs/lego/lib/site-packages/sfepy/meshes/2d/rectangle_tri.mesh' #%% mesh = Mesh.from_file(mesh_path) domain = FEDomain('domain', mesh) min_x, max_x = domain.get_mesh_bounding_box()[:, 0] eps = 1e-8 * (m...
Field.from_args('fu', np.float64, 'vector', omega, approx_order=2)
sfepy.discrete.fem.Field.from_args
#%% import numpy as np from sfepy.discrete.fem import Mesh, FEDomain, Field mesh_path = 'C:/Users/lzy71/miniconda3/envs/lego/lib/site-packages/sfepy/meshes/2d/rectangle_tri.mesh' #%% mesh = Mesh.from_file(mesh_path) domain = FEDomain('domain', mesh) min_x, max_x = domain.get_mesh_bounding_box()[:, 0] eps = 1e-8 * (m...
FieldVariable('u', 'unknown', field)
sfepy.discrete.FieldVariable
#%% import numpy as np from sfepy.discrete.fem import Mesh, FEDomain, Field mesh_path = 'C:/Users/lzy71/miniconda3/envs/lego/lib/site-packages/sfepy/meshes/2d/rectangle_tri.mesh' #%% mesh = Mesh.from_file(mesh_path) domain = FEDomain('domain', mesh) min_x, max_x = domain.get_mesh_bounding_box()[:, 0] eps = 1e-8 * (m...
FieldVariable('v', 'test', field, primary_var_name='u')
sfepy.discrete.FieldVariable
#%% import numpy as np from sfepy.discrete.fem import Mesh, FEDomain, Field mesh_path = 'C:/Users/lzy71/miniconda3/envs/lego/lib/site-packages/sfepy/meshes/2d/rectangle_tri.mesh' #%% mesh = Mesh.from_file(mesh_path) domain = FEDomain('domain', mesh) min_x, max_x = domain.get_mesh_bounding_box()[:, 0] eps = 1e-8 * (m...
Material('f', val=[[0.02], [0.01]])
sfepy.discrete.Material
#%% import numpy as np from sfepy.discrete.fem import Mesh, FEDomain, Field mesh_path = 'C:/Users/lzy71/miniconda3/envs/lego/lib/site-packages/sfepy/meshes/2d/rectangle_tri.mesh' #%% mesh = Mesh.from_file(mesh_path) domain = FEDomain('domain', mesh) min_x, max_x = domain.get_mesh_bounding_box()[:, 0] eps = 1e-8 * (m...
Integral('i', order=3)
sfepy.discrete.Integral
#%% import numpy as np from sfepy.discrete.fem import Mesh, FEDomain, Field mesh_path = 'C:/Users/lzy71/miniconda3/envs/lego/lib/site-packages/sfepy/meshes/2d/rectangle_tri.mesh' #%% mesh = Mesh.from_file(mesh_path) domain = FEDomain('domain', mesh) min_x, max_x = domain.get_mesh_bounding_box()[:, 0] eps = 1e-8 * (m...
Equation('balance', t1 + t2)
sfepy.discrete.Equation
#%% import numpy as np from sfepy.discrete.fem import Mesh, FEDomain, Field mesh_path = 'C:/Users/lzy71/miniconda3/envs/lego/lib/site-packages/sfepy/meshes/2d/rectangle_tri.mesh' #%% mesh = Mesh.from_file(mesh_path) domain = FEDomain('domain', mesh) min_x, max_x = domain.get_mesh_bounding_box()[:, 0] eps = 1e-8 * (m...
Equations([eq])
sfepy.discrete.Equations
#%% import numpy as np from sfepy.discrete.fem import Mesh, FEDomain, Field mesh_path = 'C:/Users/lzy71/miniconda3/envs/lego/lib/site-packages/sfepy/meshes/2d/rectangle_tri.mesh' #%% mesh = Mesh.from_file(mesh_path) domain = FEDomain('domain', mesh) min_x, max_x = domain.get_mesh_bounding_box()[:, 0] eps = 1e-8 * (m...
Problem('elasticity', equations=eqs)
sfepy.discrete.Problem
#%% import numpy as np from sfepy.discrete.fem import Mesh, FEDomain, Field mesh_path = 'C:/Users/lzy71/miniconda3/envs/lego/lib/site-packages/sfepy/meshes/2d/rectangle_tri.mesh' #%% mesh = Mesh.from_file(mesh_path) domain = FEDomain('domain', mesh) min_x, max_x = domain.get_mesh_bounding_box()[:, 0] eps = 1e-8 * (m...
stiffness_from_lame(dim=2, lam=1.0, mu=1.0)
sfepy.mechanics.matcoefs.stiffness_from_lame
from __future__ import absolute_import import numpy as nm from sfepy.base.base import load_classes, Struct from sfepy import get_paths def transform_basis(transform, bf): """ Transform a basis `bf` using `transform` array of matrices. """ if bf.ndim == 3: nbf = nm.einsum('cij,qdj->cqdi', trans...
get_paths('sfepy/discrete/fem/poly_spaces.py')
sfepy.get_paths
from __future__ import absolute_import import numpy as nm from sfepy.base.base import load_classes, Struct from sfepy import get_paths def transform_basis(transform, bf): """ Transform a basis `bf` using `transform` array of matrices. """ if bf.ndim == 3: nbf = nm.einsum('cij,qdj->cqdi', trans...
get_paths('sfepy/discrete/dg/poly_spaces.py')
sfepy.get_paths
# This example implements homogenization of porous structures undergoing finite strains. # # largedef_porous_mac.py - problem at (global) macroscopic level # largedef_porous_mic.py - local subproblems, homogenized coefficients # # The mathematical model and numerical results are described in: # # <NAME>., <NAME>. # Ho...
TimeStepper(0, 0.15, n_step=30)
sfepy.solvers.ts.TimeStepper
# This example implements homogenization of porous structures undergoing finite strains. # # largedef_porous_mac.py - problem at (global) macroscopic level # largedef_porous_mic.py - local subproblems, homogenized coefficients # # The mathematical model and numerical results are described in: # # <NAME>., <NAME>. # Ho...
la.dot_sequences(mtx_f, mtx_f, 'ATB')
sfepy.linalg.dot_sequences
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
FEDomain('d1', m1)
sfepy.discrete.fem.FEDomain
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
FEDomain('d2', m2)
sfepy.discrete.fem.FEDomain
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
transform_variables(variables)
sfepy.base.conf.transform_variables
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
transform_variables(variables)
sfepy.base.conf.transform_variables
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
Mesh('source mesh', data_dir + '/meshes/3d/block.mesh')
sfepy.discrete.fem.Mesh
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
Mesh('target mesh', data_dir + '/meshes/3d/cube_medium_tetra.mesh')
sfepy.discrete.fem.Mesh
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
FEDomain('d1', m1)
sfepy.discrete.fem.FEDomain
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
FEDomain('d2', m2)
sfepy.discrete.fem.FEDomain
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
Mesh('source mesh', data_dir + '/meshes/3d/block.mesh')
sfepy.discrete.fem.Mesh
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
FEDomain('domain', mesh)
sfepy.discrete.fem.FEDomain
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
Integral('i', order=2)
sfepy.discrete.Integral
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
Term.new('ev_volume_integrate(u)', integral, omega, u=u)
sfepy.terms.Term.new
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
get_physical_qps(omega, integral)
sfepy.discrete.common.mappings.get_physical_qps
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
Mesh('original mesh', data_dir + '/meshes/3d/block.mesh')
sfepy.discrete.fem.Mesh
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
Mesh('original mesh', data_dir + '/meshes/3d/cylinder.mesh')
sfepy.discrete.fem.Mesh
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
transform_variables(variables1)
sfepy.base.conf.transform_variables
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
transform_variables(variables2)
sfepy.base.conf.transform_variables
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
Mesh('original mesh', data_dir + '/meshes/3d/block.mesh')
sfepy.discrete.fem.Mesh
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
Mesh('original mesh', data_dir + '/meshes/3d/cylinder.mesh')
sfepy.discrete.fem.Mesh
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
transform_variables(variables)
sfepy.base.conf.transform_variables
import os.path as op import numpy as nm from sfepy.base.conf import transform_variables 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) def gen_datas(meshes): ...
make_axis_rotation_matrix([0, 1, 0], angle)
sfepy.linalg.make_axis_rotation_matrix
""" Functions to visualize the geometry elements and numbering and orientation of their facets (edges and faces). The standard geometry elements can be plotted by running:: $ python sfepy/postprocess/plot_facets.py """ import numpy as nm import matplotlib.pyplot as plt from sfepy.linalg import (get_perpendiculars,...
plot_mesh(ax, gel.coors, [gel.conn], gel.edges, show=False)
sfepy.postprocess.plot_dofs.plot_mesh
""" Functions to visualize the geometry elements and numbering and orientation of their facets (edges and faces). The standard geometry elements can be plotted by running:: $ python sfepy/postprocess/plot_facets.py """ import numpy as nm import matplotlib.pyplot as plt from sfepy.linalg import (get_perpendiculars,...
plot_global_dofs(ax, gel.coors, [gel.conn], show=show)
sfepy.postprocess.plot_dofs.plot_global_dofs
""" Functions to visualize the geometry elements and numbering and orientation of their facets (edges and faces). The standard geometry elements can be plotted by running:: $ python sfepy/postprocess/plot_facets.py """ import numpy as nm import matplotlib.pyplot as plt from sfepy.linalg import (get_perpendiculars,...
_get_axes(ax, dim)
sfepy.postprocess.plot_dofs._get_axes
""" Functions to visualize the geometry elements and numbering and orientation of their facets (edges and faces). The standard geometry elements can be plotted by running:: $ python sfepy/postprocess/plot_facets.py """ import numpy as nm import matplotlib.pyplot as plt from sfepy.linalg import (get_perpendiculars,...
_get_axes(ax, dim)
sfepy.postprocess.plot_dofs._get_axes
""" Functions to visualize the geometry elements and numbering and orientation of their facets (edges and faces). The standard geometry elements can be plotted by running:: $ python sfepy/postprocess/plot_facets.py """ import numpy as nm import matplotlib.pyplot as plt from sfepy.linalg import (get_perpendiculars,...
get_perpendiculars(vd)
sfepy.linalg.get_perpendiculars
""" Functions to visualize the geometry elements and numbering and orientation of their facets (edges and faces). The standard geometry elements can be plotted by running:: $ python sfepy/postprocess/plot_facets.py """ import numpy as nm import matplotlib.pyplot as plt from sfepy.linalg import (get_perpendiculars,...
geometry_data.iteritems()
sfepy.discrete.fem.geometry_element.geometry_data.iteritems
""" Functions to visualize the geometry elements and numbering and orientation of their facets (edges and faces). The standard geometry elements can be plotted by running:: $ python sfepy/postprocess/plot_facets.py """ import numpy as nm import matplotlib.pyplot as plt from sfepy.linalg import (get_perpendiculars,...
normalize_vectors(vdir)
sfepy.linalg.normalize_vectors