Bases: esys.escriptcore.escriptcpp.Domain
Class representing continuous domains
Wait until all processes have reached this point
adds a PDE onto the stiffness matrix mat and a rhs
Parameters: |
---|
adds a PDE onto the stiffness matrix mat and a rhs
Parameters: |
---|
Parameters: |
---|
Dumps the domain to a file:param filename: :type filename: string
Returns: | a pair (dps, ns) where dps=the number of data points per sample, and ns=the number of samples |
---|---|
Return type: | tuple |
Returns: | a description for this domain |
---|---|
Return type: | string |
Returns: | the rank of this process |
---|---|
Return type: | int |
Returns: | the number of processes used for this Domain |
---|---|
Return type: | int |
Return type: | escript |
---|---|
Returns: | Boundary normals |
Returns: | the number of data points summed across all MPI processes |
---|---|
Return type: | int |
Returns: | the local size of samples. The function space is chosen appropriately |
---|---|
Return type: | Data |
The status of a domain changes whenever the domain is modified
Return type: | int |
---|
Returns: | the identifier of the matrix type to be used for the global stiffness matrix when a particular solver package and symmetric matrix is used. |
---|---|
Return type: | int |
Returns: | tag id for name |
---|---|
Return type: | string |
Return type: | Data |
---|---|
Returns: | Locations in the`Domain`. FunctionSpace is chosen appropriately |
Returns: | True is name corresponds to a tag |
---|---|
Return type: | bool |
creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros
Parameters: |
|
---|
creates a TransportProblemAdapter
Parameters: |
|
---|
Returns: | True if this code is executing on the master process |
---|---|
Return type: | bool |
Parameters: | full (bool) – |
---|
Give a tag number a name.
Parameters: |
|
---|---|
Note : | Tag names must be unique within a domain |
assigns new location to the domain
Parameters: | arg (Data) – |
---|
Returns: | A space separated list of tag names |
---|---|
Return type: | string |
Does this domain support contact elements.
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.
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.
note: | In the no argument form, a new object will be returned which is an independent copy of this object. |
---|
Selectively copy values from other Data.Datapoints which correspond to positive values in mask will be copied from other
Parameters: |
---|
Convert this object into lazy representation
Save the data as a netCDF file
Parameters: | fileName (string) – |
---|
Convert the data to expanded representation if it is not expanded already.
Return type: | FunctionSpace |
---|
Return type: | int |
---|---|
Returns: | Number of datapoints in the object |
Returns: | the number of indices required to address a component of a datapoint |
---|---|
Return type: | positive int |
Returns the shape of the datapoints in this object as a python tuple. Scalar data has the shape ()
Return type: | tuple |
---|
Return tag number for the specified datapoint
Return type: | int |
---|---|
Parameters: | dpno (int) – datapoint number |
Returns: | Value of the specified datapoint |
---|---|
Return type: | tuple |
Parameters: | dataPointNo (int) – datapoint to access |
Get a specific datapoint from a specific process
Return type: | tuple |
---|---|
Parameters: |
|
Interpolate this object’s values into a new functionspace.
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
Return type: | bool |
---|---|
Returns: | True if this Data is an instance of DataConstant |
Note : | This does not mean the data is immutable. |
Is this object an instance of DataEmpty
Return type: | bool |
---|---|
Note : | This is not the same thing as asking if the object contains datapoints. |
Return type: | bool |
---|---|
Returns: | True if this Data is expanded. |
Return type: | bool |
---|---|
Returns: | True if this Data is lazy. |
Can this instance be modified. :rtype: bool
Return type: | bool |
---|---|
Returns: | True if this Data is not lazy. |
Return type: | bool |
---|---|
Returns: | True if this Data is expanded. |
Please consider using getSupLocator() from pdetools instead.
Please consider using getInfLocator() from pdetools instead.
1D interpolation with non equally spaced points
1D interpolation of slope with non equally spaced points
Convert the data to non-lazy representation.
Disallow modifications to this data object
Note : | This method does not allow you to undo protection. |
---|
Set the value of tagged Data.
param tagKey: tag to update type tagKey: int
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 |
After this call the object will store values of the same shape as before but all components will be zero.
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.
Convert data to tagged representation if it is not already tagged or expanded
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] |
---|
Bases: Boost.Python.instance
Base class for all domains.
Wait until all processes have reached this point
Dumps the domain to a file:param filename: :type filename: string
Returns: | the rank of this process |
---|---|
Return type: | int |
Returns: | the number of processes used for this Domain |
---|---|
Return type: | int |
Return type: | escript |
---|---|
Returns: | Boundary normals |
Returns: | the local size of samples. The function space is chosen appropriately |
---|---|
Return type: | Data |
The status of a domain changes whenever the domain is modified
Return type: | int |
---|
Returns: | tag id for name |
---|---|
Return type: | string |
Return type: | Data |
---|---|
Returns: | Locations in the`Domain`. FunctionSpace is chosen appropriately |
Returns: | True is name corresponds to a tag |
---|---|
Return type: | bool |
Returns: | True if this code is executing on the master process |
---|---|
Return type: | bool |
Give a tag number a name.
Parameters: |
|
---|---|
Note : | Tag names must be unique within a domain |
Returns: | A space separated list of tag names |
---|---|
Return type: | string |
Does this domain support contact elements.
Bases: Boost.Python.instance
A FunctionSpace describes which points from the Domain to use to represent functions.
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 |
Returns: | the spatial dimension of the underlying domain. |
---|---|
Return type: | int |
Returns: | the underlying Domain for this FunctionSpace. |
---|---|
Return type: | Domain |
Returns: | a list of the tags used in this function space |
---|---|
Return type: | list |
Returns: | the reference number associated with dataPointNo |
---|---|
Return type: | int |
Returns: | the tag associated with the given sample number. |
---|---|
Return type: | int |
Returns: | a function whose values are its input coordinates. ie an identity function. |
---|---|
Return type: | Data |
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
Bases: Boost.Python.instance
Return type: | bool |
---|---|
Returns: | True if matrix is empty |
matrix*vector multiplication
resets the matrix entries
writes the matrix to a file using the Harwell-Boeing file format
writes the matrix to a file using the Matrix Market file format
Bases: esys.escriptcore.escriptcpp.Domain
Test Class for domains with no structure. May be removed from future releases without notice.
Wait until all processes have reached this point
Dumps the domain to a file:param filename: :type filename: string
Returns: | the rank of this process |
---|---|
Return type: | int |
Returns: | the number of processes used for this Domain |
---|---|
Return type: | int |
Return type: | escript |
---|---|
Returns: | Boundary normals |
Returns: | the local size of samples. The function space is chosen appropriately |
---|---|
Return type: | Data |
The status of a domain changes whenever the domain is modified
Return type: | int |
---|
Returns: | tag id for name |
---|---|
Return type: | string |
Return type: | Data |
---|---|
Returns: | Locations in the`Domain`. FunctionSpace is chosen appropriately |
Returns: | True is name corresponds to a tag |
---|---|
Return type: | bool |
Returns: | True if this code is executing on the master process |
---|---|
Return type: | bool |
Give a tag number a name.
Parameters: |
|
---|---|
Note : | Tag names must be unique within a domain |
Returns: | A space separated list of tag names |
---|---|
Return type: | string |
Does this domain support contact elements.
Bases: Boost.Python.instance
inserts constraint u_{,t}=r where q>0 into the problem using a weighting factor
Return type: | int |
---|
resets the transport operator typically as they have been updated.
Compute a tensor product of two Data objects.
Return type: | |
---|---|
Parameters: |
|
Returns: | a continuous FunctionSpace (overlapped node values) |
---|---|
Return type: | FunctionSpace |
Return type: | FunctionSpace |
---|
Returns: | a function FunctionSpace |
---|---|
Return type: | FunctionSpace |
Returns: | a function on boundary FunctionSpace |
---|---|
Return type: | FunctionSpace |
Returns: | Return a FunctionSpace on right side of contact |
---|---|
Return type: | FunctionSpace |
Returns: | Return a FunctionSpace on left side of contact |
---|---|
Return type: | FunctionSpace |
Wait until all MPI processes have reached this point.
Creates a new expanded Data object containing pseudo-random values.
Parameters: |
|
---|
Returns: | a continuous with reduced order FunctionSpace (overlapped node values on reduced element order) |
---|---|
Return type: | FunctionSpace |
Returns: | a function FunctionSpace with reduced integration order |
---|---|
Return type: | FunctionSpace |
Returns: | a function on boundary FunctionSpace with reduced integration order |
---|---|
Return type: | FunctionSpace |
Returns: | Return a FunctionSpace on right side of contact with reduced integration order |
---|---|
Return type: | FunctionSpace |
Returns: | a FunctionSpace on left side of contact with reduced integration order |
---|---|
Return type: | FunctionSpace |
Return type: | FunctionSpace |
---|
Construct a Data object containing scalar data-points.
Parameters: |
|
---|---|
Return type: |
Return type: | FunctionSpace |
---|
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 0x3804850> [, (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 0x3804950> [, (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 0x3804a50> [, (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 0x3804750> [, (bool)expanded=False]]) -> Data
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: |
|
---|
Parameters: |
|
---|---|
Returns: | True if src can be interpolated to dest |
Return type: | bool |
Read the value of an escript tuning parameter
Parameters: |
|
---|
Return the rank of this process in the MPI World.
Return number of MPI processes in the job.
Each MPI process calls this function with a value for arg1. The maximum value is computed and returned.
Return type: | 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 |
---|
Return the maximum number of threads available to OpenMP.
For testing only. May be removed without notice.
This method will only report accurate version numbers for clean checkouts.
Returns: | A list of pairs (p,d) where p is the name of a parameter for escript and d is a description. |
---|
reads Data on domain from file in netCDF format
Parameters: |
|
---|
Returns: | True if the load function is configured. |
---|
Spawns an external MPI program using a separate communicator.
Modify the value of an escript tuning parameter
Parameters: |
|
---|
Use of this method is strongly discouraged.