Changeset 9e84556 in tol
- Timestamp:
- Dec 30, 2009, 6:20:22 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- d9c5d1e
- Parents:
- bb01c80
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tol_pkg/MulVarFunAprox/DesignC2.Monomial.Spheric.Grid.tol
rbb01c80 r9e84556 25 25 //Auxiliar members 26 26 ////////////////////////////////////////////////////////////////////////////// 27 VMatrix _.Y.h = Rand(0,0,0,0);28 27 VMatrix _.Y.neighbourhood = Rand(0,0,0,0); 29 28 … … 50 49 51 50 ////////////////////////////////////////////////////////////////////////////// 52 VMatrix get.radius(VMatrix Y.idx)53 //////////////////////////////////////////////////////////////////////////////54 {55 Constant(VRows(Y.idx),1,_.radius)56 };57 58 //////////////////////////////////////////////////////////////////////////////59 VMatrix closest.reference.index(VMatrix X)60 //////////////////////////////////////////////////////////////////////////////61 {62 WriteLn("TRACE [closest.reference.index] 1");63 SubRow(_.Y.neighbourhood, Col2Set(_.grid::point2index(X)))64 };65 66 //////////////////////////////////////////////////////////////////////////////67 51 Real build.reference.points(Real void) 68 52 ////////////////////////////////////////////////////////////////////////////// … … 70 54 Text _MID = "[@DesignC2.Monomial.Spheric.Grid::build.reference.points] "; 71 55 VMatrix _.Y := _.grid::_.Y; 72 VMatrix _.Y.h := Mat2VMat(_.grid::_.Y.h);73 VMatrix _.Y.neighbourhood := _.Y.h | Group("ConcatColumns",56 VMatrix Y.h = Mat2VMat(_.grid::_.Y.h); 57 VMatrix _.Y.neighbourhood := Y.h | Group("ConcatColumns", 74 58 For(1,2*_.n, VMatrix(Real i) 75 59 { 76 60 VMatrix aux = SubCol(_.grid::_.Y.neighbourhood.index,[[i]]); 77 IfVMat(aux,aux, _.Y.h)61 IfVMat(aux,aux,Y.h) 78 62 })); 79 63 Set X.class = Classify(Col2Set(_.grid::point2index(_.X)),Compare); … … 87 71 ////////////////////////////////////////////////////////////////////////////// 88 72 { 89 Text _MID = "[@DesignC2. Spheric::build.stress.points] ";73 Text _MID = "[@DesignC2.Monomial.Spheric.Grid::build.stress.points] "; 90 74 WriteLn("TRACE "+_MID+"1"); 91 75 Real _.Z.maxNeighbour := If(prior.Z.order>=0,2,0); … … 133 117 VMatrix _.Z.h := SubRow(Z.h.interior, sel.unique); 134 118 Real _.Tz := VRows(_.Z); 135 VMatrix _.Z.Y.neighbour :=119 VMatrix Z.Y.neighbour = 136 120 { 137 121 Matrix Z.t = DifEq(1/(1-B),Rand(_.Tz,1,1,1)); … … 147 131 SubRow(Mat2VMat(Z.Y.idx),MatQuery::SelectMatch(Z.Y.match)) 148 132 }; 149 VMatrix aux = MatQuery::SortAndCount(SubCol( _.Z.Y.neighbour,[[2]]));133 VMatrix aux = MatQuery::SortAndCount(SubCol(Z.Y.neighbour,[[2]])); 150 134 VMatrix _.Yt := Triplet(VMat2Mat(SubCol(aux,[[1]])) | 151 135 Rand(VRows(aux),1,1,1) | … … 186 170 }; 187 171 172 ////////////////////////////////////////////////////////////////////////////// 173 VMatrix get.radius(VMatrix Y.idx) 174 ////////////////////////////////////////////////////////////////////////////// 175 { 176 Constant(VRows(Y.idx),1,_.radius) 177 }; 178 179 ////////////////////////////////////////////////////////////////////////////// 180 VMatrix closest.reference.index(VMatrix X) 181 ////////////////////////////////////////////////////////////////////////////// 182 { 183 WriteLn("TRACE [closest.reference.index] 1"); 184 SubRow(_.Y.neighbourhood, Col2Set(_.grid::point2index(X))) 185 }; 186 187 //////////////////////////////////////////////////////////////////////////// 188 VMatrix match.evaluable(VMatrix X) 189 //////////////////////////////////////////////////////////////////////////// 190 { 191 Real m = VRows(X); 192 Mat2VMat(_.grid::point2index(X)) 193 }; 194 188 195 /////////////////////////////////////////////////////////////////////////// 189 VMatrix generate.internal.points( 190 Real m, 191 Real force.reference.near.nodal) 196 VMatrix generate.internal.points(Real m) 192 197 /////////////////////////////////////////////////////////////////////////// 193 198 { … … 197 202 VMatrix u = v*(VMatDat(MtMSqr(v),1,1)^-0.5); 198 203 y+u*(Rand(0,1)*_.radius) 199 };200 201 ////////////////////////////////////////////////////////////////////////////202 VMatrix match.evaluable(VMatrix X)203 ////////////////////////////////////////////////////////////////////////////204 {205 Real m = VRows(X);206 Mat2VMat(_.grid::point2index(X))207 /*208 VMatrix X.closest.index = closest.reference.index(X);209 VMatrix X.h=SubRow(SubCol(_.Y.neighbourhood,[[1]]),210 VCol2Set(X.closest.index));211 VMatrix X.dif = X - SubRow(_.Y,VCol2Set(X.h));212 VMatrix X.norm2 = RPow(X.dif,2)*Rand(_.n,1,1,1);213 VMatrix X.tao = RPow(X.norm2,0.5)/_.radius;214 LE(X.tao,Rand(m,1,1,1))215 */216 204 } 217 205 206 218 207 };
Note: See TracChangeset
for help on using the changeset viewer.
