MYBASIC

entity.copy(<str::entity>,[<str::type>,],<int::source><int::destination>)

PYTHON

copy(<str::entity>,<int::source><int::destination>, type = <str::type>)



Copy of a numbered entity. If the entity with the source number does not exist, the script function is neglected without any warning. If the entity with the destination number already exists, it is overwritten without a warning.


Python requires to import the entity module.



Arguments


entity

str: Indicate the entity to copy. Valid entities are:


equilibrium_phases

exchange

gas_phase

kinetics

mix

reaction

reaction_pressure

reaction_temperature

solid_solution

solution

surface


The options 

cell

node

indicate that all entities identified by the number source will be copied.


type

str: (optional) to indicate the range of entity to copy. Valid types are

all

All existing entities will be copied. The number of the copied entity is source + destination. If an entity with number source+destination already exists, the entity will be overwritten without warning.

cell

A single entity with number source will be copied to destination. If an entity with number destination already exists, the entity will be overwritten without warning.

horizon

This option is only valid when HPx is running in transport state. All existing entities linked to a given material type will be copied. The number of the copied entity is node number + destination. If an entity with number node number +destination already exists, the entity will be overwritten without warning.

material

Same as horizon

node

Same as cell

transport

This option is only valid when HPx is running in transport state. All existing entities linked to the transport nodes will be copied. The number of the copied entity is node number + destination. If an entity with number node number +destination already exists, the entity will be overwritten without warning.


if type is absent, node is assumed.



Error Messages


0101

String Expected

entity needs to be a string.

0102

Integer Expected

source or destination are not an integer or destiny is missing.

3501

Invalid string argument

Wrong option for first (entity) or for the optional second (type) argument. Valid options are listed above. Check the spelling of the first argument. 

3750

Wrong context for argument

Options "transport", "horizon", or "material" for type are only valid during transport simulations.