    

 ## On this page

  

 

 # ansys::dpf::Location Struct Reference

 Last update: 16.07.2025 

User defined location quantity. [More...](structansys_1_1dpf_1_1Location.xhtml#details)

`#include <dpf_api_base.h>`

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

 [Location](structansys_1_1dpf_1_1Location.xhtml#a2b3efab2807517d182bc9a486a0fb837) (std::string const &amp;name="") <a id="acbfdb380af9621ce0bc37d290f18a464" name="acbfdb380af9621ce0bc37d290f18a464"></a> **Location** ([Location](structansys_1_1dpf_1_1Location.xhtml) const &amp;)=default <a id="a88d382410f5b1bbf37e65b5e89f85b22" name="a88d382410f5b1bbf37e65b5e89f85b22"></a>bool **operator==** ([Location](structansys_1_1dpf_1_1Location.xhtml) const &amp;) const <a id="a17fccc35f2e202671ce6b961ef946521" name="a17fccc35f2e202671ce6b961ef946521"></a>bool **operator&lt;** ([Location](structansys_1_1dpf_1_1Location.xhtml) const &amp;) const <a id="a120b2f92eef3fea51a789125c740726f" name="a120b2f92eef3fea51a789125c740726f"></a>bool **operator&lt;=** ([Location](structansys_1_1dpf_1_1Location.xhtml) const &amp;) const <a id="ae9e07f6694532a61658cd75aca0a6756" name="ae9e07f6694532a61658cd75aca0a6756"></a>bool **operator!=** ([Location](structansys_1_1dpf_1_1Location.xhtml) const &amp;) const  [operator std::string](structansys_1_1dpf_1_1Location.xhtml#a5a60f9364ad31a180f0fe06aedd3bfc9) () const <a id="aa79d660aa731fcdbdad2f57b3b3a5e65" name="aa79d660aa731fcdbdad2f57b3b3a5e65"></a>bool **empty** () const const char \* [c\_str](structansys_1_1dpf_1_1Location.xhtml#ad9fab192124627740ffa623b1a0221ea) () const <a id="details" name="details"></a>## Detailed Description

User defined location quantity.

The location is the type of topology associated with the data container. This allows for the definition of a new location quantity. Many location quantities are predefined.

See also[locations](structansys_1_1dpf_1_1locations.xhtml "Predefined location quantities.") Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#_a5).

## Constructor &amp; Destructor Documentation

<a id="a2b3efab2807517d182bc9a486a0fb837" name="a2b3efab2807517d182bc9a486a0fb837"></a>## [◆ ](#a2b3efab2807517d182bc9a486a0fb837)Location()

 ansys::dpf::Location::Location  ( std::string const &amp;  *name* = `""`)   explicit 

Create new location.

Parameters \[in\]nameOptional name of location. 



## Member Function Documentation

<a id="ad9fab192124627740ffa623b1a0221ea" name="ad9fab192124627740ffa623b1a0221ea"></a>## [◆ ](#ad9fab192124627740ffa623b1a0221ea)c\_str()

 const char \* ansys::dpf::Location::c\_str  ( )  const

Gets name of location.

ReturnsName of location. Examples[AveragingTest.cpp](AveragingTest_8cpp-example.xhtml#a11), and [ModelTest.cpp](ModelTest_8cpp-example.xhtml#a39).



<a id="a5a60f9364ad31a180f0fe06aedd3bfc9" name="a5a60f9364ad31a180f0fe06aedd3bfc9"></a>## [◆ ](#a5a60f9364ad31a180f0fe06aedd3bfc9)operator std::string()

 ansys::dpf::Location::operator std::string  ( )  const

Name of location.