ViscousPenaltyConstMatrixCartesian* ViscousPenaltyConstMatrixCartesian_New( Name name, StiffnessMatrix* stiffnessMatrix, Swarm* swarm, Dimension_Index dim, FiniteElementContext* context, double incompressibility_Penalty, Bool viscosityWeighting ) { ViscousPenaltyConstMatrixCartesian* self = (ViscousPenaltyConstMatrixCartesian*) _ViscousPenaltyConstMatrixCartesian_DefaultNew( name ); _StiffnessMatrixTerm_Init( self, context, stiffnessMatrix, swarm, NULL ); _ConstitutiveMatrix_Init( (ConstitutiveMatrix*)self, dim, False, True ); _ViscousPenaltyConstMatrixCartesian_Init( self, incompressibility_Penalty, viscosityWeighting ); self->isConstructed = True; return self; }
ViscousPenaltyConstMatrixCartesian* ViscousPenaltyConstMatrixCartesian_New( Name name, StiffnessMatrix* stiffnessMatrix, Swarm* swarm, Dimension_Index dim, FiniteElementContext* context, Materials_Register* materials_Register, double incompressibility_Penalty, Bool viscosityWeighting ) { ViscousPenaltyConstMatrixCartesian* self = (ViscousPenaltyConstMatrixCartesian*) _ViscousPenaltyConstMatrixCartesian_DefaultNew( name ); _StiffnessMatrixTerm_Init( self, context, stiffnessMatrix, swarm, NULL ); #ifndef PDE _ConstitutiveMatrix_Init( (ConstitutiveMatrix*)self, dim, False, True ); #else /* PDE_Rework compatibility hack */ ConstitutiveMatrix_InitAll( (ConstitutiveMatrix*)self, swarm, dim, NULL, materials_Register, NULL ); #endif _ViscousPenaltyConstMatrixCartesian_Init( self, incompressibility_Penalty, viscosityWeighting ); self->isConstructed = True; return self; }