16 template <
typename T,
typename ParticleType>
56 :
GSBase(
InParticles,
InMesh,
EMeshArray,
NuMeshArray,
MoveTemp(
AlphaJMeshArray),
MoveTemp(
IncidentElementsIn),
MoveTemp(
IncidentElementsLocalIn),
ParticleStartIndexIn,
ParticleEndIndexIn,
bDoQuasistaticsIn,
bDoSORIn,
InOmegaSOR,
InParams,
NuMesh,
bRecordMetricIn)
71 ComputeHessianHelper = [](
const Chaos::PMatrix<T, 3, 3>&
Fe,
const Chaos::PMatrix<T, 3, 3>&
DmInv,
const T
mu,
const T
lambda,
const int32 local_index,
const T
Coeff,
Chaos::PMatrix<T, 3, 3>&
final_hessian)
75 JFinvT.SetAt(0, 0,
Fe.GetAt(1, 1) *
Fe.GetAt(2, 2) -
Fe.GetAt(2, 1) *
Fe.GetAt(1, 2));
76 JFinvT.SetAt(0, 1,
Fe.GetAt(2, 0) *
Fe.GetAt(1, 2) -
Fe.GetAt(1, 0) *
Fe.GetAt(2, 2));
77 JFinvT.SetAt(0, 2,
Fe.GetAt(1, 0) *
Fe.GetAt(2, 1) -
Fe.GetAt(2, 0) *
Fe.GetAt(1, 1));
78 JFinvT.SetAt(1, 0,
Fe.GetAt(2, 1) *
Fe.GetAt(0, 2) -
Fe.GetAt(0, 1) *
Fe.GetAt(2, 2));
79 JFinvT.SetAt(1, 1,
Fe.GetAt(0, 0) *
Fe.GetAt(2, 2) -
Fe.GetAt(2, 0) *
Fe.GetAt(0, 2));
80 JFinvT.SetAt(1, 2,
Fe.GetAt(2, 0) *
Fe.GetAt(0, 1) -
Fe.GetAt(0, 0) *
Fe.GetAt(2, 1));
81 JFinvT.SetAt(2, 0,
Fe.GetAt(0, 1) *
Fe.GetAt(1, 2) -
Fe.GetAt(1, 1) *
Fe.GetAt(0, 2));
82 JFinvT.SetAt(2, 1,
Fe.GetAt(1, 0) *
Fe.GetAt(0, 2) -
Fe.GetAt(0, 0) *
Fe.GetAt(1, 2));
83 JFinvT.SetAt(2, 2,
Fe.GetAt(0, 0) *
Fe.GetAt(1, 1) -
Fe.GetAt(1, 0) *
Fe.GetAt(0, 1));
89 for (
int32 nu = 0; nu < 3; nu++) {
91 for (
int32 k = 0; k < 3; k++) {
96 for (
int32 alpha = 0; alpha < 3; alpha++) {
102 for (
int32 alpha = 0; alpha < 3; alpha++) {
103 for (
int32 k = 0; k < 3; k++) {
107 for (
int32 alpha = 0; alpha < 3; alpha++)
115 for (
int32 nu = 0; nu < 3; nu++)
119 for (
int32 alpha = 0; alpha < 3; alpha++)
126 for (
int32 alpha = 0; alpha < 3; alpha++) {
129 for (
int32 alpha = 0; alpha < 3; alpha++)
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition GaussSeidelCorotatedConstraints.h:18
TArray< int32 > Particle2Incident
Definition GaussSeidelCorotatedConstraints.h:388
int32 ParticleStartIndex
Definition GaussSeidelCorotatedConstraints.h:393
TFunction< void(const Chaos::PMatrix< T, 3, 3 > &, const Chaos::PMatrix< T, 3, 3 > &, const T, const T, const int32, const T, Chaos::PMatrix< T, 3, 3 > &)> ComputeHessianHelper
Definition GaussSeidelCorotatedConstraints.h:404
TFunction< void(const Chaos::PMatrix< T, 3, 3 > &, const T, const T, Chaos::PMatrix< T, 3, 3 > &)> ComputeStress
Definition GaussSeidelCorotatedConstraints.h:403
T LocalNewtonTol
Definition GaussSeidelCorotatedConstraints.h:391
TArray< TArray< int32 > > IncidentElements
Definition GaussSeidelCorotatedConstraints.h:389
TArray< TArray< int32 > > ParticlesPerColor
Definition GaussSeidelCorotatedConstraints.h:392
bool bDoQuasistatics
Definition GaussSeidelCorotatedConstraints.h:398
TArray< TArray< int32 > > IncidentElementsLocal
Definition GaussSeidelCorotatedConstraints.h:390
Definition GaussSeidelNeohookeanConstraints.h:18
virtual ~FGaussSeidelNeohookeanConstraints()
Definition GaussSeidelNeohookeanConstraints.h:61
FGaussSeidelNeohookeanConstraints(const ParticleType &InParticles, const TArray< TVector< int32, 4 > > &InMesh, const TArray< T > &EMeshArray, const TArray< T > &NuMeshArray, TArray< T > &&AlphaJMeshArray, TArray< TArray< int32 > > &&IncidentElementsIn, TArray< TArray< int32 > > &&IncidentElementsLocalIn, const int32 ParticleStartIndexIn, const int32 ParticleEndIndexIn, const bool bDoQuasistaticsIn=false, const bool bDoSORIn=true, const T InOmegaSOR=(T) 1.6, const FDeformableXPBDCorotatedParams &InParams=FDeformableXPBDCorotatedParams(), const T &NuMesh=(T).3, const bool bRecordMetricIn=false)
Definition GaussSeidelNeohookeanConstraints.h:39
void InitializeNeohookeanLambdas()
Definition GaussSeidelNeohookeanConstraints.h:65
Definition XPBDCorotatedConstraints.h:20
TArray< T > LambdaArray
Definition XPBDCorotatedConstraints.h:637
TArray< TVector< int32, 4 > > MeshConstraints
Definition XPBDCorotatedConstraints.h:654
TArray< T > Measure
Definition XPBDCorotatedConstraints.h:655
FDeformableXPBDCorotatedParams CorotatedParams
Definition XPBDCorotatedConstraints.h:641
TArray< T > DmInverse
Definition XPBDCorotatedConstraints.h:638
TArray< T > MuElementArray
Definition XPBDCorotatedConstraints.h:646
TArray< T > LambdaElementArray
Definition XPBDCorotatedConstraints.h:647
Definition CollectionEmbeddedSpringConstraintFacade.cpp:6
void PNeohookeanMM(const Chaos::PMatrix< T, 3, 3 > &Fe, const T mu, const T lambda, Chaos::PMatrix< T, 3, 3 > &P)
Definition NeohookeanModel.cpp:22