Skip to main content

System Coupling Participant library 2025 R2

File syscRegion.h

Last update: 17.07.2025

Location: syscRegion.h

Classes

Includes

  • SystemCouplingParticipant/LibraryType.hpp
  • SystemCouplingParticipant/syscCommonTypes.h
  • SystemCouplingParticipant/syscVariable.h
  • <stddef.h>
graph LR
3["SystemCouplingParticipant/syscCommonTypes.h"]

5["stddef.h"]

2["SystemCouplingParticipant/LibraryType.hpp"]

4["SystemCouplingParticipant/syscVariable.h"]

1["syscRegion.h"]
click 1 "syscRegion_8h.md#syscRegion_8h"
1 --> 2
1 --> 3
1 --> 4
1 --> 5

Typedefs

Typedef SyscRegion

Definition: syscRegion.h (line 47)

typedef struct SyscRegion SyscRegion

Provide a struct for a System Coupling region.

Participant can declare which regions can be used in the coupled analysis. Each region can declare its input variables and output variables. Input variables represent physical quantities whose values the participant expects System Coupling to provide. Output variables represent physical quantities whose values System Coupling expects the participant to provide.

To create and/or initialize the SyscRegion struct, it is highly recommended to use one of the functions with names starting with syscGetRegion. These functions will initialize all members to the correct values and will help to avoid back-compatibility issues in the future. For example:

SyscRegion reg = syscGetRegionT("Wall", SyscSurface);

Return type: struct SyscRegion

Functions

Function syscGetRegion

SyscRegion syscGetRegion(const char *name)

Create region to be used in a coupled analysis.

Parameters:

  • name: - Unique name for this region. String length should not exceed SYSC_STRING_LENGTH.

Display name will default to the same as name.

Topology will default to surface.

Region mesh type will default to mesh.

Parameters:

  • const char * name

Return type: SyscRegion

Function syscGetRegionT

SyscRegion syscGetRegionT(const char *name, enum SyscTopology topology)

Create region to be used in a coupled analysis.

Parameters:

  • name: - Unique name for this region. String length should not exceed SYSC_STRING_LENGTH.
  • topology: - region topology.

Display name will default to the same as name.

Region mesh type will default to mesh.

Parameters:

Return type: SyscRegion

Function syscGetRegionDT

SyscRegion syscGetRegionDT(const char *name, const char *displayName, enum SyscTopology topology)

Create region to be used in a coupled analysis.

Parameters:

  • name: - Unique name for this region. String length should not exceed SYSC_STRING_LENGTH.
  • displayName: - region display name. String length should not exceed SYSC_STRING_LENGTH.
  • topology: - region topology.

Region mesh type will default to mesh.

Parameters:

  • const char * name
  • const char * displayName
  • enum SyscTopology topology

Return type: SyscRegion

Function syscGetRegionTM

SyscRegion syscGetRegionTM(const char *name, enum SyscTopology topology, enum SyscRegionDiscretizationType regionDiscretizationType)

Create region to be used in a coupled analysis.

Parameters:

  • name: - Unique name for this region. String length should not exceed SYSC_STRING_LENGTH.
  • topology: - region topology.
  • regionDiscretizationType: - region mesh type.

Display names will be same as name.

Parameters:

Return type: SyscRegion

Function syscGetRegionDTM

SyscRegion syscGetRegionDTM(const char *name, const char *displayName, enum SyscTopology topology, enum SyscRegionDiscretizationType regionDiscretizationType)

Create region to be used in a coupled analysis.

Parameters:

  • name: - Unique name for this region. String length should not exceed SYSC_STRING_LENGTH.
  • displayName: - region display name. String length should not exceed SYSC_STRING_LENGTH.
  • topology: - region topology.
  • regionDiscretizationType: - region mesh type.

Parameters:

Return type: SyscRegion

Function syscAddInputVariable

SyscError syscAddInputVariable(const SyscRegion region, const SyscVariable variable)

Provide a function to add an input variable to the region.

If this variable has already been added to the region as an input variable, then this call will have no effect.

If a different variable with the same name has already been added to the region as an input variable, then an error will be returned.

If a variable with the same name has already been added to the region as an output variable, then an error will be returned.

If the variable name contains invalid characters, then an error will be returned.

If the region discretization type is point cloud, then the location of the variable added to this region is insignificant.

Parameters:

  • region: Region to which the input variable is to be added.
  • variable: Variable whose values are provided by System Coupling and consumed by the participant.

Parameters:

Return type: SyscError

Function syscAddOutputVariable

SyscError syscAddOutputVariable(const SyscRegion region, const SyscVariable variable)

Provide a function to add an output variable to the region.

If this variable has already been added to the region as an output variable, then this call will have no effect.

If a different variable with the same name has already been added to the region as an output variable, then an error will be returned.

If a variable with the same name has already been added to the region as an input variable, then an error will be returned.

If the variable name contains invalid characters, then an error will be returned.

If the region discretization type is point cloud, then the location of the variable added to this region is insignificant.

Parameters:

  • region: Region to which the output variable is to be added.
  • variable: Variable whose values are consumed by System Coupling and provided by the participant.

Parameters:

Return type: SyscError

Function syscGetNumInputVariables

size_t syscGetNumInputVariables(const SyscRegion region)

Provide a function to return the number of input variables.

Parameters:

  • region: - region

Returns:

Number of input variables for the region.

Parameters:

Return type: size_t

Function syscGetInputVariable

SyscVariable syscGetInputVariable(const SyscRegion region, size_t index)

Return an input variable.

Parameters:

  • region: - region
  • index: - region index

Returns:

Variable at specified index.

Parameters:

Return type: SyscVariable

Function syscGetNumOutputVariables

size_t syscGetNumOutputVariables(const SyscRegion region)

Provide a function to return the number of output variables.

Parameters:

  • region: - region

Returns:

Number of output variables for the region.

Parameters:

Return type: size_t

Function syscGetOutputVariable

SyscVariable syscGetOutputVariable(const SyscRegion region, size_t index)

Return an output variable.

Parameters:

  • region: - region
  • index: - region index

Returns:

Variable at specified index.

Parameters:

Return type: SyscVariable

Source

/*
* Copyright ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
*/

#pragma once

#include "SystemCouplingParticipant/LibraryType.hpp"

#include "SystemCouplingParticipant/syscCommonTypes.h"
#include "SystemCouplingParticipant/syscVariable.h"

#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct SyscRegion {
  char name[SYSC_STRING_LENGTH];                              
  enum SyscTopology topology;                                 
  enum SyscRegionDiscretizationType regionDiscretizationType; 
  char displayName[SYSC_STRING_LENGTH];                       
} SyscRegion;

SyscRegion syscGetRegion(const char* name);

SyscRegion syscGetRegionT(const char* name, enum SyscTopology topology);

SyscRegion syscGetRegionDT(
  const char* name,
  const char* displayName,
  enum SyscTopology topology);

SyscRegion syscGetRegionTM(
  const char* name,
  enum SyscTopology topology,
  enum SyscRegionDiscretizationType regionDiscretizationType);

SyscRegion syscGetRegionDTM(
  const char* name,
  const char* displayName,
  enum SyscTopology topology,
  enum SyscRegionDiscretizationType regionDiscretizationType);

SyscError syscAddInputVariable(
  const SyscRegion region,
  const SyscVariable variable);

SyscError syscAddOutputVariable(
  const SyscRegion region,
  const SyscVariable variable);

size_t syscGetNumInputVariables(const SyscRegion region);

SyscVariable syscGetInputVariable(const SyscRegion region, size_t index);

size_t syscGetNumOutputVariables(const SyscRegion region);

SyscVariable syscGetOutputVariable(const SyscRegion region, size_t index);

#ifdef __cplusplus
}
#endif

Connect with Ansys