esys.escriptcore.escriptcpp Package

To use this module, please import esys.escript

esys.escriptcore.escriptcpp.C_GeneralTensorProduct((Data)arg0, (Data)arg1[, (int)axis_offset=0[, (int)transpose=0]]) → Data :

Compute a tensor product of two Data objects.

Return type:

Data

Parameters:
  • arg0
  • arg1
  • axis_offset (int) –
  • transpose (int) – 0: transpose neither, 1: transpose arg0, 2: transpose arg1
class esys.escriptcore.escriptcpp.ContinuousDomain

Bases: esys.escriptcore.escriptcpp.Domain

Class representing continuous domains

MPIBarrier((Domain)arg1) → None :

Wait until all processes have reached this point

addPDEToRHS((ContinuousDomain)arg1, (Data)rhs, (Data)X, (Data)Y, (Data)y, (Data)y_contact, (Data)y_dirac) → None :

adds a PDE onto the stiffness matrix mat and a rhs

Parameters:
addPDEToSystem((ContinuousDomain)arg1, (Operator)mat, (Data)rhs, (Data)A, (Data)B, (Data)C, (Data)D, (Data)X, (Data)Y, (Data)d, (Data)y, (Data)d_contact, (Data)y_contact, (Data)d_dirac, (Data)y_dirac) → None :

adds a PDE onto the stiffness matrix mat and a rhs

Parameters:
addPDEToTransportProblem((ContinuousDomain)arg1, (TransportProblem)tp, (Data)source, (Data)M, (Data)A, (Data)B, (Data)C, (Data)D, (Data)X, (Data)Y, (Data)d, (Data)y, (Data)d_contact, (Data)y_contact, (Data)d_dirac, (Data)y_dirac) → None :
Parameters:
dump((Domain)arg1, (str)filename) → None :

Dumps the domain to a file

Parameters:filename (string) –
getDataShape((ContinuousDomain)arg1, (int)functionSpaceCode) → object :
Returns:a pair (dps, ns) where dps=the number of data points per sample, and ns=the number of samples
Return type:tuple
getDescription((ContinuousDomain)arg1) → str :
Returns:a description for this domain
Return type:string
getDim((Domain)arg1) → int :
Return type:int
Returns:Spatial dimension of the Domain
getMPIRank((Domain)arg1) → int :
Returns:the rank of this process
Return type:int
getMPISize((Domain)arg1) → int :
Returns:the number of processes used for this Domain
Return type:int
getNormal((Domain)arg1) → Data :
Return type:escript
Returns:Boundary normals
getNumDataPointsGlobal((ContinuousDomain)arg1) → int :
Returns:the number of data points summed across all MPI processes
Return type:int
getSize((Domain)arg1) → Data :
Returns:the local size of samples. The function space is chosen appropriately
Return type:Data
getStatus((Domain)arg1) → int :

The status of a domain changes whenever the domain is modified

Return type:int
getSystemMatrixTypeId((ContinuousDomain)arg1, (object)options) → int :
Returns:the identifier of the matrix type to be used for the global stiffness matrix when particular solver options are used.
Return type:int
getTag((Domain)arg1, (str)name) → int :
Returns:tag id for name
Return type:string
getTransportTypeId((ContinuousDomain)arg1, (int)solver, (int)preconditioner, (int)package, (bool)symmetry) → int
getX((Domain)arg1) → Data :
Return type:Data
Returns:Locations in the`Domain`. FunctionSpace is chosen appropriately
isValidTagName((Domain)arg1, (str)name) → bool :
Returns:True is name corresponds to a tag
Return type:bool
newOperator((ContinuousDomain)arg1, (int)row_blocksize, (FunctionSpace)row_functionspace, (int)column_blocksize, (FunctionSpace)column_functionspace, (int)type) → Operator :

creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros

Parameters:
  • row_blocksize (int) –
  • row_functionspace (FunctionSpace) –
  • column_blocksize (int) –
  • column_functionspace (FunctionSpace) –
  • type (int) –
newTransportProblem((ContinuousDomain)theta, (int)blocksize, (FunctionSpace)functionspace, (int)type) → TransportProblem :

creates a TransportProblemAdapter

Parameters:
  • theta (float) –
  • blocksize (int) –
  • functionspace (FunctionSpace) –
  • type (int) –
onMasterProcessor((Domain)arg1) → bool :
Returns:True if this code is executing on the master process
Return type:bool
print_mesh_info((ContinuousDomain)arg1[, (bool)full=False]) → None :
Parameters:full (bool) –
setTagMap((Domain)arg1, (str)name, (int)tag) → None :

Give a tag number a name.

Parameters:
  • name (string) – Name for the tag
  • tag (int) – numeric id
Note:

Tag names must be unique within a domain

setX((ContinuousDomain)arg1, (Data)arg) → None :

assigns new location to the domain

Parameters:arg (Data) –
showTagNames((Domain)arg1) → str :
Returns:A space separated list of tag names
Return type:string
supportsContactElements((Domain)arg1) → bool :

Does this domain support contact elements.

esys.escriptcore.escriptcpp.ContinuousFunction((Domain)domain) → FunctionSpace :
Returns:a continuous FunctionSpace (overlapped node values)
Return type:FunctionSpace
class esys.escriptcore.escriptcpp.Data

Bases: Boost.Python.instance

Represents a collection of datapoints. It is used to store the values of a function. For more details please consult the c++ class documentation.

conjugate((Data)arg1) → Data
copy((Data)arg1, (Data)other) → None :

Make this object a copy of other

note:The two objects will act independently from now on. That is, changing other after this call will not change this object and vice versa.
copy( (Data)arg1) -> Data :
note:In the no argument form, a new object will be returned which is an independent copy of this object.
copyWithMask((Data)arg1, (Data)other, (Data)mask) → None :

Selectively copy values from other Data.Datapoints which correspond to positive values in mask will be copied from other

Parameters:
  • other (Data) – source of values
  • mask (Scalar Data) –
delay((Data)arg1) → Data :

Convert this object into lazy representation

dump((Data)arg1, (str)fileName) → None :

Save the data as a netCDF file

Parameters:fileName (string) –
expand((Data)arg1) → None :

Convert the data to expanded representation if it is not expanded already.

getDomain((Data)arg1) → Domain :
Return type:Domain
getFunctionSpace((Data)arg1) → FunctionSpace :
Return type:FunctionSpace
getNumberOfDataPoints((Data)arg1) → int :
Return type:int
Returns:Number of datapoints in the object
getRank((Data)arg1) → int :
Returns:the number of indices required to address a component of a datapoint
Return type:positive int
getShape((Data)arg1) → tuple :

Returns the shape of the datapoints in this object as a python tuple. Scalar data has the shape ()

Return type:tuple
getTagNumber((Data)arg1, (int)dpno) → int :

Return tag number for the specified datapoint

Return type:int
Parameters:dpno (int) – datapoint number
getTupleForDataPoint((Data)arg1, (int)dataPointNo) → object :
Returns:Value of the specified datapoint
Return type:tuple
Parameters:dataPointNo (int) – datapoint to access
getTupleForGlobalDataPoint((Data)arg1, (int)procNo, (int)dataPointNo) → object :

Get a specific datapoint from a specific process

Return type:

tuple

Parameters:
  • procNo (positive int) – MPI rank of the process
  • dataPointNo (int) – datapoint to access
hasNaN((Data)arg1) → bool :

Returns return true if data contains NaN.

imag((Data)arg1) → Data
internal_maxGlobalDataPoint((Data)arg1) → tuple :

Please consider using getSupLocator() from pdetools instead.

internal_minGlobalDataPoint((Data)arg1) → tuple :

Please consider using getInfLocator() from pdetools instead.

interpolate((Data)arg1, (FunctionSpace)functionspace) → Data :

Interpolate this object’s values into a new functionspace.

interpolateTable((Data)arg1, (object)table, (float)Amin, (float)Astep, (Data)B, (float)Bmin, (float)Bstep[, (float)undef=1e+50[, (bool)check_boundaries=False]]) → Data :
Creates a new Data object by interpolating using the source data (which are

looked up in table) A must be the outer dimension on the table

param table:two dimensional collection of values
param Amin:The base of locations in table
type Amin:float
param Astep:size of gap between each item in the table
type Astep:float
param undef:upper bound on interpolated values
type undef:float
param B:Scalar representing the second coordinate to be mapped into the table
type B:Data
param Bmin:The base of locations in table for 2nd dimension
type Bmin:float
param Bstep:size of gap between each item in the table for 2nd dimension
type Bstep:float
param check_boundaries:
 if true, then values outside the boundaries will be rejected. If false, then boundary values will be used.
raise RuntimeError(DataException):
 if the coordinates do not map into the table or if the interpolated value is above undef
rtype:Data

interpolateTable( (Data)arg1, (object)table, (float)Amin, (float)Astep [, (float)undef=1e+50 [, (bool)check_boundaries=False]]) -> Data

isComplex((Data)arg1) → bool :
Return type:bool
Returns:True if this Data stores complex values.
isConstant((Data)arg1) → bool :
Return type:bool
Returns:True if this Data is an instance of DataConstant
Note:This does not mean the data is immutable.
isEmpty((Data)arg1) → bool :

Is this object an instance of DataEmpty

Return type:bool
Note:This is not the same thing as asking if the object contains datapoints.
isExpanded((Data)arg1) → bool :
Return type:bool
Returns:True if this Data is expanded.
isLazy((Data)arg1) → bool :
Return type:bool
Returns:True if this Data is lazy.
isProtected((Data)arg1) → bool :

Can this instance be modified. :rtype: bool

isReady((Data)arg1) → bool :
Return type:bool
Returns:True if this Data is not lazy.
isTagged((Data)arg1) → bool :
Return type:bool
Returns:True if this Data is expanded.
nonuniformInterpolate((Data)arg1, (object)in, (object)out, (bool)check_boundaries) → Data :

1D interpolation with non equally spaced points

nonuniformSlope((Data)arg1, (object)in, (object)out, (bool)check_boundaries) → Data :

1D interpolation of slope with non equally spaced points

promote((Data)arg1) → None
real((Data)arg1) → Data
replaceNaN((Data)arg1, (object)value) → None :

Replaces NaN values with value

resolve((Data)arg1) → None :

Convert the data to non-lazy representation.

setProtection((Data)arg1) → None :

Disallow modifications to this data object

Note:This method does not allow you to undo protection.
setTaggedValue((Data)arg1, (int)tagKey, (object)value) → None :

Set the value of tagged Data.

param tagKey:tag to update
type tagKey:int
setTaggedValue( (Data)arg1, (str)name, (object)value) -> None :
param name:tag to update
type name:string
param value:value to set tagged data to
type value:object which acts like an array, tuple or list
setToZero((Data)arg1) → None :

After this call the object will store values of the same shape as before but all components will be zero.

setValueOfDataPoint((Data)arg1, (int)dataPointNo, (object)value) → None

setValueOfDataPoint( (Data)arg1, (int)arg2, (object)arg3) -> None

setValueOfDataPoint( (Data)arg1, (int)arg2, (float)arg3) -> None :

Modify the value of a single datapoint.

param dataPointNo:
 
type dataPointNo:
 int
param value:
type value:float or an object which acts like an array, tuple or list
warning:Use of this operation is discouraged. It prevents some optimisations from operating.
tag((Data)arg1) → None :

Convert data to tagged representation if it is not already tagged or expanded

toListOfTuples((Data)arg1[, (bool)scalarastuple=False]) → object :

Return the datapoints of this object in a list. Each datapoint is stored as a tuple.

Parameters:scalarastuple – if True, scalar data will be wrapped as a tuple. True => [(0), (1), (2)]; False => [0, 1, 2]
esys.escriptcore.escriptcpp.DiracDeltaFunctions((Domain)domain) → FunctionSpace :
Return type:FunctionSpace
class esys.escriptcore.escriptcpp.Domain

Bases: Boost.Python.instance

Base class for all domains.

MPIBarrier((Domain)arg1) → None :

Wait until all processes have reached this point

dump((Domain)arg1, (str)filename) → None :

Dumps the domain to a file

Parameters:filename (string) –
getDim((Domain)arg1) → int :
Return type:int
Returns:Spatial dimension of the Domain
getMPIRank((Domain)arg1) → int :
Returns:the rank of this process
Return type:int
getMPISize((Domain)arg1) → int :
Returns:the number of processes used for this Domain
Return type:int
getNormal((Domain)arg1) → Data :
Return type:escript
Returns:Boundary normals
getSize((Domain)arg1) → Data :
Returns:the local size of samples. The function space is chosen appropriately
Return type:Data
getStatus((Domain)arg1) → int :

The status of a domain changes whenever the domain is modified

Return type:int
getTag((Domain)arg1, (str)name) → int :
Returns:tag id for name
Return type:string
getX((Domain)arg1) → Data :
Return type:Data
Returns:Locations in the`Domain`. FunctionSpace is chosen appropriately
isValidTagName((Domain)arg1, (str)name) → bool :
Returns:True is name corresponds to a tag
Return type:bool
onMasterProcessor((Domain)arg1) → bool :
Returns:True if this code is executing on the master process
Return type:bool
setTagMap((Domain)arg1, (str)name, (int)tag) → None :

Give a tag number a name.

Parameters:
  • name (string) – Name for the tag
  • tag (int) – numeric id
Note:

Tag names must be unique within a domain

showTagNames((Domain)arg1) → str :
Returns:A space separated list of tag names
Return type:string
supportsContactElements((Domain)arg1) → bool :

Does this domain support contact elements.

esys.escriptcore.escriptcpp.Function((Domain)domain) → FunctionSpace :
Returns:a function FunctionSpace
Return type:FunctionSpace
esys.escriptcore.escriptcpp.FunctionOnBoundary((Domain)domain) → FunctionSpace :
Returns:a function on boundary FunctionSpace
Return type:FunctionSpace
esys.escriptcore.escriptcpp.FunctionOnContactOne((Domain)domain) → FunctionSpace :
Returns:Return a FunctionSpace on right side of contact
Return type:FunctionSpace
esys.escriptcore.escriptcpp.FunctionOnContactZero((Domain)domain) → FunctionSpace :
Returns:Return a FunctionSpace on left side of contact
Return type:FunctionSpace
class esys.escriptcore.escriptcpp.FunctionSpace

Bases: Boost.Python.instance

A FunctionSpace describes which points from the Domain to use to represent functions.

getApproximationOrder((FunctionSpace)arg1) → int :
Returns:the approximation order referring to the maximum degree of a polynomial which can be represented exactly in interpolation and/or integration.
Return type:int
getDim((FunctionSpace)arg1) → int :
Returns:the spatial dimension of the underlying domain.
Return type:int
getDomain((FunctionSpace)arg1) → Domain :
Returns:the underlying Domain for this FunctionSpace.
Return type:Domain
getListOfTags((FunctionSpace)arg1) → list :
Returns:a list of the tags used in this function space
Return type:list
getNormal((FunctionSpace)arg1) → Data :
Returns:the surface normal field.
Return type:Data
getReferenceIDFromDataPointNo((FunctionSpace)arg1, (int)dataPointNo) → int :
Returns:the reference number associated with dataPointNo
Return type:int
getSize((FunctionSpace)arg1) → Data :
Returns:sample size
Return type:Data
getTagFromDataPointNo((FunctionSpace)arg1, (int)arg2) → int :
Returns:the tag associated with the given sample number.
Return type:int
getX((FunctionSpace)arg1) → Data :
Returns:a function whose values are its input coordinates. ie an identity function.
Return type:Data
setTags((FunctionSpace)arg1, (int)newtag, (Data)mask) → None :

Set tags according to a mask

param newtag:tag number to set
type newtag:string, non-zero int
param mask:Samples which correspond to positive values in the mask will be set to newtag.
type mask:scalar Data

setTags( (FunctionSpace)arg1, (str)newtag, (Data)mask) -> None

class esys.escriptcore.escriptcpp.Internal_SplitWorld

Bases: Boost.Python.instance

Manages a group of sub worlds. For internal use only.

clearVariable((Internal_SplitWorld)arg1, (str)name) → None :

Remove the value from the named variable

copyVariable((Internal_SplitWorld)arg1, (str)source, (str)destination) → None :

Copy the contents of one variable to another

getDoubleVariable((Internal_SplitWorld)arg1, (str)arg2) → float :

Return the value of floating point variable

getLocalObjectVariable((Internal_SplitWorld)arg1, (str)arg2) → object :

Returns python object for a variable which is not shared between worlds

getSubWorldCount((Internal_SplitWorld)arg1) → int
getSubWorldID((Internal_SplitWorld)arg1) → int
getVarInfo((Internal_SplitWorld)arg1) → object :

Lists variable descriptions known to the system

getVarList((Internal_SplitWorld)arg1) → object :

Lists variables known to the system

removeVariable((Internal_SplitWorld)arg1, (str)name) → None :

Remove the named variable from the SplitWorld

runJobs((Internal_SplitWorld)arg1) → None :

Execute pending jobs.

esys.escriptcore.escriptcpp.MPIBarrierWorld() → None :

Wait until all MPI processes have reached this point.

class esys.escriptcore.escriptcpp.Operator

Bases: Boost.Python.instance

isEmpty((Operator)arg1) → bool :
Return type:bool
Returns:True if matrix is empty
nullifyRowsAndCols((Operator)arg1, (Data)arg2, (Data)arg3, (float)arg4) → None
of((Operator)arg1, (Data)right) → Data :

matrix*vector multiplication

resetValues((Operator)arg1, (bool)arg2) → None :

resets the matrix entries

saveHB((Operator)arg1, (str)filename) → None :

writes the matrix to a file using the Harwell-Boeing file format

saveMM((Operator)arg1, (str)fileName) → None :

writes the matrix to a file using the Matrix Market file format

solve((Operator)arg1, (Data)in, (object)options) → Data :
Returns:the solution u of the linear system this*u=in
Parameters:in (Data) –
esys.escriptcore.escriptcpp.RandomData((tuple)shape, (FunctionSpace)fs[, (int)seed=0[, (tuple)filter=()]]) → Data :

Creates a new expanded Data object containing pseudo-random values. With no filter, values are drawn uniformly at random from [0,1].

Parameters:
  • shape (tuple) – datapoint shape
  • fs (FunctionSpace) – function space for data object.
  • seed (long) – seed for random number generator.
esys.escriptcore.escriptcpp.ReducedContinuousFunction((Domain)domain) → FunctionSpace :
Returns:a continuous with reduced order FunctionSpace (overlapped node values on reduced element order)
Return type:FunctionSpace
esys.escriptcore.escriptcpp.ReducedFunction((Domain)domain) → FunctionSpace :
Returns:a function FunctionSpace with reduced integration order
Return type:FunctionSpace
esys.escriptcore.escriptcpp.ReducedFunctionOnBoundary((Domain)domain) → FunctionSpace :
Returns:a function on boundary FunctionSpace with reduced integration order
Return type:FunctionSpace
esys.escriptcore.escriptcpp.ReducedFunctionOnContactOne((Domain)domain) → FunctionSpace :
Returns:Return a FunctionSpace on right side of contact with reduced integration order
Return type:FunctionSpace
esys.escriptcore.escriptcpp.ReducedFunctionOnContactZero((Domain)domain) → FunctionSpace :
Returns:a FunctionSpace on left side of contact with reduced integration order
Return type:FunctionSpace
esys.escriptcore.escriptcpp.ReducedSolution((Domain)domain) → FunctionSpace :
Return type:FunctionSpace
class esys.escriptcore.escriptcpp.Reducer

Bases: Boost.Python.instance

esys.escriptcore.escriptcpp.Scalar([(float)value=0.0[, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749950>[, (bool)expanded=False]]]) → Data :

Construct a Data object containing scalar data-points.

Parameters:
  • value (float) – scalar value for all points
  • what (FunctionSpace) – FunctionSpace for Data
  • expanded (bool) – If True, a value is stored for each point. If False, more efficient representations may be used
Return type:

Data

esys.escriptcore.escriptcpp.Solution((Domain)domain) → FunctionSpace :
Return type:FunctionSpace
class esys.escriptcore.escriptcpp.SolverBuddy

Bases: Boost.Python.instance

acceptConvergenceFailure((SolverBuddy)arg1) → bool :

Returns True if a failure to meet the stopping criteria within the given number of iteration steps is not raising in exception. This is useful if a solver is used in a non-linear context where the non-linear solver can continue even if the returned the solution does not necessarily meet the stopping criteria. One can use the hasConverged method to check if the last call to the solver was successful.

Returns:True if a failure to achieve convergence is accepted.
Return type:bool
adaptInnerTolerance((SolverBuddy)arg1) → bool :

Returns True if the tolerance of the inner solver is selected automatically. Otherwise the inner tolerance set by setInnerTolerance is used.

Returns:True if inner tolerance adaption is chosen.
Return type:bool
getAMGInterpolation((SolverBuddy)arg1) → SolverOptions :

Returns key of the interpolation method for the SAMG preconditioner

Return type:in the list CLASSIC_INTERPOLATION_WITH_FF_COUPLING, CLASSIC_INTERPOLATION, DIRECT_INTERPOLATION
getAbsoluteTolerance((SolverBuddy)arg1) → float :

Returns the absolute tolerance for the solver

Return type:float
getCoarsening((SolverBuddy)arg1) → SolverOptions :

Returns the key of the coarsening algorithm to be applied AMG, AMLI or BoomerAMG

Return type:in the list DEFAULT, YAIR_SHAPIRA_COARSENING, RUGE_STUEBEN_COARSENING, AGGREGATION_COARSENING, CIJP_FIXED_RANDOM_COARSENING, CIJP_COARSENING, FALGOUT_COARSENING, PMIS_COARSENING, HMIS_COARSENING
getCoarseningThreshold((SolverBuddy)arg1) → float :

Returns the threshold for coarsening in the algebraic multi level solver or preconditioner

Return type:float
getCycleType((SolverBuddy)arg1) → int :

Returns the cyle type (V- or W-cycle) to be used in an algebraic multi level solver or preconditioner

Return type:int
getDiagnostics((SolverBuddy)arg1, (str)name) → float :

Returns the diagnostic information name. Possible values are:

  • ‘num_iter’: the number of iteration steps
  • ‘cum_num_iter’: the cumulative number of iteration steps
  • ‘num_level’: the number of level in multi level solver
  • ‘num_inner_iter’: the number of inner iteration steps
  • ‘cum_num_inner_iter’: the cumulative number of inner iteration steps
  • ‘time’: execution time
  • ‘cum_time’: cumulative execution time
  • ‘set_up_time’: time to set up of the solver, typically this includes factorization and reordering
  • ‘cum_set_up_time’: cumulative time to set up of the solver
  • ‘net_time’: net execution time, excluding setup time for the solver and execution time for preconditioner
  • ‘cum_net_time’: cumulative net execution time
  • ‘preconditioner_size’: size of preconditioner [Bytes]
  • ‘converged’: return True if solution has converged.
  • ‘time_step_backtracking_used’: returns True if time step back tracking has been used.
  • ‘coarse_level_sparsity’: returns the sparsity of the matrix on the coarsest level
  • ‘num_coarse_unknowns’: returns the number of unknowns on the coarsest level
Parameters:name (str in the list above.) – name of diagnostic information to return
Returns:requested value. 0 is returned if the value is yet to be defined.
Note:If the solver has thrown an exception diagnostic values have an undefined status.
getDiagonalDominanceThreshold((SolverBuddy)arg1) → float :

Returns the threshold for diagonal dominant rows which are eliminated during AMG coarsening.

Return type:float
getDropStorage((SolverBuddy)arg1) → float :

Returns the maximum allowed increase in storage for ILUT

Return type:float
getDropTolerance((SolverBuddy)arg1) → float :

Returns the relative drop tolerance in ILUT

Return type:float
getInnerIterMax((SolverBuddy)arg1) → int :

Returns maximum number of inner iteration steps

Return type:int
getInnerTolerance((SolverBuddy)arg1) → float :

Returns the relative tolerance for an inner iteration scheme

Return type:float
getIterMax((SolverBuddy)arg1) → int :

Returns maximum number of iteration steps

Return type:int
getLevelMax((SolverBuddy)arg1) → int :

Returns the maximum number of coarsening levels to be used in an algebraic multi level solver or preconditioner

Return type:int
getMinCoarseMatrixSize((SolverBuddy)arg1) → int :

Returns the minimum size of the coarsest level matrix in AMG or AMLI

getMinCoarseMatrixSparsity((SolverBuddy)arg1) → float :

Returns the minimum sparsity on the coarsest level. Typically a direct solver is used when the sparsity becomes bigger than the set limit.

Returns:minimal sparsity
Return type:float
getName((SolverBuddy)arg1, (int)key) → str :

Returns the name of a given key

Parameters:key – a valid key
getNumCoarseMatrixRefinements((SolverBuddy)arg1) → int :

Returns the number of refinement steps to refine the solution on the coarsest level when a direct solver is applied.

Return type:non-negative int
getNumPostSweeps((SolverBuddy)arg1) → int :

Returns he number of sweeps in the post-smoothing step of a multi level solver or preconditioner

Return type:int
getNumPreSweeps((SolverBuddy)arg1) → int :

Returns he number of sweeps in the pre-smoothing step of a multi level solver or preconditioner

Return type:int
getNumRefinements((SolverBuddy)arg1) → int :

Returns the number of refinement steps to refine the solution when a direct solver is applied.

Return type:non-negative int
getNumSweeps((SolverBuddy)arg1) → int :

Returns the number of sweeps in a Jacobi or Gauss-Seidel/SOR preconditioner.

Return type:int
getODESolver((SolverBuddy)arg1) → SolverOptions :

Returns key of the solver method for ODEs.

Parameters:method (in CRANK_NICOLSON, BACKWARD_EULER, LINEAR_CRANK_NICOLSON) – key of the ODE solver method to be used.
getPackage((SolverBuddy)arg1) → SolverOptions :

Returns the solver package key

Return type:in the list DEFAULT, PASO, CUSP, MKL, UMFPACK, TRILINOS
getPreconditioner((SolverBuddy)arg1) → SolverOptions :

Returns the key of the preconditioner to be used.

Return type:in the list ILU0, ILUT, JACOBI, AMLI, AMG, REC_ILU, GAUSS_SEIDEL, RILU, BOOMERAMG, NO_PRECONDITIONER
getRelaxationFactor((SolverBuddy)arg1) → float :

Returns the relaxation factor used to add dropped elements in RILU to the main diagonal.

Return type:float
getReordering((SolverBuddy)arg1) → SolverOptions :

Returns the key of the reordering method to be applied if supported by the solver.

Return type:in NO_REORDERING, MINIMUM_FILL_IN, NESTED_DISSECTION, DEFAULT_REORDERING
getRestart((SolverBuddy)arg1) → int :

Returns the number of iterations steps after which GMRES performs a restart. If 0 is returned no restart is performed.

Return type:int
getSmoother((SolverBuddy)arg1) → SolverOptions :

Returns key of the smoother to be used.

Return type:in the list JACOBI, GAUSS_SEIDEL
getSolverMethod((SolverBuddy)arg1) → SolverOptions :

Returns key of the solver method to be used.

Return type:in the list DEFAULT, DIRECT, CHOLEVSKY, PCG, CR, CGS, BICGSTAB, GMRES, PRES20, ROWSUM_LUMPING, HRZ_LUMPING, MINRES, ITERATIVE, NONLINEAR_GMRES, TFQMR
getSolverTarget((SolverBuddy)arg1) → SolverOptions :

Returns the solver target key

Return type:in the list TARGET_CPU, TARGET_GPU
getSummary((SolverBuddy)arg1) → str :

Returns a string reporting the current settings

getTolerance((SolverBuddy)arg1) → float :

Returns the relative tolerance for the solver

Return type:float
getTrilinosParameters((SolverBuddy)arg1) → dict :

Returns a dictionary of set Trilinos parameters.

:note This method returns an empty dictionary in a non-Trilinos build.

getTruncation((SolverBuddy)arg1) → int :

Returns the number of residuals in GMRES to be stored for orthogonalization

Return type:int
hasConverged((SolverBuddy)arg1) → bool :

Returns True if the last solver call has been finalized successfully.

Note:if an exception has been thrown by the solver the status of thisflag is undefined.
isComplex((SolverBuddy)arg1) → bool :

Checks if the coefficient matrix is set to be complex-valued.

Returns:True if a complex-valued PDE is indicated, False otherwise
Return type:bool
isSymmetric((SolverBuddy)arg1) → bool :

Checks if symmetry of the coefficient matrix is indicated.

Returns:True if a symmetric PDE is indicated, False otherwise
Return type:bool
isVerbose((SolverBuddy)arg1) → bool :

Returns True if the solver is expected to be verbose.

Returns:True if verbosity of switched on.
Return type:bool
resetDiagnostics((SolverBuddy)arg1[, (bool)all=False]) → None :

Resets the diagnostics

Parameters:all (bool) – if all is True all diagnostics including accumulative counters are reset.
setAMGInterpolation((SolverBuddy)arg1, (int)interpolation) → None :

Set the interpolation method for the AMG preconditioner.

Parameters:method (in CLASSIC_INTERPOLATION_WITH_FF_COUPLING, CLASSIC_INTERPOLATION, DIRECT_INTERPOLATION) – key of the interpolation method to be used.
setAbsoluteTolerance((SolverBuddy)arg1, (float)atol) → None :

Sets the absolute tolerance for the solver

Parameters:atol (non-negative float) – absolute tolerance
setAcceptanceConvergenceFailure((SolverBuddy)arg1, (bool)accept) → None :

Sets the flag to indicate the acceptance of a failure of convergence.

Parameters:accept (bool) – If True, any failure to achieve convergence is accepted.
setAcceptanceConvergenceFailureOff((SolverBuddy)arg1) → None :

Switches the acceptance of a failure of convergence off.

setAcceptanceConvergenceFailureOn((SolverBuddy)arg1) → None :

Switches the acceptance of a failure of convergence on

setCoarsening((SolverBuddy)arg1, (int)coarsening) → None :

Sets the key of the coarsening method to be applied in AMG or AMLI or BoomerAMG

Parameters:method (in DEFAULT, YAIR_SHAPIRA_COARSENING, RUGE_STUEBEN_COARSENING, AGGREGATION_COARSENING, CIJP_FIXED_RANDOM_COARSENING, CIJP_COARSENING, FALGOUT_COARSENING, PMIS_COARSENING, HMIS_COARSENING) – selects the coarsening method .
setCoarseningThreshold((SolverBuddy)arg1, (float)theta) → None :

Sets the threshold for coarsening in the algebraic multi level solver or preconditioner

Parameters:theta (positive float) – threshold for coarsening
setComplex((SolverBuddy)arg1, (bool)complex) → None :

Sets the complex flag for the coefficient matrix to flag.

Parameters:flag (bool) – If True, the complex flag is set otherwise reset.
setCycleType((SolverBuddy)arg1, (int)cycle_type) → None :

Sets the cycle type (V-cycle or W-cycle) to be used in an algebraic multi-level solver or preconditioner

Parameters:cycle_type (int) – the type of cycle
setDiagonalDominanceThreshold((SolverBuddy)arg1, (float)threshold) → None :

Sets the threshold for diagonal dominant rows which are eliminated during AMG coarsening.

Parameters:value (float) – threshold
setDropStorage((SolverBuddy)arg1, (float)drop) → None :

Sets the maximum allowed increase in storage for ILUT. storage =2 would mean that a doubling of the storage needed for the coefficient matrix is allowed in the ILUT factorization.

Parameters:storage (float) – allowed storage increase
setDropTolerance((SolverBuddy)arg1, (float)drop_tol) → None :

Sets the relative drop tolerance in ILUT

Parameters:drop_tol (positive float) – drop tolerance
setInnerIterMax((SolverBuddy)arg1, (int)iter_max) → None :

Sets the maximum number of iteration steps for the inner iteration.

Parameters:iter_max (int) – maximum number of inner iterations
setInnerTolerance((SolverBuddy)arg1, (float)rtol) → None :

Sets the relative tolerance for an inner iteration scheme, for instance on the coarsest level in a multi-level scheme.

Parameters:rtol (positive float) – inner relative tolerance
setInnerToleranceAdaption((SolverBuddy)arg1, (bool)adapt) → None :

Sets the flag to indicate automatic selection of the inner tolerance.

Parameters:adapt (bool) – If True, the inner tolerance is selected automatically.
setInnerToleranceAdaptionOff((SolverBuddy)arg1) → None :

Switches the automatic selection of inner tolerance off.

setInnerToleranceAdaptionOn((SolverBuddy)arg1) → None :

Switches the automatic selection of inner tolerance on

setIterMax((SolverBuddy)arg1, (int)iter_max) → None :

Sets the maximum number of iteration steps

Parameters:iter_max (int) – maximum number of iteration steps
setLevelMax((SolverBuddy)arg1, (int)level_max) → None :

Sets the maximum number of coarsening levels to be used in an algebraic multi-level solver or preconditioner

Parameters:level_max (int) – maximum number of levels
setLocalPreconditioner((SolverBuddy)arg1, (bool)local) → None :

Sets the flag to use local preconditioning

Parameters:use (bool) – If True, local preconditioning on each MPI rank is applied
setLocalPreconditionerOff((SolverBuddy)arg1) → None :

Sets the flag to use local preconditioning to off

setLocalPreconditionerOn((SolverBuddy)arg1) → None :

Sets the flag to use local preconditioning to on

setMinCoarseMatrixSize((SolverBuddy)arg1, (int)size) → None :

Sets the minimum size of the coarsest level matrix in AMG or AMLI

Parameters:size (positive int) – minimum size of the coarsest level matrix .
setMinCoarseMatrixSparsity((SolverBuddy)arg1, (float)sparsity) → None :

Sets the minimum sparsity on the coarsest level. Typically a direct solver is used when the sparsity becomes bigger than the set limit.

Parameters:sparsity (float) – minimal sparsity
setNumCoarseMatrixRefinements((SolverBuddy)arg1, (int)refinements) → None :

Sets the number of refinement steps to refine the solution on the coarsest level when a direct solver is applied.

Parameters:refinements (non-negative int) – number of refinements
setNumPostSweeps((SolverBuddy)arg1, (int)sweeps) → None :

Sets the number of sweeps in the post-smoothing step of a multi level solver or preconditioner

Parameters:sweeps (positive int) – number of sweeps
setNumPreSweeps((SolverBuddy)arg1, (int)sweeps) → None :

Sets the number of sweeps in the pre-smoothing step of a multi level solver or preconditioner

Parameters:sweeps (positive int) – number of sweeps
setNumRefinements((SolverBuddy)arg1, (int)refinements) → None :

Sets the number of refinement steps to refine the solution when a direct solver is applied.

Parameters:refinements (non-negative int) – number of refinements
setNumSweeps((SolverBuddy)arg1, (int)sweeps) → None :

Sets the number of sweeps in a Jacobi or Gauss-Seidel/SOR preconditioner.

Parameters:sweeps (positive int) – number of sweeps
setODESolver((SolverBuddy)arg1, (int)solver) → None :

Set the solver method for ODEs.

Parameters:method (in CRANK_NICOLSON, BACKWARD_EULER, LINEAR_CRANK_NICOLSON) – key of the ODE solver method to be used.
setPackage((SolverBuddy)arg1, (int)package) → None :

Sets the solver package to be used as a solver.

Parameters:package (in DEFAULT, PASO, CUSP, MKL, UMFPACK, TRILINOS) – key of the solver package to be used.
Note:Not all packages are support on all implementation. An exception may be thrown on some platforms if a particular package is requested.
setPreconditioner((SolverBuddy)arg1, (int)preconditioner) → None :

Sets the preconditioner to be used.

Parameters:preconditioner (in ILU0, ILUT, JACOBI, AMG, AMLI, REC_ILU, GAUSS_SEIDEL, RILU, BOOMERAMG, NO_PRECONDITIONER) – key of the preconditioner to be used.
Note:Not all packages support all preconditioner. It can be assumed that a package makes a reasonable choice if it encounters an unknownpreconditioner.
setRelaxationFactor((SolverBuddy)arg1, (float)relaxation) → None :

Sets the relaxation factor used to add dropped elements in RILU to the main diagonal.

Parameters:factor (float) – relaxation factor
Note:RILU with a relaxation factor 0 is identical to ILU0
setReordering((SolverBuddy)arg1, (int)ordering) → None :

Sets the key of the reordering method to be applied if supported by the solver. Some direct solvers support reordering to optimize compute time and storage use during elimination.

Parameters:ordering (in 'NO_REORDERING', 'MINIMUM_FILL_IN', 'NESTED_DISSECTION', 'DEFAULT_REORDERING') – selects the reordering strategy.
setRestart((SolverBuddy)arg1, (int)restart) → None :

Sets the number of iterations steps after which GMRES performs a restart.

Parameters:restart (int) – number of iteration steps after which to perform a restart. If 0 no restart is performed.
setSmoother((SolverBuddy)arg1, (int)smoother) → None :

Sets the smoother to be used.

Parameters:smoother (in JACOBI, GAUSS_SEIDEL) – key of the smoother to be used.
Note:Not all packages support all smoothers. It can be assumed that a package makes a reasonable choice if it encounters an unknown smoother.
setSolverMethod((SolverBuddy)arg1, (int)method) → None :

Sets the solver method to be used. Use method``=``DIRECT to indicate that a direct rather than an iterative solver should be used and use method``=``ITERATIVE to indicate that an iterative rather than a direct solver should be used.

Parameters:method (in DEFAULT, DIRECT, CHOLEVSKY, PCG, CR, CGS, BICGSTAB, GMRES, PRES20, ROWSUM_LUMPING, HRZ_LUMPING, ITERATIVE, NONLINEAR_GMRES, TFQMR, MINRES) – key of the solver method to be used.
Note:Not all packages support all solvers. It can be assumed that a package makes a reasonable choice if it encounters an unknown solver method.
setSolverTarget((SolverBuddy)arg1, (int)target) → None :

Sets the solver target to be used.

Parameters:target (in TARGET_CPU, TARGET_GPU) – key of the solver target to be used.
setSymmetry((SolverBuddy)arg1, (bool)symmetry) → None :

Sets the symmetry flag for the coefficient matrix to flag.

Parameters:flag (bool) – If True, the symmetry flag is set otherwise reset.
setSymmetryOff((SolverBuddy)arg1) → None :

Clears the symmetry flag for the coefficient matrix.

setSymmetryOn((SolverBuddy)arg1) → None :

Sets the symmetry flag to indicate that the coefficient matrix is symmetric.

setTolerance((SolverBuddy)arg1, (float)rtol) → None :

Sets the relative tolerance for the solver

Parameters:rtol (non-negative float) – relative tolerance
setTrilinosParameter((SolverBuddy)arg1, (str)arg2, (object)arg3) → None :

Sets a Trilinos preconditioner/solver parameter.

:note Escript does not check for validity of the parameter name (e.g. spelling mistakes). Parameters are passed 1:1 to escript’s Trilinos wrapper and from there to the relevant Trilinos package. See the relevant Trilinos documentation for valid parameter strings and values.:note This method does nothing in a non-Trilinos build.

setTruncation((SolverBuddy)arg1, (int)truncation) → None :

Sets the number of residuals in GMRES to be stored for orthogonalization. The more residuals are stored the faster GMRES converged

Parameters:truncation (int) – truncation
setUsePanel((SolverBuddy)arg1, (bool)use) → None :

Sets the flag to use a panel to find unknowns in AMG coarsening

Parameters:use (bool) – If True,a panel is used to find unknowns in AMG coarsening
setUsePanelOff((SolverBuddy)arg1) → None :

Sets the flag to use a panel to find unknowns in AMG coarsening to off

setUsePanelOn((SolverBuddy)arg1) → None :

Sets the flag to use a panel to find unknowns in AMG coarsening

setVerbosity((SolverBuddy)arg1, (bool)verbosity) → None :

Sets the verbosity flag for the solver to flag.

Parameters:verbose (bool) – If True, the verbosity of the solver is switched on.
setVerbosityOff((SolverBuddy)arg1) → None :

Switches the verbosity of the solver off.

setVerbosityOn((SolverBuddy)arg1) → None :

Switches the verbosity of the solver on.

useLocalPreconditioner((SolverBuddy)arg1) → bool :

Returns True if the preconditoner is applied locally on each MPI. This reduces communication costs and speeds up the application of the preconditioner but at the costs of more iteration steps. This can be an advantage on clusters with slower interconnects.

Returns:True if local preconditioning is applied
Return type:bool
usePanel((SolverBuddy)arg1) → bool :

Returns True if a panel is used to search for unknown in the AMG coarsening, The panel approach is normally faster but can lead to larger coarse level systems.

Returns:True if a panel is used to find unknowns in AMG coarsening
Return type:bool
class esys.escriptcore.escriptcpp.SolverOptions

Bases: Boost.Python.enum

AGGREGATION_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.AGGREGATION_COARSENING
AMG = esys.escriptcore.escriptcpp.SolverOptions.AMG
AMLI = esys.escriptcore.escriptcpp.SolverOptions.AMLI
BACKWARD_EULER = esys.escriptcore.escriptcpp.SolverOptions.BACKWARD_EULER
BICGSTAB = esys.escriptcore.escriptcpp.SolverOptions.BICGSTAB
BOOMERAMG = esys.escriptcore.escriptcpp.SolverOptions.BOOMERAMG
CGLS = esys.escriptcore.escriptcpp.SolverOptions.CGLS
CGS = esys.escriptcore.escriptcpp.SolverOptions.CGS
CHOLEVSKY = esys.escriptcore.escriptcpp.SolverOptions.CHOLEVSKY
CIJP_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.CIJP_COARSENING
CIJP_FIXED_RANDOM_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.CIJP_FIXED_RANDOM_COARSENING
CLASSIC_INTERPOLATION = esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION
CLASSIC_INTERPOLATION_WITH_FF_COUPLING = esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION_WITH_FF_COUPLING
CR = esys.escriptcore.escriptcpp.SolverOptions.CR
CRANK_NICOLSON = esys.escriptcore.escriptcpp.SolverOptions.CRANK_NICOLSON
CUSP = esys.escriptcore.escriptcpp.SolverOptions.CUSP
DEFAULT = esys.escriptcore.escriptcpp.SolverOptions.DEFAULT
DEFAULT_REORDERING = esys.escriptcore.escriptcpp.SolverOptions.DEFAULT_REORDERING
DIRECT = esys.escriptcore.escriptcpp.SolverOptions.DIRECT
DIRECT_INTERPOLATION = esys.escriptcore.escriptcpp.SolverOptions.DIRECT_INTERPOLATION
DIRECT_MUMPS = esys.escriptcore.escriptcpp.SolverOptions.DIRECT_MUMPS
DIRECT_PARDISO = esys.escriptcore.escriptcpp.SolverOptions.DIRECT_PARDISO
DIRECT_SUPERLU = esys.escriptcore.escriptcpp.SolverOptions.DIRECT_SUPERLU
DIRECT_TRILINOS = esys.escriptcore.escriptcpp.SolverOptions.DIRECT_TRILINOS
FALGOUT_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.FALGOUT_COARSENING
GAUSS_SEIDEL = esys.escriptcore.escriptcpp.SolverOptions.GAUSS_SEIDEL
GMRES = esys.escriptcore.escriptcpp.SolverOptions.GMRES
HMIS_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.HMIS_COARSENING
HRZ_LUMPING = esys.escriptcore.escriptcpp.SolverOptions.HRZ_LUMPING
ILU0 = esys.escriptcore.escriptcpp.SolverOptions.ILU0
ILUT = esys.escriptcore.escriptcpp.SolverOptions.ILUT
ITERATIVE = esys.escriptcore.escriptcpp.SolverOptions.ITERATIVE
JACOBI = esys.escriptcore.escriptcpp.SolverOptions.JACOBI
LINEAR_CRANK_NICOLSON = esys.escriptcore.escriptcpp.SolverOptions.LINEAR_CRANK_NICOLSON
LSQR = esys.escriptcore.escriptcpp.SolverOptions.LSQR
LUMPING = esys.escriptcore.escriptcpp.SolverOptions.LUMPING
MINIMUM_FILL_IN = esys.escriptcore.escriptcpp.SolverOptions.MINIMUM_FILL_IN
MINRES = esys.escriptcore.escriptcpp.SolverOptions.MINRES
MKL = esys.escriptcore.escriptcpp.SolverOptions.MKL
NESTED_DISSECTION = esys.escriptcore.escriptcpp.SolverOptions.NESTED_DISSECTION
NONLINEAR_GMRES = esys.escriptcore.escriptcpp.SolverOptions.NONLINEAR_GMRES
NO_PRECONDITIONER = esys.escriptcore.escriptcpp.SolverOptions.NO_PRECONDITIONER
NO_REORDERING = esys.escriptcore.escriptcpp.SolverOptions.NO_REORDERING
PASO = esys.escriptcore.escriptcpp.SolverOptions.PASO
PCG = esys.escriptcore.escriptcpp.SolverOptions.PCG
PMIS_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.PMIS_COARSENING
PRES20 = esys.escriptcore.escriptcpp.SolverOptions.PRES20
REC_ILU = esys.escriptcore.escriptcpp.SolverOptions.REC_ILU
RILU = esys.escriptcore.escriptcpp.SolverOptions.RILU
ROWSUM_LUMPING = esys.escriptcore.escriptcpp.SolverOptions.ROWSUM_LUMPING
RUGE_STUEBEN_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.RUGE_STUEBEN_COARSENING
STANDARD_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.STANDARD_COARSENING
TARGET_CPU = esys.escriptcore.escriptcpp.SolverOptions.TARGET_CPU
TARGET_GPU = esys.escriptcore.escriptcpp.SolverOptions.TARGET_GPU
TFQMR = esys.escriptcore.escriptcpp.SolverOptions.TFQMR
TRILINOS = esys.escriptcore.escriptcpp.SolverOptions.TRILINOS
UMFPACK = esys.escriptcore.escriptcpp.SolverOptions.UMFPACK
YAIR_SHAPIRA_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.YAIR_SHAPIRA_COARSENING
bit_length() → int

Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6

conjugate()

Returns self, the complex conjugate of any int.

denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

name
names = {'BICGSTAB': esys.escriptcore.escriptcpp.SolverOptions.BICGSTAB, 'RILU': esys.escriptcore.escriptcpp.SolverOptions.RILU, 'DEFAULT_REORDERING': esys.escriptcore.escriptcpp.SolverOptions.DEFAULT_REORDERING, 'ILU0': esys.escriptcore.escriptcpp.SolverOptions.ILU0, 'TARGET_CPU': esys.escriptcore.escriptcpp.SolverOptions.TARGET_CPU, 'CHOLEVSKY': esys.escriptcore.escriptcpp.SolverOptions.CHOLEVSKY, 'DEFAULT': esys.escriptcore.escriptcpp.SolverOptions.DEFAULT, 'MKL': esys.escriptcore.escriptcpp.SolverOptions.MKL, 'ITERATIVE': esys.escriptcore.escriptcpp.SolverOptions.ITERATIVE, 'DIRECT': esys.escriptcore.escriptcpp.SolverOptions.DIRECT, 'BACKWARD_EULER': esys.escriptcore.escriptcpp.SolverOptions.BACKWARD_EULER, 'BOOMERAMG': esys.escriptcore.escriptcpp.SolverOptions.BOOMERAMG, 'GAUSS_SEIDEL': esys.escriptcore.escriptcpp.SolverOptions.GAUSS_SEIDEL, 'CIJP_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.CIJP_COARSENING, 'PCG': esys.escriptcore.escriptcpp.SolverOptions.PCG, 'NO_PRECONDITIONER': esys.escriptcore.escriptcpp.SolverOptions.NO_PRECONDITIONER, 'LUMPING': esys.escriptcore.escriptcpp.SolverOptions.LUMPING, 'TARGET_GPU': esys.escriptcore.escriptcpp.SolverOptions.TARGET_GPU, 'CGLS': esys.escriptcore.escriptcpp.SolverOptions.CGLS, 'CIJP_FIXED_RANDOM_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.CIJP_FIXED_RANDOM_COARSENING, 'PMIS_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.PMIS_COARSENING, 'TFQMR': esys.escriptcore.escriptcpp.SolverOptions.TFQMR, 'UMFPACK': esys.escriptcore.escriptcpp.SolverOptions.UMFPACK, 'AMG': esys.escriptcore.escriptcpp.SolverOptions.AMG, 'RUGE_STUEBEN_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.RUGE_STUEBEN_COARSENING, 'MINRES': esys.escriptcore.escriptcpp.SolverOptions.MINRES, 'CLASSIC_INTERPOLATION_WITH_FF_COUPLING': esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION_WITH_FF_COUPLING, 'NO_REORDERING': esys.escriptcore.escriptcpp.SolverOptions.NO_REORDERING, 'MINIMUM_FILL_IN': esys.escriptcore.escriptcpp.SolverOptions.MINIMUM_FILL_IN, 'CGS': esys.escriptcore.escriptcpp.SolverOptions.CGS, 'CRANK_NICOLSON': esys.escriptcore.escriptcpp.SolverOptions.CRANK_NICOLSON, 'NESTED_DISSECTION': esys.escriptcore.escriptcpp.SolverOptions.NESTED_DISSECTION, 'LSQR': esys.escriptcore.escriptcpp.SolverOptions.LSQR, 'NONLINEAR_GMRES': esys.escriptcore.escriptcpp.SolverOptions.NONLINEAR_GMRES, 'AMLI': esys.escriptcore.escriptcpp.SolverOptions.AMLI, 'ILUT': esys.escriptcore.escriptcpp.SolverOptions.ILUT, 'CUSP': esys.escriptcore.escriptcpp.SolverOptions.CUSP, 'CLASSIC_INTERPOLATION': esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION, 'HRZ_LUMPING': esys.escriptcore.escriptcpp.SolverOptions.HRZ_LUMPING, 'AGGREGATION_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.AGGREGATION_COARSENING, 'STANDARD_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.STANDARD_COARSENING, 'TRILINOS': esys.escriptcore.escriptcpp.SolverOptions.TRILINOS, 'PASO': esys.escriptcore.escriptcpp.SolverOptions.PASO, 'PRES20': esys.escriptcore.escriptcpp.SolverOptions.PRES20, 'HMIS_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.HMIS_COARSENING, 'YAIR_SHAPIRA_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.YAIR_SHAPIRA_COARSENING, 'CR': esys.escriptcore.escriptcpp.SolverOptions.CR, 'ROWSUM_LUMPING': esys.escriptcore.escriptcpp.SolverOptions.ROWSUM_LUMPING, 'DIRECT_SUPERLU': esys.escriptcore.escriptcpp.SolverOptions.DIRECT_SUPERLU, 'DIRECT_TRILINOS': esys.escriptcore.escriptcpp.SolverOptions.DIRECT_TRILINOS, 'LINEAR_CRANK_NICOLSON': esys.escriptcore.escriptcpp.SolverOptions.LINEAR_CRANK_NICOLSON, 'DIRECT_MUMPS': esys.escriptcore.escriptcpp.SolverOptions.DIRECT_MUMPS, 'DIRECT_INTERPOLATION': esys.escriptcore.escriptcpp.SolverOptions.DIRECT_INTERPOLATION, 'DIRECT_PARDISO': esys.escriptcore.escriptcpp.SolverOptions.DIRECT_PARDISO, 'FALGOUT_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.FALGOUT_COARSENING, 'REC_ILU': esys.escriptcore.escriptcpp.SolverOptions.REC_ILU, 'GMRES': esys.escriptcore.escriptcpp.SolverOptions.GMRES, 'JACOBI': esys.escriptcore.escriptcpp.SolverOptions.JACOBI}
numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

values = {0: esys.escriptcore.escriptcpp.SolverOptions.DEFAULT, 1: esys.escriptcore.escriptcpp.SolverOptions.TARGET_CPU, 2: esys.escriptcore.escriptcpp.SolverOptions.TARGET_GPU, 3: esys.escriptcore.escriptcpp.SolverOptions.CUSP, 4: esys.escriptcore.escriptcpp.SolverOptions.MKL, 5: esys.escriptcore.escriptcpp.SolverOptions.PASO, 6: esys.escriptcore.escriptcpp.SolverOptions.TRILINOS, 7: esys.escriptcore.escriptcpp.SolverOptions.UMFPACK, 8: esys.escriptcore.escriptcpp.SolverOptions.BICGSTAB, 9: esys.escriptcore.escriptcpp.SolverOptions.CGLS, 10: esys.escriptcore.escriptcpp.SolverOptions.CGS, 11: esys.escriptcore.escriptcpp.SolverOptions.CHOLEVSKY, 12: esys.escriptcore.escriptcpp.SolverOptions.CR, 13: esys.escriptcore.escriptcpp.SolverOptions.DIRECT, 14: esys.escriptcore.escriptcpp.SolverOptions.DIRECT_MUMPS, 15: esys.escriptcore.escriptcpp.SolverOptions.DIRECT_PARDISO, 16: esys.escriptcore.escriptcpp.SolverOptions.DIRECT_SUPERLU, 17: esys.escriptcore.escriptcpp.SolverOptions.DIRECT_TRILINOS, 18: esys.escriptcore.escriptcpp.SolverOptions.GMRES, 19: esys.escriptcore.escriptcpp.SolverOptions.HRZ_LUMPING, 20: esys.escriptcore.escriptcpp.SolverOptions.ITERATIVE, 21: esys.escriptcore.escriptcpp.SolverOptions.LSQR, 22: esys.escriptcore.escriptcpp.SolverOptions.MINRES, 23: esys.escriptcore.escriptcpp.SolverOptions.NONLINEAR_GMRES, 24: esys.escriptcore.escriptcpp.SolverOptions.PCG, 25: esys.escriptcore.escriptcpp.SolverOptions.PRES20, 26: esys.escriptcore.escriptcpp.SolverOptions.ROWSUM_LUMPING, 27: esys.escriptcore.escriptcpp.SolverOptions.TFQMR, 28: esys.escriptcore.escriptcpp.SolverOptions.AMG, 29: esys.escriptcore.escriptcpp.SolverOptions.AMLI, 30: esys.escriptcore.escriptcpp.SolverOptions.BOOMERAMG, 31: esys.escriptcore.escriptcpp.SolverOptions.GAUSS_SEIDEL, 32: esys.escriptcore.escriptcpp.SolverOptions.ILU0, 33: esys.escriptcore.escriptcpp.SolverOptions.ILUT, 34: esys.escriptcore.escriptcpp.SolverOptions.JACOBI, 35: esys.escriptcore.escriptcpp.SolverOptions.NO_PRECONDITIONER, 36: esys.escriptcore.escriptcpp.SolverOptions.REC_ILU, 37: esys.escriptcore.escriptcpp.SolverOptions.RILU, 38: esys.escriptcore.escriptcpp.SolverOptions.BACKWARD_EULER, 39: esys.escriptcore.escriptcpp.SolverOptions.CRANK_NICOLSON, 40: esys.escriptcore.escriptcpp.SolverOptions.LINEAR_CRANK_NICOLSON, 41: esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION, 42: esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION_WITH_FF_COUPLING, 43: esys.escriptcore.escriptcpp.SolverOptions.DIRECT_INTERPOLATION, 44: esys.escriptcore.escriptcpp.SolverOptions.AGGREGATION_COARSENING, 45: esys.escriptcore.escriptcpp.SolverOptions.CIJP_COARSENING, 46: esys.escriptcore.escriptcpp.SolverOptions.CIJP_FIXED_RANDOM_COARSENING, 47: esys.escriptcore.escriptcpp.SolverOptions.FALGOUT_COARSENING, 48: esys.escriptcore.escriptcpp.SolverOptions.HMIS_COARSENING, 49: esys.escriptcore.escriptcpp.SolverOptions.PMIS_COARSENING, 50: esys.escriptcore.escriptcpp.SolverOptions.RUGE_STUEBEN_COARSENING, 51: esys.escriptcore.escriptcpp.SolverOptions.STANDARD_COARSENING, 52: esys.escriptcore.escriptcpp.SolverOptions.YAIR_SHAPIRA_COARSENING, 53: esys.escriptcore.escriptcpp.SolverOptions.DEFAULT_REORDERING, 54: esys.escriptcore.escriptcpp.SolverOptions.MINIMUM_FILL_IN, 55: esys.escriptcore.escriptcpp.SolverOptions.NESTED_DISSECTION, 56: esys.escriptcore.escriptcpp.SolverOptions.NO_REORDERING}
class esys.escriptcore.escriptcpp.SubWorld

Bases: Boost.Python.instance

Information about a group of workers.

esys.escriptcore.escriptcpp.Tensor([(float)value=0.0[, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749ad0>[, (bool)expanded=False]]]) → Data :

Construct a Data object containing rank2 data-points.

param value:scalar value for all points
rtype:Data
type value:float
param what:FunctionSpace for Data
type what:FunctionSpace
param expanded:If True, a value is stored for each point. If False, more efficient representations may be used
type expanded:bool

Tensor( (object)value [, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749b50> [, (bool)expanded=False]]) -> Data

esys.escriptcore.escriptcpp.Tensor3([(float)value=0.0[, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749bd0>[, (bool)expanded=False]]]) → Data :

Construct a Data object containing rank3 data-points.

param value:scalar value for all points
rtype:Data
type value:float
param what:FunctionSpace for Data
type what:FunctionSpace
param expanded:If True, a value is stored for each point. If False, more efficient representations may be used
type expanded:bool

Tensor3( (object)value [, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749c50> [, (bool)expanded=False]]) -> Data

esys.escriptcore.escriptcpp.Tensor4([(float)value=0.0[, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749cd0>[, (bool)expanded=False]]]) → Data :

Construct a Data object containing rank4 data-points.

param value:scalar value for all points
rtype:Data
type value:float
param what:FunctionSpace for Data
type what:FunctionSpace
param expanded:If True, a value is stored for each point. If False, more efficient representations may be used
type expanded:bool

Tensor4( (object)value [, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749d50> [, (bool)expanded=False]]) -> Data

class esys.escriptcore.escriptcpp.TestDomain

Bases: esys.escriptcore.escriptcpp.Domain

Test Class for domains with no structure. May be removed from future releases without notice.

MPIBarrier((Domain)arg1) → None :

Wait until all processes have reached this point

dump((Domain)arg1, (str)filename) → None :

Dumps the domain to a file

Parameters:filename (string) –
getDim((Domain)arg1) → int :
Return type:int
Returns:Spatial dimension of the Domain
getMPIRank((Domain)arg1) → int :
Returns:the rank of this process
Return type:int
getMPISize((Domain)arg1) → int :
Returns:the number of processes used for this Domain
Return type:int
getNormal((Domain)arg1) → Data :
Return type:escript
Returns:Boundary normals
getSize((Domain)arg1) → Data :
Returns:the local size of samples. The function space is chosen appropriately
Return type:Data
getStatus((Domain)arg1) → int :

The status of a domain changes whenever the domain is modified

Return type:int
getTag((Domain)arg1, (str)name) → int :
Returns:tag id for name
Return type:string
getX((Domain)arg1) → Data :
Return type:Data
Returns:Locations in the`Domain`. FunctionSpace is chosen appropriately
isValidTagName((Domain)arg1, (str)name) → bool :
Returns:True is name corresponds to a tag
Return type:bool
onMasterProcessor((Domain)arg1) → bool :
Returns:True if this code is executing on the master process
Return type:bool
setTagMap((Domain)arg1, (str)name, (int)tag) → None :

Give a tag number a name.

Parameters:
  • name (string) – Name for the tag
  • tag (int) – numeric id
Note:

Tag names must be unique within a domain

showTagNames((Domain)arg1) → str :
Returns:A space separated list of tag names
Return type:string
supportsContactElements((Domain)arg1) → bool :

Does this domain support contact elements.

class esys.escriptcore.escriptcpp.TransportProblem

Bases: Boost.Python.instance

getSafeTimeStepSize((TransportProblem)arg1) → float
getUnlimitedTimeStepSize((TransportProblem)arg1) → float
insertConstraint((TransportProblem)source, (Data)q, (Data)r, (Data)factor) → None :

inserts constraint u_{,t}=r where q>0 into the problem using a weighting factor

isEmpty((TransportProblem)arg1) → int :
Return type:int
reset((TransportProblem)arg1) → None :

resets the transport operator typically as they have been updated.

resetValues((TransportProblem)arg1) → None
solve((TransportProblem)arg1, (Data)u0, (Data)source, (float)dt, (object)options) → Data :

returns the solution u for a time step dt>0 with initial value u0

Return type:Data
Parameters:source (Data) –
esys.escriptcore.escriptcpp.Vector([(float)value=0.0[, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db7499d0>[, (bool)expanded=False]]]) → Data :

Construct a Data object containing rank1 data-points.

param value:scalar value for all points
rtype:Data
type value:float
param what:FunctionSpace for Data
type what:FunctionSpace
param expanded:If True, a value is stored for each point. If False, more efficient representations may be used
type expanded:bool

Vector( (object)value [, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749a50> [, (bool)expanded=False]]) -> Data

esys.escriptcore.escriptcpp.canInterpolate((FunctionSpace)src, (FunctionSpace)dest) → bool :
Parameters:
  • src – Source FunctionSpace
  • dest – Destination FunctionSpace
Returns:

True if src can be interpolated to dest

Return type:

bool

esys.escriptcore.escriptcpp.getEscriptParamInt((str)name[, (int)sentinel=0]) → int :

Read the value of an escript tuning parameter

Parameters:
  • name (string) – parameter to lookup
  • sentinel (int) – Value to be returned if name is not a known parameter
esys.escriptcore.escriptcpp.getMPIRankWorld() → int :

Return the rank of this process in the MPI World.

esys.escriptcore.escriptcpp.getMPISizeWorld() → int :

Return number of MPI processes in the job.

esys.escriptcore.escriptcpp.getMPIWorldMax((int)arg1) → int :

Each MPI process calls this function with a value for arg1. The maximum value is computed and returned.

Return type:int
esys.escriptcore.escriptcpp.getMPIWorldSum((int)arg1) → int :

Each MPI process calls this function with a value for arg1. The values are added up and the total value is returned.

Return type:int
esys.escriptcore.escriptcpp.getMachinePrecision() → float
esys.escriptcore.escriptcpp.getMaxFloat() → float
esys.escriptcore.escriptcpp.getNumberOfThreads() → int :

Return the maximum number of threads available to OpenMP.

esys.escriptcore.escriptcpp.getTestDomainFunctionSpace((int)dpps, (int)samples[, (int)size=1]) → FunctionSpace :

For testing only. May be removed without notice.

esys.escriptcore.escriptcpp.getVersion() → int :

This method will only report accurate version numbers for clean checkouts.

esys.escriptcore.escriptcpp.hasFeature((str)name) → bool :

Check if escript was compiled with a certain feature

Parameters:name (string) – feature to lookup
esys.escriptcore.escriptcpp.internal_addJob()

object internal_addJob(tuple args, dict kwds)

esys.escriptcore.escriptcpp.internal_addJobPerWorld()

object internal_addJobPerWorld(tuple args, dict kwds)

esys.escriptcore.escriptcpp.internal_addVariable()

object internal_addVariable(tuple args, dict kwds)

esys.escriptcore.escriptcpp.internal_buildDomains()

object internal_buildDomains(tuple args, dict kwds)

esys.escriptcore.escriptcpp.internal_makeDataReducer((str)op) → Reducer :

Create a reducer to work with Data and the specified operation.

esys.escriptcore.escriptcpp.internal_makeLocalOnly() → Reducer :

Create a variable which is not connected to copies in other worlds.

esys.escriptcore.escriptcpp.internal_makeScalarReducer((str)op) → Reducer :

Create a reducer to work with doubles and the specified operation.

esys.escriptcore.escriptcpp.listEscriptParams() → list :
Returns:A list of tuples (p,v,d) where p is the name of a parameter for escript, v is its current value, and d is a description.
esys.escriptcore.escriptcpp.listFeatures() → list :
Returns:A list of strings representing the features escript supports.
esys.escriptcore.escriptcpp.load((str)fileName, (Domain)domain) → Data :

reads Data on domain from file in netCDF format

Parameters:
  • fileName (string) –
  • domain (Domain) –
esys.escriptcore.escriptcpp.loadIsConfigured() → bool :
Returns:True if the load function is configured.
esys.escriptcore.escriptcpp.printParallelThreadCounts() → None
esys.escriptcore.escriptcpp.releaseUnusedMemory() → None
esys.escriptcore.escriptcpp.resolveGroup((object)arg1) → None
esys.escriptcore.escriptcpp.runMPIProgram((list)arg1) → int :

Spawns an external MPI program using a separate communicator.

esys.escriptcore.escriptcpp.setEscriptParamInt((str)name[, (int)value=0]) → None :

Modify the value of an escript tuning parameter

Parameters:
  • name (string) –
  • value (int) –
esys.escriptcore.escriptcpp.setNumberOfThreads((int)arg1) → None :

Use of this method is strongly discouraged.

Classes

class esys.escriptcore.escriptcpp.ContinuousDomain

Bases: esys.escriptcore.escriptcpp.Domain

Class representing continuous domains

__init__()

Raises an exception This class cannot be instantiated from Python

MPIBarrier((Domain)arg1) → None :

Wait until all processes have reached this point

addPDEToRHS((ContinuousDomain)arg1, (Data)rhs, (Data)X, (Data)Y, (Data)y, (Data)y_contact, (Data)y_dirac) → None :

adds a PDE onto the stiffness matrix mat and a rhs

Parameters:
addPDEToSystem((ContinuousDomain)arg1, (Operator)mat, (Data)rhs, (Data)A, (Data)B, (Data)C, (Data)D, (Data)X, (Data)Y, (Data)d, (Data)y, (Data)d_contact, (Data)y_contact, (Data)d_dirac, (Data)y_dirac) → None :

adds a PDE onto the stiffness matrix mat and a rhs

Parameters:
addPDEToTransportProblem((ContinuousDomain)arg1, (TransportProblem)tp, (Data)source, (Data)M, (Data)A, (Data)B, (Data)C, (Data)D, (Data)X, (Data)Y, (Data)d, (Data)y, (Data)d_contact, (Data)y_contact, (Data)d_dirac, (Data)y_dirac) → None :
Parameters:
dump((Domain)arg1, (str)filename) → None :

Dumps the domain to a file

Parameters:filename (string) –
getDataShape((ContinuousDomain)arg1, (int)functionSpaceCode) → object :
Returns:a pair (dps, ns) where dps=the number of data points per sample, and ns=the number of samples
Return type:tuple
getDescription((ContinuousDomain)arg1) → str :
Returns:a description for this domain
Return type:string
getDim((Domain)arg1) → int :
Return type:int
Returns:Spatial dimension of the Domain
getMPIRank((Domain)arg1) → int :
Returns:the rank of this process
Return type:int
getMPISize((Domain)arg1) → int :
Returns:the number of processes used for this Domain
Return type:int
getNormal((Domain)arg1) → Data :
Return type:escript
Returns:Boundary normals
getNumDataPointsGlobal((ContinuousDomain)arg1) → int :
Returns:the number of data points summed across all MPI processes
Return type:int
getSize((Domain)arg1) → Data :
Returns:the local size of samples. The function space is chosen appropriately
Return type:Data
getStatus((Domain)arg1) → int :

The status of a domain changes whenever the domain is modified

Return type:int
getSystemMatrixTypeId((ContinuousDomain)arg1, (object)options) → int :
Returns:the identifier of the matrix type to be used for the global stiffness matrix when particular solver options are used.
Return type:int
getTag((Domain)arg1, (str)name) → int :
Returns:tag id for name
Return type:string
getTransportTypeId((ContinuousDomain)arg1, (int)solver, (int)preconditioner, (int)package, (bool)symmetry) → int
getX((Domain)arg1) → Data :
Return type:Data
Returns:Locations in the`Domain`. FunctionSpace is chosen appropriately
isValidTagName((Domain)arg1, (str)name) → bool :
Returns:True is name corresponds to a tag
Return type:bool
newOperator((ContinuousDomain)arg1, (int)row_blocksize, (FunctionSpace)row_functionspace, (int)column_blocksize, (FunctionSpace)column_functionspace, (int)type) → Operator :

creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros

Parameters:
  • row_blocksize (int) –
  • row_functionspace (FunctionSpace) –
  • column_blocksize (int) –
  • column_functionspace (FunctionSpace) –
  • type (int) –
newTransportProblem((ContinuousDomain)theta, (int)blocksize, (FunctionSpace)functionspace, (int)type) → TransportProblem :

creates a TransportProblemAdapter

Parameters:
  • theta (float) –
  • blocksize (int) –
  • functionspace (FunctionSpace) –
  • type (int) –
onMasterProcessor((Domain)arg1) → bool :
Returns:True if this code is executing on the master process
Return type:bool
print_mesh_info((ContinuousDomain)arg1[, (bool)full=False]) → None :
Parameters:full (bool) –
setTagMap((Domain)arg1, (str)name, (int)tag) → None :

Give a tag number a name.

Parameters:
  • name (string) – Name for the tag
  • tag (int) – numeric id
Note:

Tag names must be unique within a domain

setX((ContinuousDomain)arg1, (Data)arg) → None :

assigns new location to the domain

Parameters:arg (Data) –
showTagNames((Domain)arg1) → str :
Returns:A space separated list of tag names
Return type:string
supportsContactElements((Domain)arg1) → bool :

Does this domain support contact elements.

class esys.escriptcore.escriptcpp.Data

Bases: Boost.Python.instance

Represents a collection of datapoints. It is used to store the values of a function. For more details please consult the c++ class documentation.

__init__((object)arg1) → None

__init__( (object)arg1, (object)value [, (object)p2 [, (object)p3 [, (object)p4]]]) -> None

conjugate((Data)arg1) → Data
copy((Data)arg1, (Data)other) → None :

Make this object a copy of other

note:The two objects will act independently from now on. That is, changing other after this call will not change this object and vice versa.
copy( (Data)arg1) -> Data :
note:In the no argument form, a new object will be returned which is an independent copy of this object.
copyWithMask((Data)arg1, (Data)other, (Data)mask) → None :

Selectively copy values from other Data.Datapoints which correspond to positive values in mask will be copied from other

Parameters:
  • other (Data) – source of values
  • mask (Scalar Data) –
delay((Data)arg1) → Data :

Convert this object into lazy representation

dump((Data)arg1, (str)fileName) → None :

Save the data as a netCDF file

Parameters:fileName (string) –
expand((Data)arg1) → None :

Convert the data to expanded representation if it is not expanded already.

getDomain((Data)arg1) → Domain :
Return type:Domain
getFunctionSpace((Data)arg1) → FunctionSpace :
Return type:FunctionSpace
getNumberOfDataPoints((Data)arg1) → int :
Return type:int
Returns:Number of datapoints in the object
getRank((Data)arg1) → int :
Returns:the number of indices required to address a component of a datapoint
Return type:positive int
getShape((Data)arg1) → tuple :

Returns the shape of the datapoints in this object as a python tuple. Scalar data has the shape ()

Return type:tuple
getTagNumber((Data)arg1, (int)dpno) → int :

Return tag number for the specified datapoint

Return type:int
Parameters:dpno (int) – datapoint number
getTupleForDataPoint((Data)arg1, (int)dataPointNo) → object :
Returns:Value of the specified datapoint
Return type:tuple
Parameters:dataPointNo (int) – datapoint to access
getTupleForGlobalDataPoint((Data)arg1, (int)procNo, (int)dataPointNo) → object :

Get a specific datapoint from a specific process

Return type:

tuple

Parameters:
  • procNo (positive int) – MPI rank of the process
  • dataPointNo (int) – datapoint to access
hasNaN((Data)arg1) → bool :

Returns return true if data contains NaN.

imag((Data)arg1) → Data
internal_maxGlobalDataPoint((Data)arg1) → tuple :

Please consider using getSupLocator() from pdetools instead.

internal_minGlobalDataPoint((Data)arg1) → tuple :

Please consider using getInfLocator() from pdetools instead.

interpolate((Data)arg1, (FunctionSpace)functionspace) → Data :

Interpolate this object’s values into a new functionspace.

interpolateTable((Data)arg1, (object)table, (float)Amin, (float)Astep, (Data)B, (float)Bmin, (float)Bstep[, (float)undef=1e+50[, (bool)check_boundaries=False]]) → Data :
Creates a new Data object by interpolating using the source data (which are

looked up in table) A must be the outer dimension on the table

param table:two dimensional collection of values
param Amin:The base of locations in table
type Amin:float
param Astep:size of gap between each item in the table
type Astep:float
param undef:upper bound on interpolated values
type undef:float
param B:Scalar representing the second coordinate to be mapped into the table
type B:Data
param Bmin:The base of locations in table for 2nd dimension
type Bmin:float
param Bstep:size of gap between each item in the table for 2nd dimension
type Bstep:float
param check_boundaries:
 if true, then values outside the boundaries will be rejected. If false, then boundary values will be used.
raise RuntimeError(DataException):
 if the coordinates do not map into the table or if the interpolated value is above undef
rtype:Data

interpolateTable( (Data)arg1, (object)table, (float)Amin, (float)Astep [, (float)undef=1e+50 [, (bool)check_boundaries=False]]) -> Data

isComplex((Data)arg1) → bool :
Return type:bool
Returns:True if this Data stores complex values.
isConstant((Data)arg1) → bool :
Return type:bool
Returns:True if this Data is an instance of DataConstant
Note:This does not mean the data is immutable.
isEmpty((Data)arg1) → bool :

Is this object an instance of DataEmpty

Return type:bool
Note:This is not the same thing as asking if the object contains datapoints.
isExpanded((Data)arg1) → bool :
Return type:bool
Returns:True if this Data is expanded.
isLazy((Data)arg1) → bool :
Return type:bool
Returns:True if this Data is lazy.
isProtected((Data)arg1) → bool :

Can this instance be modified. :rtype: bool

isReady((Data)arg1) → bool :
Return type:bool
Returns:True if this Data is not lazy.
isTagged((Data)arg1) → bool :
Return type:bool
Returns:True if this Data is expanded.
nonuniformInterpolate((Data)arg1, (object)in, (object)out, (bool)check_boundaries) → Data :

1D interpolation with non equally spaced points

nonuniformSlope((Data)arg1, (object)in, (object)out, (bool)check_boundaries) → Data :

1D interpolation of slope with non equally spaced points

promote((Data)arg1) → None
real((Data)arg1) → Data
replaceNaN((Data)arg1, (object)value) → None :

Replaces NaN values with value

resolve((Data)arg1) → None :

Convert the data to non-lazy representation.

setProtection((Data)arg1) → None :

Disallow modifications to this data object

Note:This method does not allow you to undo protection.
setTaggedValue((Data)arg1, (int)tagKey, (object)value) → None :

Set the value of tagged Data.

param tagKey:tag to update
type tagKey:int
setTaggedValue( (Data)arg1, (str)name, (object)value) -> None :
param name:tag to update
type name:string
param value:value to set tagged data to
type value:object which acts like an array, tuple or list
setToZero((Data)arg1) → None :

After this call the object will store values of the same shape as before but all components will be zero.

setValueOfDataPoint((Data)arg1, (int)dataPointNo, (object)value) → None

setValueOfDataPoint( (Data)arg1, (int)arg2, (object)arg3) -> None

setValueOfDataPoint( (Data)arg1, (int)arg2, (float)arg3) -> None :

Modify the value of a single datapoint.

param dataPointNo:
 
type dataPointNo:
 int
param value:
type value:float or an object which acts like an array, tuple or list
warning:Use of this operation is discouraged. It prevents some optimisations from operating.
tag((Data)arg1) → None :

Convert data to tagged representation if it is not already tagged or expanded

toListOfTuples((Data)arg1[, (bool)scalarastuple=False]) → object :

Return the datapoints of this object in a list. Each datapoint is stored as a tuple.

Parameters:scalarastuple – if True, scalar data will be wrapped as a tuple. True => [(0), (1), (2)]; False => [0, 1, 2]
class esys.escriptcore.escriptcpp.Domain

Bases: Boost.Python.instance

Base class for all domains.

__init__()

Raises an exception This class cannot be instantiated from Python

MPIBarrier((Domain)arg1) → None :

Wait until all processes have reached this point

dump((Domain)arg1, (str)filename) → None :

Dumps the domain to a file

Parameters:filename (string) –
getDim((Domain)arg1) → int :
Return type:int
Returns:Spatial dimension of the Domain
getMPIRank((Domain)arg1) → int :
Returns:the rank of this process
Return type:int
getMPISize((Domain)arg1) → int :
Returns:the number of processes used for this Domain
Return type:int
getNormal((Domain)arg1) → Data :
Return type:escript
Returns:Boundary normals
getSize((Domain)arg1) → Data :
Returns:the local size of samples. The function space is chosen appropriately
Return type:Data
getStatus((Domain)arg1) → int :

The status of a domain changes whenever the domain is modified

Return type:int
getTag((Domain)arg1, (str)name) → int :
Returns:tag id for name
Return type:string
getX((Domain)arg1) → Data :
Return type:Data
Returns:Locations in the`Domain`. FunctionSpace is chosen appropriately
isValidTagName((Domain)arg1, (str)name) → bool :
Returns:True is name corresponds to a tag
Return type:bool
onMasterProcessor((Domain)arg1) → bool :
Returns:True if this code is executing on the master process
Return type:bool
setTagMap((Domain)arg1, (str)name, (int)tag) → None :

Give a tag number a name.

Parameters:
  • name (string) – Name for the tag
  • tag (int) – numeric id
Note:

Tag names must be unique within a domain

showTagNames((Domain)arg1) → str :
Returns:A space separated list of tag names
Return type:string
supportsContactElements((Domain)arg1) → bool :

Does this domain support contact elements.

class esys.escriptcore.escriptcpp.FunctionSpace

Bases: Boost.Python.instance

A FunctionSpace describes which points from the Domain to use to represent functions.

__init__((object)arg1) → None
getApproximationOrder((FunctionSpace)arg1) → int :
Returns:the approximation order referring to the maximum degree of a polynomial which can be represented exactly in interpolation and/or integration.
Return type:int
getDim((FunctionSpace)arg1) → int :
Returns:the spatial dimension of the underlying domain.
Return type:int
getDomain((FunctionSpace)arg1) → Domain :
Returns:the underlying Domain for this FunctionSpace.
Return type:Domain
getListOfTags((FunctionSpace)arg1) → list :
Returns:a list of the tags used in this function space
Return type:list
getNormal((FunctionSpace)arg1) → Data :
Returns:the surface normal field.
Return type:Data
getReferenceIDFromDataPointNo((FunctionSpace)arg1, (int)dataPointNo) → int :
Returns:the reference number associated with dataPointNo
Return type:int
getSize((FunctionSpace)arg1) → Data :
Returns:sample size
Return type:Data
getTagFromDataPointNo((FunctionSpace)arg1, (int)arg2) → int :
Returns:the tag associated with the given sample number.
Return type:int
getX((FunctionSpace)arg1) → Data :
Returns:a function whose values are its input coordinates. ie an identity function.
Return type:Data
setTags((FunctionSpace)arg1, (int)newtag, (Data)mask) → None :

Set tags according to a mask

param newtag:tag number to set
type newtag:string, non-zero int
param mask:Samples which correspond to positive values in the mask will be set to newtag.
type mask:scalar Data

setTags( (FunctionSpace)arg1, (str)newtag, (Data)mask) -> None

class esys.escriptcore.escriptcpp.Internal_SplitWorld

Bases: Boost.Python.instance

Manages a group of sub worlds. For internal use only.

__init__((object)arg1, (int)num_worlds) → None
clearVariable((Internal_SplitWorld)arg1, (str)name) → None :

Remove the value from the named variable

copyVariable((Internal_SplitWorld)arg1, (str)source, (str)destination) → None :

Copy the contents of one variable to another

getDoubleVariable((Internal_SplitWorld)arg1, (str)arg2) → float :

Return the value of floating point variable

getLocalObjectVariable((Internal_SplitWorld)arg1, (str)arg2) → object :

Returns python object for a variable which is not shared between worlds

getSubWorldCount((Internal_SplitWorld)arg1) → int
getSubWorldID((Internal_SplitWorld)arg1) → int
getVarInfo((Internal_SplitWorld)arg1) → object :

Lists variable descriptions known to the system

getVarList((Internal_SplitWorld)arg1) → object :

Lists variables known to the system

removeVariable((Internal_SplitWorld)arg1, (str)name) → None :

Remove the named variable from the SplitWorld

runJobs((Internal_SplitWorld)arg1) → None :

Execute pending jobs.

class esys.escriptcore.escriptcpp.Operator

Bases: Boost.Python.instance

__init__((object)arg1) → None
isEmpty((Operator)arg1) → bool :
Return type:bool
Returns:True if matrix is empty
nullifyRowsAndCols((Operator)arg1, (Data)arg2, (Data)arg3, (float)arg4) → None
of((Operator)arg1, (Data)right) → Data :

matrix*vector multiplication

resetValues((Operator)arg1, (bool)arg2) → None :

resets the matrix entries

saveHB((Operator)arg1, (str)filename) → None :

writes the matrix to a file using the Harwell-Boeing file format

saveMM((Operator)arg1, (str)fileName) → None :

writes the matrix to a file using the Matrix Market file format

solve((Operator)arg1, (Data)in, (object)options) → Data :
Returns:the solution u of the linear system this*u=in
Parameters:in (Data) –
class esys.escriptcore.escriptcpp.Reducer

Bases: Boost.Python.instance

__init__()

Raises an exception This class cannot be instantiated from Python

class esys.escriptcore.escriptcpp.SolverBuddy

Bases: Boost.Python.instance

__init__((object)arg1) → None
acceptConvergenceFailure((SolverBuddy)arg1) → bool :

Returns True if a failure to meet the stopping criteria within the given number of iteration steps is not raising in exception. This is useful if a solver is used in a non-linear context where the non-linear solver can continue even if the returned the solution does not necessarily meet the stopping criteria. One can use the hasConverged method to check if the last call to the solver was successful.

Returns:True if a failure to achieve convergence is accepted.
Return type:bool
adaptInnerTolerance((SolverBuddy)arg1) → bool :

Returns True if the tolerance of the inner solver is selected automatically. Otherwise the inner tolerance set by setInnerTolerance is used.

Returns:True if inner tolerance adaption is chosen.
Return type:bool
getAMGInterpolation((SolverBuddy)arg1) → SolverOptions :

Returns key of the interpolation method for the SAMG preconditioner

Return type:in the list CLASSIC_INTERPOLATION_WITH_FF_COUPLING, CLASSIC_INTERPOLATION, DIRECT_INTERPOLATION
getAbsoluteTolerance((SolverBuddy)arg1) → float :

Returns the absolute tolerance for the solver

Return type:float
getCoarsening((SolverBuddy)arg1) → SolverOptions :

Returns the key of the coarsening algorithm to be applied AMG, AMLI or BoomerAMG

Return type:in the list DEFAULT, YAIR_SHAPIRA_COARSENING, RUGE_STUEBEN_COARSENING, AGGREGATION_COARSENING, CIJP_FIXED_RANDOM_COARSENING, CIJP_COARSENING, FALGOUT_COARSENING, PMIS_COARSENING, HMIS_COARSENING
getCoarseningThreshold((SolverBuddy)arg1) → float :

Returns the threshold for coarsening in the algebraic multi level solver or preconditioner

Return type:float
getCycleType((SolverBuddy)arg1) → int :

Returns the cyle type (V- or W-cycle) to be used in an algebraic multi level solver or preconditioner

Return type:int
getDiagnostics((SolverBuddy)arg1, (str)name) → float :

Returns the diagnostic information name. Possible values are:

  • ‘num_iter’: the number of iteration steps
  • ‘cum_num_iter’: the cumulative number of iteration steps
  • ‘num_level’: the number of level in multi level solver
  • ‘num_inner_iter’: the number of inner iteration steps
  • ‘cum_num_inner_iter’: the cumulative number of inner iteration steps
  • ‘time’: execution time
  • ‘cum_time’: cumulative execution time
  • ‘set_up_time’: time to set up of the solver, typically this includes factorization and reordering
  • ‘cum_set_up_time’: cumulative time to set up of the solver
  • ‘net_time’: net execution time, excluding setup time for the solver and execution time for preconditioner
  • ‘cum_net_time’: cumulative net execution time
  • ‘preconditioner_size’: size of preconditioner [Bytes]
  • ‘converged’: return True if solution has converged.
  • ‘time_step_backtracking_used’: returns True if time step back tracking has been used.
  • ‘coarse_level_sparsity’: returns the sparsity of the matrix on the coarsest level
  • ‘num_coarse_unknowns’: returns the number of unknowns on the coarsest level
Parameters:name (str in the list above.) – name of diagnostic information to return
Returns:requested value. 0 is returned if the value is yet to be defined.
Note:If the solver has thrown an exception diagnostic values have an undefined status.
getDiagonalDominanceThreshold((SolverBuddy)arg1) → float :

Returns the threshold for diagonal dominant rows which are eliminated during AMG coarsening.

Return type:float
getDropStorage((SolverBuddy)arg1) → float :

Returns the maximum allowed increase in storage for ILUT

Return type:float
getDropTolerance((SolverBuddy)arg1) → float :

Returns the relative drop tolerance in ILUT

Return type:float
getInnerIterMax((SolverBuddy)arg1) → int :

Returns maximum number of inner iteration steps

Return type:int
getInnerTolerance((SolverBuddy)arg1) → float :

Returns the relative tolerance for an inner iteration scheme

Return type:float
getIterMax((SolverBuddy)arg1) → int :

Returns maximum number of iteration steps

Return type:int
getLevelMax((SolverBuddy)arg1) → int :

Returns the maximum number of coarsening levels to be used in an algebraic multi level solver or preconditioner

Return type:int
getMinCoarseMatrixSize((SolverBuddy)arg1) → int :

Returns the minimum size of the coarsest level matrix in AMG or AMLI

getMinCoarseMatrixSparsity((SolverBuddy)arg1) → float :

Returns the minimum sparsity on the coarsest level. Typically a direct solver is used when the sparsity becomes bigger than the set limit.

Returns:minimal sparsity
Return type:float
getName((SolverBuddy)arg1, (int)key) → str :

Returns the name of a given key

Parameters:key – a valid key
getNumCoarseMatrixRefinements((SolverBuddy)arg1) → int :

Returns the number of refinement steps to refine the solution on the coarsest level when a direct solver is applied.

Return type:non-negative int
getNumPostSweeps((SolverBuddy)arg1) → int :

Returns he number of sweeps in the post-smoothing step of a multi level solver or preconditioner

Return type:int
getNumPreSweeps((SolverBuddy)arg1) → int :

Returns he number of sweeps in the pre-smoothing step of a multi level solver or preconditioner

Return type:int
getNumRefinements((SolverBuddy)arg1) → int :

Returns the number of refinement steps to refine the solution when a direct solver is applied.

Return type:non-negative int
getNumSweeps((SolverBuddy)arg1) → int :

Returns the number of sweeps in a Jacobi or Gauss-Seidel/SOR preconditioner.

Return type:int
getODESolver((SolverBuddy)arg1) → SolverOptions :

Returns key of the solver method for ODEs.

Parameters:method (in CRANK_NICOLSON, BACKWARD_EULER, LINEAR_CRANK_NICOLSON) – key of the ODE solver method to be used.
getPackage((SolverBuddy)arg1) → SolverOptions :

Returns the solver package key

Return type:in the list DEFAULT, PASO, CUSP, MKL, UMFPACK, TRILINOS
getPreconditioner((SolverBuddy)arg1) → SolverOptions :

Returns the key of the preconditioner to be used.

Return type:in the list ILU0, ILUT, JACOBI, AMLI, AMG, REC_ILU, GAUSS_SEIDEL, RILU, BOOMERAMG, NO_PRECONDITIONER
getRelaxationFactor((SolverBuddy)arg1) → float :

Returns the relaxation factor used to add dropped elements in RILU to the main diagonal.

Return type:float
getReordering((SolverBuddy)arg1) → SolverOptions :

Returns the key of the reordering method to be applied if supported by the solver.

Return type:in NO_REORDERING, MINIMUM_FILL_IN, NESTED_DISSECTION, DEFAULT_REORDERING
getRestart((SolverBuddy)arg1) → int :

Returns the number of iterations steps after which GMRES performs a restart. If 0 is returned no restart is performed.

Return type:int
getSmoother((SolverBuddy)arg1) → SolverOptions :

Returns key of the smoother to be used.

Return type:in the list JACOBI, GAUSS_SEIDEL
getSolverMethod((SolverBuddy)arg1) → SolverOptions :

Returns key of the solver method to be used.

Return type:in the list DEFAULT, DIRECT, CHOLEVSKY, PCG, CR, CGS, BICGSTAB, GMRES, PRES20, ROWSUM_LUMPING, HRZ_LUMPING, MINRES, ITERATIVE, NONLINEAR_GMRES, TFQMR
getSolverTarget((SolverBuddy)arg1) → SolverOptions :

Returns the solver target key

Return type:in the list TARGET_CPU, TARGET_GPU
getSummary((SolverBuddy)arg1) → str :

Returns a string reporting the current settings

getTolerance((SolverBuddy)arg1) → float :

Returns the relative tolerance for the solver

Return type:float
getTrilinosParameters((SolverBuddy)arg1) → dict :

Returns a dictionary of set Trilinos parameters.

:note This method returns an empty dictionary in a non-Trilinos build.

getTruncation((SolverBuddy)arg1) → int :

Returns the number of residuals in GMRES to be stored for orthogonalization

Return type:int
hasConverged((SolverBuddy)arg1) → bool :

Returns True if the last solver call has been finalized successfully.

Note:if an exception has been thrown by the solver the status of thisflag is undefined.
isComplex((SolverBuddy)arg1) → bool :

Checks if the coefficient matrix is set to be complex-valued.

Returns:True if a complex-valued PDE is indicated, False otherwise
Return type:bool
isSymmetric((SolverBuddy)arg1) → bool :

Checks if symmetry of the coefficient matrix is indicated.

Returns:True if a symmetric PDE is indicated, False otherwise
Return type:bool
isVerbose((SolverBuddy)arg1) → bool :

Returns True if the solver is expected to be verbose.

Returns:True if verbosity of switched on.
Return type:bool
resetDiagnostics((SolverBuddy)arg1[, (bool)all=False]) → None :

Resets the diagnostics

Parameters:all (bool) – if all is True all diagnostics including accumulative counters are reset.
setAMGInterpolation((SolverBuddy)arg1, (int)interpolation) → None :

Set the interpolation method for the AMG preconditioner.

Parameters:method (in CLASSIC_INTERPOLATION_WITH_FF_COUPLING, CLASSIC_INTERPOLATION, DIRECT_INTERPOLATION) – key of the interpolation method to be used.
setAbsoluteTolerance((SolverBuddy)arg1, (float)atol) → None :

Sets the absolute tolerance for the solver

Parameters:atol (non-negative float) – absolute tolerance
setAcceptanceConvergenceFailure((SolverBuddy)arg1, (bool)accept) → None :

Sets the flag to indicate the acceptance of a failure of convergence.

Parameters:accept (bool) – If True, any failure to achieve convergence is accepted.
setAcceptanceConvergenceFailureOff((SolverBuddy)arg1) → None :

Switches the acceptance of a failure of convergence off.

setAcceptanceConvergenceFailureOn((SolverBuddy)arg1) → None :

Switches the acceptance of a failure of convergence on

setCoarsening((SolverBuddy)arg1, (int)coarsening) → None :

Sets the key of the coarsening method to be applied in AMG or AMLI or BoomerAMG

Parameters:method (in DEFAULT, YAIR_SHAPIRA_COARSENING, RUGE_STUEBEN_COARSENING, AGGREGATION_COARSENING, CIJP_FIXED_RANDOM_COARSENING, CIJP_COARSENING, FALGOUT_COARSENING, PMIS_COARSENING, HMIS_COARSENING) – selects the coarsening method .
setCoarseningThreshold((SolverBuddy)arg1, (float)theta) → None :

Sets the threshold for coarsening in the algebraic multi level solver or preconditioner

Parameters:theta (positive float) – threshold for coarsening
setComplex((SolverBuddy)arg1, (bool)complex) → None :

Sets the complex flag for the coefficient matrix to flag.

Parameters:flag (bool) – If True, the complex flag is set otherwise reset.
setCycleType((SolverBuddy)arg1, (int)cycle_type) → None :

Sets the cycle type (V-cycle or W-cycle) to be used in an algebraic multi-level solver or preconditioner

Parameters:cycle_type (int) – the type of cycle
setDiagonalDominanceThreshold((SolverBuddy)arg1, (float)threshold) → None :

Sets the threshold for diagonal dominant rows which are eliminated during AMG coarsening.

Parameters:value (float) – threshold
setDropStorage((SolverBuddy)arg1, (float)drop) → None :

Sets the maximum allowed increase in storage for ILUT. storage =2 would mean that a doubling of the storage needed for the coefficient matrix is allowed in the ILUT factorization.

Parameters:storage (float) – allowed storage increase
setDropTolerance((SolverBuddy)arg1, (float)drop_tol) → None :

Sets the relative drop tolerance in ILUT

Parameters:drop_tol (positive float) – drop tolerance
setInnerIterMax((SolverBuddy)arg1, (int)iter_max) → None :

Sets the maximum number of iteration steps for the inner iteration.

Parameters:iter_max (int) – maximum number of inner iterations
setInnerTolerance((SolverBuddy)arg1, (float)rtol) → None :

Sets the relative tolerance for an inner iteration scheme, for instance on the coarsest level in a multi-level scheme.

Parameters:rtol (positive float) – inner relative tolerance
setInnerToleranceAdaption((SolverBuddy)arg1, (bool)adapt) → None :

Sets the flag to indicate automatic selection of the inner tolerance.

Parameters:adapt (bool) – If True, the inner tolerance is selected automatically.
setInnerToleranceAdaptionOff((SolverBuddy)arg1) → None :

Switches the automatic selection of inner tolerance off.

setInnerToleranceAdaptionOn((SolverBuddy)arg1) → None :

Switches the automatic selection of inner tolerance on

setIterMax((SolverBuddy)arg1, (int)iter_max) → None :

Sets the maximum number of iteration steps

Parameters:iter_max (int) – maximum number of iteration steps
setLevelMax((SolverBuddy)arg1, (int)level_max) → None :

Sets the maximum number of coarsening levels to be used in an algebraic multi-level solver or preconditioner

Parameters:level_max (int) – maximum number of levels
setLocalPreconditioner((SolverBuddy)arg1, (bool)local) → None :

Sets the flag to use local preconditioning

Parameters:use (bool) – If True, local preconditioning on each MPI rank is applied
setLocalPreconditionerOff((SolverBuddy)arg1) → None :

Sets the flag to use local preconditioning to off

setLocalPreconditionerOn((SolverBuddy)arg1) → None :

Sets the flag to use local preconditioning to on

setMinCoarseMatrixSize((SolverBuddy)arg1, (int)size) → None :

Sets the minimum size of the coarsest level matrix in AMG or AMLI

Parameters:size (positive int) – minimum size of the coarsest level matrix .
setMinCoarseMatrixSparsity((SolverBuddy)arg1, (float)sparsity) → None :

Sets the minimum sparsity on the coarsest level. Typically a direct solver is used when the sparsity becomes bigger than the set limit.

Parameters:sparsity (float) – minimal sparsity
setNumCoarseMatrixRefinements((SolverBuddy)arg1, (int)refinements) → None :

Sets the number of refinement steps to refine the solution on the coarsest level when a direct solver is applied.

Parameters:refinements (non-negative int) – number of refinements
setNumPostSweeps((SolverBuddy)arg1, (int)sweeps) → None :

Sets the number of sweeps in the post-smoothing step of a multi level solver or preconditioner

Parameters:sweeps (positive int) – number of sweeps
setNumPreSweeps((SolverBuddy)arg1, (int)sweeps) → None :

Sets the number of sweeps in the pre-smoothing step of a multi level solver or preconditioner

Parameters:sweeps (positive int) – number of sweeps
setNumRefinements((SolverBuddy)arg1, (int)refinements) → None :

Sets the number of refinement steps to refine the solution when a direct solver is applied.

Parameters:refinements (non-negative int) – number of refinements
setNumSweeps((SolverBuddy)arg1, (int)sweeps) → None :

Sets the number of sweeps in a Jacobi or Gauss-Seidel/SOR preconditioner.

Parameters:sweeps (positive int) – number of sweeps
setODESolver((SolverBuddy)arg1, (int)solver) → None :

Set the solver method for ODEs.

Parameters:method (in CRANK_NICOLSON, BACKWARD_EULER, LINEAR_CRANK_NICOLSON) – key of the ODE solver method to be used.
setPackage((SolverBuddy)arg1, (int)package) → None :

Sets the solver package to be used as a solver.

Parameters:package (in DEFAULT, PASO, CUSP, MKL, UMFPACK, TRILINOS) – key of the solver package to be used.
Note:Not all packages are support on all implementation. An exception may be thrown on some platforms if a particular package is requested.
setPreconditioner((SolverBuddy)arg1, (int)preconditioner) → None :

Sets the preconditioner to be used.

Parameters:preconditioner (in ILU0, ILUT, JACOBI, AMG, AMLI, REC_ILU, GAUSS_SEIDEL, RILU, BOOMERAMG, NO_PRECONDITIONER) – key of the preconditioner to be used.
Note:Not all packages support all preconditioner. It can be assumed that a package makes a reasonable choice if it encounters an unknownpreconditioner.
setRelaxationFactor((SolverBuddy)arg1, (float)relaxation) → None :

Sets the relaxation factor used to add dropped elements in RILU to the main diagonal.

Parameters:factor (float) – relaxation factor
Note:RILU with a relaxation factor 0 is identical to ILU0
setReordering((SolverBuddy)arg1, (int)ordering) → None :

Sets the key of the reordering method to be applied if supported by the solver. Some direct solvers support reordering to optimize compute time and storage use during elimination.

Parameters:ordering (in 'NO_REORDERING', 'MINIMUM_FILL_IN', 'NESTED_DISSECTION', 'DEFAULT_REORDERING') – selects the reordering strategy.
setRestart((SolverBuddy)arg1, (int)restart) → None :

Sets the number of iterations steps after which GMRES performs a restart.

Parameters:restart (int) – number of iteration steps after which to perform a restart. If 0 no restart is performed.
setSmoother((SolverBuddy)arg1, (int)smoother) → None :

Sets the smoother to be used.

Parameters:smoother (in JACOBI, GAUSS_SEIDEL) – key of the smoother to be used.
Note:Not all packages support all smoothers. It can be assumed that a package makes a reasonable choice if it encounters an unknown smoother.
setSolverMethod((SolverBuddy)arg1, (int)method) → None :

Sets the solver method to be used. Use method``=``DIRECT to indicate that a direct rather than an iterative solver should be used and use method``=``ITERATIVE to indicate that an iterative rather than a direct solver should be used.

Parameters:method (in DEFAULT, DIRECT, CHOLEVSKY, PCG, CR, CGS, BICGSTAB, GMRES, PRES20, ROWSUM_LUMPING, HRZ_LUMPING, ITERATIVE, NONLINEAR_GMRES, TFQMR, MINRES) – key of the solver method to be used.
Note:Not all packages support all solvers. It can be assumed that a package makes a reasonable choice if it encounters an unknown solver method.
setSolverTarget((SolverBuddy)arg1, (int)target) → None :

Sets the solver target to be used.

Parameters:target (in TARGET_CPU, TARGET_GPU) – key of the solver target to be used.
setSymmetry((SolverBuddy)arg1, (bool)symmetry) → None :

Sets the symmetry flag for the coefficient matrix to flag.

Parameters:flag (bool) – If True, the symmetry flag is set otherwise reset.
setSymmetryOff((SolverBuddy)arg1) → None :

Clears the symmetry flag for the coefficient matrix.

setSymmetryOn((SolverBuddy)arg1) → None :

Sets the symmetry flag to indicate that the coefficient matrix is symmetric.

setTolerance((SolverBuddy)arg1, (float)rtol) → None :

Sets the relative tolerance for the solver

Parameters:rtol (non-negative float) – relative tolerance
setTrilinosParameter((SolverBuddy)arg1, (str)arg2, (object)arg3) → None :

Sets a Trilinos preconditioner/solver parameter.

:note Escript does not check for validity of the parameter name (e.g. spelling mistakes). Parameters are passed 1:1 to escript’s Trilinos wrapper and from there to the relevant Trilinos package. See the relevant Trilinos documentation for valid parameter strings and values.:note This method does nothing in a non-Trilinos build.

setTruncation((SolverBuddy)arg1, (int)truncation) → None :

Sets the number of residuals in GMRES to be stored for orthogonalization. The more residuals are stored the faster GMRES converged

Parameters:truncation (int) – truncation
setUsePanel((SolverBuddy)arg1, (bool)use) → None :

Sets the flag to use a panel to find unknowns in AMG coarsening

Parameters:use (bool) – If True,a panel is used to find unknowns in AMG coarsening
setUsePanelOff((SolverBuddy)arg1) → None :

Sets the flag to use a panel to find unknowns in AMG coarsening to off

setUsePanelOn((SolverBuddy)arg1) → None :

Sets the flag to use a panel to find unknowns in AMG coarsening

setVerbosity((SolverBuddy)arg1, (bool)verbosity) → None :

Sets the verbosity flag for the solver to flag.

Parameters:verbose (bool) – If True, the verbosity of the solver is switched on.
setVerbosityOff((SolverBuddy)arg1) → None :

Switches the verbosity of the solver off.

setVerbosityOn((SolverBuddy)arg1) → None :

Switches the verbosity of the solver on.

useLocalPreconditioner((SolverBuddy)arg1) → bool :

Returns True if the preconditoner is applied locally on each MPI. This reduces communication costs and speeds up the application of the preconditioner but at the costs of more iteration steps. This can be an advantage on clusters with slower interconnects.

Returns:True if local preconditioning is applied
Return type:bool
usePanel((SolverBuddy)arg1) → bool :

Returns True if a panel is used to search for unknown in the AMG coarsening, The panel approach is normally faster but can lead to larger coarse level systems.

Returns:True if a panel is used to find unknowns in AMG coarsening
Return type:bool
class esys.escriptcore.escriptcpp.SolverOptions

Bases: Boost.Python.enum

__init__()

x.__init__(...) initializes x; see help(type(x)) for signature

AGGREGATION_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.AGGREGATION_COARSENING
AMG = esys.escriptcore.escriptcpp.SolverOptions.AMG
AMLI = esys.escriptcore.escriptcpp.SolverOptions.AMLI
BACKWARD_EULER = esys.escriptcore.escriptcpp.SolverOptions.BACKWARD_EULER
BICGSTAB = esys.escriptcore.escriptcpp.SolverOptions.BICGSTAB
BOOMERAMG = esys.escriptcore.escriptcpp.SolverOptions.BOOMERAMG
CGLS = esys.escriptcore.escriptcpp.SolverOptions.CGLS
CGS = esys.escriptcore.escriptcpp.SolverOptions.CGS
CHOLEVSKY = esys.escriptcore.escriptcpp.SolverOptions.CHOLEVSKY
CIJP_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.CIJP_COARSENING
CIJP_FIXED_RANDOM_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.CIJP_FIXED_RANDOM_COARSENING
CLASSIC_INTERPOLATION = esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION
CLASSIC_INTERPOLATION_WITH_FF_COUPLING = esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION_WITH_FF_COUPLING
CR = esys.escriptcore.escriptcpp.SolverOptions.CR
CRANK_NICOLSON = esys.escriptcore.escriptcpp.SolverOptions.CRANK_NICOLSON
CUSP = esys.escriptcore.escriptcpp.SolverOptions.CUSP
DEFAULT = esys.escriptcore.escriptcpp.SolverOptions.DEFAULT
DEFAULT_REORDERING = esys.escriptcore.escriptcpp.SolverOptions.DEFAULT_REORDERING
DIRECT = esys.escriptcore.escriptcpp.SolverOptions.DIRECT
DIRECT_INTERPOLATION = esys.escriptcore.escriptcpp.SolverOptions.DIRECT_INTERPOLATION
DIRECT_MUMPS = esys.escriptcore.escriptcpp.SolverOptions.DIRECT_MUMPS
DIRECT_PARDISO = esys.escriptcore.escriptcpp.SolverOptions.DIRECT_PARDISO
DIRECT_SUPERLU = esys.escriptcore.escriptcpp.SolverOptions.DIRECT_SUPERLU
DIRECT_TRILINOS = esys.escriptcore.escriptcpp.SolverOptions.DIRECT_TRILINOS
FALGOUT_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.FALGOUT_COARSENING
GAUSS_SEIDEL = esys.escriptcore.escriptcpp.SolverOptions.GAUSS_SEIDEL
GMRES = esys.escriptcore.escriptcpp.SolverOptions.GMRES
HMIS_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.HMIS_COARSENING
HRZ_LUMPING = esys.escriptcore.escriptcpp.SolverOptions.HRZ_LUMPING
ILU0 = esys.escriptcore.escriptcpp.SolverOptions.ILU0
ILUT = esys.escriptcore.escriptcpp.SolverOptions.ILUT
ITERATIVE = esys.escriptcore.escriptcpp.SolverOptions.ITERATIVE
JACOBI = esys.escriptcore.escriptcpp.SolverOptions.JACOBI
LINEAR_CRANK_NICOLSON = esys.escriptcore.escriptcpp.SolverOptions.LINEAR_CRANK_NICOLSON
LSQR = esys.escriptcore.escriptcpp.SolverOptions.LSQR
LUMPING = esys.escriptcore.escriptcpp.SolverOptions.LUMPING
MINIMUM_FILL_IN = esys.escriptcore.escriptcpp.SolverOptions.MINIMUM_FILL_IN
MINRES = esys.escriptcore.escriptcpp.SolverOptions.MINRES
MKL = esys.escriptcore.escriptcpp.SolverOptions.MKL
NESTED_DISSECTION = esys.escriptcore.escriptcpp.SolverOptions.NESTED_DISSECTION
NONLINEAR_GMRES = esys.escriptcore.escriptcpp.SolverOptions.NONLINEAR_GMRES
NO_PRECONDITIONER = esys.escriptcore.escriptcpp.SolverOptions.NO_PRECONDITIONER
NO_REORDERING = esys.escriptcore.escriptcpp.SolverOptions.NO_REORDERING
PASO = esys.escriptcore.escriptcpp.SolverOptions.PASO
PCG = esys.escriptcore.escriptcpp.SolverOptions.PCG
PMIS_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.PMIS_COARSENING
PRES20 = esys.escriptcore.escriptcpp.SolverOptions.PRES20
REC_ILU = esys.escriptcore.escriptcpp.SolverOptions.REC_ILU
RILU = esys.escriptcore.escriptcpp.SolverOptions.RILU
ROWSUM_LUMPING = esys.escriptcore.escriptcpp.SolverOptions.ROWSUM_LUMPING
RUGE_STUEBEN_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.RUGE_STUEBEN_COARSENING
STANDARD_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.STANDARD_COARSENING
TARGET_CPU = esys.escriptcore.escriptcpp.SolverOptions.TARGET_CPU
TARGET_GPU = esys.escriptcore.escriptcpp.SolverOptions.TARGET_GPU
TFQMR = esys.escriptcore.escriptcpp.SolverOptions.TFQMR
TRILINOS = esys.escriptcore.escriptcpp.SolverOptions.TRILINOS
UMFPACK = esys.escriptcore.escriptcpp.SolverOptions.UMFPACK
YAIR_SHAPIRA_COARSENING = esys.escriptcore.escriptcpp.SolverOptions.YAIR_SHAPIRA_COARSENING
bit_length() → int

Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6

conjugate()

Returns self, the complex conjugate of any int.

denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

name
names = {'BICGSTAB': esys.escriptcore.escriptcpp.SolverOptions.BICGSTAB, 'RILU': esys.escriptcore.escriptcpp.SolverOptions.RILU, 'DEFAULT_REORDERING': esys.escriptcore.escriptcpp.SolverOptions.DEFAULT_REORDERING, 'ILU0': esys.escriptcore.escriptcpp.SolverOptions.ILU0, 'TARGET_CPU': esys.escriptcore.escriptcpp.SolverOptions.TARGET_CPU, 'CHOLEVSKY': esys.escriptcore.escriptcpp.SolverOptions.CHOLEVSKY, 'DEFAULT': esys.escriptcore.escriptcpp.SolverOptions.DEFAULT, 'MKL': esys.escriptcore.escriptcpp.SolverOptions.MKL, 'ITERATIVE': esys.escriptcore.escriptcpp.SolverOptions.ITERATIVE, 'DIRECT': esys.escriptcore.escriptcpp.SolverOptions.DIRECT, 'BACKWARD_EULER': esys.escriptcore.escriptcpp.SolverOptions.BACKWARD_EULER, 'BOOMERAMG': esys.escriptcore.escriptcpp.SolverOptions.BOOMERAMG, 'GAUSS_SEIDEL': esys.escriptcore.escriptcpp.SolverOptions.GAUSS_SEIDEL, 'CIJP_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.CIJP_COARSENING, 'PCG': esys.escriptcore.escriptcpp.SolverOptions.PCG, 'NO_PRECONDITIONER': esys.escriptcore.escriptcpp.SolverOptions.NO_PRECONDITIONER, 'LUMPING': esys.escriptcore.escriptcpp.SolverOptions.LUMPING, 'TARGET_GPU': esys.escriptcore.escriptcpp.SolverOptions.TARGET_GPU, 'CGLS': esys.escriptcore.escriptcpp.SolverOptions.CGLS, 'CIJP_FIXED_RANDOM_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.CIJP_FIXED_RANDOM_COARSENING, 'PMIS_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.PMIS_COARSENING, 'TFQMR': esys.escriptcore.escriptcpp.SolverOptions.TFQMR, 'UMFPACK': esys.escriptcore.escriptcpp.SolverOptions.UMFPACK, 'AMG': esys.escriptcore.escriptcpp.SolverOptions.AMG, 'RUGE_STUEBEN_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.RUGE_STUEBEN_COARSENING, 'MINRES': esys.escriptcore.escriptcpp.SolverOptions.MINRES, 'CLASSIC_INTERPOLATION_WITH_FF_COUPLING': esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION_WITH_FF_COUPLING, 'NO_REORDERING': esys.escriptcore.escriptcpp.SolverOptions.NO_REORDERING, 'MINIMUM_FILL_IN': esys.escriptcore.escriptcpp.SolverOptions.MINIMUM_FILL_IN, 'CGS': esys.escriptcore.escriptcpp.SolverOptions.CGS, 'CRANK_NICOLSON': esys.escriptcore.escriptcpp.SolverOptions.CRANK_NICOLSON, 'NESTED_DISSECTION': esys.escriptcore.escriptcpp.SolverOptions.NESTED_DISSECTION, 'LSQR': esys.escriptcore.escriptcpp.SolverOptions.LSQR, 'NONLINEAR_GMRES': esys.escriptcore.escriptcpp.SolverOptions.NONLINEAR_GMRES, 'AMLI': esys.escriptcore.escriptcpp.SolverOptions.AMLI, 'ILUT': esys.escriptcore.escriptcpp.SolverOptions.ILUT, 'CUSP': esys.escriptcore.escriptcpp.SolverOptions.CUSP, 'CLASSIC_INTERPOLATION': esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION, 'HRZ_LUMPING': esys.escriptcore.escriptcpp.SolverOptions.HRZ_LUMPING, 'AGGREGATION_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.AGGREGATION_COARSENING, 'STANDARD_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.STANDARD_COARSENING, 'TRILINOS': esys.escriptcore.escriptcpp.SolverOptions.TRILINOS, 'PASO': esys.escriptcore.escriptcpp.SolverOptions.PASO, 'PRES20': esys.escriptcore.escriptcpp.SolverOptions.PRES20, 'HMIS_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.HMIS_COARSENING, 'YAIR_SHAPIRA_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.YAIR_SHAPIRA_COARSENING, 'CR': esys.escriptcore.escriptcpp.SolverOptions.CR, 'ROWSUM_LUMPING': esys.escriptcore.escriptcpp.SolverOptions.ROWSUM_LUMPING, 'DIRECT_SUPERLU': esys.escriptcore.escriptcpp.SolverOptions.DIRECT_SUPERLU, 'DIRECT_TRILINOS': esys.escriptcore.escriptcpp.SolverOptions.DIRECT_TRILINOS, 'LINEAR_CRANK_NICOLSON': esys.escriptcore.escriptcpp.SolverOptions.LINEAR_CRANK_NICOLSON, 'DIRECT_MUMPS': esys.escriptcore.escriptcpp.SolverOptions.DIRECT_MUMPS, 'DIRECT_INTERPOLATION': esys.escriptcore.escriptcpp.SolverOptions.DIRECT_INTERPOLATION, 'DIRECT_PARDISO': esys.escriptcore.escriptcpp.SolverOptions.DIRECT_PARDISO, 'FALGOUT_COARSENING': esys.escriptcore.escriptcpp.SolverOptions.FALGOUT_COARSENING, 'REC_ILU': esys.escriptcore.escriptcpp.SolverOptions.REC_ILU, 'GMRES': esys.escriptcore.escriptcpp.SolverOptions.GMRES, 'JACOBI': esys.escriptcore.escriptcpp.SolverOptions.JACOBI}
numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

values = {0: esys.escriptcore.escriptcpp.SolverOptions.DEFAULT, 1: esys.escriptcore.escriptcpp.SolverOptions.TARGET_CPU, 2: esys.escriptcore.escriptcpp.SolverOptions.TARGET_GPU, 3: esys.escriptcore.escriptcpp.SolverOptions.CUSP, 4: esys.escriptcore.escriptcpp.SolverOptions.MKL, 5: esys.escriptcore.escriptcpp.SolverOptions.PASO, 6: esys.escriptcore.escriptcpp.SolverOptions.TRILINOS, 7: esys.escriptcore.escriptcpp.SolverOptions.UMFPACK, 8: esys.escriptcore.escriptcpp.SolverOptions.BICGSTAB, 9: esys.escriptcore.escriptcpp.SolverOptions.CGLS, 10: esys.escriptcore.escriptcpp.SolverOptions.CGS, 11: esys.escriptcore.escriptcpp.SolverOptions.CHOLEVSKY, 12: esys.escriptcore.escriptcpp.SolverOptions.CR, 13: esys.escriptcore.escriptcpp.SolverOptions.DIRECT, 14: esys.escriptcore.escriptcpp.SolverOptions.DIRECT_MUMPS, 15: esys.escriptcore.escriptcpp.SolverOptions.DIRECT_PARDISO, 16: esys.escriptcore.escriptcpp.SolverOptions.DIRECT_SUPERLU, 17: esys.escriptcore.escriptcpp.SolverOptions.DIRECT_TRILINOS, 18: esys.escriptcore.escriptcpp.SolverOptions.GMRES, 19: esys.escriptcore.escriptcpp.SolverOptions.HRZ_LUMPING, 20: esys.escriptcore.escriptcpp.SolverOptions.ITERATIVE, 21: esys.escriptcore.escriptcpp.SolverOptions.LSQR, 22: esys.escriptcore.escriptcpp.SolverOptions.MINRES, 23: esys.escriptcore.escriptcpp.SolverOptions.NONLINEAR_GMRES, 24: esys.escriptcore.escriptcpp.SolverOptions.PCG, 25: esys.escriptcore.escriptcpp.SolverOptions.PRES20, 26: esys.escriptcore.escriptcpp.SolverOptions.ROWSUM_LUMPING, 27: esys.escriptcore.escriptcpp.SolverOptions.TFQMR, 28: esys.escriptcore.escriptcpp.SolverOptions.AMG, 29: esys.escriptcore.escriptcpp.SolverOptions.AMLI, 30: esys.escriptcore.escriptcpp.SolverOptions.BOOMERAMG, 31: esys.escriptcore.escriptcpp.SolverOptions.GAUSS_SEIDEL, 32: esys.escriptcore.escriptcpp.SolverOptions.ILU0, 33: esys.escriptcore.escriptcpp.SolverOptions.ILUT, 34: esys.escriptcore.escriptcpp.SolverOptions.JACOBI, 35: esys.escriptcore.escriptcpp.SolverOptions.NO_PRECONDITIONER, 36: esys.escriptcore.escriptcpp.SolverOptions.REC_ILU, 37: esys.escriptcore.escriptcpp.SolverOptions.RILU, 38: esys.escriptcore.escriptcpp.SolverOptions.BACKWARD_EULER, 39: esys.escriptcore.escriptcpp.SolverOptions.CRANK_NICOLSON, 40: esys.escriptcore.escriptcpp.SolverOptions.LINEAR_CRANK_NICOLSON, 41: esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION, 42: esys.escriptcore.escriptcpp.SolverOptions.CLASSIC_INTERPOLATION_WITH_FF_COUPLING, 43: esys.escriptcore.escriptcpp.SolverOptions.DIRECT_INTERPOLATION, 44: esys.escriptcore.escriptcpp.SolverOptions.AGGREGATION_COARSENING, 45: esys.escriptcore.escriptcpp.SolverOptions.CIJP_COARSENING, 46: esys.escriptcore.escriptcpp.SolverOptions.CIJP_FIXED_RANDOM_COARSENING, 47: esys.escriptcore.escriptcpp.SolverOptions.FALGOUT_COARSENING, 48: esys.escriptcore.escriptcpp.SolverOptions.HMIS_COARSENING, 49: esys.escriptcore.escriptcpp.SolverOptions.PMIS_COARSENING, 50: esys.escriptcore.escriptcpp.SolverOptions.RUGE_STUEBEN_COARSENING, 51: esys.escriptcore.escriptcpp.SolverOptions.STANDARD_COARSENING, 52: esys.escriptcore.escriptcpp.SolverOptions.YAIR_SHAPIRA_COARSENING, 53: esys.escriptcore.escriptcpp.SolverOptions.DEFAULT_REORDERING, 54: esys.escriptcore.escriptcpp.SolverOptions.MINIMUM_FILL_IN, 55: esys.escriptcore.escriptcpp.SolverOptions.NESTED_DISSECTION, 56: esys.escriptcore.escriptcpp.SolverOptions.NO_REORDERING}
class esys.escriptcore.escriptcpp.SubWorld

Bases: Boost.Python.instance

Information about a group of workers.

__init__()

Raises an exception This class cannot be instantiated from Python

class esys.escriptcore.escriptcpp.TestDomain

Bases: esys.escriptcore.escriptcpp.Domain

Test Class for domains with no structure. May be removed from future releases without notice.

__init__()

Raises an exception This class cannot be instantiated from Python

MPIBarrier((Domain)arg1) → None :

Wait until all processes have reached this point

dump((Domain)arg1, (str)filename) → None :

Dumps the domain to a file

Parameters:filename (string) –
getDim((Domain)arg1) → int :
Return type:int
Returns:Spatial dimension of the Domain
getMPIRank((Domain)arg1) → int :
Returns:the rank of this process
Return type:int
getMPISize((Domain)arg1) → int :
Returns:the number of processes used for this Domain
Return type:int
getNormal((Domain)arg1) → Data :
Return type:escript
Returns:Boundary normals
getSize((Domain)arg1) → Data :
Returns:the local size of samples. The function space is chosen appropriately
Return type:Data
getStatus((Domain)arg1) → int :

The status of a domain changes whenever the domain is modified

Return type:int
getTag((Domain)arg1, (str)name) → int :
Returns:tag id for name
Return type:string
getX((Domain)arg1) → Data :
Return type:Data
Returns:Locations in the`Domain`. FunctionSpace is chosen appropriately
isValidTagName((Domain)arg1, (str)name) → bool :
Returns:True is name corresponds to a tag
Return type:bool
onMasterProcessor((Domain)arg1) → bool :
Returns:True if this code is executing on the master process
Return type:bool
setTagMap((Domain)arg1, (str)name, (int)tag) → None :

Give a tag number a name.

Parameters:
  • name (string) – Name for the tag
  • tag (int) – numeric id
Note:

Tag names must be unique within a domain

showTagNames((Domain)arg1) → str :
Returns:A space separated list of tag names
Return type:string
supportsContactElements((Domain)arg1) → bool :

Does this domain support contact elements.

class esys.escriptcore.escriptcpp.TransportProblem

Bases: Boost.Python.instance

__init__((object)arg1) → None
getSafeTimeStepSize((TransportProblem)arg1) → float
getUnlimitedTimeStepSize((TransportProblem)arg1) → float
insertConstraint((TransportProblem)source, (Data)q, (Data)r, (Data)factor) → None :

inserts constraint u_{,t}=r where q>0 into the problem using a weighting factor

isEmpty((TransportProblem)arg1) → int :
Return type:int
reset((TransportProblem)arg1) → None :

resets the transport operator typically as they have been updated.

resetValues((TransportProblem)arg1) → None
solve((TransportProblem)arg1, (Data)u0, (Data)source, (float)dt, (object)options) → Data :

returns the solution u for a time step dt>0 with initial value u0

Return type:Data
Parameters:source (Data) –

Functions

esys.escriptcore.escriptcpp.C_GeneralTensorProduct((Data)arg0, (Data)arg1[, (int)axis_offset=0[, (int)transpose=0]]) → Data :

Compute a tensor product of two Data objects.

Return type:

Data

Parameters:
  • arg0
  • arg1
  • axis_offset (int) –
  • transpose (int) – 0: transpose neither, 1: transpose arg0, 2: transpose arg1
esys.escriptcore.escriptcpp.ContinuousFunction((Domain)domain) → FunctionSpace :
Returns:a continuous FunctionSpace (overlapped node values)
Return type:FunctionSpace
esys.escriptcore.escriptcpp.DiracDeltaFunctions((Domain)domain) → FunctionSpace :
Return type:FunctionSpace
esys.escriptcore.escriptcpp.Function((Domain)domain) → FunctionSpace :
Returns:a function FunctionSpace
Return type:FunctionSpace
esys.escriptcore.escriptcpp.FunctionOnBoundary((Domain)domain) → FunctionSpace :
Returns:a function on boundary FunctionSpace
Return type:FunctionSpace
esys.escriptcore.escriptcpp.FunctionOnContactOne((Domain)domain) → FunctionSpace :
Returns:Return a FunctionSpace on right side of contact
Return type:FunctionSpace
esys.escriptcore.escriptcpp.FunctionOnContactZero((Domain)domain) → FunctionSpace :
Returns:Return a FunctionSpace on left side of contact
Return type:FunctionSpace
esys.escriptcore.escriptcpp.MPIBarrierWorld() → None :

Wait until all MPI processes have reached this point.

esys.escriptcore.escriptcpp.RandomData((tuple)shape, (FunctionSpace)fs[, (int)seed=0[, (tuple)filter=()]]) → Data :

Creates a new expanded Data object containing pseudo-random values. With no filter, values are drawn uniformly at random from [0,1].

Parameters:
  • shape (tuple) – datapoint shape
  • fs (FunctionSpace) – function space for data object.
  • seed (long) – seed for random number generator.
esys.escriptcore.escriptcpp.ReducedContinuousFunction((Domain)domain) → FunctionSpace :
Returns:a continuous with reduced order FunctionSpace (overlapped node values on reduced element order)
Return type:FunctionSpace
esys.escriptcore.escriptcpp.ReducedFunction((Domain)domain) → FunctionSpace :
Returns:a function FunctionSpace with reduced integration order
Return type:FunctionSpace
esys.escriptcore.escriptcpp.ReducedFunctionOnBoundary((Domain)domain) → FunctionSpace :
Returns:a function on boundary FunctionSpace with reduced integration order
Return type:FunctionSpace
esys.escriptcore.escriptcpp.ReducedFunctionOnContactOne((Domain)domain) → FunctionSpace :
Returns:Return a FunctionSpace on right side of contact with reduced integration order
Return type:FunctionSpace
esys.escriptcore.escriptcpp.ReducedFunctionOnContactZero((Domain)domain) → FunctionSpace :
Returns:a FunctionSpace on left side of contact with reduced integration order
Return type:FunctionSpace
esys.escriptcore.escriptcpp.ReducedSolution((Domain)domain) → FunctionSpace :
Return type:FunctionSpace
esys.escriptcore.escriptcpp.Scalar([(float)value=0.0[, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749950>[, (bool)expanded=False]]]) → Data :

Construct a Data object containing scalar data-points.

Parameters:
  • value (float) – scalar value for all points
  • what (FunctionSpace) – FunctionSpace for Data
  • expanded (bool) – If True, a value is stored for each point. If False, more efficient representations may be used
Return type:

Data

esys.escriptcore.escriptcpp.Solution((Domain)domain) → FunctionSpace :
Return type:FunctionSpace
esys.escriptcore.escriptcpp.Tensor([(float)value=0.0[, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749ad0>[, (bool)expanded=False]]]) → Data :

Construct a Data object containing rank2 data-points.

param value:scalar value for all points
rtype:Data
type value:float
param what:FunctionSpace for Data
type what:FunctionSpace
param expanded:If True, a value is stored for each point. If False, more efficient representations may be used
type expanded:bool

Tensor( (object)value [, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749b50> [, (bool)expanded=False]]) -> Data

esys.escriptcore.escriptcpp.Tensor3([(float)value=0.0[, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749bd0>[, (bool)expanded=False]]]) → Data :

Construct a Data object containing rank3 data-points.

param value:scalar value for all points
rtype:Data
type value:float
param what:FunctionSpace for Data
type what:FunctionSpace
param expanded:If True, a value is stored for each point. If False, more efficient representations may be used
type expanded:bool

Tensor3( (object)value [, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749c50> [, (bool)expanded=False]]) -> Data

esys.escriptcore.escriptcpp.Tensor4([(float)value=0.0[, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749cd0>[, (bool)expanded=False]]]) → Data :

Construct a Data object containing rank4 data-points.

param value:scalar value for all points
rtype:Data
type value:float
param what:FunctionSpace for Data
type what:FunctionSpace
param expanded:If True, a value is stored for each point. If False, more efficient representations may be used
type expanded:bool

Tensor4( (object)value [, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749d50> [, (bool)expanded=False]]) -> Data

esys.escriptcore.escriptcpp.Vector([(float)value=0.0[, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db7499d0>[, (bool)expanded=False]]]) → Data :

Construct a Data object containing rank1 data-points.

param value:scalar value for all points
rtype:Data
type value:float
param what:FunctionSpace for Data
type what:FunctionSpace
param expanded:If True, a value is stored for each point. If False, more efficient representations may be used
type expanded:bool

Vector( (object)value [, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7f24db749a50> [, (bool)expanded=False]]) -> Data

esys.escriptcore.escriptcpp._condEval((Data)mask, (Data)trueval, (Data)falseval) → Data
esys.escriptcore.escriptcpp._saveDataCSV((str)filename, (dict)arg, (str)sep, (str)csep[, (bool)append=False]) → None :

Saves data objects passed in a python dictionary to a file. The data objects must be over the same domain and be able to be interpolated to the same FunctionSpace. If one of the dictionary keys is named mask, then only samples where mask has a positive value will be written to the file.

A header line giving the names of each column will be output first. The keys given in the dictionary will be used to name columns. Then the data will be output, one line per sample (for all data). That is, items in each column will be printed in the same order. So you can be sure that values in the same row correspond to the same input value.

Parameters:
  • filename (string) –
  • arg (dict) – dictionary of named Data objects. If one is called mask it must be scalar data.
  • sep (string) – separator for columns (defaults to ‘,’)
  • csep (string) – separator for fields within data object (defaults to “_”)
  • append (string) – If True, write to the end of filename
esys.escriptcore.escriptcpp.canInterpolate((FunctionSpace)src, (FunctionSpace)dest) → bool :
Parameters:
  • src – Source FunctionSpace
  • dest – Destination FunctionSpace
Returns:

True if src can be interpolated to dest

Return type:

bool

esys.escriptcore.escriptcpp.getEscriptParamInt((str)name[, (int)sentinel=0]) → int :

Read the value of an escript tuning parameter

Parameters:
  • name (string) – parameter to lookup
  • sentinel (int) – Value to be returned if name is not a known parameter
esys.escriptcore.escriptcpp.getMPIRankWorld() → int :

Return the rank of this process in the MPI World.

esys.escriptcore.escriptcpp.getMPISizeWorld() → int :

Return number of MPI processes in the job.

esys.escriptcore.escriptcpp.getMPIWorldMax((int)arg1) → int :

Each MPI process calls this function with a value for arg1. The maximum value is computed and returned.

Return type:int
esys.escriptcore.escriptcpp.getMPIWorldSum((int)arg1) → int :

Each MPI process calls this function with a value for arg1. The values are added up and the total value is returned.

Return type:int
esys.escriptcore.escriptcpp.getMachinePrecision() → float
esys.escriptcore.escriptcpp.getMaxFloat() → float
esys.escriptcore.escriptcpp.getNumberOfThreads() → int :

Return the maximum number of threads available to OpenMP.

esys.escriptcore.escriptcpp.getTestDomainFunctionSpace((int)dpps, (int)samples[, (int)size=1]) → FunctionSpace :

For testing only. May be removed without notice.

esys.escriptcore.escriptcpp.getVersion() → int :

This method will only report accurate version numbers for clean checkouts.

esys.escriptcore.escriptcpp.hasFeature((str)name) → bool :

Check if escript was compiled with a certain feature

Parameters:name (string) – feature to lookup
esys.escriptcore.escriptcpp.internal_addJob()

object internal_addJob(tuple args, dict kwds)

esys.escriptcore.escriptcpp.internal_addJobPerWorld()

object internal_addJobPerWorld(tuple args, dict kwds)

esys.escriptcore.escriptcpp.internal_addVariable()

object internal_addVariable(tuple args, dict kwds)

esys.escriptcore.escriptcpp.internal_buildDomains()

object internal_buildDomains(tuple args, dict kwds)

esys.escriptcore.escriptcpp.internal_makeDataReducer((str)op) → Reducer :

Create a reducer to work with Data and the specified operation.

esys.escriptcore.escriptcpp.internal_makeLocalOnly() → Reducer :

Create a variable which is not connected to copies in other worlds.

esys.escriptcore.escriptcpp.internal_makeScalarReducer((str)op) → Reducer :

Create a reducer to work with doubles and the specified operation.

esys.escriptcore.escriptcpp.listEscriptParams() → list :
Returns:A list of tuples (p,v,d) where p is the name of a parameter for escript, v is its current value, and d is a description.
esys.escriptcore.escriptcpp.listFeatures() → list :
Returns:A list of strings representing the features escript supports.
esys.escriptcore.escriptcpp.load((str)fileName, (Domain)domain) → Data :

reads Data on domain from file in netCDF format

Parameters:
  • fileName (string) –
  • domain (Domain) –
esys.escriptcore.escriptcpp.loadIsConfigured() → bool :
Returns:True if the load function is configured.
esys.escriptcore.escriptcpp.printParallelThreadCounts() → None
esys.escriptcore.escriptcpp.releaseUnusedMemory() → None
esys.escriptcore.escriptcpp.resolveGroup((object)arg1) → None
esys.escriptcore.escriptcpp.runMPIProgram((list)arg1) → int :

Spawns an external MPI program using a separate communicator.

esys.escriptcore.escriptcpp.setEscriptParamInt((str)name[, (int)value=0]) → None :

Modify the value of an escript tuning parameter

Parameters:
  • name (string) –
  • value (int) –
esys.escriptcore.escriptcpp.setNumberOfThreads((int)arg1) → None :

Use of this method is strongly discouraged.

Others

  • __doc__
  • __file__
  • __name__
  • __package__