Skip to content

Commit

Permalink
Port dimension lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
fsimonis committed Jan 17, 2024
1 parent 03a0c0f commit cffb7d8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion adapter/PreciceInterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,16 @@ void Precice_FreeData(SimulationData *sim)

void PreciceInterface_Create(PreciceInterface *interface, SimulationData *sim, InterfaceConfig const *config)
{
interface->dim = precicec_getDimensions();
if (config->nodesMeshName) {
interface->dim = precicec_getMeshDimensions(config->nodesMeshName);
} else {
if (config->facesMeshName) {
interface->dim = precicec_getMeshDimensions(config->facesMeshName);
} else {
printf("ERROR: You need to define either a face or a nodes mesh. Check the adapter configuration file.\n");
exit(EXIT_FAILURE);
}
}

// Initialize pointers as NULL
interface->elementIDs = NULL;
Expand Down

0 comments on commit cffb7d8

Please sign in to comment.