Cross Product In Matrix Form
@manvendra5345 ya está trabajando en esto.
Desde el 15/1/2026.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Área
- backend
Línea de trabajo
Read src/stdlib_linalg_cross_product.fypp and src/stdlib_linalg.fypp, which the issue links as the existing cross product and module definition entry points. Check how cross_product() is exposed and tested, then follow that pattern for the proposed matrix function. Done means the function returns the stated 3×3 skew-symmetric operator matrix for a 3-element vector and is available through the linear algebra module.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Motivation
A proposal to include a cross_product_matrix() function in stdlib_linalg module that takes a 3×1 vector and returns the 3×3 skew-symmetric cross product operator matrix which is used in mechanics a lot to convert the cross product into a linear algebra operator.
An illustrative example of this function would be:
pure function cross_product_matrix(a) result(c)
real(dp), intent(in) ::a(3)
reaL(dp) :: c(3,3)
real(dp) :: x,y,z
x = a(1)
y = a(2)
z = a(3)
! define column-by-column (negative of row-major display)
c = reshape( &
[ 0._dp, z, -y, &
-z, 0._dp, x, &
y, -x, 0._dp], [3,3])
end function cross_product_matrix
This allows a vector cross producrt c=a×b to be described using linear algebra as the matrix-vector multiplication c=A*b where A=a× is the cross product matrix.
The use of this function would be in mechanics. For example building a 3×3 rotation matrix from an axis vector and an angle scalar
pure function rotation_matrix(axis, angle) result(R)
real(dp) :: R(3,3)
real(dp), intent(in) :: angle, axis(3)
real(dp) :: ax(3,3)
! Form an identiy matrix
R = 0._dp
R(1,1) = 1._dp
R(2,2) = 1._do
R(3,3) = 1._dp
! Form the cross product matrix
ax = vector_cross_matrix(axis)
! Rodrigues Rotation Formula
R = R + sin(angle)*ax + (1._dp - cos(angle))*matmul(ax, ax)
end function rotation_matrix
or finding the mass moment of inertia tensor of a body based on the parallel axis theorem
pure function parallel_axis_theorem(I, m, r) result(Ip)
real(dp) :: Ip(3,3)
real(dp), intent(in) :: I(3,3), m, r(3)
real(dp) :: rx(3,3)
! Form the cross product matrix
rx = vector_cross_matrix(r)
! Parallel Axis Theorem
Ip = I - m*(matmul(rx, rx))
end function parallel_axis_theorem
Prior Art
Existing cross product function cross_product() takes two vectors and returns their cross product vector as a result.
and the linear algebra module definition file:
Additional Information
No response
- Lenguaje dominante
- Fortran
- Estrellas
- 1.4k
- Forks
- 233
- Merge medio
- 4 d 11 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de fortran-lang/stdlib
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
fortran-lang/stdlib#1193 · 1 comentario ·
-
Cannot compile example_mnorm.f90Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
fortran-lang/stdlib#1224 · 1 comentario ·
-
LAPACK upgradesAbiertoidea topic: linalg
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
fortran-lang/stdlib#1199 · 1 reacción ·
-
Support meson build systemAbiertoidea
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
fortran-lang/stdlib#1181 · 2 comentarios · 1 reacción ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 49/100
fortran-lang/stdlib#1178 · 3 comentarios ·
Todos los issues de fortran-lang/stdlib
Issues similares
-
[Bug]: Telegram bot (v3.11.0): "Ban log" no longer sends the current 3xipl-banned.logPosiblemente ocupada @HamedSanaei la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
MHSanaei/3x-ui#6990 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
记忆分析的默认模型显示与实际使用不一致Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
developmentseed/titiler-cmr#270 ·
Los mantenedores suelen responder en 1 día
-
agent-butler-finding bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
jordansmall/spindrift#6107 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día