diff --git a/adapter/PreciceInterface.c b/adapter/PreciceInterface.c index 874fdb7..9164864 100644 --- a/adapter/PreciceInterface.c +++ b/adapter/PreciceInterface.c @@ -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;