sfepy.homogenization.coefs_base module

class sfepy.homogenization.coefs_base.CoefDim(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.CoefDimDim(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.CoefDimSym(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.CoefDummy(name, problem, kwargs)[source]

Dummy class serving for computing and returning its requirements.

class sfepy.homogenization.coefs_base.CoefEval(name, problem, kwargs)[source]

Evaluate expression.

class sfepy.homogenization.coefs_base.CoefExprPar(name, problem, kwargs)[source]

The coefficient which expression can be parametrized via ‘expr_pars’, the dimension is given by the number of parameters.

Example:

‘expression’: ‘dw_surface_ndot.5.Ys(mat_norm.k%d, corr1)’, ‘expr_pars’: [ii for ii in range(dim)], ‘class’: cb.CoefExprPar,
static set_variables_default(variables, ir, set_var, data)[source]
class sfepy.homogenization.coefs_base.CoefFMOne(name, problem, kwargs)[source]

Fading memory scalar coefficients.

class sfepy.homogenization.coefs_base.CoefFMSym(name, problem, kwargs)[source]

Fading memory sym coefficients.

class sfepy.homogenization.coefs_base.CoefFMSymSym(name, problem, kwargs)[source]

Fading memory sym x sym coefficients.

class sfepy.homogenization.coefs_base.CoefN(name, problem, kwargs)[source]
get_coef(row, volume, problem, data)[source]
static set_variables_default(variables, ir, ic, mode, set_var, data)[source]
class sfepy.homogenization.coefs_base.CoefNN(name, problem, kwargs)[source]
get_coef(row, col, volume, problem, data)[source]
static set_variables_default(variables, ir, ic, mode, set_var, data)[source]
class sfepy.homogenization.coefs_base.CoefNonSym(name, problem, kwargs)[source]
is_sym = False
static iter_sym(dim)
class sfepy.homogenization.coefs_base.CoefNonSymNonSym(name, problem, kwargs)[source]
is_sym = False
static iter_sym(dim)
class sfepy.homogenization.coefs_base.CoefNone(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.CoefOne(name, problem, kwargs)[source]
static set_variables_default(variables, set_var, data)[source]
class sfepy.homogenization.coefs_base.CoefSum(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.CoefSym(name, problem, kwargs)[source]
is_sym = True
static iter_sym(dim)
class sfepy.homogenization.coefs_base.CoefSymSym(name, problem, kwargs)[source]
is_sym = True
static iter_sym(dim)
class sfepy.homogenization.coefs_base.CorrDim(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.CorrDimDim(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.CorrEqPar(name, problem, kwargs)[source]

The corrector which equation can be parametrized via ‘eq_pars’, the dimension is given by the number of parameters.

Example:

‘equations’: ‘dw_diffusion.5.Y(mat.k, q, p) =
dw_surface_integrate.5.%s(q)’,

‘eq_pars’: (‘bYMp’, ‘bYMm’), ‘class’: cb.CorrEqPar,

class sfepy.homogenization.coefs_base.CorrEval(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.CorrMiniApp(name, problem, kwargs)[source]
get_dump_name()[source]
get_dump_name_base()[source]
get_output(corr_sol, is_dump=False, extend=True, variables=None)[source]
get_save_name()[source]
get_save_name_base()[source]
save(state, problem, variables=None)[source]
setup_output(save_format=None, dump_format=None, post_process_hook=None, file_per_var=None)[source]

Instance attributes have precedence!

class sfepy.homogenization.coefs_base.CorrN(name, problem, kwargs)[source]
static set_variables_default(variables, ir, set_var, data)[source]
class sfepy.homogenization.coefs_base.CorrNN(name, problem, kwargs)[source]

__init__() kwargs: {

‘ebcs’ : [], ‘epbcs’ : [], ‘equations’ : {}, ‘set_variables’ : None,

},

static set_variables_default(variables, ir, ic, set_var, data)[source]
class sfepy.homogenization.coefs_base.CorrOne(name, problem, kwargs)[source]
static set_variables_default(variables, set_var, data)[source]
class sfepy.homogenization.coefs_base.CorrSetBCS(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.CorrSolution(**kwargs)[source]

Class for holding solutions of corrector problems.

iter_solutions()[source]
class sfepy.homogenization.coefs_base.MiniAppBase(name, problem, kwargs)[source]
static any_from_conf(name, problem, kwargs)[source]
init_solvers(problem)[source]

Setup solvers. Use local options if these are defined, otherwise use the global ones.

For linear problems, assemble the matrix and try to presolve the linear system.

process_options()[source]

Setup application-specific options.

Subclasses should implement this method as needed.

Returns:

app_options : Struct instance

The application options.

class sfepy.homogenization.coefs_base.OnesDim(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.PressureEigenvalueProblem(name, problem, kwargs)[source]

Pressure eigenvalue problem solver for time-dependent correctors.

presolve(mtx)[source]

Prepare A^{-1} B^T for the Schur complement.

solve_pressure_eigenproblem(mtx, eig_problem=None, n_eigs=0, check=False)[source]

G = B*AI*BT or B*AI*BT+D

class sfepy.homogenization.coefs_base.ShapeDim(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.ShapeDimDim(name, problem, kwargs)[source]
class sfepy.homogenization.coefs_base.TCorrectorsViaPressureEVP(name, problem, kwargs)[source]

Time correctors via the pressure eigenvalue problem.

compute_correctors(evp, sign, state0, ts, dump_name, save_name, problem=None, vec_g=None)[source]
save(dump_name, save_name, vec_u, vec_p, vec_dp, ts, problem)[source]
  1. saves raw correctors into hdf5 files (filename)
  2. saves correctors transformed to output for visualization
setup_equations(equations, problem=None)[source]

Set equations, update boundary conditions and materials.

verify_correctors(sign, state0, filename, problem=None)[source]
class sfepy.homogenization.coefs_base.TSTimes(name, problem, kwargs)[source]

Coefficient-like class, returns times of the time stepper.

class sfepy.homogenization.coefs_base.VolumeFractions(name, problem, kwargs)[source]

Coefficient-like class, returns volume fractions of given regions within the whole domain.