Debian Codegraph @

texmf-dist/doc/latex/tensormatrix/tensormatrix.tex

raw
1 \documentclass[12pt,a4paper]{article}
2 \usepackage{fullpage}
3 \usepackage{tensormatrix}
4 \usepackage{subfig}
5
6 \newlength{\pwidth}
7 \setlength{\pwidth}{8cm}
8
9 \begin{document}
10 \title{tensormatrix -- version 1.0.0}
11 \author{Einar Halvorsen}
12 \date{August 8, 2025}
13 \maketitle
14
15
16 This package helps visualizing the structure of matrices representing the tensors of linear constitutive equations. It requires the tikz package. The package provides an environment \textit{tmat} which takes two parameters, the dimensions of the matrix. The environment requires math mode. Inside the environment a sequence of commands can be given. The available commands are listed in table \ref{tab:elements}. They either define a symbol to appear at the location specified by the parameter of the command or a link between two elements. If no symbol is defined for an element, the default, a small dot, is shown. This would define a zero value in the usual use of the notation.
17
18 \begin{table}[hbt]
19 \centering
20 \caption{Elements available, notation and usual interpretation}
21 \label{tab:elements}
22 \begin{tabular}{cll}
23 \hline\hline
24 Symbol & Command & Interpretation \\
25 \hline
26 \begin{tikzpicture}
27 \node [tkz] (0,0) {};
28 \end{tikzpicture}
29 & & a component that is zero
30 \\
31 \begin{tikzpicture}
32 \tmatpv{0}{0}
33 \end{tikzpicture}
34 & \verb|\tmatpv{M}{N}| & element (M,N) that is nonzero
35 \\
36 \begin{tikzpicture}
37 \tmatpn{0}{0}
38 \end{tikzpicture}
39 & \verb|\tmatpn{M}{N}|&
40 \parbox[t]{\pwidth}{
41 element (M,N) has sign opposite to the one it is connected to}
42 \\
43 \begin{tikzpicture}
44 \tmatpdv{0}{0}
45 \end{tikzpicture}
46 &\verb|\tmatpdv{M}{N}| &
47 \parbox[t]{\pwidth}{
48 element (M,N) has twice the value of the solid-circle component it is connected to}
49 \\
50 \begin{tikzpicture}
51 \tmatpdn{0}{0}
52 \end{tikzpicture}
53 & \verb|\tmatpdn{M}{N}| &
54 \parbox[t]{\pwidth}{
55 element (M,N) has minus twice the value of the solid-circle component it is connected to}
56 \\
57 \begin{tikzpicture}
58 \tmatpx{0}{0}
59 \end{tikzpicture}
60 & \verb|\tmatpx{M}{N}| &
61 \parbox[t]{\pwidth}{
62 element (M,N) is given by other elements}
63 \\
64 \begin{tikzpicture}
65 \draw[line width=1pt,line cap=round,fill=black] (-0.5\tmatds,.5\tmatds) -- (0.5\tmatds,0);
66 \end{tikzpicture}
67 & \verb|\tmatlink{M N}{P Q}| &
68 \parbox[t]{\pwidth}{connection between elements (M,N) and (P,Q) with related values}
69 \\ \vspace{-1.5ex}\\ \hline
70 \end{tabular}
71 \end{table}
72
73 Examples of typical use are provided by the matrices given in figure \ref{fig:matex}.
74
75 \begin{figure}[h]
76 \centering
77 \subfloat[]{
78 \label{fig:matexa}
79 $\begin{tmat}{6}{6}
80 \tmatpv{1}{1}
81 \tmatpv{1}{2}
82 \tmatpv{1}{3}
83 \tmatpv{1}{4}
84 \tmatpv{2}{1}
85 \tmatpv{2}{2}
86 \tmatpv{2}{3}
87 \tmatpn{2}{4}
88 \tmatpv{3}{1}
89 \tmatpv{3}{2}
90 \tmatpv{3}{3}
91 \tmatpv{4}{1}
92 \tmatpn{4}{2}
93 \tmatpv{4}{4}
94 \tmatpv{5}{5}
95 \tmatpx{6}{6}
96 \tmatpdv{6}{5}
97 \tmatpdv{5}{6}
98 \tmatlink{1 1}{2 2}
99 \tmatlink{1 3}{2 3}
100 \tmatlink{1 4}{2 4}
101 \tmatlink{2 4}{5 6}
102 \tmatlink{3 1}{3 2}
103 \tmatlink{4 1}{4 2}
104 \tmatlink{4 2}{6 5}
105 \tmatlink{4 4}{5 5}
106 \end{tmat}$
107 }
108 \hspace{2cm}
109 \subfloat[]{
110 $\begin{tmat}{3}{3}
111 \tmatpv{1}{1}
112 \tmatpv{2}{2}
113 \tmatpv{3}{3}
114 \tmatlink{1 1}{2 2}
115 \end{tmat}$
116 }
117 \hspace{2cm}
118 \subfloat[]{
119 $\begin{tmat}{3}{6}
120 \tmatpv{1}{1}
121 \tmatpn{1}{2}
122 \tmatpv{1}{4}
123 \tmatpn{2}{5}
124 \tmatpdn{2}{6}
125 \tmatlink{1 1}{1 2}
126 \tmatlink{1 2}{2 6}
127 \tmatlink{1 4}{2 5}
128 \end{tmat}$
129 }
130 \caption{Matrices for a material of with class-32 symmetry. (a) $S^E$, $S^D$. (b) $\kappa^\epsilon$, $\kappa^\sigma$, $\beta^\epsilon$, $\beta^\sigma$. (c) $d$.}
131 \label{fig:matex}
132 \end{figure}
133
134 \newpage
135 As an example of use, the code producing the matrix in figure \ref{fig:matexa}
136 is:
137 \begin{verbatim}
138 \begin{tmat}{6}{6}
139 \tmatpv{1}{1}
140 \tmatpv{1}{2}
141 \tmatpv{1}{3}
142 \tmatpv{1}{4}
143 \tmatpv{2}{1}
144 \tmatpv{2}{2}
145 \tmatpv{2}{3}
146 \tmatpn{2}{4}
147 \tmatpv{3}{1}
148 \tmatpv{3}{2}
149 \tmatpv{3}{3}
150 \tmatpv{4}{1}
151 \tmatpn{4}{2}
152 \tmatpv{4}{4}
153 \tmatpv{5}{5}
154 \tmatpx{6}{6}
155 \tmatpdv{6}{5}
156 \tmatpdv{5}{6}
157 \tmatlink{1 1}{2 2}
158 \tmatlink{1 3}{2 3}
159 \tmatlink{1 4}{2 4}
160 \tmatlink{2 4}{5 6}
161 \tmatlink{3 1}{3 2}
162 \tmatlink{4 1}{4 2}
163 \tmatlink{4 2}{6 5}
164 \tmatlink{4 4}{5 5}
165 \end{tmat}
166 \end{verbatim}
167
168
169 \end{document}