IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Base class for simulation domains. More...
Public Member Functions | |
SimDomainDto (string domainName, int domainIndex, int dimensionOfSpace) | |
Constructs a new domain DTO (data transfer object) that holds all domain data after a specific time step. More... | |
SimDomainDto (string domainName, int domainIndex, int dimensionOfSpace, int timeStep, double time) | |
Constructs a new domain DTO (data transfer object) that holds all domain data after a specific time step. More... | |
void | AddScalarField (SimScalarFieldDto field) |
Adds the specified field DTO to the array of scalar fields. More... | |
int | GetScalarFieldIndex (string fieldName) |
Returns index of the scalar field with the specified name within the array of scalar fields, or -1 if the specified field has not been bound. More... | |
SimScalarFieldDto | GetScalarField (string fieldName) |
Returns the scalar field DTO of the specified name that is installed on the current simulation domain DTO, or null if there is no such scalar field. More... | |
SimScalarFieldDto | RemoveScalarfield (string fieldName) |
Removes the scalar field of hte specified name from the current domain DTO. Nothing happens if a field with the specified name does not exist on the current domain DTO. More... | |
void | AddVectorField (SimVectorFieldDto field) |
Adds the specified field DTO to the array of vector fields. More... | |
int | GetVectorFieldIndex (string fieldName) |
Returns index of the vector field with the specified name within the array of vector fields, or -1 if the specified field has not been bound. More... | |
SimVectorFieldDto | GetVectorField (string fieldName) |
Returns the vector field DTO of the specified name that is installed on the current simulation domain DTO, or null if there is no such vector field. More... | |
SimVectorFieldDto | RemoveVectorfield (string fieldName) |
Removes the vector field of hte specified name from the current domain DTO. Nothing happens if a field with the specified name does not exist on the current domain DTO. More... | |
void | AddTensorField (SimTensorFieldDto field) |
Adds the specified field DTO to the array of tensor fields. More... | |
int | GetTensorFieldIndex (string fieldName) |
Returns index of the tensor field with the specified name within the array of tensor fields, or -1 if the specified field has not been bound. More... | |
SimTensorFieldDto | GetTensorField (string fieldName) |
Returns the tensor field DTO of the specified name that is installed on the current simulation domain DTO, or null if there is no such tensor field. More... | |
SimTensorFieldDto | RemoveTensorfield (string fieldName) |
Removes the tensor field of hte specified name from the current domain DTO. Nothing happens if a field with the specified name does not exist on the current domain DTO. More... | |
override SimDomainDto | CreateObject () |
Creates and returns a new object of the type whose data is represented by the current DTO (Data Transfer Object). WARNING: Implement thread locking in overriding functions! More... | |
override void | NulllifyCrossLinks () |
Sets all cross links in the internall structure of the current DTO (data transfer object) to null. Cross links facilitate traversing of teh internal structure. More... | |
override void | RestoreCrossLinks () |
Restore cross links in the internall structure of the current DTO. More... | |
![]() | |
virtual string | GetComponentType () |
Returns type of the current component. More... | |
![]() | |
SerializationDtoBase () | |
virtual bool | GetNull () |
Returns a flag indicating whether the object represented by the current DTO is null. More... | |
virtual void | SetNull (bool isNull) |
Sets a flag indicating whether the object represented by the current DTO is null. More... | |
virtual void | CopyFromBase (BaseType obj) |
Copies data to the current DTO from an object of type BaseType. More... | |
virtual void | CopyToBase (ref BaseType obj) |
Copies data from the current DTO to an object of the base type. Object is created anew if necessary by using the CreateObject() method. More... | |
virtual void | CopyFrom (Type obj) |
Copies data to the current DTO from an object of type Type. More... | |
virtual void | CopyTo (ref Type obj) |
Copies data from the current DTO to an object of type Type. Object is created anew if necessary by using the CreateObject() method. More... | |
virtual void | CopyFromObject (object obj) |
Copies data to the current DTO from an object of type object. The necessary casts are performed. More... | |
virtual void | CopyToObject (ref object obj) |
Copies data from the current DTO to an object of type object. Object is created anew if necessary by using the CreateObject() method. The necessary casts are performed. More... | |
override string | ToString () |
Creates and returns string representation of the current DTO (data transfer object). More... | |
![]() | |
string | GetComponentType () |
Returns type of the current component. More... | |
Static Public Member Functions | |
static void | SaveJson (SimDomainDto simDomain, string filePath) |
Saves (serializes) the specified simulation domain DTO to the specified JSON file. File is owerwritten if it exists. More... | |
static void | SaveJson (SimDomainDto simDomain, string filePath, bool append) |
Saves (serializes) the specified simulation domain to the specified JSON file. If the file already exists, contents either overwrites the file or is appended at the end, dependent on the value of the append flag. More... | |
static void | LoadJson (string filePath, ref SimDomainDto simDomain) |
Restores (deserializes) a simulation domain DTO from the specified file in JSON format. More... | |
![]() | |
static ObjectType | CopyToObjectReturned< DtoType, ObjectType > (DtoType dto, ObjectType obj) |
Replacement for CopyToObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which object state is copied. More... | |
static void | CopyToObject< DtoType, ObjectType > (DtoType dto, ref ObjectType obj) |
Copies object state form the specified DTO (data transfer object) to the specified object. More... | |
static DtoType | CopyFromObjectReturned< DtoType, ObjectType > (ObjectType obj, DtoType dto) |
Replacement for CopyFromObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which object state is copied. More... | |
static void | CopyFromObject< DtoType, ObjectType > (ObjectType obj, ref DtoType dto) |
Copies object state form the specified object to the corresponding DTO (data transfer object). More... | |
static ObjectType[] | CopyArrayToObjectReturned< DtoType, ObjectType > (DtoType[] tabDto, ObjectType[] tabObj) |
Replacement for CopyArrayToObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied. More... | |
static void | CopyArrayToObject< DtoType, ObjectType > (DtoType[] tabDto, ref ObjectType[] tabObj) |
Copies array of DTOs (Data Transfer Objects) to an array of appropriate objects. More... | |
static DtoType[] | CopyArrayFromObjectReturned< DtoType, ObjectType > (ObjectType[] tabObj, DtoType[] tabDto) |
Replacement for CopyArrayFromObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied. More... | |
static void | CopyArrayFromObject< DtoType, ObjectType > (ObjectType[] tabObj, ref DtoType[] tabDto) |
Copies array of objects to an array of DTOs. More... | |
static List< ObjectType > | CopyListToObjectReturned< DtoType, ObjectType > (DtoType[] tabDto, List< ObjectType > listObj) |
Replacement for CopyListToObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied. More... | |
static void | CopyListToObject< DtoType, ObjectType > (DtoType[] tabDto, ref List< ObjectType > listObj) |
Copies array of DTOs (Data Transfer Objects) to a list of appropriate objects. More... | |
static DtoType[] | CopyListFromObjectReturned< DtoType, ObjectType > (List< ObjectType > tabObj, DtoType[] tabDto) |
Replacement for CopyArrayFromObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied. More... | |
static void | CopyListFromObject< DtoType, ObjectType > (List< ObjectType > tabObj, ref DtoType[] tabDto) |
Copies array of objects to a list of DTOs. More... | |
Public Attributes | |
int | DimensionOfSpace |
Dimension of space in which the field represented by the current object is embedded. More... | |
int | DomainTimeStep |
Time step number. More... | |
double | DomainTime |
Time. More... | |
string | DomainName |
Name of the simulation domain represented by the current DTO. More... | |
int | DomainIndex |
Index of the simulation domain represented by the current DTO, as indexed in simulator. More... | |
Protected Member Functions | |
override void | CopyFromPlain (SimDomainDto obj) |
override void | CopyToPlain (ref SimDomainDto obj) |
![]() | |
SimulationComponentDtoBase () | |
![]() | |
abstract void | CopyFromPlain (BaseType obj) |
Copies contents of the specified object to the current DTO (Data Transfer Object). More... | |
abstract void | CopyToPlain (ref BaseType obj) |
Copies contents of the current DTO (Data Transfer Object) to the specified object. More... | |
![]() | |
SerializationDto () | |
Private Attributes | |
SimScalarFieldDto[] | ScalarFields |
Values of scalar fields that are defined on the current domain. More... | |
SimVectorFieldDto[] | VectorFields |
Values of vector fields that are defined on the current domain. More... | |
SimTensorFieldDto[] | TensorFields |
Values of tensor fields that are defined on the current domain. More... | |
Additional Inherited Members | |
![]() | |
bool | _isNull = false |
![]() | |
object | Lock [get] |
This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More... | |
![]() | |
object | Lock [get] |
Base class for simulation domains.
$A Igor Nov11;
|
inline |
Constructs a new domain DTO (data transfer object) that holds all domain data after a specific time step.
domainName | Name of domain. |
domainIndex | Index of domain. |
dimensionOfSpace | Space dimension. |
|
inline |
Constructs a new domain DTO (data transfer object) that holds all domain data after a specific time step.
domainName | Name of domain. |
domainIndex | Index of domain. |
dimensionOfSpace | Space dimension. |
timeStep | Time step for which domain data is written. |
time | Time or pseudo time for which domain data is contained in the current DTO. |
|
inline |
Adds the specified field DTO to the array of scalar fields.
Exception is thrown if the field to be added is null.
field | Field DTO to be added. |
References IG.Sim.SimFieldBaseDto< FieldType >.Length.
|
inline |
Returns index of the scalar field with the specified name within the array of scalar fields, or -1 if the specified field has not been bound.
Exception is thrown if the specified field name is null or empty string.
fieldName | Name of the field whose index should be returned. |
References IG.Sim.SimFieldBaseDto< FieldType >.FieldName, and IG.Sim.SimFieldBaseDto< FieldType >.Length.
|
inline |
Returns the scalar field DTO of the specified name that is installed on the current simulation domain DTO, or null if there is no such scalar field.
Exception is thrown if the specified field name is null or empty string.
fieldName | Name of the field that is returned. |
|
inline |
Removes the scalar field of hte specified name from the current domain DTO. Nothing happens if a field with the specified name does not exist on the current domain DTO.
fieldName | Name of the scalar field to be removed. |
References IG.Sim.SimFieldBaseDto< FieldType >.Length.
|
inline |
Adds the specified field DTO to the array of vector fields.
Exception is thrown if the field to be added is null.
field | Field DTO to be added. |
References IG.Sim.SimFieldBaseDto< FieldType >.Length.
|
inline |
Returns index of the vector field with the specified name within the array of vector fields, or -1 if the specified field has not been bound.
Exception is thrown if the specified field name is null or empty string.
fieldName | Name of the field whose index should be returned. |
References IG.Sim.SimFieldBaseDto< FieldType >.FieldName, and IG.Sim.SimFieldBaseDto< FieldType >.Length.
|
inline |
Returns the vector field DTO of the specified name that is installed on the current simulation domain DTO, or null if there is no such vector field.
Exception is thrown if the specified field name is null or empty string.
fieldName | Name of the field that is returned. |
|
inline |
Removes the vector field of hte specified name from the current domain DTO. Nothing happens if a field with the specified name does not exist on the current domain DTO.
fieldName | Name of the vector field to be removed. |
References IG.Sim.SimFieldBaseDto< FieldType >.Length.
|
inline |
Adds the specified field DTO to the array of tensor fields.
Exception is thrown if the field to be added is null.
field | Field DTO to be added. |
References IG.Sim.SimFieldBaseDto< FieldType >.Length.
|
inline |
Returns index of the tensor field with the specified name within the array of tensor fields, or -1 if the specified field has not been bound.
Exception is thrown if the specified field name is null or empty string.
fieldName | Name of the field whose index should be returned. |
References IG.Sim.SimFieldBaseDto< FieldType >.FieldName, and IG.Sim.SimFieldBaseDto< FieldType >.Length.
|
inline |
Returns the tensor field DTO of the specified name that is installed on the current simulation domain DTO, or null if there is no such tensor field.
Exception is thrown if the specified field name is null or empty string.
fieldName | Name of the field that is returned. |
|
inline |
Removes the tensor field of hte specified name from the current domain DTO. Nothing happens if a field with the specified name does not exist on the current domain DTO.
fieldName | Name of the tensor field to be removed. |
References IG.Sim.SimFieldBaseDto< FieldType >.Length.
|
inlinestatic |
Saves (serializes) the specified simulation domain DTO to the specified JSON file. File is owerwritten if it exists.
simDomain | Object that is saved to a file. |
filePath | Path to the file in which object is is saved. |
|
inlinestatic |
Saves (serializes) the specified simulation domain to the specified JSON file. If the file already exists, contents either overwrites the file or is appended at the end, dependent on the value of the append flag.
simDomain | Object that is saved to a file. |
filePath | Path to the file in which object is is saved. |
append | Specifies whether serialized data is appended at the end of the file in the case that the file already exists. |
References IG.Sim.SimDomainDto.NulllifyCrossLinks(), and IG.Sim.SimDomainDto.RestoreCrossLinks().
|
inlinestatic |
Restores (deserializes) a simulation domain DTO from the specified file in JSON format.
filePath | File from which object is restored. |
simDomain | Object that is restored by deserialization. |
The restored object is always created anew from scratch. Therefore, if simFieldRestored already contains some object, it is overwritten.
References IG.Sim.SimDomainDto.RestoreCrossLinks().
|
inlineprotected |
|
inlineprotected |
|
inlinevirtual |
Creates and returns a new object of the type whose data is represented by the current DTO (Data Transfer Object). WARNING: Implement thread locking in overriding functions!
Therad locking should be performed in overriding functions!
Implements IG.Lib.SerializationDtoBase< Type, BaseType >.
|
inlinevirtual |
Sets all cross links in the internall structure of the current DTO (data transfer object) to null. Cross links facilitate traversing of teh internal structure.
Implements IG.Sim.SimulationComponentDtoBase< Type, BaseType >.
References IG.Sim.SimFieldBaseDto< FieldType >.Length, and IG.Sim.SimFieldBaseDto< FieldType >.NulllifyCrossLinks().
Referenced by IG.Sim.SimDomainDto.SaveJson().
|
inlinevirtual |
Restore cross links in the internall structure of the current DTO.
Implements IG.Sim.SimulationComponentDtoBase< Type, BaseType >.
References IG.Sim.SimFieldBaseDto< FieldType >.Length, and IG.Sim.SimFieldBaseDto< FieldType >.RestoreCrossLinks().
Referenced by IG.Sim.SimDomainDto.LoadJson(), and IG.Sim.SimDomainDto.SaveJson().
int IG.Sim.SimDomainDto.DimensionOfSpace |
Dimension of space in which the field represented by the current object is embedded.
int IG.Sim.SimDomainDto.DomainTimeStep |
Time step number.
double IG.Sim.SimDomainDto.DomainTime |
Time.
string IG.Sim.SimDomainDto.DomainName |
Name of the simulation domain represented by the current DTO.
int IG.Sim.SimDomainDto.DomainIndex |
Index of the simulation domain represented by the current DTO, as indexed in simulator.
|
private |
Values of scalar fields that are defined on the current domain.
|
private |
Values of vector fields that are defined on the current domain.
|
private |
Values of tensor fields that are defined on the current domain.