public double[] GetShapeFunctionsForNode(Element element, EmbeddedNode node) { double[,] elementCoordinates = GetCoordinatesTranspose(element); var shapeFunctions = CalcQ4Shape(node.Coordinates[0], node.Coordinates[1]); var ShapeFunctionDerivatives = CalcQ4ShapeFunctionDerivatives(node.Coordinates[0], node.Coordinates[1]); var jacobian = CalcQ4J(elementCoordinates, ShapeFunctionDerivatives, node.Coordinates[0], node.Coordinates[1]); return(new double[] { shapeFunctions[0], shapeFunctions[1], shapeFunctions[2], shapeFunctions[3], ShapeFunctionDerivatives[0], ShapeFunctionDerivatives[1], ShapeFunctionDerivatives[2], ShapeFunctionDerivatives[3], ShapeFunctionDerivatives[4], ShapeFunctionDerivatives[5], ShapeFunctionDerivatives[6], ShapeFunctionDerivatives[7], jacobian[0, 0], jacobian[0, 1], jacobian[1, 0], jacobian[1, 1] }); //double[] coords = GetNaturalCoordinates(element, node); //return CalcH8Shape(coords[0], coords[1], coords[2]); //double fXiP = (1.0 + coords[0]) * 0.5; //double fEtaP = (1.0 + coords[1]) * 0.5; //double fZetaP = (1.0 + coords[2]) * 0.5; //double fXiM = (1.0 - coords[0]) * 0.5; //double fEtaM = (1.0 - coords[1]) * 0.5; //double fZetaM = (1.0 - coords[2]) * 0.5; //return new double[] { fXiM * fEtaM * fZetaM, // fXiP * fEtaM * fZetaM, // fXiP * fEtaP * fZetaM, // fXiM * fEtaP * fZetaM, // fXiM * fEtaM * fZetaP, // fXiP * fEtaM * fZetaP, // fXiP * fEtaP * fZetaP, // fXiM * fEtaP * fZetaP }; }
public double[] GetShapeFunctionsForNode(Element element, EmbeddedNode node) { double[,] elementCoordinates = GetCoordinatesTranspose(element); var shapeFunctions = CalcH8Shape(node.Coordinates[0], node.Coordinates[1], node.Coordinates[2]); var nablaShapeFunctions = CalcH8NablaShape(node.Coordinates[0], node.Coordinates[1], node.Coordinates[2]); var jacobian = CalcH8JDetJ(elementCoordinates, nablaShapeFunctions); return(new double[] { shapeFunctions[0], shapeFunctions[1], shapeFunctions[2], shapeFunctions[3], shapeFunctions[4], shapeFunctions[5], shapeFunctions[6], shapeFunctions[7], nablaShapeFunctions[0], nablaShapeFunctions[1], nablaShapeFunctions[2], nablaShapeFunctions[3], nablaShapeFunctions[4], nablaShapeFunctions[5], nablaShapeFunctions[6], nablaShapeFunctions[7], nablaShapeFunctions[8], nablaShapeFunctions[9], nablaShapeFunctions[10], nablaShapeFunctions[11], nablaShapeFunctions[12], nablaShapeFunctions[13], nablaShapeFunctions[14], nablaShapeFunctions[15], nablaShapeFunctions[16], nablaShapeFunctions[17], nablaShapeFunctions[18], nablaShapeFunctions[19], nablaShapeFunctions[20], nablaShapeFunctions[21], nablaShapeFunctions[22], nablaShapeFunctions[23], jacobian.Item1[0, 0], jacobian.Item1[0, 1], jacobian.Item1[0, 2], jacobian.Item1[1, 0], jacobian.Item1[1, 1], jacobian.Item1[1, 2], jacobian.Item1[2, 0], jacobian.Item1[2, 1], jacobian.Item1[2, 2], jacobian.Item2[0, 0], jacobian.Item2[0, 1], jacobian.Item2[0, 2], jacobian.Item2[1, 0], jacobian.Item2[1, 1], jacobian.Item2[1, 2], jacobian.Item2[2, 0], jacobian.Item2[2, 1], jacobian.Item2[2, 2] }); }
public EmbeddedNode BuildHostElementEmbeddedNode(Element element, Node node, IEmbeddedDOFInHostTransformationVector transformationVector) { var points = GetNaturalCoordinates(element, node); if (points.Length == 0) { return(null); } element.EmbeddedNodes.Add(node); var embeddedNode = new EmbeddedNode(node, element, transformationVector.GetDependentDOFTypes); for (int i = 0; i < points.Length; i++) { embeddedNode.Coordinates.Add(points[i]); } return(embeddedNode); }
public EmbeddedNode BuildHostElementEmbeddedNode(Element element, Node node, IEmbeddedDOFInHostTransformationVector transformationVector) { IInverseInterpolation2D inverseInterpolation = Interpolation.CreateInverseMappingFor(Nodes); double[] naturalCoordinates = inverseInterpolation.TransformPointCartesianToNatural(new CartesianPoint(node.X, node.Y)).Coordinates; if (naturalCoordinates.Length == 0) { return(null); } element.EmbeddedNodes.Add(node); var embeddedNode = new EmbeddedNode(node, element, transformationVector.GetDependentDOFTypes); for (int i = 0; i < naturalCoordinates.Length; i++) { embeddedNode.Coordinates.Add(naturalCoordinates[i]); } return(embeddedNode); }
public double[] GetShapeFunctionsForNode(Element element, EmbeddedNode node) { return(Interpolation.EvaluateFunctionsAt(new NaturalPoint(node.Coordinates[0], node.Coordinates[1]))); //TODO: This method originally returned an array containing the shape functions, shape function derivatives and entries of the inverse jacobian matrix. // a) This is retarded and extremely difficult to work with. b) This array is used in Hexa8TranslationAndRotationTransformationVector. Cohesive embedding // and regular embedding in thermal elements only need the shape functions, so we will return these for now. //double[,] elementCoordinates = GetCoordinatesTranspose(element); //var shapeFunctions = CalcH8Shape(node.Coordinates[0], node.Coordinates[1], node.Coordinates[2]); //var nablaShapeFunctions = CalcH8NablaShape(node.Coordinates[0], node.Coordinates[1], node.Coordinates[2]); //var jacobian = CalcH8JDetJ(elementCoordinates, nablaShapeFunctions); //return new double[] //{ // shapeFunctions[0], shapeFunctions[1], shapeFunctions[2], shapeFunctions[3], shapeFunctions[4], shapeFunctions[5], shapeFunctions[6], shapeFunctions[7], // nablaShapeFunctions[0], nablaShapeFunctions[1], nablaShapeFunctions[2], nablaShapeFunctions[3], nablaShapeFunctions[4], nablaShapeFunctions[5], nablaShapeFunctions[6], nablaShapeFunctions[7], // nablaShapeFunctions[8], nablaShapeFunctions[9], nablaShapeFunctions[10], nablaShapeFunctions[11], nablaShapeFunctions[12], nablaShapeFunctions[13], nablaShapeFunctions[14], nablaShapeFunctions[15], // nablaShapeFunctions[16], nablaShapeFunctions[17], nablaShapeFunctions[18], nablaShapeFunctions[19], nablaShapeFunctions[20], nablaShapeFunctions[21], nablaShapeFunctions[22], nablaShapeFunctions[23], // jacobian.Item1[0, 0], jacobian.Item1[0, 1], jacobian.Item1[0, 2], jacobian.Item1[1, 0], jacobian.Item1[1, 1], jacobian.Item1[1, 2], jacobian.Item1[2, 0], jacobian.Item1[2, 1], jacobian.Item1[2, 2], // jacobian.Item2[0, 0], jacobian.Item2[0, 1], jacobian.Item2[0, 2], jacobian.Item2[1, 0], jacobian.Item2[1, 1], jacobian.Item2[1, 2], jacobian.Item2[2, 0], jacobian.Item2[2, 1], jacobian.Item2[2, 2] //}; }
public double[][] GetTransformationVector(EmbeddedNode node) { CheckElementType(node.EmbeddedInElement.ElementType); const int commonDofsPerNode = 3; const int hostDofsPerNode = 3; const int hostShapeFunctionLength = 8; double[] hostShapeFunctions = ((IEmbeddedHostElement)node.EmbeddedInElement.ElementType).GetShapeFunctionsForNode(node.EmbeddedInElement, node); var transformation = new double[commonDofsPerNode][]; for (int j = 0; j < commonDofsPerNode; j++) { transformation[j] = new double[hostShapeFunctionLength * hostDofsPerNode]; for (int k = 0; k < hostShapeFunctionLength; k++) { transformation[j][hostDofsPerNode * k + j] = hostShapeFunctions[k]; } } return(transformation); }
public double[][] GetTransformationVector(EmbeddedNode node) { //CheckElementType(node.EmbeddedInElement.ElementType); const int commonDofsPerNode = 1; const int hostDofsPerNode = 1; const int hostShapeFunctionLength = 4; //TODO: Use the interpolation for this. Probably for the next line too. double[] hostShapeFunctions = ((IEmbeddedHostElement)node.EmbeddedInElement.ElementType).GetShapeFunctionsForNode(node.EmbeddedInElement, node); var transformation = new double[commonDofsPerNode][]; for (int j = 0; j < commonDofsPerNode; j++) { transformation[j] = new double[hostShapeFunctionLength * hostDofsPerNode]; for (int k = 0; k < hostShapeFunctionLength; k++) { transformation[j][hostDofsPerNode * k + j] = hostShapeFunctions[k]; } } return(transformation); }
public double[] GetShapeFunctionsForNode(Element element, EmbeddedNode node) { double[,] elementCoordinates = GetCoordinatesTranspose(element); var shapeFunctions = CalcH8Shape(node.Coordinates[0], node.Coordinates[1], node.Coordinates[2]); var nablaShapeFunctions = CalcH8NablaShape(node.Coordinates[0], node.Coordinates[1], node.Coordinates[2]); var jacobian = CalcH8JDetJ(elementCoordinates, nablaShapeFunctions); return(new double[] { shapeFunctions[0], shapeFunctions[1], shapeFunctions[2], shapeFunctions[3], shapeFunctions[4], shapeFunctions[5], shapeFunctions[6], shapeFunctions[7], nablaShapeFunctions[0], nablaShapeFunctions[1], nablaShapeFunctions[2], nablaShapeFunctions[3], nablaShapeFunctions[4], nablaShapeFunctions[5], nablaShapeFunctions[6], nablaShapeFunctions[7], nablaShapeFunctions[8], nablaShapeFunctions[9], nablaShapeFunctions[10], nablaShapeFunctions[11], nablaShapeFunctions[12], nablaShapeFunctions[13], nablaShapeFunctions[14], nablaShapeFunctions[15], nablaShapeFunctions[16], nablaShapeFunctions[17], nablaShapeFunctions[18], nablaShapeFunctions[19], nablaShapeFunctions[20], nablaShapeFunctions[21], nablaShapeFunctions[22], nablaShapeFunctions[23], jacobian.Item1[0, 0], jacobian.Item1[0, 1], jacobian.Item1[0, 2], jacobian.Item1[1, 0], jacobian.Item1[1, 1], jacobian.Item1[1, 2], jacobian.Item1[2, 0], jacobian.Item1[2, 1], jacobian.Item1[2, 2], jacobian.Item2[0, 0], jacobian.Item2[0, 1], jacobian.Item2[0, 2], jacobian.Item2[1, 0], jacobian.Item2[1, 1], jacobian.Item2[1, 2], jacobian.Item2[2, 0], jacobian.Item2[2, 1], jacobian.Item2[2, 2] }); //double[] coords = GetNaturalCoordinates(element, node); //return CalcH8Shape(coords[0], coords[1], coords[2]); //double fXiP = (1.0 + coords[0]) * 0.5; //double fEtaP = (1.0 + coords[1]) * 0.5; //double fZetaP = (1.0 + coords[2]) * 0.5; //double fXiM = (1.0 - coords[0]) * 0.5; //double fEtaM = (1.0 - coords[1]) * 0.5; //double fZetaM = (1.0 - coords[2]) * 0.5; //return new double[] { fXiM * fEtaM * fZetaM, // fXiP * fEtaM * fZetaM, // fXiP * fEtaP * fZetaM, // fXiM * fEtaP * fZetaM, // fXiM * fEtaM * fZetaP, // fXiP * fEtaM * fZetaP, // fXiP * fEtaP * fZetaP, // fXiM * fEtaP * fZetaP }; }
private double[][] GetTransformationVectorForTranslationsOnly(EmbeddedNode node) { if (!(node.EmbeddedInElement.ElementType.CellType == CellType.Hexa8) ) { throw new ArgumentException("Host element is not Hexa8."); } double[] hostShapeFunctions = ((IEmbeddedHostElement)node.EmbeddedInElement.ElementType).GetShapeFunctionsForNode(node.EmbeddedInElement, node); var transformation = new double[commonDofsPerNode + rotationalDofsPerNode][]; for (int j = 0; j < commonDofsPerNode; j++) { transformation[j] = new double[hostShapeFunctionLength * hostDofsPerNode]; for (int k = 0; k < hostShapeFunctionLength; k++) { transformation[j][hostDofsPerNode * k + j] = hostShapeFunctions[k]; } } for (int j = 0; j < rotationalDofsPerNode; j++) { transformation[commonDofsPerNode + j] = new double[hostShapeFunctionLength * hostDofsPerNode]; } var jacobianAndInverse = GetJacobiansFromShapeFunctionsVector(hostShapeFunctions); transformation[commonDofsPerNode - 1 + 1][0] = 0; transformation[commonDofsPerNode - 1 + 1][1] = -jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 9] - jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 1] - jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 17]; transformation[commonDofsPerNode - 1 + 1][2] = jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 9] + jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 1] + jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 17]; transformation[commonDofsPerNode - 1 + 1][3] = 0; transformation[commonDofsPerNode - 1 + 1][4] = -jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 10] - jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 2] - jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 18]; transformation[commonDofsPerNode - 1 + 1][5] = jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 10] + jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 2] + jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 18]; transformation[commonDofsPerNode - 1 + 1][6] = 0; transformation[commonDofsPerNode - 1 + 1][7] = -jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 11] - jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 3] - jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 19]; transformation[commonDofsPerNode - 1 + 1][8] = jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 11] + jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 3] + jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 19]; transformation[commonDofsPerNode - 1 + 1][9] = 0; transformation[commonDofsPerNode - 1 + 1][10] = -jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 12] - jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 4] - jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 20]; transformation[commonDofsPerNode - 1 + 1][11] = jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 12] + jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 4] + jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 20]; transformation[commonDofsPerNode - 1 + 1][12] = 0; transformation[commonDofsPerNode - 1 + 1][13] = -jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 13] - jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 5] - jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 21]; transformation[commonDofsPerNode - 1 + 1][14] = jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 13] + jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 5] + jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 21]; transformation[commonDofsPerNode - 1 + 1][15] = 0; transformation[commonDofsPerNode - 1 + 1][16] = -jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 14] - jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 6] - jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 22]; transformation[commonDofsPerNode - 1 + 1][17] = jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 14] + jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 6] + jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 22]; transformation[commonDofsPerNode - 1 + 1][18] = 0; transformation[commonDofsPerNode - 1 + 1][19] = -jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 15] - jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 7] - jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 23]; transformation[commonDofsPerNode - 1 + 1][20] = jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 15] + jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 7] + jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 23]; transformation[commonDofsPerNode - 1 + 1][21] = 0; transformation[commonDofsPerNode - 1 + 1][22] = -jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 16] - jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 8] - jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 24]; transformation[commonDofsPerNode - 1 + 1][23] = jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 16] + jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 8] + jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 24]; transformation[commonDofsPerNode - 1 + 2][0] = jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 9] + jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 1] + jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 17]; transformation[commonDofsPerNode - 1 + 2][1] = 0; transformation[commonDofsPerNode - 1 + 2][2] = -jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 9] - jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 1] - jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 17]; transformation[commonDofsPerNode - 1 + 2][3] = jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 10] + jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 2] + jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 18]; transformation[commonDofsPerNode - 1 + 2][4] = 0; transformation[commonDofsPerNode - 1 + 2][5] = -jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 10] - jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 2] - jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 18]; transformation[commonDofsPerNode - 1 + 2][6] = jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 11] + jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 3] + jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 19]; transformation[commonDofsPerNode - 1 + 2][7] = 0; transformation[commonDofsPerNode - 1 + 2][8] = -jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 11] - jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 3] - jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 19]; transformation[commonDofsPerNode - 1 + 2][9] = jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 12] + jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 4] + jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 20]; transformation[commonDofsPerNode - 1 + 2][10] = 0; transformation[commonDofsPerNode - 1 + 2][11] = -jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 12] - jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 4] - jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 20]; transformation[commonDofsPerNode - 1 + 2][12] = jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 13] + jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 5] + jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 21]; transformation[commonDofsPerNode - 1 + 2][13] = 0; transformation[commonDofsPerNode - 1 + 2][14] = -jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 13] - jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 5] - jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 21]; transformation[commonDofsPerNode - 1 + 2][15] = jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 14] + jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 6] + jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 22]; transformation[commonDofsPerNode - 1 + 2][16] = 0; transformation[commonDofsPerNode - 1 + 2][17] = -jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 14] - jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 6] - jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 22]; transformation[commonDofsPerNode - 1 + 2][18] = jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 15] + jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 7] + jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 23]; transformation[commonDofsPerNode - 1 + 2][19] = 0; transformation[commonDofsPerNode - 1 + 2][20] = -jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 15] - jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 7] - jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 23]; transformation[commonDofsPerNode - 1 + 2][21] = jacobianAndInverse.Item2[2, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 16] + jacobianAndInverse.Item2[2, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 8] + jacobianAndInverse.Item2[2, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 24]; transformation[commonDofsPerNode - 1 + 2][22] = 0; transformation[commonDofsPerNode - 1 + 2][23] = -jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 16] - jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 8] - jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 24]; transformation[commonDofsPerNode - 1 + 3][0] = -jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 9] - jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 1] - jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 17]; transformation[commonDofsPerNode - 1 + 3][1] = jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 9] + jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 1] + jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 17]; transformation[commonDofsPerNode - 1 + 3][2] = 0; transformation[commonDofsPerNode - 1 + 3][3] = -jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 10] - jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 2] - jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 18]; transformation[commonDofsPerNode - 1 + 3][4] = jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 10] + jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 2] + jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 18]; transformation[commonDofsPerNode - 1 + 3][5] = 0; transformation[commonDofsPerNode - 1 + 3][6] = -jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 11] - jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 3] - jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 19]; transformation[commonDofsPerNode - 1 + 3][7] = jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 11] + jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 3] + jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 19]; transformation[commonDofsPerNode - 1 + 3][8] = 0; transformation[commonDofsPerNode - 1 + 3][9] = -jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 12] - jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 4] - jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 20]; transformation[commonDofsPerNode - 1 + 3][10] = jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 12] + jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 4] + jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 20]; transformation[commonDofsPerNode - 1 + 3][11] = 0; transformation[commonDofsPerNode - 1 + 3][12] = -jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 13] - jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 5] - jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 21]; transformation[commonDofsPerNode - 1 + 3][13] = jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 13] + jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 5] + jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 21]; transformation[commonDofsPerNode - 1 + 3][14] = 0; transformation[commonDofsPerNode - 1 + 3][15] = -jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 14] - jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 6] - jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 22]; transformation[commonDofsPerNode - 1 + 3][16] = jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 14] + jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 6] + jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 22]; transformation[commonDofsPerNode - 1 + 3][17] = 0; transformation[commonDofsPerNode - 1 + 3][18] = -jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 15] - jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 7] - jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 23]; transformation[commonDofsPerNode - 1 + 3][19] = jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 15] + jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 7] + jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 23]; transformation[commonDofsPerNode - 1 + 3][20] = 0; transformation[commonDofsPerNode - 1 + 3][21] = -jacobianAndInverse.Item2[1, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 16] - jacobianAndInverse.Item2[1, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 8] - jacobianAndInverse.Item2[1, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 24]; transformation[commonDofsPerNode - 1 + 3][22] = jacobianAndInverse.Item2[0, 1] * hostShapeFunctions[hostShapeFunctionLength - 1 + 16] + jacobianAndInverse.Item2[0, 0] * hostShapeFunctions[hostShapeFunctionLength - 1 + 8] + jacobianAndInverse.Item2[0, 2] * hostShapeFunctions[hostShapeFunctionLength - 1 + 24]; transformation[commonDofsPerNode - 1 + 3][23] = 0; for (int j = commonDofsPerNode; j < commonDofsPerNode + 3; j++) { for (int k = 0; k < 24; k++) { transformation[j][k] *= 0.5; } } return(transformation); }
public IReadOnlyList <IReadOnlyList <IDofType> > GetDOFTypesOfHost(EmbeddedNode node) { return(node.EmbeddedInElement.ElementType.GetElementDofTypes(node.EmbeddedInElement)); }
public double[][] GetTransformationVector(EmbeddedNode node) { return(GetTransformationVectorForTranslationsOnly(node)); }