1 /*
2 * Copyright (C) 1998, 2000-2007, 2010, 2011, 2012, 2013 SINTEF ICT,
3 * Applied Mathematics, Norway.
4 *
5 * Contact information: E-mail: tor.dokken@sintef.no
6 * SINTEF ICT, Department of Applied Mathematics,
7 * P.O. Box 124 Blindern,
8 * 0314 Oslo, Norway.
9 *
10 * This file is part of SISL.
11 *
12 * SISL is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Affero General Public License as
14 * published by the Free Software Foundation, either version 3 of the
15 * License, or (at your option) any later version.
16 *
17 * SISL is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Affero General Public License for more details.
21 *
22 * You should have received a copy of the GNU Affero General Public
23 * License along with SISL. If not, see
24 * <http://www.gnu.org/licenses/>.
25 *
26 * In accordance with Section 7(b) of the GNU Affero General Public
27 * License, a covered work must retain the producer line in every data
28 * file that is created or manipulated using SISL.
29 *
30 * Other Usage
31 * You can be released from the requirements of the license by purchasing
32 * a commercial license. Buying such a license is mandatory as soon as you
33 * develop commercial activities involving the SISL library without
34 * disclosing the source code of your own applications.
35 *
36 * This file may be used in accordance with the terms contained in a
37 * written agreement between you and SINTEF ICT.
38 */
39
40 #include "sisl-copyright.h"
41
42 /*
43 *
44 * $Id: s6chpar.c,v 1.1 1994-04-21 12:10:42 boh Exp $
45 *
46 */
47
48
49 #define S6CHPAR
50
51 #include "sislP.h"
52
53 #if defined(SISLNEEDPROTOTYPES)
54 void
s6chpar(double ecoef1[],int in1,int in2,int idim,double ecoef2[])55 s6chpar(double ecoef1[],int in1,int in2,int idim,double ecoef2[])
56 #else
57 void s6chpar(ecoef1,in1,in2,idim,ecoef2)
58 double ecoef1[];
59 int in1;
60 int in2;
61 int idim;
62 double ecoef2[];
63 #endif
64 /*
65 *********************************************************************
66 *
67 * PURPOSE : Change parameter directions of vertices of surface.
68 *
69 *
70 *
71 * INPUT : ecoef1 - Vertices of original surface.
72 * in1 - Number of vertices in first parameter direction.
73 * in2 - Number of vertices in second parameter direction.
74 * idim - Dimension of the space in which the surfac lies.
75 *
76 *
77 * OUTPUT : ecoef2 - Vertices after the changing of parameter directions.
78 *
79 *
80 *
81 * METHOD :
82 *
83 *
84 * REFERENCES :
85 *
86 *-
87 * CALLS :
88 *
89 * WRITTEN BY : Vibeke Skytt, SI, 88-11.
90 *
91 *********************************************************************
92 */
93 {
94 register int ki,kj,kk; /* Counters. */
95
96 for (ki=0; ki<in1; ki++)
97 for (kj=0; kj<in2; kj++)
98 for (kk=0; kk<idim; kk++)
99 ecoef2[(ki*in2+kj)*idim+kk] = ecoef1[(kj*in1+ki)*idim+kk];
100 }
101