Package esys :: Package escript :: Module escriptcpp
[hide private]
[frames] | no frames]

Module escriptcpp

Classes [hide private]
  ContinuousDomain
Class representing continuous domains
  Data
Represents a collection of datapoints.
  Domain
Base class for all domains.
  FunctionSpace
A FunctionSpace describes which points from the Domain to use to represent functions.
  Operator
  TestDomain
Test Class for domains with no structure.
  TransportProblem
Functions [hide private]
Data
C_GeneralTensorProduct(...)
Compute a tensor product of two Data objects.
FunctionSpace
ContinuousFunction(...)
Returns: a continuous FunctionSpace (overlapped node values)
FunctionSpace
DiracDeltaFunctions(...)
FunctionSpace
Function(...)
Returns: a function FunctionSpace
FunctionSpace
FunctionOnBoundary(...)
Returns: a function on boundary FunctionSpace
FunctionSpace
FunctionOnContactOne(...)
Returns: Return a FunctionSpace on right side of contact
FunctionSpace
FunctionOnContactZero(...)
Returns: Return a FunctionSpace on left side of contact
None :
MPIBarrierWorld()
Wait until all MPI processes have reached this point.
 
RandomData(...)
Creates a new expanded Data object containing (not very) random values.
FunctionSpace
ReducedContinuousFunction(...)
Returns: a continuous with reduced order FunctionSpace (overlapped node values on reduced element order)
FunctionSpace
ReducedFunction(...)
Returns: a function FunctionSpace with reduced integration order
FunctionSpace
ReducedFunctionOnBoundary(...)
Returns: a function on boundary FunctionSpace with reduced integration order
FunctionSpace
ReducedFunctionOnContactOne(...)
Returns: Return a FunctionSpace on right side of contact with reduced integration order
FunctionSpace
ReducedFunctionOnContactZero(...)
Returns: a FunctionSpace on left side of contact with reduced integration order
FunctionSpace
ReducedSolution(...)
Data
Scalar(...)
Construct a Data object containing scalar data-points.
FunctionSpace
Solution(...)
Data
Tensor(...)
Construct a Data object containing rank2 data-points.
Data
Tensor3(...)
Construct a Data object containing rank3 data-points.
Data
Tensor4(...)
Construct a Data object containing rank4 data-points.
Data
Vector(...)
Construct a Data object containing rank1 data-points.
 
_condEval(...)
_condEval( (Data)mask, (Data)trueval, (Data)falseval) -> Data
 
_saveDataCSV(...)
Saves data objects passed in a python dictionary to a file.
 
blocktimer_increment(...)
blocktimer_increment( (str)arg1, (float)arg2) -> None
None
blocktimer_initialize()
None
blocktimer_reportSortByName()
None
blocktimer_reportSortByTime()
float
blocktimer_time()
 
getEscriptParamInt(...)
Read the value of an escript tuning paramter
int :
getMPIRankWorld()
Return the rank of this process in the MPI World.
int :
getMPISizeWorld()
Return number of MPI processes in the job.
int
getMPIWorldMax(...)
getMPIWorldMax( (int)arg1) -> int :
int
getMPIWorldSum(...)
getMPIWorldSum( (int)arg1) -> int :
float
getMachinePrecision()
float
getMaxFloat()
int :
getNumberOfThreads()
Return the maximum number of threads available to OpenMP.
 
getTestDomainFunctionSpace(...)
For testing only.
int :
getVersion()
This method will only report accurate version numbers for clean checkouts.
list :
listEscriptParams()
Returns: A list of pairs (p,d) where p is the name of a parameter for escript and d is a description.
 
load(...)
reads Data on domain from file in netCDF format
bool :
loadIsConfigured()
Returns: True if the load function is configured.
None
printParallelThreadCounts()
None
releaseUnusedMemory()
 
resolveGroup(...)
resolveGroup( (object)arg1) -> None
 
runMPIProgram(...)
Spawns an external MPI program using a separate communicator.
 
setEscriptParamInt(...)
Modify the value of an escript tuning parameter
 
setNumberOfThreads(...)
Use of this method is strongly discouraged.
Variables [hide private]
  __package__ = None
Function Details [hide private]

C_GeneralTensorProduct(...)

 
C_GeneralTensorProduct( (Data)arg0, (Data)arg1 [, (int)axis_offset=0 [, (int)transpose=0]]) -> Data :

Compute a tensor product of two Data objects.

Parameters:
  • arg0
  • arg1
  • axis_offset (int)
  • transpose (int) - 0: transpose neither, 1: transpose arg0, 2: transpose arg1
Returns: Data

ContinuousFunction(...)

 
ContinuousFunction( (Domain)domain) -> FunctionSpace :
Returns: FunctionSpace
a continuous FunctionSpace (overlapped node values)

Function(...)

 
Function( (Domain)domain) -> FunctionSpace :
Returns: FunctionSpace
a function FunctionSpace

FunctionOnBoundary(...)

 
FunctionOnBoundary( (Domain)domain) -> FunctionSpace :
Returns: FunctionSpace
a function on boundary FunctionSpace

FunctionOnContactOne(...)

 
FunctionOnContactOne( (Domain)domain) -> FunctionSpace :
Returns: FunctionSpace
Return a FunctionSpace on right side of contact

FunctionOnContactZero(...)

 
FunctionOnContactZero( (Domain)domain) -> FunctionSpace :
Returns: FunctionSpace
Return a FunctionSpace on left side of contact

RandomData(...)

 
RandomData( (tuple)shape, (FunctionSpace)fs [, (int)seed=0]) -> Data :

Creates a new expanded Data object containing (not very) random values.

Parameters:
  • shape (tuple) - datapoint shape
  • fs (FunctionSpace) - function space for data object.
  • seed (long) - seed for random number generator.

ReducedContinuousFunction(...)

 
ReducedContinuousFunction( (Domain)domain) -> FunctionSpace :
Returns: FunctionSpace
a continuous with reduced order FunctionSpace (overlapped node values on reduced element order)

ReducedFunction(...)

 
ReducedFunction( (Domain)domain) -> FunctionSpace :
Returns: FunctionSpace
a function FunctionSpace with reduced integration order

ReducedFunctionOnBoundary(...)

 
ReducedFunctionOnBoundary( (Domain)domain) -> FunctionSpace :
Returns: FunctionSpace
a function on boundary FunctionSpace with reduced integration order

ReducedFunctionOnContactOne(...)

 
ReducedFunctionOnContactOne( (Domain)domain) -> FunctionSpace :
Returns: FunctionSpace
Return a FunctionSpace on right side of contact with reduced integration order

ReducedFunctionOnContactZero(...)

 
ReducedFunctionOnContactZero( (Domain)domain) -> FunctionSpace :
Returns: FunctionSpace
a FunctionSpace on left side of contact with reduced integration order

Scalar(...)

 
Scalar([ (float)value=0.0 [, (FunctionSpace)what=<esys.escript.escriptcpp.FunctionSpace object at 0x12e6250> [, (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
Returns: Data

Tensor(...)

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

Construct a Data object containing rank2 data-points.

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

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
Returns: Data

Tensor3(...)

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

Construct a Data object containing rank3 data-points.

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

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
Returns: Data

Tensor4(...)

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

Construct a Data object containing rank4 data-points.

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

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
Returns: Data

Vector(...)

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

Construct a Data object containing rank1 data-points.

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

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
Returns: Data

_saveDataCSV(...)

 
_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

getEscriptParamInt(...)

 
getEscriptParamInt( (str)name [, (int)sentinel=0]) -> int :

Read the value of an escript tuning paramter

Parameters:
  • name (string) - parameter to lookup
  • sentinel (int) - Value to be returned if name is not a known parameter

getMPIWorldMax(...)

 

getMPIWorldMax( (int)arg1) -> int :

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

getMPIWorldSum(...)

 

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.
Returns: int

getTestDomainFunctionSpace(...)

 
getTestDomainFunctionSpace( (int)dpps, (int)samples) -> FunctionSpace :

For testing only. May be removed without notice.

listEscriptParams()

 
Returns: list :
A list of pairs (p,d) where p is the name of a parameter for escript and d is a description.

load(...)

 
load( (str)fileName, (Domain)domain) -> Data :

reads Data on domain from file in netCDF format

Parameters:
  • fileName (string)
  • domain (Domain)

loadIsConfigured()

 
Returns: bool :
True if the load function is configured.

setEscriptParamInt(...)

 
setEscriptParamInt( (str)name [, (int)value=0]) -> None :

Modify the value of an escript tuning parameter

Parameters:
  • name (string)
  • value (int)