Skip to main content

System Coupling C++ library 2024 R1

sysc::CouplingInterface Class Reference

Last update: 17.07.2025

Provide a class for a coupling interface. More...

#include <CouplingInterface.hpp>

Public Member Functions

 CouplingInterface (CouplingInterfaceName interfaceName)
 Provide a constructor for the CouplingInterface class.
 
void addSideOneRegion (const Region &region)
 Add region to side one of the interface.
 
void addSideTwoRegion (const Region &region)
 Add region to side two of the interface.
 
const CouplingInterfaceNamegetName () const
 Get coupling interface name.
 
std::size_t getNumSideOneRegions () const
 Get the number of regions on side one of the interface.
 
std::size_t getNumSideTwoRegions () const
 Get the number of regions on side two of the interface.
 
const RegiongetSideOneRegion (std::size_t index) const
 Get the region on side one, given an index.
 
const RegiongetSideTwoRegion (std::size_t index) const
 Get the region on side two, given an index.
 
void addDataTransfer (const DataTransfer &dataTransfer)
 Add a data transfer.
 
std::size_t getNumDataTransfers () const noexcept
 Get the number of data transfers.
 
const DataTransfergetDataTransfer (std::size_t index) const
 Get the data transfer, given an index.
 

Detailed Description

Provide a class for a coupling interface.

Coupling interface can be used to set up the transfers of data between different regions within the same participant solver. Interface contains two sides and each side can contain one or more regions.

All regions on one side of the interface must have the same topology.

Definition at line 28 of file CouplingInterface.hpp.

Constructor & Destructor Documentation

◆ CouplingInterface()

sysc::CouplingInterface::CouplingInterface ( CouplingInterfaceName  interfaceName)

Provide a constructor for the CouplingInterface class.

Parameters
[in]interfaceNameA unique name for the coupling interface.

Member Function Documentation

◆ addSideOneRegion()

void sysc::CouplingInterface::addSideOneRegion ( const Region region)

Add region to side one of the interface.

If this region has already been added to the interface on side one, then this call will have no effect.

If a different region with the same name has already been added to the interface on side one, then a runtime error will be thrown.

If a region with the same name has already been added to the interface on side two, then a runtime error will be thrown.

If the region name contains invalid characters, a runtime error will be thrown.

Parameters
[in]regionRegion to be added to side one of the interface.

◆ addSideTwoRegion()

void sysc::CouplingInterface::addSideTwoRegion ( const Region region)

Add region to side two of the interface.

If this region has already been added to the interface on side two, then this call will have no effect.

If a different region with the same name has already been added to the interface on side two, then a runtime error will be thrown.

If a region with the same name has already been added to the interface on side one, then a runtime error will be thrown.

If the region name contains invalid characters, a runtime error will be thrown.

Parameters
[in]regionRegion to be added to side one of the interface.

Connect with Ansys