prompt stringlengths 174 59.5k | completion stringlengths 7 228 | api stringlengths 12 64 |
|---|---|---|
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Conditions(ics) | sfepy.discrete.conditions.Conditions |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Conditions(bcs) | sfepy.discrete.conditions.Conditions |
from __future__ import absolute_import
import os.path as op
import numpy as nm
from sfepy import data_dir
from sfepy.base.testing import TestCommon
import six
def init_vec(variables):
return nm.random.rand(variables.di.ptr[-1])
def check_vec(self, vec, ii, ok, conds, variables):
from sfepy.discrete.common.... | Variables([u, p]) | sfepy.discrete.Variables |
import numpy as nm
from sfepy.base.conf import transform_functions
from sfepy.base.testing import TestCommon
def get_nodes(coors, domain=None):
x, z = coors[:,0], coors[:,2]
return nm.where((z < 0.1) & (x < 0.1))[0]
def get_elements(coors, domain=None):
return {0 : [1, 4, 5]}
class Test(TestCommon):
... | Domain('test domain', mesh) | sfepy.fem.Domain |
import numpy as nm
from sfepy.base.conf import transform_functions
from sfepy.base.testing import TestCommon
def get_nodes(coors, domain=None):
x, z = coors[:,0], coors[:,2]
return nm.where((z < 0.1) & (x < 0.1))[0]
def get_elements(coors, domain=None):
return {0 : [1, 4, 5]}
class Test(TestCommon):
... | transform_functions(conf_functions) | sfepy.base.conf.transform_functions |
from __future__ import absolute_import
from sfepy.discrete.fem import Mesh, FEDomain
import scipy.sparse as sps
import numpy as nm
from sfepy.base.compat import factorial
from sfepy.base.base import output
from six.moves import range
def elems_q2t(el):
nel, nnd = el.shape
if nnd > 4:
q2t = nm.array([[... | output('smoothing...') | sfepy.base.base.output |
from __future__ import absolute_import
from sfepy.discrete.fem import Mesh, FEDomain
import scipy.sparse as sps
import numpy as nm
from sfepy.base.compat import factorial
from sfepy.base.base import output
from six.moves import range
def elems_q2t(el):
nel, nnd = el.shape
if nnd > 4:
q2t = nm.array([[... | Timer(start=True) | sfepy.base.timing.Timer |
from __future__ import absolute_import
from sfepy.discrete.fem import Mesh, FEDomain
import scipy.sparse as sps
import numpy as nm
from sfepy.base.compat import factorial
from sfepy.base.base import output
from six.moves import range
def elems_q2t(el):
nel, nnd = el.shape
if nnd > 4:
q2t = nm.array([[... | output('initial mesh: %d elements' % nelo, verbose=verbose) | sfepy.base.base.output |
from __future__ import absolute_import
from sfepy.discrete.fem import Mesh, FEDomain
import scipy.sparse as sps
import numpy as nm
from sfepy.base.compat import factorial
from sfepy.base.base import output
from six.moves import range
def elems_q2t(el):
nel, nnd = el.shape
if nnd > 4:
q2t = nm.array([[... | output('new mesh: %d elements' % new_conns.shape[0], verbose=verbose) | sfepy.base.base.output |
from __future__ import absolute_import
from sfepy.discrete.fem import Mesh, FEDomain
import scipy.sparse as sps
import numpy as nm
from sfepy.base.compat import factorial
from sfepy.base.base import output
from six.moves import range
def elems_q2t(el):
nel, nnd = el.shape
if nnd > 4:
q2t = nm.array([[... | FEDomain('mesh', mesh) | sfepy.discrete.fem.FEDomain |
from __future__ import absolute_import
from sfepy.discrete.fem import Mesh, FEDomain
import scipy.sparse as sps
import numpy as nm
from sfepy.base.compat import factorial
from sfepy.base.base import output
from six.moves import range
def elems_q2t(el):
nel, nnd = el.shape
if nnd > 4:
q2t = nm.array([[... | output('rescaling...') | sfepy.base.base.output |
from __future__ import absolute_import
from sfepy.discrete.fem import Mesh, FEDomain
import scipy.sparse as sps
import numpy as nm
from sfepy.base.compat import factorial
from sfepy.base.base import output
from six.moves import range
def elems_q2t(el):
nel, nnd = el.shape
if nnd > 4:
q2t = nm.array([[... | output('scale factor: %.2f' % scale) | sfepy.base.base.output |
from __future__ import absolute_import
from sfepy.discrete.fem import Mesh, FEDomain
import scipy.sparse as sps
import numpy as nm
from sfepy.base.compat import factorial
from sfepy.base.base import output
from six.moves import range
def elems_q2t(el):
nel, nnd = el.shape
if nnd > 4:
q2t = nm.array([[... | factorial(dim) | sfepy.base.compat.factorial |
from __future__ import absolute_import
from sfepy.discrete.fem import Mesh, FEDomain
import scipy.sparse as sps
import numpy as nm
from sfepy.base.compat import factorial
from sfepy.base.base import output
from six.moves import range
def elems_q2t(el):
nel, nnd = el.shape
if nnd > 4:
q2t = nm.array([[... | dets_fast(mtx) | sfepy.linalg.utils.dets_fast |
import numpy as nm
from sfepy.base.base import assert_, Struct
from sfepy.terms.terms import terms
from sfepy.terms.terms_hyperelastic_base import HyperElasticBase
class HyperElasticTLBase(HyperElasticBase):
"""
Base class for all hyperelastic terms in TL formulation family.
The subclasses should have th... | Struct(name='tl_family_data') | sfepy.base.base.Struct |
import numpy as nm
from sfepy.base.base import assert_, Struct
from sfepy.terms.terms import terms
from sfepy.terms.terms_hyperelastic_base import HyperElasticBase
class HyperElasticTLBase(HyperElasticBase):
"""
Base class for all hyperelastic terms in TL formulation family.
The subclasses should have th... | Struct(name='tl_surface_family_data') | sfepy.base.base.Struct |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 9 19:16:05 2021
@author: shrohanmohapatra
"""
r"""
Navier-Stokes equations for incompressible fluid flow in 2D.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} \nu\ \nabla \ul{v} : \nabla \ul{u}
+ \int_{\Omega} ((\ul{u}... | UserMeshIO(mesh_hook) | sfepy.discrete.fem.meshio.UserMeshIO |
from __future__ import absolute_import
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.di... | get_standard_keywords() | sfepy.base.conf.get_standard_keywords |
from __future__ import absolute_import
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.di... | ProblemConf.from_file(micro_filename, required, other, verbose=False) | sfepy.base.conf.ProblemConf.from_file |
from __future__ import absolute_import
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.di... | get_standard_keywords() | sfepy.base.conf.get_standard_keywords |
from __future__ import absolute_import
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.di... | Struct(output_filename_trunk=None) | sfepy.base.base.Struct |
from __future__ import absolute_import
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.di... | HDF5MeshIO( val+'.h5' ) | sfepy.discrete.fem.meshio.HDF5MeshIO |
from __future__ import absolute_import
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.di... | multi.get_multiproc(mpi=True) | sfepy.base.multiproc.get_multiproc |
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_elastic_constants(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True
... | ElasticConstants(lam=1.0, mu=1.5) | sfepy.mechanics.matcoefs.ElasticConstants |
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_elastic_constants(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True
... | mc.ElasticConstants(lam=lam, mu=mu) | sfepy.mechanics.matcoefs.ElasticConstants |
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_elastic_constants(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True
... | mc.lame_from_youngpoisson(young, poisson) | sfepy.mechanics.matcoefs.lame_from_youngpoisson |
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_elastic_constants(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True
... | mc.bulk_from_youngpoisson(young, poisson) | sfepy.mechanics.matcoefs.bulk_from_youngpoisson |
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_elastic_constants(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True
... | mc.bulk_from_lame(lam, mu) | sfepy.mechanics.matcoefs.bulk_from_lame |
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_elastic_constants(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True
... | mc.stiffness_from_lame(3, lam, mu) | sfepy.mechanics.matcoefs.stiffness_from_lame |
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_elastic_constants(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True
... | assert_(_ds.shape == (3, 6, 6)) | sfepy.base.base.assert_ |
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_elastic_constants(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True
... | mc.stiffness_from_lame_mixed(3, lam, mu) | sfepy.mechanics.matcoefs.stiffness_from_lame_mixed |
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_elastic_constants(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True
... | assert_(_ds.shape == (3, 6, 6)) | sfepy.base.base.assert_ |
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_elastic_constants(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True
... | mc.stiffness_from_lame(3, blam, mu) | sfepy.mechanics.matcoefs.stiffness_from_lame |
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
return Test(conf=conf, options=options)
def test_elastic_constants(self):
import numpy as nm
from sfepy.mechanics.matcoefs import ElasticConstants
ok = True
... | assert_(_ds.shape == (3, 6, 6)) | sfepy.base.base.assert_ |
import numpy as nm
from sfepy.base.base import Struct, assert_
from sfepy.discrete.fem.mappings import VolumeMapping, SurfaceMapping
from poly_spaces import PolySpace
from fe_surface import FESurface
def set_mesh_coors(domain, fields, coors, update_fields=False, actual=False,
clear_all=True):
i... | assert_(key[0] == 's') | sfepy.base.base.assert_ |
import numpy as nm
from sfepy.base.base import Struct, assert_
from sfepy.discrete.fem.mappings import VolumeMapping, SurfaceMapping
from poly_spaces import PolySpace
from fe_surface import FESurface
def set_mesh_coors(domain, fields, coors, update_fields=False, actual=False,
clear_all=True):
i... | assert_(key[0] == 's') | sfepy.base.base.assert_ |
import numpy as nm
from sfepy.base.base import Struct, assert_
from sfepy.discrete.fem.mappings import VolumeMapping, SurfaceMapping
from poly_spaces import PolySpace
from fe_surface import FESurface
def set_mesh_coors(domain, fields, coors, update_fields=False, actual=False,
clear_all=True):
i... | Struct(vals=vals, weights=weights) | sfepy.base.base.Struct |
import numpy as nm
from sfepy.base.base import Struct, assert_
from sfepy.discrete.fem.mappings import VolumeMapping, SurfaceMapping
from poly_spaces import PolySpace
from fe_surface import FESurface
def set_mesh_coors(domain, fields, coors, update_fields=False, actual=False,
clear_all=True):
i... | VolumeMapping(coors, conn, poly_space=geo_ps) | sfepy.discrete.fem.mappings.VolumeMapping |
import numpy as nm
from sfepy.base.base import Struct, assert_
from sfepy.discrete.fem.mappings import VolumeMapping, SurfaceMapping
from poly_spaces import PolySpace
from fe_surface import FESurface
def set_mesh_coors(domain, fields, coors, update_fields=False, actual=False,
clear_all=True):
i... | assert_(bkey == sd.bkey) | sfepy.base.base.assert_ |
import numpy as nm
from sfepy.base.base import Struct, assert_
from sfepy.discrete.fem.mappings import VolumeMapping, SurfaceMapping
from poly_spaces import PolySpace
from fe_surface import FESurface
def set_mesh_coors(domain, fields, coors, update_fields=False, actual=False,
clear_all=True):
i... | Struct(vals=vals, weights=weights) | sfepy.base.base.Struct |
import numpy as nm
from sfepy.base.base import Struct, assert_
from sfepy.discrete.fem.mappings import VolumeMapping, SurfaceMapping
from poly_spaces import PolySpace
from fe_surface import FESurface
def set_mesh_coors(domain, fields, coors, update_fields=False, actual=False,
clear_all=True):
i... | mm.create_transformation_matrix(ccoors) | sfepy.mechanics.membranes.create_transformation_matrix |
import numpy as nm
from sfepy.base.base import Struct, assert_
from sfepy.discrete.fem.mappings import VolumeMapping, SurfaceMapping
from poly_spaces import PolySpace
from fe_surface import FESurface
def set_mesh_coors(domain, fields, coors, update_fields=False, actual=False,
clear_all=True):
i... | mm.create_mapping(coors_loc, field.gel, 1) | sfepy.mechanics.membranes.create_mapping |
import numpy as nm
from sfepy.base.base import Struct, assert_
from sfepy.discrete.fem.mappings import VolumeMapping, SurfaceMapping
from poly_spaces import PolySpace
from fe_surface import FESurface
def set_mesh_coors(domain, fields, coors, update_fields=False, actual=False,
clear_all=True):
i... | assert_(field.approx_order > 0) | sfepy.base.base.assert_ |
import numpy as nm
from sfepy.base.base import Struct, assert_
from sfepy.discrete.fem.mappings import VolumeMapping, SurfaceMapping
from poly_spaces import PolySpace
from fe_surface import FESurface
def set_mesh_coors(domain, fields, coors, update_fields=False, actual=False,
clear_all=True):
i... | SurfaceMapping(coors, conn, poly_space=geo_ps) | sfepy.discrete.fem.mappings.SurfaceMapping |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | Mesh.from_region(omega_gi, mesh, localize=True) | sfepy.discrete.fem.Mesh.from_region |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | FEDomain('domain_i', mesh_i) | sfepy.discrete.fem.FEDomain |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('field 1: number of local DOFs:', field1_i.n_nod) | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('field 2: number of local DOFs:', field2_i.n_nod) | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | FieldVariable('u_i', 'unknown', field1_i, order=0) | sfepy.discrete.FieldVariable |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | FieldVariable('v_i', 'test', field1_i, primary_var_name='u_i') | sfepy.discrete.FieldVariable |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | FieldVariable('p_i', 'unknown', field2_i, order=1) | sfepy.discrete.FieldVariable |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | FieldVariable('q_i', 'test', field2_i, primary_var_name='p_i') | sfepy.discrete.FieldVariable |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | Equation('eq1', t11 - t12) | sfepy.discrete.Equation |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | Equation('eq1', t21 + t22) | sfepy.discrete.Equation |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | Equations([eq1, eq2]) | sfepy.discrete.Equations |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | Function('bc_fun', bc_fun) | sfepy.discrete.Function |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | Problem('problem_i', equations=eqs, active_only=False) | sfepy.discrete.Problem |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('rank', rank, 'of', size) | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | Mesh.from_file(mesh_filename) | sfepy.discrete.fem.Mesh.from_file |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('creating global domain and fields...') | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | FEDomain('domain', mesh) | sfepy.discrete.fem.FEDomain |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('distributing fields...') | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('creating local problem...') | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | Region.from_cells(cells, domain) | sfepy.discrete.common.region.Region.from_cells |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | State(variables) | sfepy.discrete.State |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('allocating global system...') | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('creating solver...') | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | PETScKrylovSolver(conf, comm=comm, mtx=pmtx, status=status) | sfepy.solvers.ls.PETScKrylovSolver |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('solving...') | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('saving solution...') | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | pl.create_gather_to_zero(psol) | sfepy.parallel.parallel.create_gather_to_zero |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output.set_output(filename=filename, combined=options.silent == False) | sfepy.base.base.output.set_output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('petsc options:', petsc_opts) | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('field u order:', options.order_u) | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('field p order:', options.order_p) | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | ensure_path(filename) | sfepy.base.ioutils.ensure_path |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('dimensions:', dims) | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('shape: ', shape) | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | output('centre: ', centre) | sfepy.base.base.output |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | stiffness_from_lame(mesh.dim, lam=10, mu=5) | sfepy.mechanics.matcoefs.stiffness_from_lame |
#!/usr/bin/env python
r"""
Parallel assembling and solving of a Biot problem (deformable porous medium),
using commands for interactive use.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, ... | Conditions([ebc1, ebc2, ebc3]) | sfepy.discrete.conditions.Conditions |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_sym_indices(3) | sfepy.mechanics.tensors.get_sym_indices |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_trace(a_full, sym_storage=False) | sfepy.mechanics.tensors.get_trace |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_trace(a_sym, sym_storage=True) | sfepy.mechanics.tensors.get_trace |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_volumetric_tensor(a_full, sym_storage=False) | sfepy.mechanics.tensors.get_volumetric_tensor |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_volumetric_tensor(a_sym, sym_storage=True) | sfepy.mechanics.tensors.get_volumetric_tensor |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_deviator(a_full, sym_storage=False) | sfepy.mechanics.tensors.get_deviator |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_deviator(a_sym, sym_storage=True) | sfepy.mechanics.tensors.get_deviator |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_von_mises_stress(a_full, sym_storage=False) | sfepy.mechanics.tensors.get_von_mises_stress |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_von_mises_stress(a_sym, sym_storage=True) | sfepy.mechanics.tensors.get_von_mises_stress |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_t4_from_t2s(t2s) | sfepy.mechanics.tensors.get_t4_from_t2s |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | transform_data(data, coors) | sfepy.mechanics.tensors.transform_data |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | transform_data(data, coors) | sfepy.mechanics.tensors.transform_data |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.make_axis_rotation_matrix([0., 0., 1.], phi) | sfepy.mechanics.tensors.make_axis_rotation_matrix |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.transform_data(dr[None, ...], mtx=mtx[None, ...]) | sfepy.mechanics.tensors.transform_data |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_sym_indices(3) | sfepy.mechanics.tensors.get_sym_indices |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.get_full_indices(3) | sfepy.mechanics.tensors.get_full_indices |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.transform_data(o1[None,...], mtx=mtx[None, ...]) | sfepy.mechanics.tensors.transform_data |
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
def get_ortho_d(phi1, phi2):
import numpy as nm
import sfepy.mechanics.tensors as tn
v1 = nm.array([nm.cos(phi1), nm.sin(phi1), 0])
v2 = nm.array([nm.cos(phi2), nm.sin(phi2), 0])
om1 = nm.outer(v1, v1)
om2 = nm.ou... | tn.transform_data(o2[None,...], mtx=mtx[None, ...]) | sfepy.mechanics.tensors.transform_data |
# 28.05.2009, c
from sfepy import data_dir
filename_mesh = data_dir + '/meshes/3d/elbow.mesh'
fields = {
'scalar' : ('real', 'scalar', 'Omega', 1),
'vector' : ('real', 'vector', 'Omega', 1),
}
integrals = {
'i1' : ('v', 'gauss_o2_d3'),
'i2' : ('s', 'gauss_o2_d2'),
}
regions = {
'Omega' : ('all',... | ProblemDefinition.from_conf(conf, init_equations=False) | sfepy.fem.ProblemDefinition.from_conf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.