Skip to main content

DPF C++ client library 2023 R2

ansys::dpf::FieldDefinition Class Reference

Last update: 10.07.2023

#include <dpf_api.h>

Inheritance diagram for ansys::dpf::FieldDefinition:
ansys::dpf::DpfTypes

Public Member Functions

 FieldDefinition ()
 
 FieldDefinition (Client const *const client)
 
 FieldDefinition (FieldDefinition const &)
 
 FieldDefinition (FieldDefinition &&)
 
 FieldDefinition (const ansys::dpf::Location &loc, const std::vector< dp_int > &dimensions)
 
 FieldDefinition (const ansys::dpf::Location &loc, const std::vector< dp_int > &dimensions, const Unit &unit)
 
 FieldDefinition (Client const *const client, const ansys::dpf::Location &loc, const std::vector< dp_int > &dimensions)
 
 FieldDefinition (Client const *const client, const ansys::dpf::Location &loc, const std::vector< dp_int > &dimensions, const Unit &unit)
 
FieldDefinitionoperator= (FieldDefinition const &)
 
FieldDefinitionoperator= (FieldDefinition &&)
 
ansys::dpf::Unit unit () const
 
std::vector< dp_intdimensions () const
 
ansys::dpf::Location location () const
 
std::string name () const
 
eshellLayers shellLayers () const
 
void setName (std::string const &rhs)
 
void setLocation (ansys::dpf::Location const &rhs)
 
void setUnit (ansys::dpf::Unit const &rhs)
 
void setDimensions (std::vector< dp_int > const &rhs, int effective_size)
 
void setDimensions (std::vector< dp_int > const &rhs)
 
void setShellLayers (ansys::dpf::eshellLayers layers)
 
FieldDefinition deep_copy (ansys::dpf::Client const *const client) const
 
bool isOfQuantityType (QuantityType const &quantitytype) const
 
void setQuantityType (QuantityType const &quantitytype)
 
int numberOfQuantityTypes () const
 
std::string quantity_type (int i) const
 
FieldDefinition deep_copy () const
 
- Public Member Functions inherited from ansys::dpf::DpfTypes
virtual bool empty () const
 
virtual std::string describe () const
 
so::API const * callAPI () const
 
bool isOnCommonAPI () const
 
bool getClient (Client &client) const
 
bool hasBeenMovedLocally () const
 
bool isSameObject (DpfTypes const &rhs) const
 

Static Public Member Functions

static FieldDefinition emptyFieldDefinition ()
 

Detailed Description

Provide all the information about the content of a Field (Unit, location, dimension, a.s.o.).

See also
Field
Examples
DataApis.cpp, and DataExport.cpp.

Constructor & Destructor Documentation

◆ FieldDefinition() [1/6]

ansys::dpf::FieldDefinition::FieldDefinition ( )

Create FieldDefinition.

◆ FieldDefinition() [2/6]

ansys::dpf::FieldDefinition::FieldDefinition ( Client const *const  client)

Create FieldDefinition on a server.

Parameters
[in]clientRemote client.

◆ FieldDefinition() [3/6]

ansys::dpf::FieldDefinition::FieldDefinition ( const ansys::dpf::Location loc,
const std::vector< dp_int > &  dimensions 
)

Create FieldDefinition.

Parameters
[in]locLocation on which field defined.
[in]dimensionsVector defining size of each dimension. See Dimensionality.

◆ FieldDefinition() [4/6]

ansys::dpf::FieldDefinition::FieldDefinition ( const ansys::dpf::Location loc,
const std::vector< dp_int > &  dimensions,
const Unit unit 
)

Create FieldDefinition.

Parameters
[in]locLocation on which field defined.
[in]dimensionsVector defining size of each dimension. See Dimensionality.
[in]unitUnit defined for field.

◆ FieldDefinition() [5/6]

ansys::dpf::FieldDefinition::FieldDefinition ( Client const *const  client,
const ansys::dpf::Location loc,
const std::vector< dp_int > &  dimensions 
)

Create FieldDefinition.

Parameters
[in]clientRemote client.
[in]locLocation on which field defined.
[in]dimensionsVector defining size of each dimension. See Dimensionality.

◆ FieldDefinition() [6/6]

ansys::dpf::FieldDefinition::FieldDefinition ( Client const *const  client,
const ansys::dpf::Location loc,
const std::vector< dp_int > &  dimensions,
const Unit unit 
)

Create FieldDefinition.

Parameters
[in]clientRemote client.
[in]locLocation on which field defined.
[in]dimensionsVector defining size of each dimension. See Dimensionality.
[in]unitUnit defined for field.

Member Function Documentation

◆ deep_copy() [1/2]

FieldDefinition ansys::dpf::FieldDefinition::deep_copy ( ) const

Make a deep copy locally.

◆ deep_copy() [2/2]

FieldDefinition ansys::dpf::FieldDefinition::deep_copy ( ansys::dpf::Client const *const  client) const

Make a deep copy on a given client.

Parameters
[in]clientRemote client

◆ dimensions()

std::vector< dp_int > ansys::dpf::FieldDefinition::dimensions ( ) const
Returns
Vector defining size of each dimension. See Dimensionality.

◆ emptyFieldDefinition()

static FieldDefinition ansys::dpf::FieldDefinition::emptyFieldDefinition ( )
static

Create an empty FieldDefinition.

Returns
Empty FieldDefinition.

◆ isOfQuantityType()

bool ansys::dpf::FieldDefinition::isOfQuantityType ( QuantityType const &  quantitytype) const

checks is the field data is of the given quantity type.

◆ location()

ansys::dpf::Location ansys::dpf::FieldDefinition::location ( ) const
Returns
Location on which field defined.
Examples
AveragingTest.cpp, and DataApis.cpp.

◆ name()

std::string ansys::dpf::FieldDefinition::name ( ) const
Returns
Name of the field.

◆ numberOfQuantityTypes()

int ansys::dpf::FieldDefinition::numberOfQuantityTypes ( ) const

Get the number of quantity types.

◆ quantity_type()

std::string ansys::dpf::FieldDefinition::quantity_type ( int  i) const

Get i'th quantity types.

◆ setDimensions() [1/2]

void ansys::dpf::FieldDefinition::setDimensions ( std::vector< dp_int > const &  rhs)

Set dimensions of field.

Parameters
[in]rhsVector defining size of each dimension. See Dimensionality.

◆ setDimensions() [2/2]

void ansys::dpf::FieldDefinition::setDimensions ( std::vector< dp_int > const &  rhs,
int  effective_size 
)

Set dimensions of field.

Parameters
[in]rhsVector defining size of each dimension. See Dimensionality.
[in]effective_sizeEffective size of data per field entry. (scalar is 1, xyz vector is 3, 2 Dimensional 3x3 Matrix is 9, ...)

◆ setLocation()

void ansys::dpf::FieldDefinition::setLocation ( ansys::dpf::Location const &  rhs)

Set field location.

Parameters
[in]rhsLocation on which field defined.

◆ setName()

void ansys::dpf::FieldDefinition::setName ( std::string const &  rhs)

Set field name.

◆ setQuantityType()

void ansys::dpf::FieldDefinition::setQuantityType ( QuantityType const &  quantitytype)

Set field data quantity type.

◆ setShellLayers()

void ansys::dpf::FieldDefinition::setShellLayers ( ansys::dpf::eshellLayers  layers)

Set layers of field.

Parameters
[in]layersLayers over which field defined.

◆ setUnit()

void ansys::dpf::FieldDefinition::setUnit ( ansys::dpf::Unit const &  rhs)

Set field unit.

Parameters
[in]rhsUnit for field.
Examples
DataApis.cpp, and DataExport.cpp.

◆ shellLayers()

eshellLayers ansys::dpf::FieldDefinition::shellLayers ( ) const
Returns
Layers over which field defined.

◆ unit()

ansys::dpf::Unit ansys::dpf::FieldDefinition::unit ( ) const
Returns
Unit of FieldDefinition.
Examples
DataApis.cpp.