21 long *cellp =
cellpoints[pos[0]][pos[1]][pos[2]];
38 if (pos[0]==-1 || pos[1]==-1 || pos[2]==-1 )
return false;
39 if (pos[0]==
cc[0] || pos[1]==
cc[1] || pos[2]==
cc[2])
return false;
83 for (i=0; i<
np; i++) {
90 for (k=-1; k<2; k++) {
92 for (l=-1; l<2; l++) {
94 for (m=-1; m<2; m++) {
97 if (k==0 && l==0 && m==0)
continue;
110 fprintf (stdout,
"\n Class DuplicatePoints - control print START \n\n");
114 fprintf (stdout,
" cc = [%ld][%ld][%ld]\n",
cc[0],
cc[1],
cc[2]);
115 for (k=0; k<
cc[0]; k++)
116 for (l=0; l<cc[1]; l++)
117 for (m=0; m<cc[2]; m++) {
121 fprintf (stdout,
" cc[%ld][%ld][%ld] :: ccellps %ld cellps ", k,l,m, aux);
123 for (i=0; i<aux; i++)
124 fprintf (stdout,
" %ld",
cellpoints[k][l][m][i]+1);
126 fprintf (stdout,
"\n");
130 fprintf (stdout,
"\n Class DuplicatePoints - control print END \n");
142 long i,j, k, l, m, aux;
148 for (k=0; k<
cc[0]; k++) {
149 for (l=0; l<cc[1]; l++) {
150 for (m=0; m<cc[2]; m++) {
158 for (i=0; i<cP; i++) D[i][0] = 0;
164 for (i=0; i<cP-1; i++)
165 for (j=i+1; j<cP; j++) {
180 for (i=0; i<cP-1; i++) {
181 if (D[i][0] == 0)
continue;
184 for (j=i+1; j<cP; j++)
186 if (D[i][0] != D[j][0])
_errorr(
"error");
195 if (duplicity[j][0] == P[i])
break;
200 if (Cduplicity[j] != aux)
_errorr(
"error");
202 for (j=0; j<Cduplicity[aux]; j++)
203 if (duplicity[aux][j] != P[D[i][j]])
_errorr(
"error");
208 Cduplicity[nd] = aux;
209 duplicity[nd] =
new long[Cduplicity[nd]];
210 for (j=0; j<Cduplicity[nd]; j++)
211 duplicity[nd][j] = P[D[i][j]];
234 for (k=0; k<nd; k++) ndp += Cduplicity[k];
236 long *dp =
new long[ndp];
240 for (l=0; l<Cduplicity[k]; l++)
241 dp[ndp++] = duplicity[k][l];
250 fprintf (stdout,
"\n DUPLICITY: START \n");
252 fprintf (stdout,
"\n Number of duplicities %ld\n",nd);
253 for (i=0; i<nd; i++) {
254 fprintf (stdout,
" duplicity[%ld] :: ", i+1);
255 for (j=0; j<Cduplicity[i]; j++)
256 fprintf (stdout,
", %ld", duplicity[i][j]+1);
258 fprintf (stdout,
"\n");
261 fprintf (stdout,
"\n DUPLICITY: END \n");
double dist2_to(const PoinT *p) const
void add_point_to_cell(long id, long pos[])
*** *** *** *** CLASS MESHGEOMETRY *** *** *** ***
long is_member_of_array(ArgType val, long n, const ArgType *array)
check out "val" is member of "array"
void allocate_another_val(long n, ArgType *&old_field)
*** *** *** *** REALLOCATE TEMPLATES *** *** *** ***
bool members_are_unique(long n, const ArgType *array)
check out all members of array "a" are uniq
bool point_is_in_cell(long id, long pos[], double offset)
void assign_cellpoints(void)
void find_duplicitys(long &nd, long *Cduplicity, long **duplicity)
return duplicity squads = 2 or more points with same coordinates nd ...
void allocate(ArgType *&p, long a)
*** *** *** *** ALLOCATE TEMPLATES *** *** *** ***
Class Geometry, Model and Mesh.
void deallocateCheck(ArgType *p, bool check=true)
*** *** *** *** DEALLOCATE TEMPLATES *** *** *** ***
void fill_all_by(ArgType *p, long a, ArgType value)
*** *** *** *** FILL TEMPLATES *** *** *** ***