UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Kelvinlets.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "MathUtil.h"
6#include "VectorTypes.h"
7#include "MatrixTypes.h"
8
9namespace UE
10{
11namespace Geometry
12{
13
14
15template <typename KelvinletModelType>
17{
18public:
19
20 FVector3d Evaluate(const FVector3d& Pos) const;
21
22 // a single step of RK3
23 FVector3d IntegrateRK3(const FVector3d& Pos, double dt) const
24 {
25
26 FVector3d k1 = static_cast<const KelvinletModelType*>(this)->Evaluate(Pos);
27 FVector3d k2 = static_cast<const KelvinletModelType*>(this)->Evaluate(Pos + dt * 0.5 * k1);
28 FVector3d k3 = static_cast<const KelvinletModelType*>(this)->Evaluate(Pos + dt * (2.0 * k2 - k1));
29
30 // give result relative to pos
31 return Pos + dt * ((1.0 / 6.0) * (k1 + k3) + (2.0 / 3.0) * k2);
32 }
33};
34
35template <typename KelvinletModelType>
36class TBaseKelvinlet : public TKelvinletIntegrator<KelvinletModelType>
37{
38public:
39
40 TBaseKelvinlet(const double Size, const double ShearModulus, const double PoissonRatio)
41 {
43
45 }
46
47
48 // ShearModuls and Poisson Ratio - both => 0.
49 // Poisson Ratio should be in the interval [0, 1/2)
50 void SetMaterialParameters(const double ShearModulus, const double PoissonRatio)
51 {
52 checkSlow(PoissonRatio <= 0.5);
53 a = 1.0 / (4. * PI * ShearModulus);
54 bhat = 1.0 / (4. * (1.0 - PoissonRatio));
55 }
56
57
58 void UpdateRegularization(const double R)
59 {
60 E = R;
61 }
62
63protected:
64
65 // Epsilon and powers of epsilon
66 double E;
67 // using lowercase to be consistent with standard notation (cf "Sharp Kelvinlets: Elastic Deformations with Cusps and Localized Falloffs" 2019 de Goes)
68 double a;
69 // Note: to translate to the notation of F.de Goes, b = a * bhat.
70 double bhat;
71};
72
73
74// Note: this is independent of "a" the shear moduls term
75class FPullKelvinlet : public TBaseKelvinlet < FPullKelvinlet>
76{
77public:
78 typedef TBaseKelvinlet < FPullKelvinlet> MyBase;
79
80
81
82 FPullKelvinlet(const FVector3d& Force, const double Size, const double ShearModulus, const double PoissonRatio) :
84 F(Force)
85 {
86 // Note: b <= a /2 so this can't be 2/0
87 // double NormConst = 2. / (3. * a - 2. * b);
88
89 // we can factor a out of the solution..
90 double NormConst = 2. / (3. - 2. * bhat);
91 c = NormConst;
92 }
93
94
95 // The canonical Kelvinlet for a regularized force.
96 // u(r) = [A_e(r) I + B_e(r) r r^t] f;
97 // where A_e(r) = (a-b)/r_e + a e^2 / (2 r_e^3)
98 // B_e(r) = b / (r_e^3)
99 FVector3d Evaluate(const FVector3d& Pos) const
100 {
101
102 // normalized on the regularization size.
103 const FVector3d NPos = Pos / E;
104
105 const double D2 = 1. + NPos.SquaredLength();
106 const double D = FMath::Sqrt(D2);
107 const double D3 = D2 * D;
108
109 const double RadialTerm = (1. - bhat) / D + 0.5 / D3;
110 const double NonIsoTerm = (bhat / D3) * F.Dot(NPos);
111
112 //return c * (a * RadialTerm * F + a * NonIsoTerm * NPos);
113 return c * (RadialTerm * F + NonIsoTerm * NPos);
114 }
115
116 double Divergence(const FVector3d& Pos) const
117 {
118 // normalized on the regularization size.
119 const FVector3d NPos = Pos / E;
120 const double D2 = 1. + NPos.SquaredLength();
121 const double D5 = D2 * D2 * FMath::Sqrt(D2);
122
123 // note the divergence is zero in plane perpendicular to the brush direction.
124 double Div = (2. * bhat - 1.) * F.Dot(NPos) * (3. + D2) / (2 * D5);
125
126 return c * Div;
127 }
128
129private:
130
131 FVector3d F;
132
133 double c; // calibration
134};
135
136// Note: this is independent of "a" the shear moduls term
137class FLaplacianPullKelvinlet : public TBaseKelvinlet < FLaplacianPullKelvinlet >
138{
139public:
140 typedef TBaseKelvinlet < FLaplacianPullKelvinlet > MyBase;
141
142
143 FLaplacianPullKelvinlet(const FVector3d& Force, const double Size, const double ShearModulus, const double PoissonRatio) :
145 F(Force)
146 {
147 // Normalize the radial term
148 // Note: b <= a /2 so this can't be 2/0
149 //double NormConst = 2. /(3. * a - 2. * b);
150 double NormConst = 2. / (3. - 2. * bhat);
151 c = NormConst / 5.;
152 }
153
154 FVector3d Evaluate(const FVector3d& Pos) const
155 {
156
157 // normalized on the regularization size.
158 const FVector3d NPos = Pos / E;
159 const double R2 = NPos.SquaredLength();
160 const double D2 = 1. + R2;
161 const double D = FMath::Sqrt(D2);
162 const double D3 = D2 * D;
163 const double D7 = D * D3 * D3;
164
165
166 // Radial (Isotropic) term
167
168 double RadialTerm = (15. - bhat * D2 * (10. + 4. * R2)) / (2. * D7);
169
170
171 // Non Isotropic term
172 double NonIsoTerm = (3. * bhat * (7. + 2. * R2) / D7) * F.Dot(NPos);
173
174 // we can factor the 'a' out
175 //return c * (a * RadialTerm * F + a * NonIsoTerm * NPos);
176 return c * (RadialTerm * F + NonIsoTerm * NPos);
177 }
178
179 double Divergence(const FVector3d& Pos) const
180 {
181 // normalized on the regularization size.
182 const FVector3d NPos = Pos / E;
183 const double D2 = 1. + NPos.SquaredLength();
184 const double D = FMath::Sqrt(D2);
185 const double D9 = D2 * D2 * D2 * D2 * D;
186
187 // note the divergence is zero in plane perpendicular to the brush direction.
188 double Div = (2. * bhat - 1.) * 105 * F.Dot(NPos) / D9;
189 return c * Div;
190 }
191
193
194private:
195 double c; // calibration
196};
197
198// Note: this is independent of "a" the shear modulus term
199class FBiLaplacianPullKelvinlet : public TBaseKelvinlet < FBiLaplacianPullKelvinlet >
200{
201public:
202 typedef TBaseKelvinlet < FBiLaplacianPullKelvinlet > MyBase;
203
204 FBiLaplacianPullKelvinlet(const FVector3d& Force, const double Size, const double ShearModulus, const double PoissonRatio) :
206 F(Force)
207 {
208 // Normalize the radial term
209 // Note: b <= a /2 so this can't be 2/0
210 //double NormConst = 2. / (3. * a - 2. * b);
211 double NormConst = 2. / (3. - 2. * bhat);
212 c = NormConst / 105.;
213
214 }
215
216
217 FVector3d Evaluate(const FVector3d& Pos) const
218 {
219
220 // normalized on the regularization size.
221 const FVector3d NPos = Pos / E;
222 const double R2 = NPos.SquaredLength();
223 const double D2 = 1. + R2;
224 const double D = FMath::Sqrt(D2);
225 const double D3 = D2 * D;
226 const double D11 = D3 * D3 * D3 * D2;
227
228 // Radial (Isotropic) term
229
230 const double RadialTerm = 105. * (3. - 6. * R2 - 2. * bhat * D2) / (2. * D11);
231
232
233 // Non Isotropic term
234 const double NonIsoTerm = (bhat * 945. / D11) * F.Dot(NPos);
235
236 //return c * a * (RadialTerm * F + NonIsoTerm * NPos);
237 // we factor the a out.
238 return c * (RadialTerm * F + NonIsoTerm * NPos);
239 }
240
241
242 double Divergence(const FVector3d& Pos) const
243 {
244 // normalized on the regularization size.
245 const FVector3d NPos = Pos / E;
246 const double D2 = 1. + NPos.SquaredLength();
247 const double D = FMath::Sqrt(D2);
248 const double D8 = D2 * D2 * D2 * D2;
249 const double D13 = D8 * D2 * D2 * D;
250
251 // note the divergence is zero in plane perpendicular to the brush direction.
252 double Div = 945. * (2. * bhat - 1.) * F.Dot(NPos) * (11 - 6. * D2) / (2. * D13);
253 return c * Div;
254 }
255
257
258private:
259
260 double c; // calibration
261
262};
263
264
265
266// Note: this is independent of "a" the shear modulus term
267class FSharpLaplacianPullKelvinlet : public TBaseKelvinlet < FSharpLaplacianPullKelvinlet >
268{
269public:
270 typedef TBaseKelvinlet < FSharpLaplacianPullKelvinlet > MyBase;
271
272 FSharpLaplacianPullKelvinlet(const FVector3d& Force, const double Size, const double ShearModulus, const double PoissonRatio) :
274 F(Force)
275 {
276 // Normalize the radial term
277 // Note: b <= a /2 so this can't be 1/0
278
279 double NormConst = 1. / (10. * (3. - 2. * bhat));
280 c = NormConst;
281
282 }
283
284
285 FVector3d Evaluate(const FVector3d& Pos) const
286 {
287
288 // normalized on the regularization size.
289 const FVector3d NPos = Pos / E;
290 const double R2 = NPos.SquaredLength();
291 const double R = FMath::Sqrt(R2);
292 const double R4 = R2 * R2;
293 const double R5 = R4 * R;
294 const double D2 = 1. + R2;
295 const double D = FMath::Sqrt(D2);
296 const double D3 = D2 * D;
297 const double D5 = D3 * D2;
298
299 const double D11 = D3 * D3 * D3 * D2;
300
301 // Radial (Isotropic) term
302
303 const double RadialTerm = 2. * ((15. - 10. * bhat) + (90. - 88. * bhat) * R2 + 120. * (1. - bhat) * R4 + 48. * (1. - bhat) * R * (R5 - D5)) / D5;
304
305
306 // Non Isotropic term
307
308 const double NonIsoTerm = -12. * (bhat / (R * D5)) * (2. * R2 * (4. * D - 5. * R) + 4. * R4 * (D - R) + (4. * D - 7. * R)) * F.Dot(NPos);
309
310 //return c * a * (RadialTerm * F + NonIsoTerm * NPos);
311 // we factor the a out.
312 return c * (RadialTerm * F + NonIsoTerm * NPos);
313 }
314
315
316 double Divergence(const FVector3d& Pos) const
317 {
318 return 1;
319 }
320
322
323private:
324
325 double c; // calibration
326
327};
328
329class FSharpBiLaplacianPullKelvinlet : public TBaseKelvinlet <FSharpBiLaplacianPullKelvinlet >
330{
331public:
332 typedef TBaseKelvinlet < FSharpBiLaplacianPullKelvinlet > MyBase;
333
334 FSharpBiLaplacianPullKelvinlet(const FVector3d& Force, const double Size, const double ShearModulus, const double PoissonRatio) :
336 F(Force)
337 {
338 // Normalize the radial term
339 // Note: b <= a /2 so this can't be 1/0
340
341 double NormConst = 1. / (315. * (3. - 2. * bhat));
342 c = NormConst;
343
344 }
345
346
347 FVector3d Evaluate(const FVector3d& Pos) const
348 {
349
350 // normalized on the regularization size.
351 const FVector3d NPos = Pos / E;
352 const double R2 = NPos.SquaredLength();
353 const double R = FMath::Sqrt(R2);
354 const double R4 = R2 * R2;
355 const double D2 = 1. + R2;
356 const double D = FMath::Sqrt(D2);
357 const double D3 = D2 * D;
358 const double D5 = D3 * D2;
359 const double D9 = D5 * D2 * D2;
360 const double D10 = D5 * D5;
361 const double D11 = D3 * D3 * D3 * D2;
362
363 FVector3d Result(0., 0., 0.);
364
365 if (R < 5)
366 {
367
368 // Radial (Isotropic) term
369
370 const double RadialTerm = (9. / D10) * (-512. * R * D10 + (((((512. * R2 + 2304.) * R2 + 4032.) * R2 + 3360.) * R2 + 1260.) * R2 + 105.) * D + 2. * bhat * (128 * R * D10 - D3 * (35. + R2 * (280. + R2 * (560. + R2 * (448. + 128 * R2))))));
371
372
373 // Non Isotropic term
374
375 const double NonIsoTerm = 18. * (bhat / (R * D9)) * (128. * D9 - R * (R2 * (R2 * (R2 * (128. * R2 + 576.) + 1008.) + 840.) + 315.)) * F.Dot(NPos);
376
377 Result = c * (RadialTerm * F + NonIsoTerm * NPos);
378 }
379 return Result;
380 }
381
382
383 double Divergence(const FVector3d& Pos) const
384 {
385 return 1;
386 }
387
389
390private:
391
392 double c; // calibration
393
394};
395
396
397// Implement the "Locally affine regularized Kelvinlet" from
398// "Regularized Kelvinlets: Sculpting Brushes based on Fundamental Solutions of Elasticity" - de Goes and James 2017
399class FAffineKelvinlet : public TBaseKelvinlet < FAffineKelvinlet>
400{
401public:
402 typedef TBaseKelvinlet < FAffineKelvinlet> MyBase;
403
404 FAffineKelvinlet(const FMatrix3d& ForceMatrix, const double Size, const double ShearModulus, const double PoissonRatio) :
407 {
409 E2 = E * E;
410 }
411
413 {
414 F = NF;
416 }
417
418 FVector3d Evaluate(const FVector3d& Pos) const
419 {
420 // normalized on the regularization size.
421 const FVector3d NPos = Pos / E;
422 const double R2 = NPos.SquaredLength();
423 const double D2 = 1. + R2;
424 const double D = FMath::Sqrt(D2);
425 const double D3 = D2 * D;
426 const double D5 = D3 * D2;
427
428
429
430 // the displacement field.
431 const FVector3d Fr = F * NPos;
432 const double rDotFr = NPos.Dot(Fr);
433
434 FVector3d Term1 = (bhat * SymF * NPos - Fr) / D3;
435 FVector3d Term2 = -3. * (Fr + 2. * bhat * rDotFr * NPos) / (2. * D5);
436
437 return a * (Term1 + Term2) / E2;
438
439 }
440
441protected:
442
443
444 // Force Matrix
446
447 // 2 * symmetric part of F + trace.. : F + F^T + I Trace(F)
449
450 double E2;
451};
452
453// Independent of shear modulus and is volume preserving.
454class FTwistKelvinlet : public TBaseKelvinlet <FTwistKelvinlet>
455{
456public:
457 typedef TBaseKelvinlet < FTwistKelvinlet> MyBase;
458
459 FTwistKelvinlet(const FVector3d& Twist, const double Size, const double ShearModulus, const double PoissonRatio) :
461 F(CrossProductMatrix(Twist))
462 {
463 }
464
467 {
468 F = Other.F;
469 }
470
471 // Specialized override that should give the same result, but be faster.
472 // note: <r | F r> = 0 and F.Trace() = 0 for the skewsymmetric cross product matrix.
473 FVector3d Evaluate(const FVector3d& Pos) const
474 {
475
476 // normalized on the regularization size.
477 const FVector3d NPos = Pos / E;
478 const double R2 = NPos.SquaredLength();
479 const double D2 = 1. + R2;
480 const double D = FMath::Sqrt(D2);
481 const double D3 = D2 * D;
482 const double D5 = D3 * D2;
483
484
485
486 // the displacement field.
487 const FVector3d Fr = F * NPos;
488
489
490
491 FVector3d Term1 = (1. / D3 + 1.5 / D5) * Fr;
492 // Correct value is (-a/E2) * Term1;
493 // with Normalization = 1/ Angular velocity = 1 / ( -2.5 * a / E2 )
494
495 // set the angular velocity at the tip to be Twist.Length(). This allows us to set the speed and chirality (left / right -handed) using the twist vector
496 return Term1 * (2. / 5.);
497
498 }
499
500 double Divergence(const FVector3d& Pos) const
501 {
502 return 0.;
503 }
504
505protected:
506
507 // Force Matrix
509};
510
511
512class FPinchKelvinlet : public TBaseKelvinlet <FPinchKelvinlet>
513{
514public:
515 typedef TBaseKelvinlet <FPinchKelvinlet> MyBase;
516
517 FPinchKelvinlet(const FMatrix3d& ForceMatrix, const double Size, const double ShearModulus, const double PoissonRatio) :
519 F(PinchMatrix(ForceMatrix))
520 {
521 // set the angular velocity at the tip to be 1.
522 Normalize();
523 }
524
525
526 // Specialized override that should give the same result, but be faster.
527 FVector3d Evaluate(const FVector3d& Pos) const
528 {
529
530 // compute the regularized distance
531
532 // normalized on the regularization size.
533 const FVector3d NPos = Pos / E;
534 const double R2 = NPos.SquaredLength();
535 const double D2 = 1. + R2;
536 const double D = FMath::Sqrt(D2);
537 const double D3 = D2 * D;
538 const double D5 = D3 * D2;
539
540 const FVector3d Fr = F * NPos;
541 const double rtFr = NPos.Dot(Fr);
542
543 const FVector3d Term1 = ((2. * bhat - 1.) / D3 - (3. / 2.) / D5) * Fr;
544 const FVector3d Term2 = -(3. * bhat * rtFr / D5) * NPos;
545
546 // result = (Term1 + Term2 ) / E2
547 // divide the a out with the normalization
548 // return E * c * a* (Term1 + Term2);
549 return E * c * (Term1 + Term2);
550 }
551
552
553private:
554
555 // Convert a source matrix to a symmetric matrix with zero trace.wh
556 FMatrix3d PinchMatrix(const FMatrix3d& Mat)
557 {
558 double Trace = Mat.Trace();
559
560 // Symmetric matrix with zero trace
561 return 0.5 * (Mat + Mat.Transpose()) - (Trace / 3.0) * FMatrix3d::Identity();
562 }
563
564 void Normalize()
565 {
566 // the jacobian of 'Evaluate()' is
567 // du_i/dx_j = 1/(E3)(4b -5a) F_{i,j}
568 // we use the same normalization as Fernado - just set this to F
569 //c = 1. / ( a (4. * bhat - 5. )) ;
570 c = 1. / (4. * bhat - 5.);
571 }
572
573 double c; // calibration
574 // Force Matrix
575 FMatrix3d F;
576};
577
578// Note: this one doesn't care about a, b since we have scaled the divergence.
579class FScaleKelvinlet : public TBaseKelvinlet < FScaleKelvinlet>
580{
581public:
582 typedef TBaseKelvinlet < FScaleKelvinlet> MyBase;
583
584 FScaleKelvinlet(const double Scale, const double Size, const double ShearModulus, const double PoissonRatio)
586 S(Scale)
587 {
588 }
589
590
591 // Specialized override that should give the same result, but be faster.
592 // note: <r | F r> = 0 and F.Trace() = 0 for the skewsymmetric cross product matrix.
593 FVector3d Evaluate(const FVector3d& Pos) const
594 {
595
596 // compute the regularized distance
597
598 // normalized on the regularization size.
599 const FVector3d NPos = Pos / E;
600 const double R2 = NPos.SquaredLength();
601 const double D2 = 1. + R2;
602 const double D = FMath::Sqrt(D2);
603 const double D3 = D2 * D;
604 const double D5 = D3 * D2;
605
606 // Note, if normalized this could just be written as
607 // ( 2 * E3 / 15 ) * ( 1.0d / RE3 + 1.5 * E2 / RE5) * Pos;
608
609 // double Divergence = 3 * (5 / 2) * (2. * b -a ) / E3
610
611 // return (1./Divergence) * (2. * b - a) * ( S / E2 ) * (1.0 / D3 + 1.5 / D5) * NPos;
612
613 return S * E * (2. / 15.) * (1.0 / D3 + 1.5 / D5) * NPos;
614
615 }
616
617 double Divergence(const FVector3d& Pos) const
618 {
619 const FVector3d NPos = Pos / E;
620 const double D2 = 1. + NPos.SquaredLength();
621 const double D = FMath::Sqrt(D2);
622
623 return S * E / (D2 * D2 * D2 * D);
624
625 }
626
627 // Scale
628 double S;
629
630
631};
632
633template <typename BrushTypeA, typename BrushTypeB>
634class TBlendPairedKelvinlet : public TKelvinletIntegrator < TBlendPairedKelvinlet <BrushTypeA, BrushTypeB> >
635{
636public:
638 ABrush(BrushA),
640 {
641 Alpha = FMath::Clamp(StrengthA, 0., 1.);
642 }
643
644 FVector3d Evaluate(const FVector3d& Pos) const
645 {
646 return Alpha * ABrush.Evaluate(Pos) + (1. - Alpha) * BBrush.Evaluate(Pos);
647 }
648
649 double Divergence(const FVector3d& Pos) const
650 {
651 return Alpha * ABrush.Divergence(Pos) + (1. - Alpha) * BBrush.Divergence(Pos);
652 }
653
654protected:
657 double Alpha;
658};
659
664
665
666} // end namespace UE::Geometry
667} // end namespace UE
#define checkSlow(expr)
Definition AssertionMacros.h:332
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define PI
Definition UnrealMathUtility.h:65
uint32 Size
Definition VulkanMemory.cpp:4034
Definition Kelvinlets.h:400
FAffineKelvinlet(const FMatrix3d &ForceMatrix, const double Size, const double ShearModulus, const double PoissonRatio)
Definition Kelvinlets.h:404
double E2
Definition Kelvinlets.h:450
FMatrix3d F
Definition Kelvinlets.h:445
void UpdateForce(const FMatrix3d &NF)
Definition Kelvinlets.h:412
TBaseKelvinlet< FAffineKelvinlet > MyBase
Definition Kelvinlets.h:402
FVector3d Evaluate(const FVector3d &Pos) const
Definition Kelvinlets.h:418
FMatrix3d SymF
Definition Kelvinlets.h:448
Definition Kelvinlets.h:200
FVector3d F
Definition Kelvinlets.h:256
TBaseKelvinlet< FBiLaplacianPullKelvinlet > MyBase
Definition Kelvinlets.h:202
double Divergence(const FVector3d &Pos) const
Definition Kelvinlets.h:242
FVector3d Evaluate(const FVector3d &Pos) const
Definition Kelvinlets.h:217
FBiLaplacianPullKelvinlet(const FVector3d &Force, const double Size, const double ShearModulus, const double PoissonRatio)
Definition Kelvinlets.h:204
Definition Kelvinlets.h:138
FVector3d Evaluate(const FVector3d &Pos) const
Definition Kelvinlets.h:154
FVector3d F
Definition Kelvinlets.h:192
TBaseKelvinlet< FLaplacianPullKelvinlet > MyBase
Definition Kelvinlets.h:140
FLaplacianPullKelvinlet(const FVector3d &Force, const double Size, const double ShearModulus, const double PoissonRatio)
Definition Kelvinlets.h:143
double Divergence(const FVector3d &Pos) const
Definition Kelvinlets.h:179
Definition Kelvinlets.h:513
TBaseKelvinlet< FPinchKelvinlet > MyBase
Definition Kelvinlets.h:515
FPinchKelvinlet(const FMatrix3d &ForceMatrix, const double Size, const double ShearModulus, const double PoissonRatio)
Definition Kelvinlets.h:517
FVector3d Evaluate(const FVector3d &Pos) const
Definition Kelvinlets.h:527
Definition Kelvinlets.h:76
FPullKelvinlet(const FVector3d &Force, const double Size, const double ShearModulus, const double PoissonRatio)
Definition Kelvinlets.h:82
FVector3d Evaluate(const FVector3d &Pos) const
Definition Kelvinlets.h:99
double Divergence(const FVector3d &Pos) const
Definition Kelvinlets.h:116
TBaseKelvinlet< FPullKelvinlet > MyBase
Definition Kelvinlets.h:78
Definition Kelvinlets.h:580
TBaseKelvinlet< FScaleKelvinlet > MyBase
Definition Kelvinlets.h:582
FScaleKelvinlet(const double Scale, const double Size, const double ShearModulus, const double PoissonRatio)
Definition Kelvinlets.h:584
double Divergence(const FVector3d &Pos) const
Definition Kelvinlets.h:617
FVector3d Evaluate(const FVector3d &Pos) const
Definition Kelvinlets.h:593
double S
Definition Kelvinlets.h:628
FVector3d F
Definition Kelvinlets.h:388
FVector3d Evaluate(const FVector3d &Pos) const
Definition Kelvinlets.h:347
double Divergence(const FVector3d &Pos) const
Definition Kelvinlets.h:383
TBaseKelvinlet< FSharpBiLaplacianPullKelvinlet > MyBase
Definition Kelvinlets.h:332
FSharpBiLaplacianPullKelvinlet(const FVector3d &Force, const double Size, const double ShearModulus, const double PoissonRatio)
Definition Kelvinlets.h:334
FVector3d Evaluate(const FVector3d &Pos) const
Definition Kelvinlets.h:285
FSharpLaplacianPullKelvinlet(const FVector3d &Force, const double Size, const double ShearModulus, const double PoissonRatio)
Definition Kelvinlets.h:272
double Divergence(const FVector3d &Pos) const
Definition Kelvinlets.h:316
TBaseKelvinlet< FSharpLaplacianPullKelvinlet > MyBase
Definition Kelvinlets.h:270
FVector3d F
Definition Kelvinlets.h:321
Definition Kelvinlets.h:455
TBaseKelvinlet< FTwistKelvinlet > MyBase
Definition Kelvinlets.h:457
FVector3d Evaluate(const FVector3d &Pos) const
Definition Kelvinlets.h:473
FMatrix3d F
Definition Kelvinlets.h:508
FTwistKelvinlet(const FVector3d &Twist, const double Size, const double ShearModulus, const double PoissonRatio)
Definition Kelvinlets.h:459
double Divergence(const FVector3d &Pos) const
Definition Kelvinlets.h:500
FTwistKelvinlet(const FTwistKelvinlet &Other)
Definition Kelvinlets.h:465
Definition Kelvinlets.h:37
void UpdateRegularization(const double R)
Definition Kelvinlets.h:58
TBaseKelvinlet(const double Size, const double ShearModulus, const double PoissonRatio)
Definition Kelvinlets.h:40
double E
Definition Kelvinlets.h:66
void SetMaterialParameters(const double ShearModulus, const double PoissonRatio)
Definition Kelvinlets.h:50
double a
Definition Kelvinlets.h:68
double bhat
Definition Kelvinlets.h:70
Definition Kelvinlets.h:635
BrushTypeA ABrush
Definition Kelvinlets.h:655
BrushTypeB BBrush
Definition Kelvinlets.h:656
FVector3d Evaluate(const FVector3d &Pos) const
Definition Kelvinlets.h:644
double Divergence(const FVector3d &Pos) const
Definition Kelvinlets.h:649
double Alpha
Definition Kelvinlets.h:657
TBlendPairedKelvinlet(const BrushTypeA &BrushA, const BrushTypeB &BrushB, double StrengthA)
Definition Kelvinlets.h:637
Definition Kelvinlets.h:17
FVector3d IntegrateRK3(const FVector3d &Pos, double dt) const
Definition Kelvinlets.h:23
FVector3d Evaluate(const FVector3d &Pos) const
TBlendPairedKelvinlet< FBiLaplacianPullKelvinlet, FLaplacianPullKelvinlet > FBlendPullKelvinlet
Definition Kelvinlets.h:662
TMatrix3< double > FMatrix3d
Definition MatrixTypes.h:510
TBlendPairedKelvinlet< FTwistKelvinlet, FLaplacianPullKelvinlet > FLaplacianTwistPullKelvinlet
Definition Kelvinlets.h:660
TBlendPairedKelvinlet< FSharpBiLaplacianPullKelvinlet, FSharpLaplacianPullKelvinlet > FBlendPullSharpKelvinlet
Definition Kelvinlets.h:663
TBlendPairedKelvinlet< FTwistKelvinlet, FBiLaplacianPullKelvinlet > FBiLaplacianTwistPullKelvinlet
Definition Kelvinlets.h:661
Definition AdvancedWidgetsModule.cpp:13
static constexpr UE_FORCEINLINE_HINT T Clamp(const T X, const T MinValue, const T MaxValue)
Definition UnrealMathUtility.h:592
RealType Trace() const
Definition MatrixTypes.h:172
static TMatrix3< double > Identity()
Definition MatrixTypes.h:86
TMatrix3< RealType > Transpose() const
Definition MatrixTypes.h:207
T SquaredLength() const
Definition Vector.h:1734
UE_FORCEINLINE_HINT T Dot(const TVector< T > &V) const
Definition Vector.h:1553