-
-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
Description
For example:
calculix-adapter/adapter/PreciceInterface.c
Lines 376 to 410 in 1690a67
| case DISPLACEMENTS: | |
| if (isQuasi2D3D(interfaces[i]->quasi2D3D)) { | |
| getNodeDisplacements(interfaces[i]->nodeIDs, interfaces[i]->numNodes, interfaces[i]->dimCCX, sim->vold, sim->mt, interfaces[i]->mappingQuasi2D3D->bufferVector3D); | |
| consistentVectorWrite(interfaces[i]->mappingQuasi2D3D, interfaces[i]->couplingMeshName, interfaces[i]->displacements); | |
| } else { | |
| getNodeDisplacements(interfaces[i]->nodeIDs, interfaces[i]->numNodes, interfaces[i]->dimCCX, sim->vold, sim->mt, interfaces[i]->nodeVectorData); | |
| precicec_writeData(interfaces[i]->couplingMeshName, interfaces[i]->displacements, interfaces[i]->numNodes, interfaces[i]->preciceNodeIDs, interfaces[i]->nodeVectorData); | |
| } | |
| printf("Writing DISPLACEMENTS coupling data.\n"); | |
| break; | |
| case DISPLACEMENTDELTAS: | |
| if (isQuasi2D3D(interfaces[i]->quasi2D3D)) { | |
| getNodeDisplacementDeltas(interfaces[i]->nodeIDs, interfaces[i]->numNodes, interfaces[i]->dimCCX, sim->vold, sim->coupling_init_v, sim->mt, interfaces[i]->mappingQuasi2D3D->bufferVector3D); | |
| consistentVectorWrite(interfaces[i]->mappingQuasi2D3D, interfaces[i]->couplingMeshName, interfaces[i]->displacementDeltas); | |
| } else { | |
| getNodeDisplacementDeltas(interfaces[i]->nodeIDs, interfaces[i]->numNodes, interfaces[i]->dimCCX, sim->vold, sim->coupling_init_v, sim->mt, interfaces[i]->nodeVectorData); | |
| precicec_writeData(interfaces[i]->couplingMeshName, interfaces[i]->displacementDeltas, interfaces[i]->numNodes, interfaces[i]->preciceNodeIDs, interfaces[i]->nodeVectorData); | |
| } | |
| printf("Writing DISPLACEMENTDELTAS coupling data.\n"); | |
| break; | |
| case VELOCITIES: | |
| getNodeVelocities(interfaces[i]->nodeIDs, interfaces[i]->numNodes, interfaces[i]->dim, sim->veold, sim->mt, interfaces[i]->nodeVectorData); | |
| precicec_writeData(interfaces[i]->couplingMeshName, interfaces[i]->velocities, interfaces[i]->numNodes, interfaces[i]->preciceNodeIDs, interfaces[i]->nodeVectorData); | |
| printf("Writing VELOCITIES coupling data.\n"); | |
| break; | |
| case POSITIONS: | |
| getNodeCoordinates(interfaces[i]->nodeIDs, interfaces[i]->numNodes, interfaces[i]->dim, sim->co, sim->vold, sim->mt, interfaces[i]->nodeVectorData); | |
| precicec_writeData(interfaces[i]->couplingMeshName, interfaces[i]->positions, interfaces[i]->numNodes, interfaces[i]->preciceNodeIDs, interfaces[i]->nodeVectorData); | |
| printf("Writing POSITIONS coupling data.\n"); | |
| break; | |
| case FORCES: | |
| getNodeForces(interfaces[i]->nodeIDs, interfaces[i]->numNodes, interfaces[i]->dim, sim->fn, sim->mt, interfaces[i]->nodeVectorData); | |
| precicec_writeData(interfaces[i]->couplingMeshName, interfaces[i]->forces, interfaces[i]->numNodes, interfaces[i]->preciceNodeIDs, interfaces[i]->nodeVectorData); | |
| printf("Writing FORCES coupling data.\n"); | |
| break; |
I guess there must be a consistency check earlier, but this is a bit confusing and potentially dangerous.