\documentclass[a4paper, 12pt]{report}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, chains, positioning, shapes.geometric, shapes.multipart }
\tikzstyle{rect} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=white]
\tikzstyle{arrow} = [thick,->,>=stealth]
\usetikzlibrary{shapes.multipart}
\usepackage{float}
\begin{document}
\begin{figure}[H]
\centering
\begin{tikzpicture}[node distance=2.5cm]
\node (one) [rect] {Input excitation $p_{i+1}$ };
\node (two) [rect, below of=one, align = center] {Calculate displacement response: \\ $x_{i+1} = x_{i} + \Delta t \mathit{x1}_{i} + \frac{\Delta t^2}{2} \mathit{x2}_{i}$ };
\node(three)[rect, below of=two]{Impose $x_{i+1}$ on test structure};
\node(four)[rect, below of=three]{Measure restoring forces from $\mathit{fs}_{i+1}$ from the test structure};
\node(five)[rect, below of=four, align = center]{Calculate: \\ $\mathit{x2}_{i+1} = \left[m + \frac{\mathit{\Delta t}}{2} c\right]^{-1} \left[p_{i+1} - \mathit{fs}_{i+1} - c \mathit{x1}_{i} - \frac{\mathit{\Delta t}}{2} c \mathit{x2}_{i}\right]$ \\ $ \mathit{x1}_{i+1} = \mathit{x1}_{i} + \frac{\mathit{\Delta t}}{2}\left(\mathit{x2}_{i} + \mathit{x2}_{i+1}\right) $};
\node(six)[rect, below of=five]{set $i = i+1$};
\draw [arrow] (one) -- (two);
\draw [arrow] (two) -- (three);
\draw [arrow] (three) -- (four);
\draw [arrow] (four) -- (five);
\draw [arrow] (five) -- (six);
\draw [arrow] (six.east) -- ++(4, 0) -- ++ (0, 12.5) -- (one) ;
\end{tikzpicture}
\caption{Newmark Explicit Scheme flowchart}
\end{figure}
\end{document}
答案1
有很多方法可以改善这种情况。而且,正如ferahfeza在评论,您可以使用arrows.meta
您正在加载(但我不会使用\tikzstyle
)。下面简化了图表并使一些事情更加自动化。
\documentclass[a4paper, 12pt]{report}
%\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,positioning}
\tikzset{rect/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=white},
arrow/.style={thick,-{Stealth[length=7pt]}}}
\usetikzlibrary{shapes.multipart}
\usepackage{float}
\begin{document}
\begin{figure}[H]
\centering
\begin{tikzpicture}
\begin{scope}[local bounding box=nodes,node distance=2.5cm]
\node (one) [rect] {Input excitation $p_{i+1}$ };
\node (two) [rect, below of=one, align = center] {Calculate displacement response: \\ $\displaystyle x_{i+1} = x_{i} + \Delta t \mathit{x1}_{i} +
\frac{\Delta t^2}{2} \mathit{x2}_{i}$ };
\node(three)[rect, below of=two]{Impose $x_{i+1}$ on test structure};
\node(four)[rect, below of=three]{Measure restoring forces from $\mathit{fs}_{i+1}$ from the test structure};
\node(five)[rect, below of=four, align = center]{Calculate: \\ $\mathit{x2}_{i+1} = \left[m + \frac{\mathit{\Delta t}}{2} c\right]^{-1} \left[p_{i+1} - \mathit{fs}_{i+1} - c \mathit{x1}_{i} - \frac{\mathit{\Delta t}}{2} c \mathit{x2}_{i}\right]$ \\ $ \mathit{x1}_{i+1} = \mathit{x1}_{i} + \frac{\mathit{\Delta t}}{2}\left(\mathit{x2}_{i} + \mathit{x2}_{i+1}\right) $};
\node(six)[rect, below of=five]{set $i = i+1$};
\end{scope}
\foreach \X [remember=\X as \Y (initially one)]in {two,three,four,five,six}
{\draw [arrow] (\Y) -- (\X);}
\draw [arrow] (six.east) -| ([xshift=2em]nodes.east) |- (one) ;
\end{tikzpicture}
\caption{Newmark Explicit Scheme Flowchart.}
\end{figure}
\end{document}