mequation.c File Reference Detailed DescriptionImplementation of the matrix equation operations.
Definition in file mequation.c.
Function Documentation
Recomputes the scalar equations derived from a metrix one taking into account the used dof.
Definition at line 30 of file mequation.c. References AXIS_H, AXIS_X, AXIS_Y, AXIS_Z, TMequation::c, HasCtRotTransSeq(), TMequation::n, TMequation::neq, TMequation::r, RX, RY, RZ, TRUE, TMequation::ts, TX, TY, TZ, and UpdateUsedDOF(). Referenced by AddCtTrans2MEquation(), AddPatchTrans2MEquation(), AddTransSeq2MEquation(), AddVarTrans2MEquation(), InitMEquation(), and SimplifyMEquation().
Initializes a matrix equation Id=Id
Definition at line 99 of file mequation.c. References AddCtTrans2TransSeq(), FALSE, HTransformIdentity(), InitTransSeq(), TMequation::n, TMequation::neq, NEW, RecomputeScalarEquations(), TMequation::rhs, TMequation::simp, and TMequation::ts. Referenced by GenerateMEquationFromBranch().
Copies one matix equation into another.
Definition at line 113 of file mequation.c. References TMequation::c, CopyTransSeq(), HTransformCopy(), TMequation::n, TMequation::neq, NEW, TMequation::r, TMequation::rhs, TMequation::simp, and TMequation::ts. Referenced by AddMatrixEquation(), and CopyEquations().
Resets the information stored in the matrix equation so that it can be re-used without delete/init.
Definition at line 134 of file mequation.c. References Error(), FALSE, HTransformIdentity(), TMequation::n, TMequation::neq, ResetTransSeq(), TMequation::rhs, TMequation::simp, and TMequation::ts.
Identifies empty matrix equations.
Definition at line 145 of file mequation.c. References TMequation::neq.
Size of the matrix equation where the size is considered as the lenght of the largest tranform sequence included in the matrix equation.
Definition at line 150 of file mequation.c. References TMequation::n, TransSeqSize(), and TMequation::ts.
Cheks if a matrix equation includes rotations.
Definition at line 163 of file mequation.c. References TMequation::n, RX, RY, RZ, TMequation::ts, and UpdateUsedDOF(). Referenced by AddMatrixEquation().
Modifies a matrix equation so that only their translation part is taken into consideration when evaluating them.
Definition at line 174 of file mequation.c. References AXIS_H, TMequation::c, Error(), TMequation::neq, TMequation::r, TMequation::simp, and TRUE.
Checks if the matrix equation includes a given variable.
Definition at line 191 of file mequation.c. References FALSE, TMequation::ts, and VarIncludedinTransSeq(). Referenced by RemoveEquationsWithVar(), UsedVarInEquations(), and UsedVarInNonDummyEquations().
Adds a variable transform that represents a scaled displacement along a vector.
Definition at line 206 of file mequation.c. References AddDispTrans2TransSeq(), and TMequation::ts.
Adds a variable transform at the end of a matrix equation.
Definition at line 212 of file mequation.c. References AddVarTrans2TransSeq(), Error(), TMequation::n, RecomputeScalarEquations(), TMequation::simp, and TMequation::ts.
Adds a Parametrized-Patch transform to a matrix equation.
Definition at line 224 of file mequation.c. References AddPatchTrans2TransSeq(), Error(), TMequation::n, RecomputeScalarEquations(), TMequation::simp, and TMequation::ts.
Adds a constant transform at the end of a matrix equation. Note that identity transforms or matrices that result in identity transforms when added at the end of the sequence are skipped.
Definition at line 238 of file mequation.c. References AddCtTrans2TransSeq(), Error(), TMequation::n, RecomputeScalarEquations(), TMequation::simp, and TMequation::ts.
Concatenates a transform sequence to the matrix equation.
Definition at line 250 of file mequation.c. References AddTrans2TransSeq(), DeleteTrans(), Error(), GetElementFromTransSeq(), TMequation::n, RecomputeScalarEquations(), TMequation::simp, TransInvert(), TransSeqSize(), and TMequation::ts. Referenced by GenerateMEquationFromBranch().
Number of scaler equations defined by a matrix equation.
Definition at line 283 of file mequation.c. References TMequation::neq. Referenced by AddMatrixEquation().
After removing a variable not used in the system we have to shift down the indices of the variables with larger index than the removed one.
Definition at line 288 of file mequation.c. References TMequation::n, ShiftVariablesInTransSeq(), and TMequation::ts. Referenced by RemoveEquationsWithVar().
Replaces a variable by a constant value. Used when simplifying problems.
Definition at line 296 of file mequation.c. References DeleteTransSeq(), FALSE, FixVarInTransSeq(), HTransformDelete(), HTransformIsZero(), HTransformSubstract(), TMequation::n, NEW, TMequation::rhs, TMequation::simp, SimplifyMEquation(), and TMequation::ts. Referenced by ReplaceVariableInEquations().
Replaces a variable by another variable. Used when simplifying problems.
Definition at line 345 of file mequation.c. References TMequation::n, ReplaceVarInTransSeq(), and TMequation::ts. Referenced by ReplaceVariableInEquations().
Identifies simplified equations. The simplification is the last step in the definition of a matrix equation. Only simplified equations can be added to cuiksystem.
Definition at line 353 of file mequation.c. References TMequation::simp. Referenced by AddMatrixEquation2CS().
Performs operations in order to simplify the computations with the matrix equation. This should only be used when the matrix equation is fully defined. If new terms are added to the matrix equatoin after the simplification, the equation might become inconsistent. Right now we only simplify single transforms sequence equated to the identity. Other simplifications might be possible (i,e, move to the right hand side constant terms in the sum of matrix expressions). Howerver these cases are less frequent and, thus we do not consider them.
Definition at line 358 of file mequation.c. References Error(), TMequation::n, TMequation::neq, RecomputeScalarEquations(), TMequation::simp, SimplifyTransSeq(), TRUE, and TMequation::ts. Referenced by FixVarInMEquation(), and GenerateMEquationFromBranch().
Derives a matrix equation. This results in one or more matrix product sequences equated to zero.
Definition at line 371 of file mequation.c. References TMequation::c, DeriveTransSeq(), Error(), HTransformZero(), MEM_EXPAND, TMequation::n, TMequation::neq, NEW, TMequation::r, TMequation::rhs, TMequation::simp, TRUE, and TMequation::ts. Referenced by DeriveEqualityEquations().
Evaluates a matrix equation and stores the result on a given array. Note that the result only includes values for the scalar equations derived from the matrix equation.
Definition at line 415 of file mequation.c. References TMequation::c, EvaluateTransSeq(), HTransformDelete(), HTransformGetElement(), TMequation::n, TMequation::neq, TMequation::r, TMequation::rhs, and TMequation::ts. Referenced by EvaluateEqualityEquations(), EvaluateEqualitySparseEquations(), EvaluateSubSetEqualityEquations(), and EvaluateSubSetEqualitySparseEquations().
Evalutes a matrix equation and returns the result of muliplying the resulting matrix with a set of 3D vectors. See EvaluateJacobianXVectors why this is useful at all.
Definition at line 437 of file mequation.c. References AccumulateVector(), EvaluateTransSeq(), HTransformApply(), HTransformDelete(), TMequation::n, TMequation::neq, and TMequation::ts. Referenced by EvaluateEquationsXVectors().
Prints a Transform sequence to a file.
Definition at line 473 of file mequation.c. References HTransformIsIdentity(), TMequation::n, PrintTransSeq(), TMequation::rhs, and TMequation::ts. Referenced by PrintEquations().
Releases the memeory stored by a matrix equation.
Definition at line 492 of file mequation.c. References DeleteTransSeq(), HTransformDelete(), TMequation::n, TMequation::rhs, and TMequation::ts. Referenced by DeleteEquations(), DeriveEqualityEquations(), GenerateEquationsFromBranch(), and GenerateWorldEquations(). |
Follow us!