Exemple #1
0
 /// Copy constructor
 public ChConstraintTwo(ChConstraintTwo other) : base(other)
 {
     variables_a = other.variables_a;
     variables_b = other.variables_b;
 }
Exemple #2
0
        /// Construct and immediately set references to variables
        public ChConstraintThreeGeneric(ChVariables mvariables_a, ChVariables mvariables_b, ChVariables mvariables_c)
        {
            // Cq_a = null; Cq_b = null; Cq_c = null; Eq_a = null; Eq_b = null; Eq_c = null;

            SetVariables(mvariables_a, mvariables_b, mvariables_c);
        }
Exemple #3
0
        protected ChVariables variables_b;  //< The second constrained object


        /// Default constructor
        public ChConstraintTwo()
        {
            variables_a = null;
            variables_b = null;
        }
Exemple #4
0
 /// Set references to the constrained objects, each of ChVariables type,
 /// automatically creating/resizing jacobians if needed.
 public abstract void SetVariables(ChVariables mvariables_a, ChVariables mvariables_b, ChVariables mvariables_c);
Exemple #5
0
        /// Set references to the constrained objects, each of ChVariables type,
        /// automatically creating/resizing jacobians if needed.
        public override void SetVariables(ChVariables mvariables_a, ChVariables mvariables_b, ChVariables mvariables_c)
        {
            if (mvariables_a == null || mvariables_b == null || mvariables_c == null)
            {
                SetValid(false);
                return;
            }

            SetValid(true);
            variables_a = mvariables_a;
            variables_b = mvariables_b;
            variables_c = mvariables_c;

            if (variables_a.Get_ndof() != 0)
            {
                //if (Cq_a == null)
                //     Cq_a = new ChMatrixDynamic<double>(1, variables_a.Get_ndof());
                // else
                Cq_a.Resize(1, variables_a.Get_ndof());

                //if (Eq_a == null)
                //    Eq_a = new ChMatrixDynamic<double>(variables_a.Get_ndof(), 1);
                //else
                Eq_a.Resize(variables_a.Get_ndof(), 1);
            }
            else
            {
                /* if (Cq_a != null)
                 *   Cq_a = null;
                 * Cq_a = null;
                 * if (Eq_a != null)
                 *   Eq_a = null;
                 * Eq_a = null;*/
            }

            if (variables_b.Get_ndof() != 0)
            {
                // if (Cq_b == null)
                //     Cq_b = new ChMatrixDynamic<double>(1, variables_b.Get_ndof());
                // else
                Cq_b.Resize(1, variables_b.Get_ndof());

                // if (Eq_b != null)
                //   Eq_b = new ChMatrixDynamic<double>(variables_b.Get_ndof(), 1);
                // else
                Eq_b.Resize(variables_b.Get_ndof(), 1);
            }
            else
            {
                /* if (Cq_b != null)
                 *   Cq_b = null;
                 * Cq_b = null;
                 * if (Eq_b == null)
                 *   Eq_b = null;
                 * Eq_b = null;*/
            }

            if (variables_c.Get_ndof() != 0)
            {
                //if (Cq_c == null)
                //     Cq_c = new ChMatrixDynamic<double>(1, variables_c.Get_ndof());
                // else
                Cq_c.Resize(1, variables_c.Get_ndof());

                //if (Eq_c == null)
                //    Eq_c = new ChMatrixDynamic<double>(variables_c.Get_ndof(), 1);
                // else
                Eq_c.Resize(variables_c.Get_ndof(), 1);
            }
            else
            {
                /*  if (Cq_c != null)
                 *    Cq_c = null;
                 * Cq_c = null;
                 * if (Eq_c == null)
                 *    Eq_c = null;
                 * Eq_c = null;*/
            }
        }
Exemple #6
0
 /// Copy constructor
 public ChConstraintThree(ChConstraintThree other)
 {
     variables_a = other.variables_a;
     variables_b = other.variables_b;
     variables_c = other.variables_c;
 }
Exemple #7
0
        protected ChVariables variables_c;  //< The third constrained object


        /// Default constructor
        public ChConstraintThree()
        {
            variables_a = null;
            variables_b = null;
            variables_c = null;
        }
Exemple #8
0
 /// Copy constructor
 public ChConstraintTuple_1vars(ChConstraintTuple_1vars <T> other)
 {
     variables = other.variables;
     Cq        = other.Cq;
     Eq        = other.Eq;
 }
Exemple #9
0
 /// Default constructor
 public ChConstraintTuple_1vars()
 {
     variables = null;
 }
Exemple #10
0
 /// Default constructor
 public ChConstraintTuple_3vars()
 {
     variables_1 = null;
     variables_2 = null;
     variables_3 = null;
 }