Changeset 4039 for issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp
- Timestamp:
- 06/11/10 11:10:11 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp
r4037 r4039 11 11 #include "stdio.h" 12 12 #include <string.h> 13 #include "./InputLocal.h"14 13 #include "../objects.h" 15 14 #include "../../EnumDefinitions/EnumDefinitions.h" … … 451 450 } 452 451 /*}}}*/ 453 /*FUNCTION TriaVertexInput::PatchSize(void);{{{1*/454 int TriaVertexInput::PatchSize(void){455 456 /*Return the number of nodal values this input holds, so that457 * results can be correctl dimensionned. See InputToResultsx458 * module for more explanations: */459 return 3;460 }461 /*}}}*/462 /*FUNCTION TriaVertexInput::PatchFill(double* patches, int max_vertices,Parameters* parameters);{{{1*/463 void TriaVertexInput::PatchFill(double* patches, int max_vertices,Parameters* parameters){464 465 /*A patch is made of the following information:466 * element_id interpolation_type vertex_ids values.467 * For example:468 469 1 P0 1 2 4 4.5 NaN NaN470 2 P1 2 4 5 4.5 23.3 23.3471 3 P0 5 2 1 5.5 NaN NaN472 4 P1 2 3 5 4.5 30.2 322.2473 ...474 475 Here, we fill the info relevant to the input, ie interpolation_type and nodal values: */476 477 int i;478 479 patches[1]=P1Enum;480 for(i=0;i<3;i++)patches[2+max_vertices+i]=values[i]; //start of nodal values is at position 2+max_vertices (2 for id and interpolation_type) and max_vertices for vertices ids.481 482 /*Now, post-processing (essentially, unit conversion): */483 ProcessResults(patches+2+max_vertices,3,this->enum_type,parameters);484 485 }486 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.