Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • liangb30/cas-741-boliang
  • pignierb/cas741
  • jimoha1/cas741
  • huoy8/cas741
  • grandhia/cas741
  • chenq84/cas741
  • yex33/cas741
  • xuey45/cas741
  • garcilau/cas-741-uriel-garcilazo-msa
  • schankuc2/cas741
  • ahmady3/cas741
  • saadh/cas741
  • singhk56/cas741
  • lin523/cas741
  • fangz58/cas741
  • tranp30/cas741
  • ceranich/cas741
  • norouf1/cas741
  • mirzam48/cas741
  • djavahet/cas741
  • hossaa27/cas741
  • yiding_el/cas-741-upate-name
  • sayadia/cas741
  • elmasn2/cas741
  • cheemf8/cas741
  • cheny997/cas741
  • ma209/cas741
  • mousas26/cas741
  • liuy363/cas741
  • wongk124/cas741
  • dua11/cas741
  • zhoug28/cas741
  • courses/cas-741-tst
  • liy443/cas-741-fork-csv
  • sochania/cas741
  • liy443/cas-741-update-csv-old
  • mahdipoa/cas741
  • wangz892/cas741
  • wangn14/cas741
  • defourej/cas741
  • zhaox183/cas741
  • smiths/cas741
42 results
Show changes
Showing
with 23570 additions and 0 deletions
Source diff could not be displayed: it is too large. Options to address this: view the blob.
\documentclass[12pt,titlepage]{article}
\include{Preamble}
\author{Wen Yu}
\begin{document}
\begin{titlepage}
% Fonts for the title page
\newcommand{\texttl}{\textsf} %font for the title (Emil's version is \textsf)
\newcommand{\textau}{\textsf} %font for the authors, date, etc. (Emils version is \textsc)
\begin{center}
\HRule \\[0.4cm]
{ \huge \bfseries \texttl{Summary of Validation Testing for a Parallel Mesh Generation Toolbox}}\\[0.4cm]
\HRule \\[2cm]
\textau{\LARGE Wen Yu}\\[2cm]
\textau{\LARGE {September 2008}}
\vfill
% Bottom of the page
%\includegraphics[width=0.27\textwidth]{logo.pdf}
\hfill
\textau{\LARGE
\raisebox{2pt}{\begin{tabular}[b]{r}
\raisebox{8pt}{Computing and Software} \\
McMaster University \end{tabular}}
}
\end{center}
\end{titlepage}
\tableofcontents
%to get cross-references correct
\refstepcounter{funnum} \label{RefiningMesh}
\refstepcounter{funnum} \label{CoarseningMesh}
\refstepcounter{funnum} \label{RefiningOrCoarsening}
\refstepcounter{funnum} \label{MeshType}
\refstepcounter{funnum} \label{ElmShape}
\refstepcounter{funnum} \label{DomainDimension}
\refstepcounter{funnum} \label{Conformal}
\refstepcounter{funnum} \label{InputDefinition}
\refstepcounter{funnum} \label{RCInstruction}
\refstepcounter{funnum} \label{OutputStorage}
\refstepcounter{funnum} \label{VertexUniqueID}
\refstepcounter{funnum} \label{ElmUniqueID}
\refstepcounter{funnum} \label{ElmTopology}
\refstepcounter{funnum} \label{OutElmOrder}
\refstepcounter{funnum} \label{OutVertexOrder}
\refstepcounter{funnum} \label{Help}
\refstepcounter{nfnum} \label{Performance}
\refstepcounter{nfnum} \label{Precision}
\refstepcounter{nfnum} \label{Exception}
\refstepcounter{nfnum} \label{Portability}
\refstepcounter{nfnum} \label{LookAndFeel}
\refstepcounter{nfnum} \label{Usability}
\refstepcounter{nfnum} \label{Maintainability}
\refstepcounter{mnum} \label{mMemory}
\refstepcounter{mnum} \label{mFileRW}
\refstepcounter{mnum} \label{mKeyboard}
\refstepcounter{mnum} \label{mScreen}
\refstepcounter{mnum} \label{mInput}
\refstepcounter{mnum} \label{mOutput}
\refstepcounter{mnum} \label{mService}
\refstepcounter{mnum} \label{mVertex}
\refstepcounter{mnum} \label{mEdge}
\refstepcounter{mnum} \label{mCell}
\refstepcounter{mnum} \label{mMesh}
\refstepcounter{mnum} \label{mRefining}
\refstepcounter{mnum} \label{mCoarsening}
\newpage
\section{Introduction \label{AtestSecIntro}}
This section gives an overview of the Testing Summary for a Parallel Mesh Generation Toolbox (PMGT). First, the purpose of the document is provided. Second, the scope of the testing is identified. Third, the organization of the document is summarized.
\subsection{Purpose of the Document}
This document specifies validation tests for a PMGT. The results of the tests and analysis are also provided. The intended audience is testers who are going to test the system and developers who are going to maintain the software. Note that test document is dynamic in the sense that it should be updated when the development of the system proceeds.
\subsection{Scope of the Testing }
In general, the purpose of testing is to help produce quality software. Due to limits on the time available for testing, the scope of the testing of PMGT is restricted to test the most important test factors. Like other scientific computing software, correctness and efficiency are considered to be the two most important test factors for PMGT. For efficiency testing, the focus is on execution time rather than on storage.
\subsection{Organization of the Document}
Section \ref{AtestSecIntro} (this section) is an introduction to the report. Section \ref{AtestSecTest} shows what is going to be tested and the coverage of the testing, with respect to the software requirements and the software design. Section \ref{AtestSecResult} gives the result of the testing and the analysis.
\section{Testing PMGT \label{AtestSecTest}}
Test cases are listed in Section \ref{AtestSecTestcases}. The detailed information for these test cases can be found in Section \ref{AtestSecResult}. The traceability matrix in Section \ref{AmatrixR} shows the association between test cases and the functional and nonfunctional requirements that are specified in the Software Requirements Specification (SRS) document. Similarly, a traceability matrix for test cases and the leaf modules as introduced in the Module Guide (MG) as shown in Section \ref{AmatrixM}. Tracking these relations is useful for developing and maintaining the software.
\subsection{Test Cases \label{AtestSecTestcases}}
The correctness validation test is designed for verifying the functional requirements RefiningMesh (\fref{RefiningMesh}), CoarseningMesh (\fref{CoarseningMesh}), ElmShape (\fref{ElmShape}), and Conformal (\fref{Conformal}). Other requirements for correctness are trivial and are satisfied obviously. For example, since the vertices are stored in an array, the OutVertexOrder (\fref{OutVertexOrder}) requirement is met by outputting the vertices in the order as the order of them in the array. The tests are against above requirements are automated. The automated validation tests requirements (ACVTRs) are listed in Section \ref{ACVTRs}. Since the output mesh also can also be displayed on screen, it can be checked manually. The visual correctness validation tests requirements (VCVTRs) are listed in Section \ref{VCVTRs}. The test cases are in Section \ref{TCs}.
\subsubsection{Automated Correctness Validation Tests Requirements \label{ACVTRs}}
A list of ACVTRs follows. All test cases should pass these tests. Some test cases relate to data definitions defined in the SRS. In these cases the related data definition defined is shown as D$x$, where $x$ is the number of the associated data definition given in the SRS.
\begin{itemize}
\item The area of each element is greater than zero (referring to \textbf{D5}). %hard coded reference
\item The boundary of the mesh is closed. (referring to \textbf{D15}). %hard coded reference
\item The mesh is conformal (referring to \textbf{D16}). %hard coded reference
\item The intersection of any two elements is empty (referring to \textbf{D17}). %hard coded reference
\item The input mesh and output mesh {\em CoveringUp} each other (referring to \textbf{D19}). %hard coded reference
\item The length of each edge is greater than zero. (This is required by the definition of a mesh, which is defined in the SRS.)
\item The vertices of each element are listed in a counterclockwise order. (The counterclockwise order of the vertices for each element is not necessary for implementing PMGT. However, it is adopted by most meshing and FEA software. PMGT uses this convention.)
\item The output mesh conforms to the Euler Equation. (This requirement is not documented in the SRS. However, any mesh should implicitly satisfy the equation $nc+nv-ne=1$, where $nc$ is the number of cells, $nv$ is the number of vertices, and $ne$ is the number of edges.)
\end{itemize}
\subsubsection{Visual Correctness Validation Tests Requirements\label{VCVTRs}}
The output meshes should also be visually checked to ensure that the following VCVTRs are met.
\begin{itemize}
\item No vertex is outside of the input domain.
\item No vertex is inside of a cell.
\item No dangling points or edges are present.
\item All cells are connected.
\item The mesh is conformal.
\end{itemize}
Some of the VCVTRs overlap with the ACVTRs. This redundancy provides increased confidence in case one testing method fails to catch an error.
\subsubsection{Test Cases\label{TCs}}
The test cases developed involve testing meshes against the above requirements. In each test case, except the last one, the input mesh is refined and then coarsened. Two algorithms for refining are used. One algorithm is called {\em Split}. It splits one cell into three by adding a point in the centroid of the triangle and connecting the added point to the three original vertices. The other algorithm is simply call {\em Refine}. It refines the original mesh by longest edge bisection.
The name of each test case includes three parts. For example, test case $AxxCBN$ means that the test uses $Axx$ algorithm for refining, where $Axx$ equals $Split$ or $Refine$. The letter $C$ indicates that coarsening is performed. If the $C$ is missing, the input mesh is not coarsened. $B$ is the number of refinements before coarsening. If $B$ is S, the mesh is refined once and then coarsen once. If the $B$ is M, the mesh is refined multiple time before coarsening. $N$ is a number. If the $N$ is omitted, it means only one of this kind of test performed. Otherwise the same test procedures is used several times on different input meshes. The reason for using the same procedure is that the topology of the output meshes may differ for different input meshes.
\begin{itemize}
\item Test Case {\em SplitCS} (\refstepcounter{casenum}\cthecasenum \label{ATCscs}): This test case tests the correctness of PMGT. The input mesh is shown in Figure \ref{input1}. The refining and coarsening criterion is that the cells intersected with the vertical line, $x=0.6$, are Split once, then the cells of the new mesh that intersect with the vertical line are coarsened once. When the splitting and coarsening is done, the vertical line is moved to the right one unit ($x=x+1.0$), and another Splitting and coarsening is performed. This procedure is repeated until no cells intersect with the vertical line.
\item Test Case {\em RefineCS1} (\refstepcounter{casenum}\cthecasenum \label{ATCrcs1}): This test case tests the correctness of PMGT. The input mesh is the same as \cref{ATCscs}, which is shown in Figure \ref{input1}. There is a vertical line at $x = 0.6$. The refining and coarsening criterion is that the cells that intersect with the vertical line are refined once, then the cells of the new mesh that intersect with the vertical line are coarsened once. When the refining and coarsening are done, the vertical line is moved to the right one unit, and another refining and coarsening is performed. This procedure is repeated until no cells intersect with the vertical line.
\item Test Case {\em RefineCS2} (\refstepcounter{casenum}\cthecasenum \label{ATCrcs2}): This test case tests the correctness of PMGT. The refining and coarsening criterion, vertical line function, and the test procedure are the same as test case \cref{ATCrcs1}. However, the input mesh is different. The input mesh is showed in Figure \ref{input2}.
\item Test Case {\em RefineCM} (\refstepcounter{casenum}\cthecasenum \label{ATCrcm}): This test case tests the correctness of PMGT. The input mesh is shown in Figure \ref{input3}. There is a vertical line at $x = 0.5$. The refining and coarsening criterion is the size of the cells. The size of the cell is measured by the length of the longest edge of the cell. The cells that intersect with the vertical line are refined until the criterion is met. When the refining is done, the vertical line is moved to the right $0.6$ unit ($x=x+0.6$), and another refinement is performed. After five refinements are done, the cells to be left of the vertical line by up to 2 units are coarsened, until the coarsening criterion is met. The refining and coarsening are stopped when the vertical line moves to a position outside of the domain.
\item Test Case {\em RefineM} (\refstepcounter{casenum}\cthecasenum \label{ATCrm}): This test case tests the correctness of PMGT. The input mesh is shown in Figure \ref{input4}. There is an arc with radius of 0.7 unit going through the mesh. Cells that intersect with the arc are refined until the required number of refinements has been reached.
\item Test Case {\em Split} (\refstepcounter{casenum}\cthecasenum \label{ATCss}): This test case tests both the correctness and speed of PMGT. The input mesh is shown in Figure \ref{input5}. This test simply splits all cells of the mesh 4 times. It is done in both the serial version and the parallel version with different number of processors. The execution time of setting the cells to be refined and splitting the cells is measured.
\end{itemize}
\subsection{Traceability Matrix for SRS \label{AmatrixR}}
In the traceability matrix for software requirements, if a test case tests the functionality of a software requirement, there will be a check mark on the cell for the corresponding test case. In each row of the traceability matrix for software requirements (Table \ref{AtestTMr}), if the requirement in that row defines the correctness or the speed of the software, one or more cells in this row are checked. Otherwise, all cells in the row are empty. Table \ref{AtestTMr} shows that the test cases developed in Section \ref{AtestSecTestcases} assist with validating the correctness and speed of the software. The detailed information for each functional and nonfunctional requirements can be found in the SRS document.
The names of the requirements and their corresponding numbers are listed below for convenience.
\begin{description}
\item[\fref{RefiningMesh}:] RefiningMesh
\item[\fref{CoarseningMesh}:] CoarseningMesh
\item[\fref{RefiningOrCoarsening}:] RefiningOrCoarsening
\item[\fref{MeshType}:] MeshType
\item[\fref{ElmShape}:] ElmShape
\item[\fref{DomainDimension}:] DomainDimension
\item[\fref{Conformal}:] Conformal
\item[\fref{InputDefinition}:] InputDefinition
\item[\fref{RCInstruction}:] RCInstruction
\item[\fref{OutputStorage}:] OutputStorage
\item[\fref{VertexUniqueID}:] VertexUniqueID
\item[\fref{ElmUniqueID}:] ElmUniqueID
\item[\fref{ElmTopology}:] ElmTopology
\item[\fref{OutElmOrder}:] OutElmOrder
\item[\fref{OutVertexOrder}:] OutVertexOrder
\item[\fref{Help}:] Help
\item[\nref{Performance}:] Performance
\item[\nref{Precision}:] Precision
\item[\nref{Exception}:] Exception
\item[\nref{Portability}:] Portability
\item[\nref{LookAndFeel}:] LookAndFeel
\item[\nref{Usability}:] Usability
\item[\nref{Maintainability}:] Maintainability
\end{description}
\begin{table}[ht]
\centering
\begin{tabular}{|p{0.06\textwidth}|p{0.06\textwidth}|p{0.06\textwidth}|p{0.06\textwidth}|p{0.06\textwidth}|p{0.06\textwidth}|p{0.06\textwidth}|}
\hline
&\cref{ATCscs} & \cref{ATCrcs1} & \cref{ATCrcs2} & \cref{ATCrcm} & \cref{ATCrm}&\cref{ATCss}\\
\hline\hline
\fref{RefiningMesh}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark\\\hline%f2
\fref{CoarseningMesh}& \checkmark & \checkmark & \checkmark & \checkmark & & \\\hline%f3
\fref{RefiningOrCoarsening}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline%f1
\fref{MeshType}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark& \\\hline%f4
\fref{ElmShape}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark& \\\hline%f5
\fref{DomainDimension}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark& \\\hline%f6
\fref{Conformal}& \checkmark &\checkmark & \checkmark & \checkmark & \checkmark& \\\hline%f7
\fref{InputDefinition}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\fref{RCInstruction}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\fref{OutputStorage}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \\\hline
\fref{VertexUniqueID}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \\\hline
\fref{ElmUniqueID}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \\\hline
\fref{ElmTopology}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \\\hline
\fref{OutElmOrder}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \\\hline
\fref{OutVertexOrder}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \\\hline
\fref{Help} & & & & & & \\\hline
\nref{Performance} & & & & & & \checkmark \\\hline
\nref{Precision} & & & & & & \\\hline
\nref{Exception} & & & & & & \\\hline
\nref{Portability} & & & & & & \\\hline
\nref{LookAndFeel} & & & & & & \\\hline
\nref{Usability} & & & & & & \\\hline
\nref{Maintainability} & & & & & & \\\hline
\end{tabular}
\caption{Traceability Matrix: Test Cases and Requirements}
\label{AtestTMr}
\end{table}
\subsection{Traceability Matrix for MG \label{AmatrixM}}
Similar to Section \ref{AmatrixR}, the traceability matrix for modules (Table \ref{AtestTMm}) shows that the test cases validate the modules that are associated with correctness and speed. The names of modules appear in Table \ref{AtestTMm} are listed below. The detailed information for each module can be found in the MG document.
\begin{description}
\item[\mref{mMemory}:] Virtual Memory Module
\item[\mref{mFileRW}:] File Read/Write Module
\item[\mref{mKeyboard}:] Keyboard Input Module
\item[\mref{mScreen}:] Screen Output Module
\item[\mref{mInput}:] Input Format Module
\item[\mref{mOutput}:] Output Format Module
\item[\mref{mService}:] Service Module
\item[\mref{mVertex}:] Vertex Module
\item[\mref{mEdge}:] Edge Module
\item[\mref{mCell}:] Cell Module
\item[\mref{mMesh}:] Mesh Module
\item[\mref{mRefining}:] Refining Module
\item[\mref{mCoarsening}:] Coarsening Module
\end{description}
\begin{table}[ht]
\centering
\begin{tabular}{|p{0.06\textwidth}|p{0.06\textwidth}|p{0.06\textwidth}|p{0.06\textwidth}|p{0.06\textwidth}|p{0.06\textwidth}|p{0.06\textwidth}|}
\hline
&\cref{ATCscs} & \cref{ATCrcs1} & \cref{ATCrcs2} & \cref{ATCrcm} & \cref{ATCrm}&\cref{ATCss}\\
\hline\hline
\mref{mMemory}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\mref{mFileRW}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\mref{mKeyboard}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\mref{mScreen}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\mref{mInput}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\mref{mOutput}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\mref{mService}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \\\hline
\mref{mVertex}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\mref{mEdge}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\mref{mCell}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\mref{mMesh}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\mref{mRefining}& \checkmark & \checkmark & \checkmark & \checkmark & \checkmark & \checkmark \\\hline
\mref{mCoarsening}& \checkmark & \checkmark & \checkmark & \checkmark & & \\\hline
\end{tabular}
\caption{Traceability Matrix: Test Cases and Modules}
\label{AtestTMm}
\end{table}
\section{Results and Analysis\label{AtestSecResult}}
The results of the test cases defined in Section \ref{TCs} are listed in Section \ref{AtestSectestresult}. The analysis, including charts that compare the execution time of the parallel version to the serial version are provided in Section \ref{AtestSecAnalysis}.
\subsection {Testing Results \label{AtestSectestresult}}
The following tables list the testing results of each test case. The field {\em Test Case Number} and {\em Test Case Name} list the number and the name of each test case. The {\em Input field} gives the number of the figure that is the input for that test case, or a description of the input mesh. The {\em Expected Output} describes the requirements of the output mesh. The {\em Actual Output} gives the result of the test. The {\em Selected Output Mesh} field should give the output meshes. However, there are too many intermediate mesh to display, and displaying only the final mesh is too simple to illustrate the feature of the test case. Selected intermediate meshes and final mesh are included in the {\em Actual Output} field. The {\em Result} field indicates whether the test is passed or failed.
\vspace{1cm}
\begin{minipage}{\textwidth}
\begin{tabular}{p{\colAwidth}|p{\colBwidth}}
\hline \hline
{\bf Test Case Number} & \cref{ATCscs} \\
{\bf Test Case Name} & SplitCS\\
\hline
Input & Figure \ref{input1}\\
Expected Output & ACVTRs and VCVTRs listed in Section \ref{AtestSecTest} are met\\
Actual Output & Summary of the correctness test:\\
& 15 tests are performed.\\
& 15 tests succeed.\\
& 0 tests fail.\\
Selected Output Mesh &Figure \ref{output11}, \ref{output12}, \ref{output13}\\
Result & Passed\\
\hline \hline
\end{tabular}
\end{minipage}
\vspace{1cm}
\begin{minipage}{\textwidth}
\begin{tabular}{p{\colAwidth}|p{\colBwidth}}
\hline \hline
{\bf Test Case Number} & \cref{ATCrcs1} \\
{\bf Test Case Name} & RefineCS1\\
\hline
Input & Figure \ref{input1}\\
Expected Output & ACVTRs and VCVTRs listed in Section \ref{AtestSecTest} are met\\
Actual Output & Summary of the correctness test:\\
& 15 tests are performed.\\
& 15 tests succeed.\\
& 0 tests fail.\\
Selected Output Mesh & Figure \ref{output21}, \ref{output22}, \ref{output23}\\
Result & Passed\\
\hline \hline
\end{tabular}
\end{minipage}
\vspace{1cm}
\begin{minipage}{\textwidth}
\begin{tabular}{p{\colAwidth}|p{\colBwidth}}
\hline \hline
{\bf Test Case Number} & \cref{ATCrcs2} \\
{\bf Test Case Name} & RefineCS2\\
\hline
Input & Figure \ref{input2}\\
Expected Output & ACVTRs and VCVTRs listed in Section \ref{AtestSecTest} are met\\
Actual Output & Summary of the correctness test:\\
& 15 tests are performed.\\
& 15 tests succeed.\\
& 0 tests fail.\\
Selected Output Mesh & Figure \ref{output31}, \ref{output32}, \ref{output33}\\
Result & Passed\\
\hline \hline
\end{tabular}
\end{minipage}
\vspace{1cm}
\begin{minipage}{\textwidth}
\begin{tabular}{p{\colAwidth}|p{\colBwidth}}
\hline \hline
{\bf Test Case Number} & \cref{ATCrcm} \\
{\bf Test Case Name} & RefineCM\\
\hline
Input & Figure \ref{input3}\\
Expected Output & ACVTRs and VCVTRs listed in Section \ref{AtestSecTest} are met\\
Actual Output & Summary of the correctness test:\\
& 15 tests are performed.\\
& 15 tests succeed.\\
& 0 tests fail.\\
Selected Output Mesh & Figure \ref{output41}, \ref{output42}, \ref{output43}, \ref{output44}\\
Result & Passed\\
\hline \hline
\end{tabular}
\end{minipage}
\vspace{1cm}
\begin{minipage}{\textwidth}
\begin{tabular}{p{\colAwidth}|p{\colBwidth}}
\hline \hline
{\bf Test Case Number} & \cref{ATCrm} \\
{\bf Test Case Name} & RefineM\\
\hline
Input & Figure \ref{input4}\\
Expected Output & ACVTRs and VCVTRs listed in Section \ref{AtestSecTest} are met\\
Actual Output & Summary of the correctness test:\\
& 15 tests are performed.\\
& 15 tests succeed.\\
& 0 tests fail.\\
Selected Output Mesh & Figure \ref{output51}, \ref{output52}, \ref{output53}\\
Result & Passed\\
\hline \hline
\end{tabular}
\end{minipage}
\vspace{1cm}
\begin{minipage}{\textwidth}
\begin{tabular}{p{\colAwidth}|p{\colBwidth}}
\hline \hline
{\bf Test Case Number} & \cref{ATCss} \\
{\bf Test Case Name} & SplitM\\
\hline
Input & Figure \ref{input4}\\
Expected Output & ACVTRs and VCVTRs listed in Section \ref{AtestSecTest} are met\\
& Execution time increases as the number of cells increases. Execution time decreases as the number of processors increases.\\
Actual Output & Execution time as indicated in Figure \ref{output61}\\
Selected Output Mesh & The mesh is too dense to be shown.\\
Result & Passed\\
\hline \hline
\end{tabular}
\end{minipage}
\begin{figure}[ht]
\centering
\epsfig{file=output61.eps, width= \textwidth}
\caption{Output of \cref{ATCss}}
\label{output61}
\end{figure}
\subsection {Analysis \label{AtestSecAnalysis}}
All of the test cases conform to the ACVTRs and VCVTRs listed in Section \ref{AtestSecTest}. The test result of \cref{ATCss} show that when the number of cells increased, the execution time increased, and when the number of processors increased, the execution time decreased. That is, this test is passed. Figure \ref{speedup} show the speedup when using different numbers of processors. The speedup is defined as
\[ Speedup(n) = \frac{T_{1}}{T_{n}}
\]
Where $T_{1}$ is the execution time of the serial version, and $T_{n}$ is the execution time of the parallel version with $n$ processors. In general, $Speedup(n) < n$. However, for PMGT, when the number of cells is greater than 2700, $Speedup(n) > n$, which is a super linear speedup. Since the algorithms used for the serial version and the parallel version are the same, the super linear speedup is probably due to the cache effect. That is, when the numbers of processors increases, the size of the accumulated caches from different processors also increases. With the larger accumulated cache size, more, or even all, core data set can fit into the caches and the memory access time reduces dramatically. This may explain the extra speedup in additional to the speedup due to parallel computation.
\begin{figure}
\centering
\epsfig{file=speedup.eps, width= \textwidth}
\caption{Speedup for Different Numbers of Processors}
\label{speedup}
\end{figure}
\begin{figure}
\centering
\epsfig{file=input1.eps, width= 0.7\textwidth}
\caption{Input 1}
\label{input1}
\end{figure}
\begin{figure}
\centering
\epsfig{file=input2.eps, width= 0.7\textwidth}
\caption{Input 2}
\label{input2}
\end{figure}
\begin{figure}
\centering
\epsfig{file=input3.eps, width= 0.7\textwidth}
\caption{Input 3}
\label{input3}
\end{figure}
\begin{figure}
\centering
\epsfig{file=input4.eps, width= 0.7\textwidth}
\caption{Input 4}
\label{input4}
\end{figure}
\begin{figure}
\centering
\epsfig{file=input5.eps, width= 0.7\textwidth}
\caption{Input 5}
\label{input5}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output11.eps, width=0.7\textwidth}
\caption{Output 1 of \cref{ATCscs}}
\label{output11}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output12.eps, width=0.7\textwidth}
\caption{Output 2 of \cref{ATCscs}}
\label{output12}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output13.eps, width=0.7\textwidth}
\caption{Output 3 of \cref{ATCscs}}
\label{output13}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output21.eps, width=0.7\textwidth}
\caption{Output 1 of \cref{ATCrcs1}}
\label{output21}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output22.eps, width=0.7\textwidth}
\caption{Output 2 of \cref{ATCrcs1}}
\label{output22}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output23.eps, width=0.7\textwidth}
\caption{Output 3 of \cref{ATCrcs1}}
\label{output23}
\end{figure}
\clearpage
\begin{figure}
\centering
\epsfig{file=output31.eps, width=0.7\textwidth}
\caption{Output 1 of \cref{ATCrcs2}}
\label{output31}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output32.eps, width=0.7\textwidth}
\caption{Output 2 of \cref{ATCrcs2}}
\label{output32}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output33.eps, width=0.7\textwidth}
\caption{Output 3 of \cref{ATCrcs2}}
\label{output33}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output41.eps, width=0.7\textwidth}
\caption{Output 1 of \cref{ATCrcm}}
\label{output41}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output42.eps, width=0.7\textwidth}
\caption{Output 2 of \cref{ATCrcm}}
\label{output42}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output43.eps, width=0.7\textwidth}
\caption{Output 3 of \cref{ATCrcm}}
\label{output43}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output44.eps, width=0.7\textwidth}
\caption{Output 4 of \cref{ATCrcm}}
\label{output44}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output51.eps, width=0.7\textwidth}
\caption{Output 1 of \cref{ATCrm}}
\label{output51}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output52.eps, width=0.7\textwidth}
\caption{Output 2 of \cref{ATCrm}}
\label{output52}
\end{figure}
\begin{figure}
\centering
\epsfig{file=output53.eps, width=0.7\textwidth}
\caption{Output 3 of \cref{ATCrm}}
\label{output53}
\end{figure}
%\newpage
%\bibliography{WenRef}
%\bibliographystyle{plainnat}
\end{document}
%!PS-Adobe-3.0 EPSF-3.0
%%Title: (Slide 1)
%%Version: 1 4
%%Creator: Adobe Acrobat 6.0
%%CreationDate: 13:37:41 12/26/06
%%For: (Wen Yu)
%%DocumentData: Clean7Bit
%%BoundingBox: 29 62 747 599
%%HiResBoundingBox: 29.0 62.0 747.0 599.0
%%Pages: 0
%%DocumentProcessColors: Black
%%DocumentNeededResources: (atend)
%%DocumentSuppliedResources:
%%+ procset (Adobe Acrobat - PDF operators) 1.2 0
%%+ procset (Adobe Acrobat - type operators) 1.2 0
%%+ procset (Adobe Acrobat - general image support) 1.2 0
%%+ procset (Adobe Acrobat - monochrome image support) 1.2 0
%%+ procset (Adobe Acrobat - color image support) 1.2 0
%%+ procset (Adobe Acrobat - indexed color image support) 1.2 0
%%EndComments
%%BeginProlog
%%EndProlog
%%BeginSetup
%ADOPrintSettings: L1 W0 VM op crd os scsa T h EF bg ucr sf ef r b fa pr SEPS ttf HB 0
%%BeginResource: file Pscript_T42Hdr PSVER
userdict /ct_T42Dict 15 dict put
ct_T42Dict begin
/Is2015?
{
version
cvi
2015
ge
} bind def
/AllocGlyphStorage
{
Is2015?
{
pop
}
{
{string} forall
} ifelse
} bind def
/Type42DictBegin
{
25 dict begin
/FontName exch def
/CharStrings 256 dict
begin
/.notdef 0 def
currentdict
end def
/Encoding exch def
/PaintType 0 def
/FontType 42 def
/FontMatrix [1 0 0 1 0 0] def
4 array astore cvx /FontBBox exch def
/sfnts
} bind def
/Type42DictEnd
{
currentdict dup /FontName get exch definefont end
ct_T42Dict exch
dup /FontName get exch put
} bind def
/RD {string currentfile exch readstring pop} executeonly def
/PrepFor2015
{
Is2015?
{
/GlyphDirectory
16
dict def
sfnts 0 get
dup
2 index
(glyx)
putinterval
2 index
(locx)
putinterval
pop
pop
}
{
pop
pop
} ifelse
} bind def
/AddT42Char
{
Is2015?
{
/GlyphDirectory get
begin
def
end
pop
pop
}
{
/sfnts get
4 index
get
3 index
2 index
putinterval
pop
pop
pop
pop
} ifelse
} bind def
end
%%EndResource
%%BeginResource: procset Adobe_CoolType_Utility_MAKEOCF 1.16 0
%%Copyright: Copyright 1987-2003 Adobe Systems Incorporated.
%%Version: 1.16 0
systemdict /languagelevel known dup
{ currentglobal false setglobal }
{ false }
ifelse
exch
userdict /Adobe_CoolType_Utility 2 copy known
{ 2 copy get dup maxlength 25 add dict copy }
{ 25 dict }
ifelse put
Adobe_CoolType_Utility
begin
/ct_Level2? exch def
/ct_Clone? 1183615869 internaldict dup
/CCRun known not
exch /eCCRun known not
ct_Level2? and or def
ct_Level2?
{ globaldict begin currentglobal true setglobal }
if
/ct_AddStdCIDMap
ct_Level2?
{ {
((Hex) 57 StartData
0615 1e27 2c39 1c60 d8a8 cc31 fe2b f6e0
7aa3 e541 e21c 60d8 a8c9 c3d0 6d9e 1c60
d8a8 c9c2 02d7 9a1c 60d8 a849 1c60 d8a8
cc36 74f4 1144 b13b 77) 0 () /SubFileDecode filter cvx exec
} }
{ {
<BAB431EA07F209EB8C4348311481D9D3F76E3D15246555577D87BC510ED54E
118C39697FA9F6DB58128E60EB8A12FA24D7CDD2FA94D221FA9EC8DA3E5E6A1C
4ACECC8C2D39C54E7C946031DD156C3A6B4A09AD29E1867A> eexec
} }
ifelse bind def
ct_Level2?
{ end setglobal }
if
/ct_UseNativeCapability? systemdict /composefont known def
/ct_MakeOCF 35 dict def
/ct_Vars 25 dict def
/ct_GlyphDirProcs 6 dict def
/ct_BuildCharDict 15 dict dup
begin
/charcode 2 string def
/dst_string 1500 string def
/nullstring () def
/usewidths? true def
end def
ct_Level2? { setglobal } { pop } ifelse
ct_GlyphDirProcs
begin
/GetGlyphDirectory
{
systemdict /languagelevel known
{ pop /CIDFont findresource /GlyphDirectory get }
{
1 index /CIDFont findresource /GlyphDirectory
get dup type /dicttype eq
{
dup dup maxlength exch length sub 2 index lt
{
dup length 2 index add dict copy 2 index
/CIDFont findresource/GlyphDirectory 2 index put
}
if
}
if
exch pop exch pop
}
ifelse
+
} def
/+
{
systemdict /languagelevel known
{
currentglobal false setglobal
3 dict begin
/vm exch def
}
{ 1 dict begin }
ifelse
/$ exch def
systemdict /languagelevel known
{
vm setglobal
/gvm currentglobal def
$ gcheck setglobal
}
if
? { $ begin } if
} def
/? { $ type /dicttype eq } def
/| {
userdict /Adobe_CoolType_Data known
{
Adobe_CoolType_Data /AddWidths? known
{
currentdict Adobe_CoolType_Data
begin
begin
AddWidths?
{
Adobe_CoolType_Data /CC 3 index put
? { def } { $ 3 1 roll put } ifelse
CC charcode exch 1 index 0 2 index 256 idiv put
1 index exch 1 exch 256 mod put
stringwidth 2 array astore
currentfont /Widths get exch CC exch put
}
{ ? { def } { $ 3 1 roll put } ifelse }
ifelse
end
end
}
{ ? { def } { $ 3 1 roll put } ifelse } ifelse
}
{ ? { def } { $ 3 1 roll put } ifelse }
ifelse
} def
/!
{
? { end } if
systemdict /languagelevel known
{ gvm setglobal }
if
end
} def
/: { string currentfile exch readstring pop } executeonly def
end
ct_MakeOCF
begin
/ct_cHexEncoding
[/c00/c01/c02/c03/c04/c05/c06/c07/c08/c09/c0A/c0B/c0C/c0D/c0E/c0F/c10/c11/c12
/c13/c14/c15/c16/c17/c18/c19/c1A/c1B/c1C/c1D/c1E/c1F/c20/c21/c22/c23/c24/c25
/c26/c27/c28/c29/c2A/c2B/c2C/c2D/c2E/c2F/c30/c31/c32/c33/c34/c35/c36/c37/c38
/c39/c3A/c3B/c3C/c3D/c3E/c3F/c40/c41/c42/c43/c44/c45/c46/c47/c48/c49/c4A/c4B
/c4C/c4D/c4E/c4F/c50/c51/c52/c53/c54/c55/c56/c57/c58/c59/c5A/c5B/c5C/c5D/c5E
/c5F/c60/c61/c62/c63/c64/c65/c66/c67/c68/c69/c6A/c6B/c6C/c6D/c6E/c6F/c70/c71
/c72/c73/c74/c75/c76/c77/c78/c79/c7A/c7B/c7C/c7D/c7E/c7F/c80/c81/c82/c83/c84
/c85/c86/c87/c88/c89/c8A/c8B/c8C/c8D/c8E/c8F/c90/c91/c92/c93/c94/c95/c96/c97
/c98/c99/c9A/c9B/c9C/c9D/c9E/c9F/cA0/cA1/cA2/cA3/cA4/cA5/cA6/cA7/cA8/cA9/cAA
/cAB/cAC/cAD/cAE/cAF/cB0/cB1/cB2/cB3/cB4/cB5/cB6/cB7/cB8/cB9/cBA/cBB/cBC/cBD
/cBE/cBF/cC0/cC1/cC2/cC3/cC4/cC5/cC6/cC7/cC8/cC9/cCA/cCB/cCC/cCD/cCE/cCF/cD0
/cD1/cD2/cD3/cD4/cD5/cD6/cD7/cD8/cD9/cDA/cDB/cDC/cDD/cDE/cDF/cE0/cE1/cE2/cE3
/cE4/cE5/cE6/cE7/cE8/cE9/cEA/cEB/cEC/cED/cEE/cEF/cF0/cF1/cF2/cF3/cF4/cF5/cF6
/cF7/cF8/cF9/cFA/cFB/cFC/cFD/cFE/cFF] def
/ct_CID_STR_SIZE 8000 def
/ct_mkocfStr100 100 string def
/ct_defaultFontMtx [.001 0 0 .001 0 0] def
/ct_1000Mtx [1000 0 0 1000 0 0] def
/ct_raise {exch cvx exch errordict exch get exec stop} bind def
/ct_reraise
{ cvx $error /errorname get (Error: ) print dup ( ) cvs print
errordict exch get exec stop
} bind def
/ct_cvnsi
{
1 index add 1 sub 1 exch 0 4 1 roll
{
2 index exch get
exch 8 bitshift
add
}
for
exch pop
} bind def
/ct_GetInterval
{
Adobe_CoolType_Utility /ct_BuildCharDict get
begin
/dst_index 0 def
dup dst_string length gt
{ dup string /dst_string exch def }
if
1 index ct_CID_STR_SIZE idiv
/arrayIndex exch def
2 index arrayIndex get
2 index
arrayIndex ct_CID_STR_SIZE mul
sub
{
dup 3 index add 2 index length le
{
2 index getinterval
dst_string dst_index 2 index putinterval
length dst_index add /dst_index exch def
exit
}
{
1 index length 1 index sub
dup 4 1 roll
getinterval
dst_string dst_index 2 index putinterval
pop dup dst_index add /dst_index exch def
sub
/arrayIndex arrayIndex 1 add def
2 index dup length arrayIndex gt
{ arrayIndex get }
{
pop
exit
}
ifelse
0
}
ifelse
}
loop
pop pop pop
dst_string 0 dst_index getinterval
end
} bind def
ct_Level2?
{
/ct_resourcestatus
currentglobal mark true setglobal
{ /unknowninstancename /Category resourcestatus }
stopped
{ cleartomark setglobal true }
{ cleartomark currentglobal not exch setglobal }
ifelse
{
{
mark 3 1 roll /Category findresource
begin
ct_Vars /vm currentglobal put
({ResourceStatus} stopped) 0 () /SubFileDecode filter cvx exec
{ cleartomark false }
{ { 3 2 roll pop true } { cleartomark false } ifelse }
ifelse
ct_Vars /vm get setglobal
end
}
}
{ { resourcestatus } }
ifelse bind def
/CIDFont /Category ct_resourcestatus
{ pop pop }
{
currentglobal true setglobal
/Generic /Category findresource
dup length dict copy
dup /InstanceType /dicttype put
/CIDFont exch /Category defineresource pop
setglobal
}
ifelse
ct_UseNativeCapability?
{
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo 3 dict dup begin
/Registry (Adobe) def
/Ordering (Identity) def
/Supplement 0 def
end def
/CMapName /Identity-H def
/CMapVersion 1.000 def
/CMapType 1 def
1 begincodespacerange
<0000> <FFFF>
endcodespacerange
1 begincidrange
<0000> <FFFF> 0
endcidrange
endcmap
CMapName currentdict /CMap defineresource pop
end
end
}
if
}
{
/ct_Category 2 dict begin
/CIDFont 10 dict def
/ProcSet 2 dict def
currentdict
end
def
/defineresource
{
ct_Category 1 index 2 copy known
{
get
dup dup maxlength exch length eq
{
dup length 10 add dict copy
ct_Category 2 index 2 index put
}
if
3 index 3 index put
pop exch pop
}
{ pop pop /defineresource /undefined ct_raise }
ifelse
} bind def
/findresource
{
ct_Category 1 index 2 copy known
{
get
2 index 2 copy known
{ get 3 1 roll pop pop}
{ pop pop /findresource /undefinedresource ct_raise }
ifelse
}
{ pop pop /findresource /undefined ct_raise }
ifelse
} bind def
/resourcestatus
{
ct_Category 1 index 2 copy known
{
get
2 index known
exch pop exch pop
{
0 -1 true
}
{
false
}
ifelse
}
{ pop pop /findresource /undefined ct_raise }
ifelse
} bind def
/ct_resourcestatus /resourcestatus load def
}
ifelse
/ct_CIDInit 2 dict
begin
/ct_cidfont_stream_init
{
{
dup (Binary) eq
{
pop
null
currentfile
ct_Level2?
{
{ cid_BYTE_COUNT () /SubFileDecode filter }
stopped
{ pop pop pop }
if
}
if
/readstring load
exit
}
if
dup (Hex) eq
{
pop
currentfile
ct_Level2?
{
{ null exch /ASCIIHexDecode filter /readstring }
stopped
{ pop exch pop (>) exch /readhexstring }
if
}
{ (>) exch /readhexstring }
ifelse
load
exit
}
if
/StartData /typecheck ct_raise
}
loop
cid_BYTE_COUNT ct_CID_STR_SIZE le
{
2 copy cid_BYTE_COUNT string exch exec
pop
1 array dup
3 -1 roll
0 exch put
}
{
cid_BYTE_COUNT ct_CID_STR_SIZE div ceiling cvi
dup array exch 2 sub 0 exch 1 exch
{
2 copy
5 index
ct_CID_STR_SIZE
string
6 index exec
pop
put
pop
}
for
2 index
cid_BYTE_COUNT ct_CID_STR_SIZE mod string
3 index exec
pop
1 index exch
1 index length 1 sub
exch put
}
ifelse
cid_CIDFONT exch /GlyphData exch put
2 index null eq
{
pop pop pop
}
{
pop /readstring load
1 string exch
{
3 copy exec
pop
dup length 0 eq
{
pop pop pop pop pop
true exit
}
if
4 index
eq
{
pop pop pop pop
false exit
}
if
}
loop
pop
}
ifelse
} bind def
/StartData
{
mark
{
currentdict
dup /FDArray get 0 get /FontMatrix get
0 get 0.001 eq
{
dup /CDevProc known not
{
/CDevProc 1183615869 internaldict /stdCDevProc 2 copy known
{ get }
{
pop pop
{ pop pop pop pop pop 0 -1000 7 index 2 div 880 }
}
ifelse
def
}
if
}
{
/CDevProc
{
pop pop pop pop pop
0
1 cid_temp /cid_CIDFONT get
/FDArray get 0 get
/FontMatrix get 0 get div
7 index 2 div
1 index 0.88 mul
} def
}
ifelse
/cid_temp 15 dict def
cid_temp
begin
/cid_CIDFONT exch def
3 copy pop
dup /cid_BYTE_COUNT exch def 0 gt
{
ct_cidfont_stream_init
FDArray
{
/Private get
dup /SubrMapOffset known
{
begin
/Subrs SubrCount array def
Subrs
SubrMapOffset
SubrCount
SDBytes
ct_Level2?
{
currentdict dup /SubrMapOffset undef
dup /SubrCount undef
/SDBytes undef
}
if
end
/cid_SD_BYTES exch def
/cid_SUBR_COUNT exch def
/cid_SUBR_MAP_OFFSET exch def
/cid_SUBRS exch def
cid_SUBR_COUNT 0 gt
{
GlyphData cid_SUBR_MAP_OFFSET cid_SD_BYTES ct_GetInterval
0 cid_SD_BYTES ct_cvnsi
0 1 cid_SUBR_COUNT 1 sub
{
exch 1 index
1 add
cid_SD_BYTES mul cid_SUBR_MAP_OFFSET add
GlyphData exch cid_SD_BYTES ct_GetInterval
0 cid_SD_BYTES ct_cvnsi
cid_SUBRS 4 2 roll
GlyphData exch
4 index
1 index
sub
ct_GetInterval
dup length string copy put
}
for
pop
}
if
}
{ pop }
ifelse
}
forall
}
if
cleartomark pop pop
end
CIDFontName currentdict /CIDFont defineresource pop
end end
}
stopped
{ cleartomark /StartData ct_reraise }
if
} bind def
currentdict
end def
/ct_saveCIDInit
{
/CIDInit /ProcSet ct_resourcestatus
{ true }
{ /CIDInitC /ProcSet ct_resourcestatus }
ifelse
{
pop pop
/CIDInit /ProcSet findresource
ct_UseNativeCapability?
{ pop null }
{ /CIDInit ct_CIDInit /ProcSet defineresource pop }
ifelse
}
{ /CIDInit ct_CIDInit /ProcSet defineresource pop null }
ifelse
ct_Vars exch /ct_oldCIDInit exch put
} bind def
/ct_restoreCIDInit
{
ct_Vars /ct_oldCIDInit get dup null ne
{ /CIDInit exch /ProcSet defineresource pop }
{ pop }
ifelse
} bind def
/ct_BuildCharSetUp
{
1 index
begin
CIDFont
begin
Adobe_CoolType_Utility /ct_BuildCharDict get
begin
/ct_dfCharCode exch def
/ct_dfDict exch def
CIDFirstByte ct_dfCharCode add
dup CIDCount ge
{ pop 0 }
if
/cid exch def
{
GlyphDirectory cid 2 copy known
{ get }
{ pop pop nullstring }
ifelse
dup length FDBytes sub 0 gt
{
dup
FDBytes 0 ne
{ 0 FDBytes ct_cvnsi }
{ pop 0 }
ifelse
/fdIndex exch def
dup length FDBytes sub FDBytes exch getinterval
/charstring exch def
exit
}
{
pop
cid 0 eq
{ /charstring nullstring def exit }
if
/cid 0 def
}
ifelse
}
loop
} def
/ct_SetCacheDevice
{
0 0 moveto
dup stringwidth
3 -1 roll
true charpath
pathbbox
0 -1000
7 index 2 div 880
setcachedevice2
0 0 moveto
} def
/ct_CloneSetCacheProc
{
1 eq
{
stringwidth
pop -2 div -880
0 -1000 setcharwidth
moveto
}
{
usewidths?
{
currentfont /Widths get cid
2 copy known
{ get exch pop aload pop }
{ pop pop stringwidth }
ifelse
}
{ stringwidth }
ifelse
setcharwidth
0 0 moveto
}
ifelse
} def
/ct_Type3ShowCharString
{
ct_FDDict fdIndex 2 copy known
{ get }
{
currentglobal 3 1 roll
1 index gcheck setglobal
ct_Type1FontTemplate dup maxlength dict copy
begin
FDArray fdIndex get
dup /FontMatrix 2 copy known
{ get }
{ pop pop ct_defaultFontMtx }
ifelse
/FontMatrix exch dup length array copy def
/Private get
/Private exch def
/Widths rootfont /Widths get def
/CharStrings 1 dict dup /.notdef
<d841272cf18f54fc13> dup length string copy put def
currentdict
end
/ct_Type1Font exch definefont
dup 5 1 roll put
setglobal
}
ifelse
dup /CharStrings get 1 index /Encoding get
ct_dfCharCode get charstring put
rootfont /WMode 2 copy known
{ get }
{ pop pop 0 }
ifelse
exch
1000 scalefont setfont
ct_str1 0 ct_dfCharCode put
ct_str1 exch ct_dfSetCacheProc
ct_SyntheticBold
{
currentpoint
ct_str1 show
newpath
moveto
ct_str1 true charpath
ct_StrokeWidth setlinewidth
stroke
}
{ ct_str1 show }
ifelse
} def
/ct_Type4ShowCharString
{
ct_dfDict ct_dfCharCode charstring
FDArray fdIndex get
dup /FontMatrix get dup ct_defaultFontMtx ct_matrixeq not
{ ct_1000Mtx matrix concatmatrix concat }
{ pop }
ifelse
/Private get
Adobe_CoolType_Utility /ct_Level2? get not
{
ct_dfDict /Private
3 -1 roll
{ put }
1183615869 internaldict /superexec get exec
}
if
1183615869 internaldict
Adobe_CoolType_Utility /ct_Level2? get
{ 1 index }
{ 3 index /Private get mark 6 1 roll }
ifelse
dup /RunInt known
{ /RunInt get }
{ pop /CCRun }
ifelse
get exec
Adobe_CoolType_Utility /ct_Level2? get not
{ cleartomark }
if
} bind def
/ct_BuildCharIncremental
{
{
Adobe_CoolType_Utility /ct_MakeOCF get begin
ct_BuildCharSetUp
ct_ShowCharString
}
stopped
{ stop }
if
end
end
end
end
} bind def
/BaseFontNameStr (BF00) def
/ct_Type1FontTemplate 14 dict
begin
/FontType 1 def
/FontMatrix [0.001 0 0 0.001 0 0] def
/FontBBox [-250 -250 1250 1250] def
/Encoding ct_cHexEncoding def
/PaintType 0 def
currentdict
end def
/BaseFontTemplate 11 dict
begin
/FontMatrix [0.001 0 0 0.001 0 0] def
/FontBBox [-250 -250 1250 1250] def
/Encoding ct_cHexEncoding def
/BuildChar /ct_BuildCharIncremental load def
ct_Clone?
{
/FontType 3 def
/ct_ShowCharString /ct_Type3ShowCharString load def
/ct_dfSetCacheProc /ct_CloneSetCacheProc load def
/ct_SyntheticBold false def
/ct_StrokeWidth 1 def
}
{
/FontType 4 def
/Private 1 dict dup /lenIV 4 put def
/CharStrings 1 dict dup /.notdef <d841272cf18f54fc13> put def
/PaintType 0 def
/ct_ShowCharString /ct_Type4ShowCharString load def
}
ifelse
/ct_str1 1 string def
currentdict
end def
/BaseFontDictSize BaseFontTemplate length 5 add def
/ct_matrixeq
{
true 0 1 5
{
dup 4 index exch get exch 3 index exch get eq and
dup not
{ exit }
if
}
for
exch pop exch pop
} bind def
/ct_makeocf
{
15 dict
begin
exch /WMode exch def
exch /FontName exch def
/FontType 0 def
/FMapType 2 def
/FontMatrix matrix def
/bfCount 1 index /CIDCount get 256 idiv 1 add
dup 256 gt { pop 256} if def
/Encoding
256 array 0 1 bfCount 1 sub { 2 copy dup put pop } for
bfCount 1 255 { 2 copy bfCount put pop } for
def
/FDepVector bfCount dup 256 lt { 1 add } if array def
BaseFontTemplate BaseFontDictSize dict copy
begin
/CIDFont exch def
CIDFont /FontBBox known
{ CIDFont /FontBBox get /FontBBox exch def }
if
CIDFont /CDevProc known
{ CIDFont /CDevProc get /CDevProc exch def }
if
currentdict
end
BaseFontNameStr 3 (0) putinterval
0 1 bfCount dup 256 eq { 1 sub } if
{
FDepVector exch
2 index BaseFontDictSize dict copy
begin
dup /CIDFirstByte exch 256 mul def
FontType 3 eq
{ /ct_FDDict 2 dict def }
if
currentdict
end
1 index 16
BaseFontNameStr 2 2 getinterval cvrs pop
BaseFontNameStr exch definefont
put
}
for
ct_Clone?
{ /Widths 1 index /CIDFont get /GlyphDirectory get length dict def }
if
FontName
currentdict
end
definefont
ct_Clone?
{
gsave
dup 1000 scalefont setfont
ct_BuildCharDict
begin
/usewidths? false def
currentfont /Widths get
begin
exch /CIDFont get /GlyphDirectory get
{
pop
dup charcode exch 1 index 0 2 index 256 idiv put
1 index exch 1 exch 256 mod put
stringwidth 2 array astore def
}
forall
end
/usewidths? true def
end
grestore
}
{ exch pop }
ifelse
} bind def
/ct_ComposeFont
{
ct_UseNativeCapability?
{
2 index /CMap ct_resourcestatus
{ pop pop exch pop }
{
/CIDInit /ProcSet findresource
begin
12 dict
begin
begincmap
/CMapName 3 index def
/CMapVersion 1.000 def
/CMapType 1 def
exch /WMode exch def
/CIDSystemInfo 3 dict dup
begin
/Registry (Adobe) def
/Ordering
CMapName ct_mkocfStr100 cvs
(Adobe-) search
{
pop pop
(-) search
{
dup length string copy
exch pop exch pop
}
{ pop (Identity)}
ifelse
}
{ pop (Identity) }
ifelse
def
/Supplement 0 def
end def
1 begincodespacerange
<0000> <FFFF>
endcodespacerange
1 begincidrange
<0000> <FFFF> 0
endcidrange
endcmap
CMapName currentdict /CMap defineresource pop
end
end
}
ifelse
composefont
}
{
3 2 roll pop
0 get /CIDFont findresource
ct_makeocf
}
ifelse
} bind def
/ct_MakeIdentity
{
ct_UseNativeCapability?
{
1 index /CMap ct_resourcestatus
{ pop pop }
{
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CMapName 2 index def
/CMapVersion 1.000 def
/CMapType 1 def
/CIDSystemInfo 3 dict dup
begin
/Registry (Adobe) def
/Ordering
CMapName ct_mkocfStr100 cvs
(Adobe-) search
{
pop pop
(-) search
{ dup length string copy exch pop exch pop }
{ pop (Identity) }
ifelse
}
{ pop (Identity) }
ifelse
def
/Supplement 0 def
end def
1 begincodespacerange
<0000> <FFFF>
endcodespacerange
1 begincidrange
<0000> <FFFF> 0
endcidrange
endcmap
CMapName currentdict /CMap defineresource pop
end
end
}
ifelse
composefont
}
{
exch pop
0 get /CIDFont findresource
ct_makeocf
}
ifelse
} bind def
currentdict readonly pop
end
end
%%EndResource
/currentpacking where{pop currentpacking true setpacking}if
%%BeginResource: procset pdfvars 6.0 1
%%Copyright: Copyright 1987-2002 Adobe Systems Incorporated. All Rights Reserved.
%%Title: definition of dictionary of variables used by PDF & PDFText procsets
userdict /PDF 162 dict put
userdict /PDFVars 89 dict dup begin put
/docSetupDone false def
/InitAll 0 def
/TermAll 0 def
/DocInitAll 0 def
/DocTermAll 0 def
/_pdfEncodings 2 array def
/_pdf_str1 1 string def
/_pdf_i 0 def
/_pdf_na 0 def
/_pdf_showproc 0 def
/_italMtx [1 0 .212557 1 0 0] def
/_italMtx_WMode1 [1 -.212557 0 1 0 0] def
/_italMtxType0 [1 0 .1062785 1 0 0] def
/_italMtx_WMode1Type0 [1 -.1062785 0 1 0 0] def
/_basefont 0 def
/_basefonto 0 def
/_pdf_oldCIDInit null def
/_pdf_FontDirectory 30 dict def
/_categories 10 dict def
/_sa? true def
/_ColorSep5044? false def
/nulldict 0 dict def
/_processColors 0 def
/overprintstack null def
/_defaulttransfer currenttransfer def
/_defaultflatness currentflat def
/_defaulthalftone null def
/_defaultcolortransfer null def
/_defaultblackgeneration null def
/_defaultundercolorremoval null def
/_defaultcolortransfer null def
PDF begin
[/c/cs/cm/d/d0/f/h/i/j/J/l/m/M/n/q/Q/re/ri/S/sc/sh/Tf/w/W
/applyInterpFunc/applystitchFunc/domainClip/encodeInput
/initgs/int/limit/rangeClip
/defineRes/undefineRes/findRes/setSA/pl
/? /! /| /: /+ /GetGlyphDirectory
/pdf_flushFilters /pdf_readstring /pdf_dictOp /pdf_image /pdf_maskedImage
/pdf_shfill /pdf_sethalftone
] {null def} bind forall
end
end
%%EndResource
PDFVars begin PDF begin
%%BeginResource: procset pdfutil 6.0 1
%%Copyright: Copyright 1993-2001 Adobe Systems Incorporated. All Rights Reserved.
%%Title: Basic utilities used by other PDF procsets
/bd {bind def} bind def
/ld {load def} bd
/bld {
dup length dict begin
{ null def } forall
bind
end
def
} bd
/dd { PDFVars 3 1 roll put } bd
/xdd { exch dd } bd
/Level2?
systemdict /languagelevel known
{ systemdict /languagelevel get 2 ge } { false } ifelse
def
/Level1? Level2? not def
/Level3?
systemdict /languagelevel known
{systemdict /languagelevel get 3 eq } { false } ifelse
def
/getifknown {
2 copy known { get true } { pop pop false } ifelse
} bd
/here {
currentdict exch getifknown
} bd
/isdefined? { where { pop true } { false } ifelse } bd
%%EndResource
%%BeginResource: procset l2compat 6.0 1
%%Copyright: Copyright 1987-2003 Adobe Systems Incorporated. All Rights Reserved.
%%Title: Level 1 emulation of level 2 operators
/setcmykcolor isdefined? not
{
/setcmykcolor {
1 sub 4 1 roll
3 {
3 index add neg dup 0 lt { pop 0 } if
3 1 roll
} repeat
setrgbcolor
pop
} bd
} if
/rectclip isdefined? not
{
/rectclip { newpath re clip newpath } bd
} if
/rectfill isdefined? not
{
/rectfill { gsave newpath re fill grestore } bd
} if
/sethalftone isdefined? not
{
/sethalftone {
begin
HalftoneType 1 eq
{ Frequency Angle /SpotFunction load setscreen }
if
end
} bd
} if
Level1?
{
/pdf_show {show} bd
/xshow
{
PDFVars /_pdf_showproc /pdf_show load put
pdf_xshow
} bd
/yshow
{
PDFVars /_pdf_showproc /pdf_show load put
pdf_yshow
} bd
/xyshow
{
PDFVars /_pdf_showproc /pdf_show load put
pdf_xyshow
} bd
} if
/getrampcolor {
cvi
/indx exch def
[
0 1 NumComp 1 sub {
dup
Samples exch get
dup type /stringtype eq { indx get } if
exch
Scaling exch get aload pop
3 1 roll
mul add
} for
]
L1setcolor
} bd
/sssetbackground { L1setcolor } bd
%%EndResource
%%BeginResource: procset pdf 6.0 1
%%Copyright: Copyright 1998-2003 Adobe Systems Incorporated. All Rights Reserved.
%%Title: General operators for PDF, common to all Language Levels.
/cm { matrix astore concat } bd
/d /setdash ld
/f /fill ld
/h /closepath ld
/i {dup 0 eq {pop _defaultflatness} if setflat} bd
/j /setlinejoin ld
/J /setlinecap ld
/M /setmiterlimit ld
/n /newpath ld
/S /stroke ld
/w /setlinewidth ld
/W /clip ld
/sg /setgray ld
/initgs {
0 setgray
[] 0 d
0 j
0 J
10 M
1 w
false setSA
/_defaulttransfer load settransfer
0 i
/RelativeColorimetric ri
newpath
} bd
/int {
dup 2 index sub 3 index 5 index sub div 6 -2 roll sub mul
exch pop add exch pop
} bd
/limit {
dup 2 index le { exch } if pop
dup 2 index ge { exch } if pop
} bd
/domainClip {
Domain aload pop 3 2 roll
limit
} [/Domain] bld
/applyInterpFunc {
0 1 DimOut 1 sub
{
dup C0 exch get exch
dup C1 exch get exch
3 1 roll
1 index sub
3 index
N exp mul add
exch
currentdict /Range_lo known
{
dup Range_lo exch get exch
Range_hi exch get
3 2 roll limit
}
{
pop
}
ifelse
exch
} for
pop
} [/DimOut /C0 /C1 /N /Range_lo /Range_hi] bld
/encodeInput {
NumParts 1 sub
0 1 2 index
{
dup Bounds exch get
2 index gt
{ exit }
{ dup
3 index eq
{ exit }
{ pop } ifelse
} ifelse
} for
3 2 roll pop
dup Bounds exch get exch
dup 1 add Bounds exch get exch
2 mul
dup Encode exch get exch
1 add Encode exch get
int
} [/NumParts /Bounds /Encode] bld
/rangeClip {
exch dup Range_lo exch get
exch Range_hi exch get
3 2 roll
limit
} [/Range_lo /Range_hi] bld
/applyStitchFunc {
Functions exch get exec
currentdict /Range_lo known {
0 1 DimOut 1 sub {
DimOut 1 add -1 roll
rangeClip
} for
} if
} [/Functions /Range_lo /DimOut] bld
/pdf_flushfilters
{
aload length
{ dup status
1 index currentfile ne and
{ dup flushfile closefile }
{ pop }
ifelse
} repeat
} bd
/pdf_readstring
{
1 index dup length 1 sub get
exch readstring pop
exch pdf_flushfilters
} bind def
/pdf_dictOp
{
3 2 roll
10 dict copy
begin
_Filters dup length 1 sub get def
currentdict exch exec
_Filters pdf_flushfilters
end
} [/_Filters] bld
/pdf_image {{image} /DataSource pdf_dictOp} bd
/pdf_imagemask {{imagemask} /DataSource pdf_dictOp} bd
/pdf_shfill {{sh} /DataSource pdf_dictOp} bd
/pdf_sethalftone {{sethalftone} /Thresholds pdf_dictOp} bd
/pdf_maskedImage
{
10 dict copy begin
/miDict currentdict def
/DataDict DataDict 10 dict copy def
DataDict begin
/DataSource
_Filters dup length 1 sub get
def
miDict image
_Filters pdf_flushfilters
end
end
} [/miDict /DataDict /_Filters] bld
/RadialShade {
40 dict begin
/background exch def
/ext1 exch def
/ext0 exch def
/BBox exch def
/r2 exch def
/c2y exch def
/c2x exch def
/r1 exch def
/c1y exch def
/c1x exch def
/rampdict exch def
gsave
BBox length 0 gt {
newpath
BBox 0 get BBox 1 get moveto
BBox 2 get BBox 0 get sub 0 rlineto
0 BBox 3 get BBox 1 get sub rlineto
BBox 2 get BBox 0 get sub neg 0 rlineto
closepath
clip
newpath
} if
c1x c2x eq
{
c1y c2y lt {/theta 90 def}{/theta 270 def} ifelse
}
{
/slope c2y c1y sub c2x c1x sub div def
/theta slope 1 atan def
c2x c1x lt c2y c1y ge and { /theta theta 180 sub def} if
c2x c1x lt c2y c1y lt and { /theta theta 180 add def} if
}
ifelse
gsave
clippath
c1x c1y translate
theta rotate
-90 rotate
{ pathbbox } stopped
{ 0 0 0 0 } if
/yMax exch def
/xMax exch def
/yMin exch def
/xMin exch def
grestore
xMax xMin eq yMax yMin eq or
{
grestore
end
}
{
/max { 2 copy gt { pop } {exch pop} ifelse } bind def
/min { 2 copy lt { pop } {exch pop} ifelse } bind def
rampdict begin
40 dict begin
background length 0 gt { background sssetbackground gsave clippath fill grestore } if
gsave
c1x c1y translate
theta rotate
-90 rotate
/c2y c1x c2x sub dup mul c1y c2y sub dup mul add sqrt def
/c1y 0 def
/c1x 0 def
/c2x 0 def
ext0 {
0 getrampcolor
c2y r2 add r1 sub 0.0001 lt
{
c1x c1y r1 360 0 arcn
pathbbox
/aymax exch def
/axmax exch def
/aymin exch def
/axmin exch def
/bxMin xMin axmin min def
/byMin yMin aymin min def
/bxMax xMax axmax max def
/byMax yMax aymax max def
bxMin byMin moveto
bxMax byMin lineto
bxMax byMax lineto
bxMin byMax lineto
bxMin byMin lineto
eofill
}
{
c2y r1 add r2 le
{
c1x c1y r1 0 360 arc
fill
}
{
c2x c2y r2 0 360 arc fill
r1 r2 eq
{
/p1x r1 neg def
/p1y c1y def
/p2x r1 def
/p2y c1y def
p1x p1y moveto p2x p2y lineto p2x yMin lineto p1x yMin lineto
fill
}
{
/AA r2 r1 sub c2y div def
AA -1 eq
{ /theta 89.99 def}
{ /theta AA 1 AA dup mul sub sqrt div 1 atan def}
ifelse
/SS1 90 theta add dup sin exch cos div def
/p1x r1 SS1 SS1 mul SS1 SS1 mul 1 add div sqrt mul neg def
/p1y p1x SS1 div neg def
/SS2 90 theta sub dup sin exch cos div def
/p2x r1 SS2 SS2 mul SS2 SS2 mul 1 add div sqrt mul def
/p2y p2x SS2 div neg def
r1 r2 gt
{
/L1maxX p1x yMin p1y sub SS1 div add def
/L2maxX p2x yMin p2y sub SS2 div add def
}
{
/L1maxX 0 def
/L2maxX 0 def
}ifelse
p1x p1y moveto p2x p2y lineto L2maxX L2maxX p2x sub SS2 mul p2y add lineto
L1maxX L1maxX p1x sub SS1 mul p1y add lineto
fill
}
ifelse
}
ifelse
} ifelse
} if
c1x c2x sub dup mul
c1y c2y sub dup mul
add 0.5 exp
0 dtransform
dup mul exch dup mul add 0.5 exp 72 div
0 72 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt
72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt
1 index 1 index lt { exch } if pop
/hires exch def
hires mul
/numpix exch def
/numsteps NumSamples def
/rampIndxInc 1 def
/subsampling false def
numpix 0 ne
{
NumSamples numpix div 0.5 gt
{
/numsteps numpix 2 div round cvi dup 1 le { pop 2 } if def
/rampIndxInc NumSamples 1 sub numsteps div def
/subsampling true def
} if
} if
/xInc c2x c1x sub numsteps div def
/yInc c2y c1y sub numsteps div def
/rInc r2 r1 sub numsteps div def
/cx c1x def
/cy c1y def
/radius r1 def
newpath
xInc 0 eq yInc 0 eq rInc 0 eq and and
{
0 getrampcolor
cx cy radius 0 360 arc
stroke
NumSamples 1 sub getrampcolor
cx cy radius 72 hires div add 0 360 arc
0 setlinewidth
stroke
}
{
0
numsteps
{
dup
subsampling { round } if
getrampcolor
cx cy radius 0 360 arc
/cx cx xInc add def
/cy cy yInc add def
/radius radius rInc add def
cx cy radius 360 0 arcn
eofill
rampIndxInc add
}
repeat
pop
} ifelse
ext1 {
c2y r2 add r1 lt
{
c2x c2y r2 0 360 arc
fill
}
{
c2y r1 add r2 sub 0.0001 le
{
c2x c2y r2 360 0 arcn
pathbbox
/aymax exch def
/axmax exch def
/aymin exch def
/axmin exch def
/bxMin xMin axmin min def
/byMin yMin aymin min def
/bxMax xMax axmax max def
/byMax yMax aymax max def
bxMin byMin moveto
bxMax byMin lineto
bxMax byMax lineto
bxMin byMax lineto
bxMin byMin lineto
eofill
}
{
c2x c2y r2 0 360 arc fill
r1 r2 eq
{
/p1x r2 neg def
/p1y c2y def
/p2x r2 def
/p2y c2y def
p1x p1y moveto p2x p2y lineto p2x yMax lineto p1x yMax lineto
fill
}
{
/AA r2 r1 sub c2y div def
AA -1 eq
{ /theta 89.99 def}
{ /theta AA 1 AA dup mul sub sqrt div 1 atan def}
ifelse
/SS1 90 theta add dup sin exch cos div def
/p1x r2 SS1 SS1 mul SS1 SS1 mul 1 add div sqrt mul neg def
/p1y c2y p1x SS1 div sub def
/SS2 90 theta sub dup sin exch cos div def
/p2x r2 SS2 SS2 mul SS2 SS2 mul 1 add div sqrt mul def
/p2y c2y p2x SS2 div sub def
r1 r2 lt
{
/L1maxX p1x yMax p1y sub SS1 div add def
/L2maxX p2x yMax p2y sub SS2 div add def
}
{
/L1maxX 0 def
/L2maxX 0 def
}ifelse
p1x p1y moveto p2x p2y lineto L2maxX L2maxX p2x sub SS2 mul p2y add lineto
L1maxX L1maxX p1x sub SS1 mul p1y add lineto
fill
}
ifelse
}
ifelse
} ifelse
} if
grestore
grestore
end
end
end
} ifelse
} bd
/GenStrips {
40 dict begin
/background exch def
/ext1 exch def
/ext0 exch def
/BBox exch def
/y2 exch def
/x2 exch def
/y1 exch def
/x1 exch def
/rampdict exch def
gsave
BBox length 0 gt {
newpath
BBox 0 get BBox 1 get moveto
BBox 2 get BBox 0 get sub 0 rlineto
0 BBox 3 get BBox 1 get sub rlineto
BBox 2 get BBox 0 get sub neg 0 rlineto
closepath
clip
newpath
} if
x1 x2 eq
{
y1 y2 lt {/theta 90 def}{/theta 270 def} ifelse
}
{
/slope y2 y1 sub x2 x1 sub div def
/theta slope 1 atan def
x2 x1 lt y2 y1 ge and { /theta theta 180 sub def} if
x2 x1 lt y2 y1 lt and { /theta theta 180 add def} if
}
ifelse
gsave
clippath
x1 y1 translate
theta rotate
{ pathbbox } stopped
{ 0 0 0 0 } if
/yMax exch def
/xMax exch def
/yMin exch def
/xMin exch def
grestore
xMax xMin eq yMax yMin eq or
{
grestore
end
}
{
rampdict begin
20 dict begin
background length 0 gt { background sssetbackground gsave clippath fill grestore } if
gsave
x1 y1 translate
theta rotate
/xStart 0 def
/xEnd x2 x1 sub dup mul y2 y1 sub dup mul add 0.5 exp def
/ySpan yMax yMin sub def
/numsteps NumSamples def
/rampIndxInc 1 def
/subsampling false def
xStart 0 transform
xEnd 0 transform
3 -1 roll
sub dup mul
3 1 roll
sub dup mul
add 0.5 exp 72 div
0 72 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt
72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt
1 index 1 index lt { exch } if pop
mul
/numpix exch def
numpix 0 ne
{
NumSamples numpix div 0.5 gt
{
/numsteps numpix 2 div round cvi dup 1 le { pop 2 } if def
/rampIndxInc NumSamples 1 sub numsteps div def
/subsampling true def
} if
} if
ext0 {
0 getrampcolor
xMin xStart lt
{ xMin yMin xMin neg ySpan rectfill } if
} if
/xInc xEnd xStart sub numsteps div def
/x xStart def
0
numsteps
{
dup
subsampling { round } if
getrampcolor
x yMin xInc ySpan rectfill
/x x xInc add def
rampIndxInc add
}
repeat
pop
ext1 {
xMax xEnd gt
{ xEnd yMin xMax xEnd sub ySpan rectfill } if
} if
grestore
grestore
end
end
end
} ifelse
} bd
/currentdistillerparams where { pop currentdistillerparams /CoreDistVersion get 5000 lt}{true}ifelse
{
/PDFMark5 {cleartomark} bd
}
{
/PDFMark5 {pdfmark} bd
}ifelse
/ReadByPDFMark5
{
2 dict begin
/makerString exch def string /tmpString exch def
{
currentfile tmpString readline pop
makerString anchorsearch
{
pop pop cleartomark exit
}
{
3 copy /PUT PDFMark5 pop 2 copy (\n) /PUT PDFMark5
} ifelse
}loop
end
}bd
%%EndResource
%%BeginResource: procset sep_ops 6.0 1
%%Copyright: Copyright 1987-2001 Adobe Systems Incorporated. All Rights Reserved.
%%Title: Support for Separations in Level 1, following the conventions of Tech Note 5044
userdict /sep_ops 50 dict dup begin put
/bdef {bind def} bind def
/xdef {exch def} bdef
/colorimagebuffer {
0 1 2 index length 1 sub {
dup 2 index exch get 255 exch sub 2 index 3 1 roll put
} for
} bdef
/addprocs {
[ 3 1 roll
/exec load
dup 3 1 roll
] cvx
} bdef
/L1? {
systemdict /languagelevel known {
systemdict /languagelevel get 2 lt
}{
true
} ifelse
} bdef
/colorexists {
statusdict /processcolors known {
statusdict /processcolors get exec
}{
/deviceinfo where {
pop deviceinfo /Colors known {
deviceinfo /Colors get
statusdict /processcolors {
deviceinfo /Colors known {
deviceinfo /Colors get
}{
1
} ifelse
} put
}{
1
} ifelse
}{
1
} ifelse
} ifelse
1 gt
} bdef
/colorplate colorexists { 0 } { 5 } ifelse def
/negativecolorplate false def
/setcmykcolor where {
pop
gsave
1 0 0 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
0 1 0 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
0 0 1 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
0 0 0 1 setcmykcolor systemdict /currentgray get exec 1 exch sub
4 {4 copy} repeat
grestore
1 dict begin
/foureq {
4 index eq 8 1 roll
4 index eq 8 1 roll
4 index eq 8 1 roll
4 index eq 8 1 roll
pop pop pop pop and and and
} def
1 0 0 0 foureq {/colorplate 1 store} if
0 1 0 0 foureq {/colorplate 2 store} if
0 0 1 0 foureq {/colorplate 3 store} if
0 0 0 1 foureq {/colorplate 4 store} if
0 0 0 0 foureq {/colorplate 6 store} if
end
} if
0 systemdict /currenttransfer get exec exec
1 systemdict /currenttransfer get exec exec
2 copy
eq
{
/colorplate 6 store
pop
/negativecolorplate exch 0.5 lt store
}
{
gt /negativecolorplate exch store
}
ifelse
/findcmykcustomcolor where { pop }
{
/findcmykcustomcolor {
[ 6 1 roll ] readonly
} bdef
} ifelse
/setoverprint where {
pop
}{
/setoverprint {
pop
} bdef
} ifelse
/currentoverprint where {
pop
}{
/currentoverprint {
false
} bdef
} ifelse
/setcustomcolor where {
pop
}{
L1? {
/setcustomcolor {
exch
aload pop pop
4 { 4 index mul 4 1 roll } repeat
5 -1 roll pop
setcmykcolor
} bdef
}{
/setcustomcolor {
exch
[ exch /Separation exch dup 4 get exch /DeviceCMYK exch
0 4 getinterval
[ exch /dup load exch cvx {mul exch dup}
/forall load /pop load dup] cvx
] setcolorspace setcolor
} bdef
} ifelse
} ifelse
/ik 0 def
/iy 0 def
/im 0 def
/ic 0 def
/imagetint {
ic .3 mul
im .59 mul
iy .11 mul
ik add add add dup
1 gt {pop 1} if
} bdef
/setcmykcolor where {
pop
}{
/setcmykcolor {
/ik xdef /iy xdef /im xdef /ic xdef
imagetint
1 exch sub setgray
} bdef
} ifelse
/customcolorimage where {
pop
}{
L1? {
/customcolorimage{
gsave
colorexists {
aload pop pop
/ik xdef /iy xdef /im xdef /ic xdef
currentcolortransfer
{ik mul ik sub 1 add} addprocs
4 1 roll {iy mul iy sub 1 add} addprocs
4 1 roll {im mul im sub 1 add} addprocs
4 1 roll {ic mul ic sub 1 add} addprocs
4 1 roll setcolortransfer
/magentabuf 0 string def
/yellowbuf 0 string def
/blackbuf 0 string def
{
colorimagebuffer dup length magentabuf length ne
{
dup length dup dup
/magentabuf exch string def
/yellowbuf exch string def
/blackbuf exch string def
} if
dup magentabuf copy yellowbuf copy
blackbuf copy pop
} addprocs
{magentabuf}{yellowbuf}{blackbuf} true 4 colorimage
}{
aload pop pop /ik xdef /iy xdef /im xdef /ic xdef /tint
imagetint def
currenttransfer
{tint mul 1 tint sub add} addprocs settransfer image
} ifelse
grestore
} bdef
}{
/customcolorimage {
gsave
[ exch /Separation exch dup 4 get exch /DeviceCMYK exch
0 4 getinterval
[ exch /dup load exch cvx {mul exch dup}
/forall load /pop load dup] cvx
] setcolorspace
10 dict begin
/ImageType 1 def
/DataSource exch def
/ImageMatrix exch def
/BitsPerComponent exch def
/Height exch def
/Width exch def
/Decode [1 0] def
currentdict end
image
grestore
} bdef
} ifelse
} ifelse
/setseparationgray where {
pop
}{
L1? {
/setseparationgray { 1 exch sub dup dup dup setcmykcolor } bdef
}{
/setseparationgray {
[/Separation /All /DeviceCMYK {dup dup dup}] setcolorspace
1 exch sub setcolor
} bdef
} ifelse
} ifelse
/separationimage where { pop }
{
/separationimage {
gsave
1 1 1 1 (All)
findcmykcustomcolor customcolorimage
grestore
} bdef
} ifelse
currentdict readonly pop end
%%EndResource
%%BeginResource: procset pdflev15044 6.0 1
%%Copyright: Copyright 1987-2002 Adobe Systems Incorporated. All Rights Reserved.
%%Title: PDF operators, Level 1, with emulated separations (TN 5044)
/_ColorSep5044? true dd
/docinitialize {
PDF begin
/_defaulthalftone
/currenthalftone where
{ pop currenthalftone }
{ 4 dict dup begin
currentscreen
/SpotFunction exch def
/Angle exch def
/Frequency exch def
/HalftoneType 1 def
end }
ifelse
dd
/currentcolortransfer where
{ pop /_defaultcolortransfer [ currentcolortransfer ] dd }
{ /_defaultcolortransfer [currenttransfer dup dup dup] dd }
ifelse
end
} bd
/initialize {
/overprintstack null dd
sep_ops begin
50 dict begin
_defaulthalftone sethalftone
} bd
/terminate {
end end
} bd
/currentcolortransfer where
{ pop }
{
/setcolortransfer
{
settransfer pop pop pop
} bd
} ifelse
/pl {
transform
0.25 sub round 0.25 add exch
0.25 sub round 0.25 add exch
itransform
} bd
/m { _sa? { pl } if moveto } bd
/l { _sa? { pl } if lineto } bd
/c
{
_sa? {3 {pl 6 2 roll} repeat} if
curveto
} bd
/ri/pop ld
/setSA { /_sa? xdd } bd
/re
{
_sa?
{
8 dict begin
/:h exch def
/:w exch def
/:y exch def
/:x exch def
:x :y pl
/:ymin exch def /:xmin exch def
:x :w add :y :h add pl
/:ymax exch def /:xmax exch def
:xmin :ymin moveto
:xmax :ymin lineto
:xmax :ymax lineto
:xmin :ymax lineto
closepath
end
}
{
4 2 roll moveto
1 index 0 rlineto
0 exch rlineto
neg 0 rlineto
closepath
} ifelse
} bd
/q
{
gsave
[currentoverprint overprintstack] /overprintstack xdd
}
[/overprintstack] bld
/Q
{
overprintstack aload pop /overprintstack xdd setoverprint
grestore
}
[/overprintstack] bld
/AlmostFull?
{ dup maxlength exch length sub 2 le
} bd
/Expand
{ 1 index maxlength mul cvi dict
dup begin exch { def } forall end
} bd
/xput
{ 3 2 roll
dup 3 index known not
{ dup AlmostFull? { 1.5 Expand } if
} if
dup 4 2 roll put
} bd
/defineRes
{ _categories 1 index known not
{ /_categories _categories 2 index 10 dict xput store
} if
_categories exch 2 copy get 5 -1 roll 4 index xput put
} bd
/undefineRes {
null exch
defineRes
} bd
/findRes {
_categories exch get exch get
} bd
/L1setcolor {
aload length
dup 0 eq
{ pop .5 setgray }
{ dup 1 eq
{ pop setgray }
{ 3 eq
{ setrgbcolor }
{ setcmykcolor }
ifelse }
ifelse }
ifelse
} bind dd
/concattransferfuncs {
[ 3 1 roll /exec load exch /exec load ] cvx
} bd
/concatandsettransfer {
/_defaulttransfer load concattransferfuncs settransfer
} bd
/concatandsetcolortransfer {
colorplate 0 eq
{
_defaultcolortransfer aload pop
8 -1 roll 5 -1 roll concattransferfuncs 7 1 roll
6 -1 roll 4 -1 roll concattransferfuncs 5 1 roll
4 -1 roll 3 -1 roll concattransferfuncs 3 1 roll
concattransferfuncs
setcolortransfer
} if
colorplate 1 ge colorplate 4 le and
{
4 colorplate sub index 4 { exch pop } repeat
concatandsettransfer
} if
colorplate 5 ge
{
0 index 4 { exch pop } repeat
concatandsettransfer
} if
} bd
/tn5044sethalftone
{
begin
HalftoneType 5 eq
{ [/Default /Cyan /Magenta /Yellow /Black /Default /Default /Default]
colorplate get
here not {
/Default here not { currentdict } if
} if
}
{ currentdict }
ifelse
end
begin
/TransferFunction here
{
concatandsettransfer
currentdict dup length dict
begin
{
1 index /TransferFunction ne { def } { pop pop } ifelse
} forall
currentdict
end
}
{
currentdict
} ifelse
end
sethalftone
} bd
/paintimage
{
colorplate 0 eq
{
{ {currentfile cyanstr readstring pop}
{currentfile magentastr readstring pop}
{currentfile yellowstr readstring pop}
{currentfile blackstr readstring pop
currentfile graystr readstring pop pop}
}
{ {currentfile cyanstr readhexstring pop}
{currentfile magentastr readhexstring pop}
{currentfile yellowstr readhexstring pop}
{currentfile blackstr readhexstring pop
currentfile graystr readhexstring pop pop}
} ifelse
true 4 colorimage
}
{
3 dict begin
/binaryOK exch def
[
1 1 5 {
dup
/currentfile cvx
[ /cyanstr /magentastr /yellowstr /blackstr /graystr ]
3 -1 roll 1 sub get cvx
binaryOK { /readstring } { /readhexstring } ifelse cvx
/pop cvx
5 -1 roll
colorplate dup 5 gt { pop 5 } if
eq not { /pop cvx } if
} for
] cvx bind
end
[
colorplate 6 eq {
/pop cvx
negativecolorplate { 0 } { 1 } ifelse
} if
colorplate 4 le
{
1 /exch cvx /sub cvx
} if
colorplate 6 ne
{
systemdict /currenttransfer get exec
aload pop
} if
] cvx
gsave
systemdict /settransfer get exec
systemdict /image get exec
grestore
} ifelse
} bd
%%EndResource
%%BeginResource: procset pdftext 6.0 1
%%Copyright: Copyright 1987-2001 Adobe Systems Incorporated. All Rights Reserved.
%%Title: Text operators for PDF
PDF /PDFText 78 dict dup begin put
/docinitialize
{
/resourcestatus where {
pop
/CIDParams /ProcSet resourcestatus {
pop pop
false /CIDParams /ProcSet findresource /SetBuildCompatible get exec
} if
} if
PDF begin
PDFText /_pdfDefineIdentity-H known
{ PDFText /_pdfDefineIdentity-H get exec}
if
end
} bd
/initialize {
PDFText begin
} bd
/terminate { end } bd
Level2?
{
/_safeput
{
3 -1 roll load 3 1 roll put
}
bd
}
{
/_safeput
{
2 index load dup dup length exch maxlength ge
{ dup length 5 add dict copy
3 index xdd
}
{ pop }
ifelse
3 -1 roll load 3 1 roll put
}
bd
}
ifelse
/pdf_has_composefont? systemdict /composefont known def
/CopyFont {
{
1 index /FID ne 2 index /UniqueID ne and
{ def } { pop pop } ifelse
} forall
} bd
/Type0CopyFont
{
exch
dup length dict
begin
CopyFont
[
exch
FDepVector
{
dup /FontType get 0 eq
{
1 index Type0CopyFont
/_pdfType0 exch definefont
}
{
/_pdfBaseFont exch
2 index exec
}
ifelse
exch
}
forall
pop
]
/FDepVector exch def
currentdict
end
} bd
Level2? {currentglobal true setglobal} if
/cHexEncoding
[/c00/c01/c02/c03/c04/c05/c06/c07/c08/c09/c0A/c0B/c0C/c0D/c0E/c0F/c10/c11/c12
/c13/c14/c15/c16/c17/c18/c19/c1A/c1B/c1C/c1D/c1E/c1F/c20/c21/c22/c23/c24/c25
/c26/c27/c28/c29/c2A/c2B/c2C/c2D/c2E/c2F/c30/c31/c32/c33/c34/c35/c36/c37/c38
/c39/c3A/c3B/c3C/c3D/c3E/c3F/c40/c41/c42/c43/c44/c45/c46/c47/c48/c49/c4A/c4B
/c4C/c4D/c4E/c4F/c50/c51/c52/c53/c54/c55/c56/c57/c58/c59/c5A/c5B/c5C/c5D/c5E
/c5F/c60/c61/c62/c63/c64/c65/c66/c67/c68/c69/c6A/c6B/c6C/c6D/c6E/c6F/c70/c71
/c72/c73/c74/c75/c76/c77/c78/c79/c7A/c7B/c7C/c7D/c7E/c7F/c80/c81/c82/c83/c84
/c85/c86/c87/c88/c89/c8A/c8B/c8C/c8D/c8E/c8F/c90/c91/c92/c93/c94/c95/c96/c97
/c98/c99/c9A/c9B/c9C/c9D/c9E/c9F/cA0/cA1/cA2/cA3/cA4/cA5/cA6/cA7/cA8/cA9/cAA
/cAB/cAC/cAD/cAE/cAF/cB0/cB1/cB2/cB3/cB4/cB5/cB6/cB7/cB8/cB9/cBA/cBB/cBC/cBD
/cBE/cBF/cC0/cC1/cC2/cC3/cC4/cC5/cC6/cC7/cC8/cC9/cCA/cCB/cCC/cCD/cCE/cCF/cD0
/cD1/cD2/cD3/cD4/cD5/cD6/cD7/cD8/cD9/cDA/cDB/cDC/cDD/cDE/cDF/cE0/cE1/cE2/cE3
/cE4/cE5/cE6/cE7/cE8/cE9/cEA/cEB/cEC/cED/cEE/cEF/cF0/cF1/cF2/cF3/cF4/cF5/cF6
/cF7/cF8/cF9/cFA/cFB/cFC/cFD/cFE/cFF] def
Level2? {setglobal} if
/modEnc {
/_enc xdd
/_icode 0 dd
counttomark 1 sub -1 0
{
index
dup type /nametype eq
{
_enc _icode 3 -1 roll put
_icode 1 add
}
if
/_icode xdd
} for
cleartomark
_enc
} bd
/trEnc {
/_enc xdd
255 -1 0 {
exch dup -1 eq
{ pop /.notdef }
{ Encoding exch get }
ifelse
_enc 3 1 roll put
} for
pop
_enc
} bd
/TE {
/_i xdd
StandardEncoding 256 array copy modEnc
_pdfEncodings exch _i exch put
} bd
/TZ
{
/_usePDFEncoding xdd
findfont
dup length 6 add dict
begin
{
1 index /FID ne { def } { pop pop } ifelse
} forall
/pdf_origFontName FontName def
/FontName exch def
currentdict /PaintType known
{ PaintType 2 eq {/PaintType 0 def} if }
if
_usePDFEncoding 0 ge
{
/Encoding _pdfEncodings _usePDFEncoding get def
pop
}
{
_usePDFEncoding -1 eq
{
counttomark 0 eq
{ pop }
{
Encoding 256 array copy
modEnc /Encoding exch def
}
ifelse
}
{
256 array
trEnc /Encoding exch def
}
ifelse
}
ifelse
pdf_EuroProcSet pdf_origFontName known
{
pdf_origFontName pdf_AddEuroGlyphProc
} if
Level2?
{
currentdict /pdf_origFontName undef
} if
FontName currentdict
end
definefont pop
}
bd
Level2?
{
/TZG
{
currentglobal true setglobal
2 index _pdfFontStatus
{
2 index findfont
false setglobal
3 index findfont
true setglobal
ne
{
2 index findfont dup rcheck
{
dup length dict begin
{
1 index /FID ne { def } { pop pop } ifelse
} forall
currentdict end
}
if
3 index exch definefont pop
}
if
} if
setglobal
TZ
} bd
}
{
/TZG {TZ} bd
} ifelse
Level2?
{
currentglobal false setglobal
userdict /pdftext_data 5 dict put
pdftext_data
begin
/saveStacks
{
pdftext_data
begin
/vmmode currentglobal def
false setglobal
count array astore /os exch def
end
countdictstack array dictstack pdftext_data exch /ds exch put
cleardictstack pdftext_data /dscount countdictstack put
pdftext_data /vmmode get setglobal
} bind def
/restoreStacks
{
pdftext_data /vmmode currentglobal put false setglobal
clear cleardictstack
pdftext_data /ds get dup
pdftext_data /dscount get 1 2 index length 1 sub
{ get begin dup } for
pop pop
pdftext_data /os get aload pop
pdftext_data /vmmode get setglobal
} bind def
/testForClonePrinterBug
{
currentglobal true setglobal
/undefinedCategory /Generic /Category findresource
dup length dict copy /Category defineresource pop
setglobal
pdftext_data /saveStacks get exec
pdftext_data /vmmode currentglobal put false setglobal
/undefined /undefinedCategory { resourcestatus } stopped
pdftext_data exch /bugFound exch put
pdftext_data /vmmode get setglobal
pdftext_data /restoreStacks get exec
pdftext_data /bugFound get
} bind def
end
setglobal
/pdf_resourcestatus
pdftext_data /testForClonePrinterBug get exec
{
{
pdftext_data /saveStacks get exec
pdftext_data /os get dup dup length 1 sub
dup 1 sub dup 0 lt { pop 0 } if
exch 1 exch { get exch dup } for
pop pop
{ resourcestatus }
stopped
{
clear cleardictstack pdftext_data /restoreStacks get exec
{ pop pop } stopped pop false
}
{
count array astore pdftext_data exch /results exch put
pdftext_data /restoreStacks get exec pop pop
pdftext_data /results get aload pop
}
ifelse
}
}
{ { resourcestatus } }
ifelse
bd
}
if
Level2?
{
/_pdfUndefineResource
{
currentglobal 3 1 roll
_pdf_FontDirectory 2 index 2 copy known
{undef}
{pop pop}
ifelse
1 index (pdf) exch _pdfConcatNames 1 index
1 index 1 _pdfConcatNames 1 index
5 index 1 _pdfConcatNames 1 index
4
{
2 copy pdf_resourcestatus
{
pop 2 lt
{2 copy findresource gcheck setglobal undefineresource}
{pop pop}
ifelse
}
{ pop pop}
ifelse
} repeat
setglobal
} bd
}
{
/_pdfUndefineResource { pop pop} bd
}
ifelse
Level2?
{
/_pdfFontStatus
{
currentglobal exch
/Font pdf_resourcestatus
{pop pop true}
{false}
ifelse
exch setglobal
} bd
}
{
/_pdfFontStatusString 50 string def
_pdfFontStatusString 0 (fonts/) putinterval
/_pdfFontStatus
{
FontDirectory 1 index known
{ pop true }
{
_pdfFontStatusString 6 42 getinterval
cvs length 6 add
_pdfFontStatusString exch 0 exch getinterval
{ status } stopped
{pop false}
{
{ pop pop pop pop true}
{ false }
ifelse
}
ifelse
}
ifelse
} bd
}
ifelse
Level2?
{
/_pdfCIDFontStatus
{
/CIDFont /Category pdf_resourcestatus
{
pop pop
/CIDFont pdf_resourcestatus
{pop pop true}
{false}
ifelse
}
{ pop false }
ifelse
} bd
}
if
/_pdfString100 100 string def
/_pdfComposeFontName
{
dup length 1 eq
{
0 get
1 index
type /nametype eq
{
_pdfString100 cvs
length dup dup _pdfString100 exch (-) putinterval
_pdfString100 exch 1 add dup _pdfString100 length exch sub getinterval
2 index exch cvs length
add 1 add _pdfString100 exch 0 exch getinterval
exch pop
true
}
{
pop pop
false
}
ifelse
}
{
false
}
ifelse
dup {exch cvn exch} if
} bd
/_pdfConcatNames
{
exch
_pdfString100 cvs
length dup dup _pdfString100 exch (-) putinterval
_pdfString100 exch 1 add dup _pdfString100 length exch sub getinterval
3 -1 roll exch cvs length
add 1 add _pdfString100 exch 0 exch getinterval
cvn
} bind def
/_pdfTextTempString 50 string def
/_pdfRegOrderingArray [(Adobe-Japan1) (Adobe-CNS1) (Adobe-Korea1) (Adobe-GB1)] def
/_pdf_CheckCIDSystemInfo
{
1 index _pdfTextTempString cvs
(Identity) anchorsearch
{
pop pop pop pop true
}
{
false
_pdfRegOrderingArray
{
2 index exch
anchorsearch
{ pop pop pop true exit}
{ pop }
ifelse
}
forall
exch pop
exch /CIDFont findresource
/CIDSystemInfo get
3 -1 roll /CMap findresource
/CIDSystemInfo get
exch
3 -1 roll
{
2 copy
/Supplement get
exch
dup type /dicttype eq
{/Supplement get}
{pop 0 }
ifelse
ge
}
{ true }
ifelse
{
dup /Registry get
2 index /Registry get eq
{
/Ordering get
exch /Ordering get
dup type /arraytype eq
{
1 index type /arraytype eq
{
true
1 index length 1 sub -1 0
{
dup 2 index exch get exch 3 index exch get ne
{ pop false exit}
if
} for
exch pop exch pop
}
{ pop pop false }
ifelse
}
{
eq
}
ifelse
}
{ pop pop false }
ifelse
}
{ pop pop false }
ifelse
}
ifelse
} bind def
pdf_has_composefont?
{
/_pdfComposeFont
{
2 copy _pdfComposeFontName not
{
2 index
}
if
(pdf) exch _pdfConcatNames
dup _pdfFontStatus
{ dup findfont 5 2 roll pop pop pop true}
{
4 1 roll
1 index /CMap pdf_resourcestatus
{
pop pop
true
}
{false}
ifelse
1 index true exch
{
_pdfCIDFontStatus not
{pop false exit}
if
}
forall
and
{
1 index 1 index 0 get _pdf_CheckCIDSystemInfo
{
3 -1 roll pop
2 index 3 1 roll
composefont true
}
{
pop pop exch pop false
}
ifelse
}
{
_pdfComposeFontName
{
dup _pdfFontStatus
{
exch pop
1 index exch
findfont definefont true
}
{
pop exch pop
false
}
ifelse
}
{
exch pop
false
}
ifelse
}
ifelse
{ true }
{
dup _pdfFontStatus
{ dup findfont true }
{ pop false }
ifelse
}
ifelse
}
ifelse
} bd
}
{
/_pdfComposeFont
{
_pdfComposeFontName not
{
dup
}
if
dup
_pdfFontStatus
{exch pop dup findfont true}
{
1 index
dup type /nametype eq
{pop}
{cvn}
ifelse
eq
{pop false}
{
dup _pdfFontStatus
{dup findfont true}
{pop false}
ifelse
}
ifelse
}
ifelse
} bd
}
ifelse
/_pdfStyleDicts 4 dict dup begin
/Adobe-Japan1 4 dict dup begin
Level2?
{
/Serif
/HeiseiMin-W3-83pv-RKSJ-H _pdfFontStatus
{/HeiseiMin-W3}
{
/HeiseiMin-W3 _pdfCIDFontStatus
{/HeiseiMin-W3}
{/Ryumin-Light}
ifelse
}
ifelse
def
/SansSerif
/HeiseiKakuGo-W5-83pv-RKSJ-H _pdfFontStatus
{/HeiseiKakuGo-W5}
{
/HeiseiKakuGo-W5 _pdfCIDFontStatus
{/HeiseiKakuGo-W5}
{/GothicBBB-Medium}
ifelse
}
ifelse
def
/HeiseiMaruGo-W4-83pv-RKSJ-H _pdfFontStatus
{/HeiseiMaruGo-W4}
{
/HeiseiMaruGo-W4 _pdfCIDFontStatus
{/HeiseiMaruGo-W4}
{
/Jun101-Light-RKSJ-H _pdfFontStatus
{ /Jun101-Light }
{ SansSerif }
ifelse
}
ifelse
}
ifelse
/RoundSansSerif exch def
/Default Serif def
}
{
/Serif /Ryumin-Light def
/SansSerif /GothicBBB-Medium def
{
(fonts/Jun101-Light-83pv-RKSJ-H) status
}stopped
{pop}{
{ pop pop pop pop /Jun101-Light }
{ SansSerif }
ifelse
/RoundSansSerif exch def
}ifelse
/Default Serif def
}
ifelse
end
def
/Adobe-Korea1 4 dict dup begin
/Serif /HYSMyeongJo-Medium def
/SansSerif /HYGoThic-Medium def
/RoundSansSerif SansSerif def
/Default Serif def
end
def
/Adobe-GB1 4 dict dup begin
/Serif /STSong-Light def
/SansSerif /STHeiti-Regular def
/RoundSansSerif SansSerif def
/Default Serif def
end
def
/Adobe-CNS1 4 dict dup begin
/Serif /MKai-Medium def
/SansSerif /MHei-Medium def
/RoundSansSerif SansSerif def
/Default Serif def
end
def
end
def
/TZzero
{
/_wmode xdd
/_styleArr xdd
/_regOrdering xdd
3 copy
_pdfComposeFont
{
5 2 roll pop pop pop
}
{
[
0 1 _styleArr length 1 sub
{
_styleArr exch get
_pdfStyleDicts _regOrdering 2 copy known
{
get
exch 2 copy known not
{ pop /Default }
if
get
}
{
pop pop pop /Unknown
}
ifelse
}
for
]
exch pop
2 index 3 1 roll
_pdfComposeFont
{3 -1 roll pop}
{
findfont dup /FontName get exch
}
ifelse
}
ifelse
dup /WMode 2 copy known
{ get _wmode ne }
{ pop pop _wmode 1 eq}
ifelse
{
exch _wmode _pdfConcatNames
dup _pdfFontStatus
{ exch pop dup findfont false}
{ exch true }
ifelse
}
{
dup /FontType get 0 ne
}
ifelse
{
dup /FontType get 3 eq _wmode 1 eq and
{
_pdfVerticalRomanT3Font dup length 10 add dict copy
begin
/_basefont exch
dup length 3 add dict
begin
{1 index /FID ne {def}{pop pop} ifelse }
forall
/Encoding Encoding dup length array copy
dup 16#27 /quotesingle put
dup 16#60 /grave put
_regOrdering /Adobe-Japan1 eq
{dup 16#5c /yen put dup 16#a5 /yen put dup 16#b4 /yen put}
if
def
FontName
currentdict
end
definefont
def
/Encoding _basefont /Encoding get def
/_fauxfont true def
}
{
dup length 3 add dict
begin
{1 index /FID ne {def}{pop pop} ifelse }
forall
FontType 0 ne
{
/Encoding Encoding dup length array copy
dup 16#27 /quotesingle put
dup 16#60 /grave put
_regOrdering /Adobe-Japan1 eq
{dup 16#5c /yen put}
if
def
/_fauxfont true def
} if
} ifelse
/WMode _wmode def
dup dup /FontName exch def
currentdict
end
definefont pop
}
{
pop
}
ifelse
/_pdf_FontDirectory 3 1 roll _safeput
}
bd
Level2?
{
/Tf {
_pdf_FontDirectory 2 index 2 copy known
{get exch 3 -1 roll pop}
{pop pop}
ifelse
selectfont
} bd
}
{
/Tf {
_pdf_FontDirectory 2 index 2 copy known
{get exch 3 -1 roll pop}
{pop pop}
ifelse
exch findfont exch
dup type /arraytype eq
{makefont}
{scalefont}
ifelse
setfont
} bd
}
ifelse
/cshow where
{
pop /pdf_cshow /cshow load dd
/pdf_remove2 {pop pop} dd
}
{
/pdf_cshow {exch forall} dd
/pdf_remove2 {} dd
} ifelse
/pdf_xshow
{
/_pdf_na xdd
/_pdf_i 0 dd
currentpoint
/_pdf_y xdd
/_pdf_x xdd
{
pdf_remove2
_pdf_str1 exch 0 exch put
_pdf_str1 /_pdf_showproc load exec
{_pdf_na _pdf_i get} stopped
{ pop pop }
{
_pdf_x _pdf_y moveto
0
rmoveto
}
ifelse
_pdf_i 1 add /_pdf_i xdd
currentpoint
/_pdf_y xdd
/_pdf_x xdd
}
exch
pdf_cshow
} bd
/pdf_yshow
{
/_pdf_na xdd
/_pdf_i 0 dd
currentpoint
/_pdf_y xdd
/_pdf_x xdd
{
pdf_remove2
_pdf_str1 exch 0 exch put
_pdf_str1 /_pdf_showproc load exec
{_pdf_na _pdf_i get} stopped
{ pop pop }
{
_pdf_x _pdf_y moveto
0 exch
rmoveto
}
ifelse
_pdf_i 1 add /_pdf_i xdd
currentpoint
/_pdf_y xdd
/_pdf_x xdd
}
exch
pdf_cshow
} bd
/pdf_xyshow
{
/_pdf_na xdd
/_pdf_i 0 dd
currentpoint
/_pdf_y xdd
/_pdf_x xdd
{
pdf_remove2
_pdf_str1 exch 0 exch put
_pdf_str1 /_pdf_showproc load exec
{_pdf_na _pdf_i get} stopped
{ pop pop }
{
{_pdf_na _pdf_i 1 add get} stopped
{ pop pop pop}
{
_pdf_x _pdf_y moveto
rmoveto
}
ifelse
}
ifelse
_pdf_i 2 add /_pdf_i xdd
currentpoint
/_pdf_y xdd
/_pdf_x xdd
}
exch
pdf_cshow
} bd
/pdfl1xs {/_pdf_showproc /show load dd pdf_xshow} bd
/pdfl1ys {/_pdf_showproc /show load dd pdf_yshow} bd
/pdfl1xys {/_pdf_showproc /show load dd pdf_xyshow} bd
Level2? _ColorSep5044? not and
{
/pdfxs {{xshow} stopped {pdfl1xs} if} bd
/pdfys {{yshow} stopped {pdfl1ys} if} bd
/pdfxys {{xyshow} stopped {pdfl1xys} if} bd
}
{
/pdfxs /pdfl1xs load dd
/pdfys /pdfl1ys load dd
/pdfxys /pdfl1xys load dd
} ifelse
/pdf_charpath {false charpath} bd
/pdf_xcharpath {/_pdf_showproc /pdf_charpath load dd pdf_xshow} bd
/pdf_ycharpath {/_pdf_showproc /pdf_charpath load dd pdf_yshow} bd
/pdf_xycharpath {/_pdf_showproc /pdf_charpath load dd pdf_xyshow} bd
/pdf_strokepath
{
{
pdf_remove2
_pdf_str1 exch 0 exch put
_pdf_str1 false charpath
currentpoint S moveto
} bind
exch pdf_cshow
} bd
/pdf_xstrokepath {/_pdf_showproc {pdf_charpath S} dd pdf_xshow} bd
/pdf_ystrokepath {/_pdf_showproc {pdf_charpath S} dd pdf_yshow} bd
/pdf_xystrokepath {/_pdf_showproc {pdf_charpath S} dd pdf_xyshow} bd
Level2? {currentglobal true setglobal} if
/d0/setcharwidth ld
/nND {{/.notdef} repeat} bd
/T3Defs {
/BuildChar
{
1 index /Encoding get exch get
1 index /BuildGlyph get exec
}
def
/BuildGlyph {
exch begin
GlyphProcs exch get exec
end
} def
/_pdfT3Font true def
} bd
/_pdfBoldRomanWidthProc
{
stringwidth 1 index 0 ne { exch .03 add exch }if setcharwidth
0 0
} bd
/_pdfType0WidthProc
{
dup stringwidth 0 0 moveto
2 index true charpath pathbbox
0 -1
7 index 2 div .88
setcachedevice2
pop
0 0
} bd
/_pdfType0WMode1WidthProc
{
dup stringwidth
pop 2 div neg -0.88
2 copy
moveto
0 -1
5 -1 roll true charpath pathbbox
setcachedevice
} bd
/_pdfBoldBaseFont
11 dict begin
/FontType 3 def
/FontMatrix[1 0 0 1 0 0]def
/FontBBox[0 0 1 1]def
/Encoding cHexEncoding def
/_setwidthProc /_pdfBoldRomanWidthProc load def
/_bcstr1 1 string def
/BuildChar
{
exch begin
_basefont setfont
_bcstr1 dup 0 4 -1 roll put
dup
_setwidthProc
3 copy
moveto
show
_basefonto setfont
moveto
show
end
}bd
currentdict
end
def
pdf_has_composefont?
{
/_pdfBoldBaseCIDFont
11 dict begin
/CIDFontType 1 def
/CIDFontName /_pdfBoldBaseCIDFont def
/FontMatrix[1 0 0 1 0 0]def
/FontBBox[0 0 1 1]def
/_setwidthProc /_pdfType0WidthProc load def
/_bcstr2 2 string def
/BuildGlyph
{
exch begin
_basefont setfont
_bcstr2 1 2 index 256 mod put
_bcstr2 0 3 -1 roll 256 idiv put
_bcstr2 dup _setwidthProc
3 copy
moveto
show
_basefonto setfont
moveto
show
end
}bd
currentdict
end
def
/_pdfDefineIdentity-H
{
/Identity-H /CMap PDFText /pdf_resourcestatus get exec
{
pop pop
}
{
/CIDInit/ProcSet findresource begin 12 dict begin
begincmap
/CIDSystemInfo
3 dict begin
/Registry (Adobe) def
/Ordering (Identity) def
/Supplement 0 def
currentdict
end
def
/CMapName /Identity-H def
/CMapVersion 1 def
/CMapType 1 def
1 begincodespacerange
<0000> <ffff>
endcodespacerange
1 begincidrange
<0000> <ffff> 0
endcidrange
endcmap
CMapName currentdict/CMap defineresource pop
end
end
} ifelse
} def
} if
/_pdfVerticalRomanT3Font
10 dict begin
/FontType 3 def
/FontMatrix[1 0 0 1 0 0]def
/FontBBox[0 0 1 1]def
/_bcstr1 1 string def
/BuildChar
{
exch begin
_basefont setfont
_bcstr1 dup 0 4 -1 roll put
dup
_pdfType0WidthProc
moveto
show
end
}bd
currentdict
end
def
Level2? {setglobal} if
/MakeBoldFont
{
dup /ct_SyntheticBold known
{
dup length 3 add dict begin
CopyFont
/ct_StrokeWidth .03 0 FontMatrix idtransform pop def
/ct_SyntheticBold true def
currentdict
end
definefont
}
{
dup dup length 3 add dict
begin
CopyFont
/PaintType 2 def
/StrokeWidth .03 0 FontMatrix idtransform pop def
/dummybold currentdict
end
definefont
dup /FontType get dup 9 ge exch 11 le and
{
_pdfBoldBaseCIDFont
dup length 3 add dict copy begin
dup /CIDSystemInfo get /CIDSystemInfo exch def
/_Type0Identity /Identity-H 3 -1 roll [ exch ] composefont
/_basefont exch def
/_Type0Identity /Identity-H 3 -1 roll [ exch ] composefont
/_basefonto exch def
currentdict
end
/CIDFont defineresource
}
{
_pdfBoldBaseFont
dup length 3 add dict copy begin
/_basefont exch def
/_basefonto exch def
currentdict
end
definefont
}
ifelse
}
ifelse
} bd
/MakeBold {
1 index
_pdf_FontDirectory 2 index 2 copy known
{get}
{exch pop}
ifelse
findfont
dup
/FontType get 0 eq
{
dup /WMode known {dup /WMode get 1 eq }{false} ifelse
version length 4 ge
and
{version 0 4 getinterval cvi 2015 ge }
{true}
ifelse
{/_pdfType0WidthProc}
{/_pdfType0WMode1WidthProc}
ifelse
_pdfBoldBaseFont /_setwidthProc 3 -1 roll load put
{MakeBoldFont} Type0CopyFont definefont
}
{
dup /_fauxfont known not 1 index /SubstMaster known not and
{
_pdfBoldBaseFont /_setwidthProc /_pdfBoldRomanWidthProc load put
MakeBoldFont
}
{
2 index 2 index eq
{ exch pop }
{
dup length dict begin
CopyFont
currentdict
end
definefont
}
ifelse
}
ifelse
}
ifelse
pop pop
dup /dummybold ne
{/_pdf_FontDirectory exch dup _safeput }
{ pop }
ifelse
}bd
/MakeItalic {
_pdf_FontDirectory exch 2 copy known
{get}
{exch pop}
ifelse
dup findfont
dup /FontInfo 2 copy known
{
get
/ItalicAngle 2 copy known
{get 0 eq }
{ pop pop true}
ifelse
}
{ pop pop true}
ifelse
{
exch pop
dup /FontType get 0 eq Level2? not and
{ dup /FMapType get 6 eq }
{ false }
ifelse
{
dup /WMode 2 copy known
{
get 1 eq
{ _italMtx_WMode1Type0 }
{ _italMtxType0 }
ifelse
}
{ pop pop _italMtxType0 }
ifelse
}
{
dup /WMode 2 copy known
{
get 1 eq
{ _italMtx_WMode1 }
{ _italMtx }
ifelse
}
{ pop pop _italMtx }
ifelse
}
ifelse
makefont
dup /FontType get 42 eq Level2? not or
{
dup length dict begin
CopyFont
currentdict
end
}
if
1 index exch
definefont pop
/_pdf_FontDirectory exch dup _safeput
}
{
pop
2 copy ne
{
/_pdf_FontDirectory 3 1 roll _safeput
}
{ pop pop }
ifelse
}
ifelse
}bd
/MakeBoldItalic {
/dummybold exch
MakeBold
/dummybold
MakeItalic
}bd
Level2?
{
/pdf_CopyDict
{1 index length add dict copy}
def
}
{
/pdf_CopyDict
{
1 index length add dict
1 index wcheck
{ copy }
{ begin
{def} forall
currentdict
end
}
ifelse
}
def
}
ifelse
/pdf_AddEuroGlyphProc
{
currentdict /CharStrings known
{
CharStrings /Euro known not
{
dup
/CharStrings
CharStrings 1 pdf_CopyDict
begin
/Euro pdf_EuroProcSet 4 -1 roll get def
currentdict
end
def
/pdf_PSBuildGlyph /pdf_PSBuildGlyph load def
/pdf_PathOps /pdf_PathOps load def
/Symbol eq Encoding 160 get /.notdef eq and
{
/Encoding Encoding dup length array copy
dup 160 /Euro put def
}
if
}
{ pop
}
ifelse
}
{ pop
}
ifelse
}
def
Level2? {currentglobal true setglobal} if
/pdf_PathOps 4 dict dup begin
/m {moveto} def
/l {lineto} def
/c {curveto} def
/cp {closepath} def
end
def
/pdf_PSBuildGlyph
{
gsave
8 -1 roll pop
7 1 roll
currentdict /PaintType 2 copy known {get 2 eq}{pop pop false} ifelse
dup 9 1 roll
{
currentdict /StrokeWidth 2 copy known
{
get 2 div
5 1 roll
4 -1 roll 4 index sub
4 1 roll
3 -1 roll 4 index sub
3 1 roll
exch 4 index add exch
4 index add
5 -1 roll pop
}
{
pop pop
}
ifelse
}
if
setcachedevice
pdf_PathOps begin
exec
end
{
currentdict /StrokeWidth 2 copy known
{ get }
{ pop pop 0 }
ifelse
setlinewidth stroke
}
{
fill
}
ifelse
grestore
} def
/pdf_EuroProcSet 13 dict def
pdf_EuroProcSet
begin
/Courier-Bold
{
600 0 6 -12 585 612
{
385 274 m
180 274 l
179 283 179 293 179 303 c
179 310 179 316 180 323 c
398 323 l
423 404 l
197 404 l
219 477 273 520 357 520 c
409 520 466 490 487 454 c
487 389 l
579 389 l
579 612 l
487 612 l
487 560 l
449 595 394 612 349 612 c
222 612 130 529 98 404 c
31 404 l
6 323 l
86 323 l
86 304 l
86 294 86 284 87 274 c
31 274 l
6 193 l
99 193 l
129 77 211 -12 359 -12 c
398 -12 509 8 585 77 c
529 145 l
497 123 436 80 356 80 c
285 80 227 122 198 193 c
360 193 l
cp
600 0 m
}
pdf_PSBuildGlyph
} def
/Courier-BoldOblique /Courier-Bold load def
/Courier
{
600 0 17 -12 578 584
{
17 204 m
97 204 l
126 81 214 -12 361 -12 c
440 -12 517 17 578 62 c
554 109 l
501 70 434 43 366 43 c
266 43 184 101 154 204 c
380 204 l
400 259 l
144 259 l
144 270 143 281 143 292 c
143 299 143 307 144 314 c
418 314 l
438 369 l
153 369 l
177 464 249 529 345 529 c
415 529 484 503 522 463 c
522 391 l
576 391 l
576 584 l
522 584 l
522 531 l
473 566 420 584 348 584 c
216 584 122 490 95 369 c
37 369 l
17 314 l
87 314 l
87 297 l
87 284 88 272 89 259 c
37 259 l
cp
600 0 m
}
pdf_PSBuildGlyph
} def
/Courier-Oblique /Courier load def
/Helvetica
{
556 0 24 -19 541 703
{
541 628 m
510 669 442 703 354 703 c
201 703 117 607 101 444 c
50 444 l
25 372 l
97 372 l
97 301 l
49 301 l
24 229 l
103 229 l
124 67 209 -19 350 -19 c
435 -19 501 25 509 32 c
509 131 l
492 105 417 60 343 60 c
267 60 204 127 197 229 c
406 229 l
430 301 l
191 301 l
191 372 l
455 372 l
479 444 l
194 444 l
201 531 245 624 348 624 c
433 624 484 583 509 534 c
cp
556 0 m
}
pdf_PSBuildGlyph
} def
/Helvetica-Oblique /Helvetica load def
/Helvetica-Bold
{
556 0 12 -19 563 710
{
563 621 m
537 659 463 710 363 710 c
216 710 125 620 101 462 c
51 462 l
12 367 l
92 367 l
92 346 l
92 337 93 328 93 319 c
52 319 l
12 224 l
102 224 l
131 58 228 -19 363 -19 c
417 -19 471 -12 517 18 c
517 146 l
481 115 426 93 363 93 c
283 93 254 166 246 224 c
398 224 l
438 319 l
236 319 l
236 367 l
457 367 l
497 462 l
244 462 l
259 552 298 598 363 598 c
425 598 464 570 486 547 c
507 526 513 517 517 509 c
cp
556 0 m
}
pdf_PSBuildGlyph
} def
/Helvetica-BoldOblique /Helvetica-Bold load def
/Symbol
{
750 0 20 -12 714 685
{
714 581 m
650 645 560 685 465 685 c
304 685 165 580 128 432 c
50 432 l
20 369 l
116 369 l
115 356 115 347 115 337 c
115 328 115 319 116 306 c
50 306 l
20 243 l
128 243 l
165 97 300 -12 465 -12 c
560 -12 635 25 685 65 c
685 155 l
633 91 551 51 465 51 c
340 51 238 131 199 243 c
555 243 l
585 306 l
184 306 l
183 317 182 326 182 336 c
182 346 183 356 184 369 c
614 369 l 644 432 l
199 432 l
233 540 340 622 465 622 c
555 622 636 580 685 520 c
cp
750 0 m
}
pdf_PSBuildGlyph
} def
/Times-Bold
{
500 0 16 -14 478 700
{
367 308 m
224 308 l
224 368 l
375 368 l
380 414 l
225 414 l
230 589 257 653 315 653 c
402 653 431 521 444 457 c
473 457 l
473 698 l
444 697 l
441 679 437 662 418 662 c
393 662 365 700 310 700 c
211 700 97 597 73 414 c
21 414 l
16 368 l
69 368 l
69 359 68 350 68 341 c
68 330 68 319 69 308 c
21 308 l
16 262 l
73 262 l
91 119 161 -14 301 -14 c
380 -14 443 50 478 116 c
448 136 l
415 84 382 40 323 40 c
262 40 231 77 225 262 c
362 262 l
cp
500 0 m
}
pdf_PSBuildGlyph
} def
/Times-BoldItalic
{
500 0 9 -20 542 686
{
542 686 m
518 686 l
513 673 507 660 495 660 c
475 660 457 683 384 683 c
285 683 170 584 122 430 c
58 430 l
34 369 l
105 369 l
101 354 92 328 90 312 c
34 312 l
9 251 l
86 251 l
85 238 84 223 84 207 c
84 112 117 -14 272 -14 c
326 -14 349 9 381 9 c
393 9 393 -10 394 -20 c
420 -20 l
461 148 l
429 148 l
416 109 362 15 292 15 c
227 15 197 55 197 128 c
197 162 204 203 216 251 c
378 251 l
402 312 l
227 312 l
229 325 236 356 241 369 c
425 369 l
450 430 l
255 430 l
257 435 264 458 274 488 c
298 561 337 654 394 654 c
437 654 484 621 484 530 c
484 516 l
516 516 l
cp
500 0 m
}
pdf_PSBuildGlyph
} def
/Times-Italic
{
500 0 23 -10 595 692
{
399 317 m
196 317 l
199 340 203 363 209 386 c
429 386 l
444 424 l
219 424 l
246 514 307 648 418 648 c
448 648 471 638 492 616 c
529 576 524 529 527 479 c
549 475 l
595 687 l
570 687 l
562 674 558 664 542 664 c
518 664 474 692 423 692 c
275 692 162 551 116 424 c
67 424 l
53 386 l
104 386 l
98 363 93 340 90 317 c
37 317 l
23 279 l
86 279 l
85 266 85 253 85 240 c
85 118 137 -10 277 -10 c
370 -10 436 58 488 128 c
466 149 l
424 101 375 48 307 48 c
212 48 190 160 190 234 c
190 249 191 264 192 279 c
384 279 l
cp
500 0 m
}
pdf_PSBuildGlyph
} def
/Times-Roman
{
500 0 10 -12 484 692
{
347 298 m
171 298 l
170 310 170 322 170 335 c
170 362 l
362 362 l
374 403 l
172 403 l
184 580 244 642 308 642 c
380 642 434 574 457 457 c
481 462 l
474 691 l
449 691 l
433 670 429 657 410 657 c
394 657 360 692 299 692 c
204 692 94 604 73 403 c
22 403 l
10 362 l
70 362 l
69 352 69 341 69 330 c
69 319 69 308 70 298 c
22 298 l
10 257 l
73 257 l
97 57 216 -12 295 -12 c
364 -12 427 25 484 123 c
458 142 l
425 101 384 37 316 37 c
256 37 189 84 173 257 c
335 257 l
cp
500 0 m
}
pdf_PSBuildGlyph
} def
end
Level2? {setglobal} if
currentdict readonly pop end
%%EndResource
PDFText begin
[39/quotesingle 96/grave 128/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis
/Udieresis/aacute/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute
/egrave/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde
/oacute/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex
/udieresis/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls
/registered/copyright/trademark/acute/dieresis/.notdef/AE/Oslash
/.notdef/plusminus/.notdef/.notdef/yen/mu/.notdef/.notdef
/.notdef/.notdef/.notdef/ordfeminine/ordmasculine/.notdef/ae/oslash
/questiondown/exclamdown/logicalnot/.notdef/florin/.notdef/.notdef
/guillemotleft/guillemotright/ellipsis/space/Agrave/Atilde/Otilde/OE/oe
/endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide
/.notdef/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright
/fi/fl/daggerdbl/periodcentered/quotesinglbase/quotedblbase/perthousand
/Acircumflex/Ecircumflex/Aacute/Edieresis/Egrave/Iacute/Icircumflex
/Idieresis/Igrave/Oacute/Ocircumflex/.notdef/Ograve/Uacute/Ucircumflex
/Ugrave/dotlessi/circumflex/tilde/macron/breve/dotaccent/ring/cedilla
/hungarumlaut/ogonek/caron
0 TE
[1/dotlessi/caron 39/quotesingle 96/grave
127/bullet/Euro/bullet/quotesinglbase/florin/quotedblbase/ellipsis
/dagger/daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE
/bullet/Zcaron/bullet/bullet/quoteleft/quoteright/quotedblleft
/quotedblright/bullet/endash/emdash/tilde/trademark/scaron
/guilsinglright/oe/bullet/zcaron/Ydieresis/space/exclamdown/cent/sterling
/currency/yen/brokenbar/section/dieresis/copyright/ordfeminine
/guillemotleft/logicalnot/hyphen/registered/macron/degree/plusminus
/twosuperior/threesuperior/acute/mu/paragraph/periodcentered/cedilla
/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash
/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave
/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde
/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute
/ucircumflex/udieresis/yacute/thorn/ydieresis
1 TE
end
%%BeginResource: procset pdfasc.prc 6.0 1
%%Copyright: Copyright 1992-2003 Adobe Systems Incorporated. All Rights Reserved.
/ASR {
13 dict begin
/mirV? exch def
/mirH? exch def
/center? exch def
/autorotate? exch def
/angle exch def
/shrink exch def
/Pury exch def
/Purx exch def
/Plly exch def
/Pllx exch def
/Dury exch def
/Durx exch def
/Dlly exch def
/Dllx exch def
Dury 0 eq Durx 0 eq and Dlly 0 eq Dllx 0 eq and and
{ shrink 0 gt { GClipBBox } { GPageBBox } ifelse }
{ ITransDBBox }
ifelse
/PHt Pury Plly sub def
/PW Purx Pllx sub def
/DHt Dury Dlly sub def
/DW Durx Dllx sub def
angle 90 eq angle 270 eq or
{
PHt /PHt PW def /PW exch def
} if
autorotate? PHt PW ne and DHt DW ne and
{
DHt DW ge
PHt PW ge
ne
{ /angle angle 90 add def
PHt /PHt PW def /PW exch def
}
if
} if
angle 0 ne
{
/angle angle 360 mod def
angle rotate
angle 90 eq
{ 0 DW neg translate }
if
angle 180 eq
{ DW neg DHt neg translate }
if
angle 270 eq
{ DHt neg 0 translate }
if
} if
center?
{
ITransBBox
Durx Dllx add 2 div Dury Dlly add 2 div
Purx Pllx add -2 div Pury Plly add -2 div
3 -1 roll add exch
3 -1 roll add exch
translate
}
{
ITransBBox
angle 0 eq
{Dllx Pllx sub Dury Pury sub}
if
angle 90 eq
{Durx Purx sub Dury Pury sub}
if
angle 180 eq
{Durx Purx sub Dlly Plly sub}
if
angle 270 eq
{Dllx Pllx sub Dlly Plly sub}
if
translate
}
ifelse
mirH? mirV? or
{
ITransBBox
mirH?
{
-1 1 scale
Durx Dllx add neg 0 translate
} if
mirV?
{
1 -1 scale
0 Dury Dlly add neg translate
} if
} if
shrink 0 ne
{
ITransBBox
Dury Dlly sub Pury Plly sub div
Durx Dllx sub Purx Pllx sub div
2 copy gt { exch } if pop
shrink 1 eq
{
Durx Dllx add 2 div Dury Dlly add 2 div translate
dup scale
Purx Pllx add -2 div Pury Plly add -2 div translate
}
{
shrink 2 eq 1 index 1.0 lt and
{
Durx Dllx add 2 div Dury Dlly add 2 div translate
dup scale
Purx Pllx add -2 div Pury Plly add -2 div translate
}
{ pop }
ifelse
}
ifelse
} if
end
} [/autorotate? /shrink? /mirH? /mirV? /angle /Pury /Purx /Plly /Pllx /Durx /Dury /Dllx /Dlly /PW /PHt /DW /DHt
/Devurx /Devury /Devllx /Devlly /pdfHt /pdfW]
bld
/GClipBBox
{
gsave newpath clippath pathbbox newpath grestore
/Dury exch def
/Durx exch def
/Dlly exch def
/Dllx exch def
ITransDBBox
} [/Durx /Dury /Dllx /Dlly]
bld
/GPageBBox
{
{
currentpagedevice /PageSize get aload pop
/Devury exch def /Devurx exch def
/Devllx 0 def /Devlly 0 def
ITransBBox
}
stopped
{ GClipBBox }
if
} [/Devurx /Devury /Devllx /Devlly ]
bld
/ITransDBBox
{
Durx Dury transform matrix defaultmatrix itransform
/Devury exch def
/Devurx exch def
Dllx Dlly transform matrix defaultmatrix itransform
/Devlly exch def
/Devllx exch def
Devury Devlly lt {/Devlly Devury /Devury Devlly def def} if
Devurx Devllx lt {/Devllx Devurx /Devurx Devllx def def} if
} [/Durx /Dury /Dllx /Dlly /Devurx /Devury /Devllx /Devlly ]
bld
/ITransBBox
{
/um matrix currentmatrix matrix defaultmatrix matrix invertmatrix matrix concatmatrix def
Devllx Devlly um itransform
Devurx Devury um itransform
/Dury exch def
/Durx exch def
/Dlly exch def
/Dllx exch def
Dury Dlly lt {/Dlly Dury /Dury Dlly def def} if
Durx Dllx lt {/Dllx Durx /Durx Dllx def def} if
} [ /um /Durx /Dury /Dllx /Dlly /Devurx /Devury /Devllx /Devlly ]
bld
%%EndResource
currentdict readonly pop
end end
/currentpacking where {pop setpacking}if
PDFVars/DocInitAll{[PDF PDFText]{/docinitialize get exec}forall }put
PDFVars/InitAll{[PDF PDFText]{/initialize get exec}forall initgs}put
PDFVars/TermAll{[PDFText PDF]{/terminate get exec}forall}put
PDFVars begin PDF begin
PDFVars/DocInitAll get exec PDFVars/InitAll get exec
%%IncludeResource Arial-BoldMT
[/N18/Arial-BoldMT 1 TZ
[/NamespacePush PDFMark5
[/_objdef {Metadata_In_EPS} /type /stream /OBJ PDFMark5
[{Metadata_In_EPS} 1242 (% &end XMP packet& %) ReadByPDFMark5
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='uuid:60c69c35-3b17-48ba-853e-a073b8487e22' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='Acrobat Distiller 6.0 (Windows)'></rdf:Description>
<rdf:Description rdf:about='uuid:60c69c35-3b17-48ba-853e-a073b8487e22' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2006-12-26T13:36:47-05:00' xap:CreateDate='2006-12-26T13:36:29-05:00' xap:CreatorTool='Acrobat PDFMaker 6.0 for PowerPoint' xap:MetadataDate='2006-12-26T13:36:47-05:00'></rdf:Description>
<rdf:Description rdf:about='uuid:60c69c35-3b17-48ba-853e-a073b8487e22' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:3a3885cc-5e4a-4b22-a0b7-7e464cd3abb2'/>
<rdf:Description rdf:about='uuid:60c69c35-3b17-48ba-853e-a073b8487e22' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Slide 1</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>Wen Yu</rdf:li></rdf:Seq></dc:creator></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end='w'?>
% &end XMP packet& %
[{Metadata_In_EPS} 2 dict begin /Type /Metadata def /Subtype /XML def currentdict end /PUT PDFMark5
[/Document 1 dict begin /Metadata {Metadata_In_EPS} def currentdict end /BDC PDFMark5
[/NamespacePop PDFMark5
PDFVars/TermAll get exec end end
%%EndSetup
PDFVars begin PDF begin PDFVars/InitAll get exec
29 62 718 537 rectclip
[ 0 -1 1 0 -33 628 ] concat
/N19 [/DeviceRGB] /ColorSpace defineRes pop
29.0 62.0 537.0 718.0 re
W
n
q
n
567.47998 61.011002 -540.0 719.999985 re
eoclip
n
q
0.0 10.08 -10.02 0.0 37.5 61.01054 cm
1.0 sg
q
n
0.0 0.0 1.0 1.0 re
10 dict dup begin
/ImageType 1 def
/Width 42 def
/Height 42 def
/ImageMatrix [42.0 0.0 0.0 -41.999996 0.0 41.999996] def
/BitsPerComponent 1 def
/Decode [0.0 1.0 ] def
/DataSource {currentfile userdict /CIstring get readhexstring pop} bind def
end
42 42 false 4 -1 roll dup /ImageMatrix get exch /DataSource get
userdict /CIstring 6 string put
imagemask
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000
Q
Q
Q
n
183.479996 136.011002 m
183.479996 111.171005 191.87999 91.011002 202.199997 91.011002 c
212.580002 91.011002 220.979996 111.171005 220.979996 136.011002 c
220.979996 160.851013 212.580002 181.011002 202.199997 181.011002 c
191.87999 181.011002 183.479996 160.851013 183.479996 136.011002 c
1.0 sg
eofill
1.5 w
1 j
1 J
n
183.479996 136.011002 m
183.479996 111.171005 191.87999 91.011002 202.199997 91.011002 c
212.580002 91.011002 220.979996 111.171005 220.979996 136.011002 c
220.979996 160.851013 212.580002 181.011002 202.199997 181.011002 c
191.87999 181.011002 183.479996 160.851013 183.479996 136.011002 c
h
0.0 sg
S
0.0 sg
206.819992 114.770508 m
/N18 [0.0 12.0 -12.0 0.0 0.0 0.0] Tf
(Service)
[7.978769 6.646677 4.642771 6.646677 3.310678 6.646677 6.646677 ] pdfys
n
183.479996 262.011017 m
183.479996 237.171005 191.87999 217.011017 202.199997 217.011017 c
212.580002 217.011017 220.979996 237.171005 220.979996 262.011017 c
220.979996 286.851013 212.580002 307.011017 202.199997 307.011017 c
191.87999 307.011017 183.479996 286.851013 183.479996 262.011017 c
1.0 sg
eofill
n
183.479996 262.011017 m
183.479996 237.171005 191.87999 217.011017 202.199997 217.011017 c
212.580002 217.011017 220.979996 237.171005 220.979996 262.011017 c
220.979996 286.851013 212.580002 307.011017 202.199997 307.011017 c
191.87999 307.011017 183.479996 286.851013 183.479996 262.011017 c
h
0.0 sg
S
0.0 sg
206.819992 238.010498 m
(Refinin)
[8.668801 6.676797 4.00071 3.340799 7.336709 3.340799 7.336709 ] pdfys
206.819992 278.757416 m
(g) show
n
381.47998 262.011017 m
381.47998 237.171005 389.880005 217.011017 400.200012 217.011017 c
410.579987 217.011017 418.97998 237.171005 418.97998 262.011017 c
418.97998 286.851013 410.579987 307.011017 400.200012 307.011017 c
389.880005 307.011017 381.47998 286.851013 381.47998 262.011017 c
1.0 sg
eofill
n
381.47998 262.011017 m
381.47998 237.171005 389.880005 217.011017 400.200012 217.011017 c
410.579987 217.011017 418.97998 237.171005 418.97998 262.011017 c
418.97998 286.851013 410.579987 307.011017 400.200012 307.011017 c
389.880005 307.011017 381.47998 286.851013 381.47998 262.011017 c
h
0.0 sg
S
0.0 sg
404.819977 251.030487 m
(Cell)
[8.668801 6.676797 3.340799 3.340799 ] pdfys
n
291.47998 268.011017 m
291.47998 243.171005 299.880005 223.011017 310.200012 223.011017 c
320.579987 223.011017 328.97998 243.171005 328.97998 268.011017 c
328.97998 292.851013 320.579987 313.011017 310.200012 313.011017 c
299.880005 313.011017 291.47998 292.851013 291.47998 268.011017 c
1.0 sg
eofill
n
291.47998 268.011017 m
291.47998 243.171005 299.880005 223.011017 310.200012 223.011017 c
320.579987 223.011017 328.97998 243.171005 328.97998 268.011017 c
328.97998 292.851013 320.579987 313.011017 310.200012 313.011017 c
299.880005 313.011017 291.47998 292.851013 291.47998 268.011017 c
h
0.0 sg
S
0.0 sg
314.820007 252.770477 m
(Mesh)
[9.991111 6.667197 6.667197 7.327109 ] pdfys
n
465.47998 298.011017 m
465.47998 273.171021 473.879944 253.011017 484.200012 253.011017 c
494.579987 253.011017 502.97998 273.171021 502.97998 298.011017 c
502.97998 322.851013 494.579987 343.011017 484.200012 343.011017 c
473.879944 343.011017 465.47998 322.851013 465.47998 298.011017 c
1.0 sg
eofill
n
465.47998 298.011017 m
465.47998 273.171021 473.879944 253.011017 484.200012 253.011017 c
494.579987 253.011017 502.97998 273.171021 502.97998 298.011017 c
502.97998 322.851013 494.579987 343.011017 484.200012 343.011017 c
473.879944 343.011017 465.47998 322.851013 465.47998 298.011017 c
h
0.0 sg
S
0.0 sg
488.819977 279.770508 m
(Vertex)
[7.96797 6.635878 4.631971 3.959791 6.635878 6.635878 ] pdfys
n
435.47998 166.011002 m
435.47998 141.171005 443.880005 121.011017 454.200012 121.011017 c
464.579987 121.011017 472.97998 141.171005 472.97998 166.011002 c
472.97998 190.850998 464.579987 211.011017 454.200012 211.011017 c
443.880005 211.011017 435.47998 190.850998 435.47998 166.011002 c
1.0 sg
eofill
n
435.47998 166.011002 m
435.47998 141.171005 443.880005 121.011017 454.200012 121.011017 c
464.579987 121.011017 472.97998 141.171005 472.97998 166.011002 c
472.97998 190.850998 464.579987 211.011017 454.200012 211.011017 c
443.880005 211.011017 435.47998 190.850998 435.47998 166.011002 c
h
0.0 sg
S
0.0 sg
458.819977 151.370499 m
(Ed)
[7.987289 7.315109 ] pdfys
458.819977 166.740005 m
(ge)
[7.315109 6.655197 ] pdfys
n
183.479996 382.011017 m
183.479996 357.171021 191.87999 337.011017 202.199997 337.011017 c
212.580002 337.011017 220.979996 357.171021 220.979996 382.011017 c
220.979996 406.851013 212.580002 427.011017 202.199997 427.011017 c
191.87999 427.011017 183.479996 406.851013 183.479996 382.011017 c
1.0 sg
eofill
n
183.479996 382.011017 m
183.479996 357.171021 191.87999 337.011017 202.199997 337.011017 c
212.580002 337.011017 220.979996 357.171021 220.979996 382.011017 c
220.979996 406.851013 212.580002 427.011017 202.199997 427.011017 c
191.87999 427.011017 183.479996 406.851013 183.479996 382.011017 c
h
0.0 sg
S
0.0 sg
206.819992 349.130493 m
(Coarsenin)
[8.649482 7.317389 6.657477 4.653571 6.657477 6.657477 7.317389 3.321478 7.317389 ] pdfys
206.819992 407.745087 m
(g) show
n
183.479996 508.009979 m
183.479996 483.171021 191.87999 463.011017 202.199997 463.011017 c
212.580002 463.011017 220.979996 483.171021 220.979996 508.009979 c
220.979996 532.851013 212.580002 553.01001 202.199997 553.01001 c
191.87999 553.01001 183.479996 532.851013 183.479996 508.009979 c
1.0 sg
eofill
n
183.479996 508.009979 m
183.479996 483.171021 191.87999 463.011017 202.199997 463.011017 c
212.580002 463.011017 220.979996 483.171021 220.979996 508.009979 c
220.979996 532.851013 212.580002 553.01001 202.199997 553.01001 c
191.87999 553.01001 183.479996 532.851013 183.479996 508.009979 c
h
0.0 sg
S
0.0 sg
206.819992 493.250488 m
(Input)
[3.365999 7.361909 7.361909 7.361909 4.02591 ] pdfys
n
183.479996 664.01001 m
183.479996 639.171021 191.87999 619.01001 202.199997 619.01001 c
212.580002 619.01001 220.979996 639.171021 220.979996 664.01001 c
220.979996 688.849976 212.580002 709.01001 202.199997 709.01001 c
191.87999 709.01001 183.479996 688.849976 183.479996 664.01001 c
1.0 sg
eofill
n
183.479996 664.01001 m
183.479996 639.171021 191.87999 619.01001 202.199997 619.01001 c
212.580002 619.01001 220.979996 639.171021 220.979996 664.01001 c
220.979996 688.849976 212.580002 709.01001 202.199997 709.01001 c
191.87999 709.01001 183.479996 688.849976 183.479996 664.01001 c
h
0.0 sg
S
0.0 sg
206.819992 644.270508 m
(Output)
[9.357598 7.353509 4.01751 7.353509 7.353509 4.01751 ] pdfys
n
375.47998 661.01001 m
375.47998 757.01001 l
405.47998 757.01001 l
405.47998 661.01001 l
1.0 sg
f
8.0 M
0 j
n
375.47998 661.01001 30.0 96.0 re
0.0 sg
S
0.0 sg
394.97998 664.010498 m
(Virtual Me)
[8.013569 3.345479 4.677571 4.005391 7.341389 6.681477 3.345479 3.362278 10.00539 6.681477 ] pdfys
394.97998 721.386536 m
(mory)
[10.67757 7.341389 4.677571 6.681477 ] pdfys
n
218.940002 157.55101 m
293.399994 232.011017 l
294.47998 230.931015 l
220.019989 156.471008 l
h
291.119995 232.911011 m
297.47998 235.011017 l
295.380005 228.651016 l
0.0 sg
f
n
219.059998 145.611008 m
376.919983 250.850998 l
377.759979 249.591019 l
219.900009 144.411011 l
h
374.819977 252.171005 m
381.47998 253.011017 l
378.119995 247.19101 l
f
n
220.080002 385.43103 m
289.200012 287.511017 l
288.0 286.671021 l
218.87999 384.591003 l
h
290.459991 289.611023 m
291.47998 283.011017 l
285.540009 286.19101 l
f
n
220.199997 493.309998 m
296.339996 299.931 l
294.959991 299.391022 l
218.759979 492.711029 l
h
298.079987 301.671021 m
297.47998 295.011017 l
292.5 299.511017 l
f
n
220.199997 649.190002 m
308.880005 318.051025 l
307.440002 317.631012 l
218.759979 648.831055 l
h
310.800018 319.611023 m
309.47998 313.011017 l
305.039978 318.051025 l
f
n
219.479996 259.731018 67.020004 -1.5 re
285.47998 262.011017 m
291.47998 259.009979 l
285.47998 256.009979 l
f
n
219.360001 115.731003 m
430.440002 150.951004 l
430.679993 149.451004 l
219.600006 114.291016 l
h
429.059998 152.991013 m
435.47998 151.011002 l
430.079987 147.05101 l
f
n
219.119995 121.671005 m
478.679993 251.451019 l
479.339996 250.130997 l
219.839996 120.351006 l
h
476.759979 253.011017 m
483.47998 253.011017 l
479.459991 247.671005 l
f
n
219.900009 511.610992 m
371.819977 406.491028 l
370.919983 405.231018 l
219.059998 510.410004 l
h
372.23999 408.891022 m
375.47998 403.011017 l
368.819977 403.971008 l
f
n
219.659988 523.72998 m
370.800018 488.871033 l
370.440002 487.43103 l
219.300003 522.291016 l
h
370.319977 491.271027 m
375.47998 487.011017 l
368.940002 485.451019 l
f
n
375.47998 559.01001 m
375.47998 655.01001 l
405.47998 655.01001 l
405.47998 559.01001 l
1.0 sg
f
n
375.47998 559.01001 30.0 96.0 re
0.0 sg
S
0.0 sg
394.97998 565.610474 m
(Scr)
[8.012489 6.680397 4.676491 ] pdfys
394.97998 584.920898 m
(e) show
394.97998 591.579773 m
(en Output)
[6.680397 7.340309 3.362399 9.344398 7.340309 4.004311 7.340309 7.340309 4.004311 ] pdfys
n
375.47998 457.011017 m
375.47998 553.01001 l
405.47998 553.01001 l
405.47998 457.011017 l
1.0 sg
f
n
375.47998 457.011017 30.0 95.999969 re
0.0 sg
S
0.0 sg
394.97998 461.630493 m
(File Read/Write)
[7.344029 3.348119 3.348119 6.684117 3.362638 8.676122 6.684117 6.684117 7.344029 3.348119 11.340123
4.680211 3.348119 4.008031 6.684117 ] pdfys
n
375.47998 355.011017 m
375.47998 451.011017 l
405.47998 451.011017 l
405.47998 355.011017 l
1.0 sg
f
n
375.47998 355.011017 30.0 96.0 re
0.0 sg
S
0.0 sg
394.97998 359.030487 m
(Key)
[8.667722 6.675717 6.675717 ] pdfys
394.97998 380.971466 m
(board Input)
[7.335629 7.335629 6.675717 4.671811 7.335629 3.422519 3.339719 7.335629 7.335629 7.335629 3.999631
] pdfys
n
219.959991 661.551025 m
372.23999 526.911011 l
371.220001 525.770996 l
219.0 660.471008 l
h
372.959991 529.25 m
375.47998 523.01001 l
369.0 524.75 l
0.0 sg
f
n
219.779999 673.671021 m
371.160004 609.651001 l
370.559998 608.271057 l
219.179977 672.291016 l
h
371.100006 612.109985 m
375.47998 607.01001 l
368.759979 606.591003 l
f
n
219.360001 685.72998 m
370.440002 709.01001 l
370.679993 707.51001 l
219.600006 684.291016 l
h
369.119995 711.051025 m
375.47998 709.01001 l
370.019989 705.109985 l
f
n
418.200012 241.251007 m
434.759979 185.991013 l
433.319977 185.570999 l
416.759979 240.771011 l
h
436.619995 187.611008 m
435.47998 181.011002 l
430.859985 185.871002 l
f
n
417.059998 283.671021 m
460.859985 310.971008 l
461.639954 309.711029 l
417.899994 282.351013 l
h
458.819977 312.351013 m
465.47998 313.011017 l
462.0 307.311005 l
f
0.75 w
10.0 M
1 j
n
75.479996 436.011017 m
114.479996 313.011017 l
153.479996 436.011017 l
114.479996 559.01001 l
h
S
0.0 sg
108.600006 390.290497 m
/N18 [0.0 18.0 -18.0 0.0 0.0 0.0] Tf
(Embedded)
[12.004154 16.000156 10.995884 10.006016 10.995884 10.995884 10.006016 10.995884 ] pdfys
130.199951 387.289856 m
(Application)
[12.996002 10.997864 10.997864 5.003998 5.003998 10.007996 10.007996 5.993866 5.003998 10.997864 10.997864
] pdfys
n
136.139999 379.311005 m
182.220001 269.931 l
180.839996 269.331024 l
134.759979 378.711029 l
h
183.900009 271.731018 m
183.479996 265.011017 l
178.37999 269.391022 l
0.0 sg
f
n
141.779999 397.671021 m
179.159988 381.651031 l
178.559998 380.271027 l
141.179993 396.291016 l
h
179.159988 384.111023 m
183.479996 379.011017 l
176.759979 378.591003 l
f
n
135.23999 487.731018 m
178.559998 503.93103 l
179.039978 502.551025 l
135.720001 486.291016 l
h
176.819992 505.72998 m
183.479996 505.009979 l
178.919998 500.091003 l
f
n
128.759979 517.25 m
181.139999 668.51001 l
182.580002 668.031006 l
130.199997 516.770996 l
h
178.679993 668.331055 m
183.479996 673.01001 l
184.37999 666.351013 l
f
n
124.200005 337.251007 m
182.759979 143.991013 l
181.319992 143.570999 l
122.759987 336.771027 l
h
184.619995 145.611008 m
183.479996 139.011002 l
178.860001 143.871002 l
f
n
327.47998 265.731018 49.019989 -1.5 re
375.47998 268.011017 m
381.47998 265.011017 l
375.47998 262.011017 l
f
n
321.839996 235.671005 m
431.519989 172.19101 l
430.800018 170.871002 l
321.119995 234.350998 l
h
431.759979 174.591003 m
435.47998 169.011002 l
428.759979 169.431015 l
f
n
327.300018 295.731018 m
466.440002 330.531006 l
466.800018 329.091003 l
327.660004 294.291016 l
h
464.940002 332.451019 m
471.47998 331.011017 l
466.379944 326.631012 l
f
n
[/EMC PDFMark5
PDFVars/TermAll get exec end end
%%PageTrailer
%%Trailer
%%DocumentNeededResources:
%%+ font Arial-BoldMT
%%EOF
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/* This file includes classes for the cell module. */
/*****************************************************************************/
#ifndef CELL
#define CELL
#endif
#ifndef VERTEX
#include "Vertex.h"
#endif
#ifndef EDGE
#include "Edge.h"
#endif
namespace PMGT{
//namespace Cell{
//using namespace Vertex;
//using namespace Edge;
class Cell{
public:
Cell(int cId=-1, int LhId = -1, MFLAG mFlag=UNCHANGE, bool del=false){
cId_ = cId;
LhId_ = LhId;
mFlag_ = mFlag;
del_ = del;
}
inline int cId(){ return cId_;}
inline MFLAG mFlag(){ return mFlag_; }
inline int LhId(){ return LhId_; }
inline bool del(){ return del_; }
inline void setCId(int cId){ cId_ = cId; }
inline void setMflag(MFLAG flag){ mFlag_ = flag; }
inline void setLhId(int LhId){ LhId_ = LhId; }
inline void setDel(bool del) { del_ = del; }
inline void ccopy(Cell& other){
cId_ = other.cId_;
LhId_ = other.LhId_;
mFlag_ = other.mFlag_;
del_ = other.del_;
}
private:
int cId_; //id
int LhId_; //longest halfedge
MFLAG mFlag_; //flag for modification
bool del_; // a flag to indicate if the cell
// is marked to be deleted
}; // end of class Cell
//} // end of namespace Cell
} // end of namespace PMGT
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/*****************************************************************************/
#ifndef COARSENING
#include "Coarsening.h"
#endif
namespace PMGT{
// coarsen the mesh by edge collapse
void Coarsening::edge_collapse(Mesh& mesh){
int i, j, k,
cId, // temp cell Id
eId, // temp edge Id
hId, // temp halfedge Id
vId, // temp vertex Id
acId, // adjacent cell
first_acId, // the first adjacent cell
rvId, // the vertex to be remained
dvId; // the vertex to be deleted
vector<int> del_cells, // cells to be deleted
mutual_halfedges, // halfedges of the mutual edge
del_halfedges, // halfedges to be deleted/merged
remain_halfedges, // halfedges to be remained
update_halfedges, // halfedges whose target vertices
// to be updated
update_cells; // cells whose edge length are changed
//int nc = mesh.n_of_c();
for (i=0; i<mesh.n_of_c(); i++){
bool legal = false;
if (mesh.cell(i).mFlag() == COARSEN && !mesh.cell(i).del()){
// check if it is legal to delete i
// check if one of the adjacent cells is to be coarsened
acId = mesh.cc_first(i);
for (int k=0; k<3; k++){ // try 3 neighbour of cell i
//cout << "coarsen i=" << i << " acId=" << acId << " k=" << k <<endl;
if (acId == -1){
break;
}
// check if the i-th neighbour is to be coarsened
if (mesh.cell(acId).mFlag() != COARSEN){
acId = mesh.cc_next(i, acId);
continue;
}
/* check if the mutual edge is legal to be removed */
// find one halfedge of the mutual edge
hId = mesh.ch_first(i);
if (mesh.IcId_from_hId(mesh.ops_hId(hId)) != acId){
if (mesh.IcId_from_hId(mesh.ops_hId
(mesh.prev_hId(hId))) == acId){
hId = mesh.prev_hId(hId);
}
else if(mesh.IcId_from_hId(mesh.ops_hId
(mesh.next_hId(hId))) == acId){
hId = mesh.next_hId(hId);
}
else assert(false);
}
// find the vertex to be delated
int illegal_vId = -1; // the vertex that can not be deleted
bool both_illegal = false; // both vertices are illegal to be deleted
dvId = mesh.tvId_from_hId(hId);
rvId = mesh.svId_from_hId(hId);
int old_hId = hId;
for (int x=0; x<2; x++){ // try two vertices of hId
if (mesh.is_b_v(dvId)){
if (illegal_vId == -1){
illegal_vId = dvId;
dvId = mesh.svId_from_hId(old_hId);
rvId = mesh.tvId_from_hId(old_hId);
hId = mesh.ops_hId(old_hId);
continue;
}
else{
both_illegal = true;
break;
}
}
//cout << "mutual_h:"<<hId<<",";
// reserve the entities that will be modified
del_cells.clear();
mutual_halfedges.clear();
del_halfedges.clear();
remain_halfedges.clear();
update_halfedges.clear();
update_cells.clear();
// set variables
mutual_halfedges.push_back(hId);
del_halfedges.push_back(mesh.next_hId(hId));
remain_halfedges.push_back(mesh.prev_hId(hId));
del_cells.push_back(mesh.IcId_from_hId(hId));
hId = mesh.ops_hId(hId);
//cout << hId<< endl;
mutual_halfedges.push_back(hId);
del_halfedges.push_back(mesh.prev_hId(hId));
remain_halfedges.push_back(mesh.next_hId(hId));
del_cells.push_back(mesh.IcId_from_hId(hId));
//cout << "del_cells "<< del_cells[0]<<","<<del_cells[1]<<endl;
assert(del_cells[0]==i || del_cells[0]==acId);
assert(del_cells[1]==i || del_cells[1]==acId);
assert(del_cells[0] != del_cells[1]);
assert(!mesh.is_b_v(dvId));
// find the halfedges whose target vertices are dvId
hId = mesh.vih_first(dvId);
do{
if (hId == -1){
break;
}
if (hId != mutual_halfedges[0] && hId != del_halfedges[1]
&& hId != mesh.ops_hId(del_halfedges[0])){
update_halfedges.push_back(hId);
//update_cells.push_back(mesh.IcId_from_hId(hId));
}
//cout << "dvId="<<dvId<<"vih id=" << hId << endl;
hId = mesh.vih_next(dvId, hId);
}while (hId != mesh.vih_first(dvId));
// find the cells whose whose one vertices are dvId
cId = mesh.vc_first(dvId);
do{
if (cId ==-1){
break;
}
if (cId != del_cells[0] && cId != del_cells[1]){
update_cells.push_back(cId);
//update_cells.push_back(mesh.IcId_from_hId(hId));
}
cId = mesh.vc_next(dvId, cId);
}while (cId != mesh.vc_first(dvId));
for (j=0; j<update_cells.size(); j++){
vector<int> vIds;
vIds.clear();
vIds = mesh.vIds_from_cId(update_cells[j]);
for (int jj=0; jj<3; jj++){
if (vIds[jj] == dvId){
vIds[jj] = rvId;
}
}
if ( !mesh.is_ccw(vIds)){
break;// for j
}
}
if (j==update_cells.size()){
break; // from (for x)
}
// dvId is not legal to be deleted
if (illegal_vId == -1){
illegal_vId = dvId;
dvId = mesh.svId_from_hId(old_hId);
rvId = mesh.tvId_from_hId(old_hId);
hId = mesh.ops_hId(old_hId);
continue;
}
else {// both vertices are illegal to be deleted
both_illegal = true;
break; // from (for x)
}
}// for x
if (both_illegal){
acId = mesh.cc_next(i, acId);
if (acId == -1){
break;
}
continue;
}
else {
legal = true;
break; // from (for k) since dvId is found
}
} // for k
if (legal){
//cout << "legal coarsen i=" << i << " acId=" << acId << endl;
// reset Mflag
for (j=0; j<update_halfedges.size(); j++){
mesh.halfedge(update_halfedges[j]).setTvId(rvId);
}
for (j=0; j<2; j++){
hId = mesh.ops_hId(del_halfedges[j]);
cId = mesh.IcId_from_hId(hId);
if (mesh.LhId_from_cId(cId) == hId){
int LhId = remain_halfedges[j];
int next_hId = mesh.next_hId(hId);
int prev_hId = mesh.prev_hId(hId);
if (mesh.dist(LhId) < mesh.dist(next_hId)){
LhId = next_hId;
}
if (mesh.dist(LhId) < mesh.dist(prev_hId)){
LhId = prev_hId;
}
mesh.cell(cId).setLhId(LhId);
//cout << " ____cId = " << cId << " LhId = " << LhId <<endl;
}
}
for (j=0; j<update_cells.size(); j++){
mesh.cell(update_cells[j]).setMflag(UNCHANGE);
}
//cout << "---update_cells:";
//for (int ii=0; ii<update_cells.size(); ii++){
// cout <<" " << update_cells[ii]<< "("<<mesh.cell(update_cells[ii]).mFlag()<<")";
//}
//cout << endl;
// reset OhId
int svId = mesh.svId_from_hId(del_halfedges[1]);
if (mesh.OhId_from_vId(svId) == del_halfedges[1]){
//mesh.vertex(svId).setOhId(mesh.ccw_hId(del_halfedges[1]));
//assert(mesh.svId_from_hId(del_halfedges[1])==
//mesh.svId_from_hId(remain_halfedges[1]));
mesh.vertex(svId).setOhId(mesh.ops_hId(remain_halfedges[1]));
//cout << "reset OhId of vertex " << svId << " to " << mesh.vertex(svId).OhId() << endl;
}
svId = mesh.svId_from_hId(mesh.ops_hId(del_halfedges[0]));
if (mesh.OhId_from_vId(svId) == mesh.ops_hId(del_halfedges[0])){
//mesh.vertex(svId).setOhId(mesh.ccw_hId(mutual_halfedges[0]));
//assert(mesh.svId_from_hId(del_halfedges[0])==
//mesh.svId_from_hId(remain_halfedges[0]));
mesh.vertex(svId).setOhId(remain_halfedges[0]);
//cout << "reset OhId of vertex " << svId << " to " << mesh.vertex(svId).OhId() << endl;
}
svId = mesh.svId_from_hId(mutual_halfedges[0]);
if (mesh.OhId_from_vId(svId) == mutual_halfedges[0]){
//mesh.vertex(svId).setOhId(mesh.ccw_hId(mutual_halfedges[0]));
//assert(mesh.svId_from_hId(mutual_halfedges[0])==
//mesh.svId_from_hId(remain_halfedges[0]));
mesh.vertex(svId).setOhId(remain_halfedges[1]);
//cout << "reset OhId of vertex " << svId << " to " << mesh.vertex(svId).OhId() << endl;
}
for (j=0; j<2; j++){
hId = mesh.ops_hId(del_halfedges[j]);
int phId = mesh.prev_hId(hId);
int nhId = mesh.next_hId(hId);
cId = mesh.IcId_from_hId(hId);
mesh.halfedge(remain_halfedges[j]).setIcId(cId);
mesh.halfedge(remain_halfedges[j]).setPhId(phId);
mesh.halfedge(remain_halfedges[j]).setNhId(nhId);
mesh.halfedge(nhId).setPhId(remain_halfedges[j]);
mesh.halfedge(phId).setNhId(remain_halfedges[j]);
mesh.halfedge(del_halfedges[j]).setIcId(-1);
}
// mark edges to be deleted
mesh.edge(mesh.eId_from_hId(mutual_halfedges[0])).setDel(true);
mesh.edge(mesh.eId_from_hId(del_halfedges[0])).setDel(true);
mesh.edge(mesh.eId_from_hId(del_halfedges[1])).setDel(true);
//cout << "deleted edges:"<< mesh.eId_from_hId(mutual_halfedges[0])
//<< " "<< mesh.eId_from_hId(del_halfedges[0])
//<< " "<< mesh.eId_from_hId(del_halfedges[1])<< endl;
// mark cells to be deleted
mesh.cell(del_cells[0]).setDel(true);
mesh.cell(del_cells[1]).setDel(true);
// delete dvId
mesh.vertex(dvId).set_isolated_v();
mesh.vertex(dvId).setDel(true);
}// if (legal)
}// if COARSEN
} // for i
// delete entities
mesh.delete_cells();
mesh.delete_edges();//mesh.display_info();
mesh.delete_vertices();
// reset mFlags
}// edge_collapse
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/* This file contains the class for corsening module. */
/*****************************************************************************/
#ifndef COARSENING
#define COARSENING
#endif
#ifndef MESH
#include "Mesh.h"
#endif
namespace PMGT{
class Coarsening{
public:
// coarsen the mesh by edge collapse
void edge_collapse(Mesh& mesh);
};
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/* This file includes classes for the edge module. */
/*****************************************************************************/
#ifndef EDGE
#define EDGE
#endif
#ifndef VERTEX
#include "Vertex.h"
#endif
namespace PMGT{
//namespace Edge{
//using namespace Vertex;
class Halfedge{
public:
Halfedge(int hId=-1, int TvId=-1, int IcId=-1, int PhId=-1, int NhId=-1){
hId_ = hId;
TvId_ = TvId;
IcId_ = IcId;
PhId_ = PhId;
NhId_ = NhId;
}
inline int hId(){ return hId_; }
inline int IcId(){ return IcId_; }
inline int TvId(){ return TvId_; }
inline int NhId(){ return NhId_; }
inline int PhId(){ return PhId_; }
inline void setHId(int hId){ hId_ = hId; }
inline void setTvId(int TvId){ TvId_ = TvId; }
inline void setIcId(int IcId){ IcId_ = IcId; }
inline void setNhId(int NhId){ NhId_ = NhId; }
inline void setPhId(int PhId){ PhId_ = PhId; }
inline bool is_boundary(){ return IcId_ == -1; }
//opposite halfedge
inline int ops_hId(){ return ((hId_ & 1) ? hId_-1: hId_+1); }
inline void hcopy(Halfedge& other){
hId_ = other.hId_;
TvId_ = other.TvId_;
IcId_ = other.IcId_;
PhId_ = other.PhId_;
NhId_ = other.NhId_;
}
private:
int hId_; //id
int TvId_; //target vertex
int IcId_; //its cel
int PhId_; //previous halfedge
int NhId_; //next halfedge
}; // end of class Halfedge
class Edge{
public:
Edge(int svId=-2, int tvId=-1, int eId=-1, bool del=false){
assert(svId != tvId);
eId_ = eId;
pair_[0].setHId(eId << 1);
pair_[0].setTvId(tvId);
pair_[1].setHId((eId << 1)+1);
pair_[1].setTvId(svId);
del_ = del;
}
inline int eId(){ return eId_;}
inline Halfedge* pair(){ return pair_; }
inline bool del(){ return del_; }
inline void setEId(int eId){ eId_ = eId; }
inline void setPair(Halfedge& h1, Halfedge& h2){
pair_[0].hcopy(h1);
pair_[1].hcopy(h2);
}
inline void setDel(bool del) { del_ = del; }
inline bool is_isolated_e(){
return pair_[0].IcId() == -1
&& pair_[1].IcId() == -1;
}
inline void set_isolated_e(){
pair_[0].setIcId(-1);
pair_[1].setIcId(-1);
}
inline bool same (int svId, int tvId){
int v1Id = pair_[0].TvId();
int v2Id = pair_[1].TvId();
return ((v1Id==svId && v2Id==tvId) || (v1Id==tvId && v2Id==svId));
}
inline void ecopy(Edge& other){
eId_ = other.eId_;
pair_[0].hcopy(other.pair_[0]);
pair_[1].hcopy(other.pair_[1]);
del_ = other.del_;
}
private:
int eId_; // id
Halfedge pair_[2]; //a pair of halfedges
bool del_; // a flag to indicate if the edge
// is marked to be deleted
}; // end of class Edge
//} // end of namespace Edge
} // end of namespace PMGT
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/*****************************************************************************/
#include "Input.h"
namespace PMGT{
// Read the mesh from two files
// One is the coordinates of points
// The other is the vertex list of cells
void Input::read_file(Mesh& mesh, char* vertexFile, char* cellFile){
/**/
FILE *v;
FILE *c;
Point p;
Ids ids;
vector<Point> points;
vector<Ids> cells;
char *s, *t;
char line[100];
bool error = false;
// Open the file. If NULL is returned there was an error
if((v = fopen(vertexFile, "r")) == NULL) {
cout << "Error opening file " << vertexFile << "." << endl;
exit(1);
}
if((c = fopen(cellFile, "r")) == NULL) {
cout << "Error opening file " << cellFile << "." << endl;
exit(1);
}
//assert(vertices_.size() == 0);
//assert(edges_.size() == 0);
//assert(cells_.size() == 0);
// get vertices
points.clear();
int count = 0;
while( fgets(line, sizeof(line), v) != NULL ) {
// Get each line from the infile
s = line;
p.clear();
p.push_back(strtod(s, &t));
while ( *s != ' ' && *s !='\n'){
s++;
}
if (*s == '\n'){
error = true;
break;
}
p.push_back(strtod(s, &t));
points.push_back(p);
count++;
}
fclose(v); // Close the file
if (error){ // error message for input file
cout <<"Something wrong in your input file " << vertexFile <<
" line " << count+1 << endl;
exit(1);
}
// get cells
int n=points.size();
count = 0;
cells.clear();
while( fgets(line, sizeof(line), c) != NULL ) {
// Get each line from the infile
s = line;
ids.clear();
ids.push_back(strtol(s, &t, 10));
if (ids[ids.size()-1] <0 || ids[ids.size()-1]>=n){
error = true;
break;
}
while ( *s != ' ' && *s !='\n'){
s++;
}
while(*s == ' ') s++;
if (*s == '\n'){
error = true;
break;
}
ids.push_back(strtol(s, &t, 10));
while(*s == ' ') s++;
if (ids[ids.size()-1] <0 || ids[ids.size()-1]>=n){
error = true;
break;
}
while ( *s != ' ' && *s !='\n'){
s++;
}
while(*s == ' ') s++;
if (*s == '\n'){
error = true;
break;
}
ids.push_back(strtol(s, &t, 10));
if (ids[ids.size()-1] <0 || ids[ids.size()-1]>=n){
error = true;
break;
}
cells.push_back(ids);
count++;
}
fclose(c);
if (error){ // error message for input file
cout <<"Something wrong in your input file " << cellFile <<
" line " << count+1 <<endl;
exit(1);
}
mesh.create(points, cells);
}
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/* This file includes classes for the input module. */
/*****************************************************************************/
#ifndef INPUT
#define INPUT
#endif
#ifndef MESH
#include "Mesh.h"
#endif
namespace PMGT{
class Input{
public:
// Read the mesh from two files
// One is the coordinates of points
// The other is the vertex list of cells
void read_file(Mesh& mesh, char* vertexFile, char* cellFile);
};
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/*****************************************************************************/
#include "Mesh.h"
namespace PMGT{
//namespace Mesh{
// Returns the id of the vertex that has given coordinate.
// Returns -1 if the vertex does not exist.
int Mesh::find_vertex(Point point){
for (int i=0; i<vertices_.size(); i++){
if (vertices_[i].point() == point)
return i;
}
return -1;
}
// Returns the id of the edge that has given points.
// Returns -1 if the edge does not exist.
int Mesh::find_edge(int svId, int tvId){
assert(is_valid_vId(svId));
assert(is_valid_vId(tvId));
for (int i=0; i<edges_.size(); i++){
if (edges_[i].pair()[0].TvId() == tvId){
if (edges_[i].pair()[1].TvId() == svId)
return i;
}
if (edges_[i].pair()[0].TvId() == svId){
if (edges_[i].pair()[1].TvId() == tvId)
return i;
}
}
return -1;
}
// Returns the id of the halfedge that has given start and targate points.
// Returns -1 if the halfedge does not exist.
int Mesh::find_halfedge(int svId, int tvId){
assert(is_valid_vId(svId));
assert(is_valid_vId(tvId));
for (int i=0; i<edges_.size(); i++){
if (edges_[i].pair()[0].TvId() == tvId){
if (edges_[i].pair()[1].TvId() == svId)
return (i<<1);
}
if (edges_[i].pair()[0].TvId() == svId){
if (edges_[i].pair()[1].TvId() == tvId)
return (i<<1)+1;
}
}
return -1;
}
// Returns the id of the cell that has given vertices.
// Returns -1 if the cell does not exist.
// Make sure that vIds and corresponding halfedges exist.
int Mesh::find_cell(vector<int> vIds){
assert(vIds.size() == 3);
for (int i=0; i<3; i++){
assert(is_valid_vId(vIds[i]));
}
vector<int> hId(3);
for (int i=0; i<3; i++){
hId[i] = find_halfedge(vIds[i], vIds[(i+1)%3]);
if(hId[i] == -1) return -1;
}
for (int i=0; i<cells_.size(); i++){
for (int j=0; j<3; j++){
if (cells_[i].LhId()==hId[j]){
int k;
for (k=0; k<3; k++){
if (vIds[k]=tvId_from_hId(hId[j])){
break;
}
}
if (k<3 && vIds[(k+1)%3]==tvId_from_hId(hId[(j+1)%3])
&& vIds[(k+2)%3]==tvId_from_hId(hId[(j+2)%3])){
// three vertices is target vertices of three halfedges
return i;
}
}
}
}
return -1;
}
// Create a vertex and add it to the end of the vertex list.
// Returns false if the vertex already exists.
bool Mesh::add_vertex(Point point){
int vId = find_vertex(point);
if (vId != -1) return false;
Vertex v(point, vertices_.size());
vertices_.push_back(v);
return true;
}
// Create an edge and add it to the end of the edge list.
// Returns false if the edge already exists.
bool Mesh::add_edge(int svId, int tvId){
assert(is_valid_vId(svId));
assert(is_valid_vId(tvId));
int eId = find_edge(svId, tvId);
if (eId != -1){
cout << "add edge " << svId << " " << tvId << " failed" << endl;
return false;
}
Edge e(svId, tvId, edges_.size());
e.pair()[0].setIcId(-1);
e.pair()[1].setIcId(-1);
edges_.push_back(e);
edge(edges_.size()-1).pair()[0].setIcId(-1);
edge(edges_.size()-1).pair()[1].setIcId(-1);
return true;
}
// Create a cell and add it to the end of the vertex list.
// Returns false if the cell already exists.
bool Mesh::add_cell(vector<int> vIds){
assert(vIds.size() == 3);
for (int i=0; i<3; i++){
assert(is_valid_vId(vIds[i]));
}
int cId = find_cell(vIds);
if (cId != -1) return false;
assert(cId == -1);
vector<int> hId(3);
for (int i=0; i<3; i++){
hId[i] = find_halfedge(vIds[i], vIds[(i+1)%3]);
assert(hId[i] != -1);
}
int LhId = hId[0];
if (dist(hId[1]) > dist(LhId)) LhId = hId[1];
if (dist(hId[2]) > dist(LhId)) LhId = hId[2];
//Cell c(cells_.size(), LhId);
Cell c;
cells_.push_back(c);
cId = cells_.size()-1;
cell(cId).setCId(cId);
cell(cId).setLhId(LhId);
// resolve connectivity of edges and vertices
for (int i=0; i<3; i++){
halfedge(hId[i]).setIcId(cId);
halfedge(hId[i]).setNhId(hId[(i+1)%3]);
halfedge(hId[i]).setPhId(hId[(i+2)%3]);
}
for (int i=0; i<3; i++){
int OhId = vertex(vIds[i]).OhId();
if (OhId ==-1 || (!is_b_h(ops_hId(OhId)))){
vertex(vIds[i]).setOhId(hId[i]);
}
else if(svId_from_hId(OhId) != vIds[i]){
vertex(vIds[i]).setOhId(hId[i]);
}
}
return true;
}
// update the cell using given vertex.
// Returns false if the cell does not exist
// or the new cell is already exists.
bool Mesh::update_cell(vector<int> vIds, int cId){
if (!is_valid_cId(cId)) {
cout << "update cell " << cId << " failed. " <<
cId << " is not valid." << endl;
return false;
}
int newId = find_cell(vIds);
if (newId != -1){
cout << "update cell " << cId << " failed. The cell (" <<
vIds[0]<<","<<vIds[1]<<","<<vIds[2]<<") exists."<<endl;
return false;
}
vector<int> hId(3);
for (int i=0; i<3; i++){
hId[i] = find_halfedge(vIds[i], vIds[(i+1)%3]);
assert(hId[i] != -1);
}
int LhId = hId[0];
if (dist(hId[1]) > dist(LhId)) LhId = hId[1];
if (dist(hId[2]) > dist(LhId)) LhId = hId[2];
Cell& c = cell(cId);
c.setLhId(LhId);
c.setMflag(UNCHANGE);
// resolve connectivity of edges and vertices
for (int i=0; i<3; i++){
halfedge(hId[i]).setIcId(c.cId());
halfedge(hId[i]).setNhId(hId[(i+1)%3]);
halfedge(hId[i]).setPhId(hId[(i+5)%3]);
int OhId = vertex(vIds[i]).OhId();
if (OhId ==-1 || (!is_b_h(ops_hId(OhId)))){
vertex(vIds[i]).setOhId(hId[i]);
}
else if(svId_from_hId(OhId) != vIds[i]){
vertex(vIds[i]).setOhId(hId[i]);
}
}
return true;
}
// refine two cells whose longest edges are oppsite to each other
bool Mesh::longest_ref2(int hId, int o_hId, int n_hId){
assert(o_hId == ops_hId(hId));
int cId = IcId_from_hId(hId);
int ops_cId = IcId_from_hId(o_hId);
vector<int> vIds;
// reserve vertices
if (cId != -1){
//vIds = vIds_from_cId(cId);
vIds.push_back(tvId_from_hId(hId));
vIds.push_back(tvId_from_hId(next_hId(hId)));
vIds.push_back(svId_from_hId(hId));
}
vector<int> ops_vIds;// = vIds_from_cId(ops_cId);
ops_vIds.push_back(tvId_from_hId(o_hId));
ops_vIds.push_back(tvId_from_hId(next_hId(o_hId)));
ops_vIds.push_back(svId_from_hId(o_hId));
if (cId !=-1){
assert(ops_vIds[0] == vIds[2]);
assert(ops_vIds[2] == vIds[0]);
}
// reset mFlag
cell(ops_cId).setMflag(UNCHANGE);
if (cId != -1){
cell(cId).setMflag(UNCHANGE);
}
// add new vertex
Point p = mid_point(hId);
assert(add_vertex(p));
int new_vId = n_of_v()-1;
// add/update edges
assert(add_edge(ops_vIds[1], new_vId));
if (cId != -1){
assert(add_edge(vIds[1], new_vId));
}
halfedge(hId).setTvId(new_vId);
assert(add_edge(ops_vIds[2], new_vId));
// add/update cells
int next_svId=0;
if (n_hId != -1){
for(int k=0; k<2; k++){
if(ops_vIds[k]==svId_from_hId(n_hId)){
next_svId = k;
break;
}
}
}
vector<int> temp_vIds;
temp_vIds.clear();
temp_vIds.push_back(new_vId);
temp_vIds.push_back(ops_vIds[next_svId]);
temp_vIds.push_back(ops_vIds[next_svId+1]);
assert(update_cell(temp_vIds, ops_cId));
if (next_svId == 0){
temp_vIds[1] = ops_vIds[1];
temp_vIds[2] = ops_vIds[2];
}
else {
temp_vIds[1] = ops_vIds[0];
temp_vIds[2] = ops_vIds[1];
}
assert(add_cell(temp_vIds));
if (cId != -1){
temp_vIds.clear();
temp_vIds.push_back(new_vId);
temp_vIds.push_back(vIds[0]);
temp_vIds.push_back(vIds[1]);
assert(update_cell(temp_vIds, cId));
temp_vIds[1] = vIds[1];
temp_vIds[2] = vIds[2];
assert(add_cell(temp_vIds));
}
}
// ****** delete an entity *****
// Delete vertices that marked to be deleted.
bool Mesh::delete_vertices(){
for (int i=vertices_.size()-1; i>=0; i--){
if (vertices_[i].del() == true){
// the vertex to be deleted is not the last one
if (vertices_.size()-1 != i){
int vnId = vertices_.size()-1;
int hId = vih_first(vnId);
do{
int old_hId = hId;
hId = vih_next(vnId, hId);
halfedge(old_hId).setTvId(i);
if (hId == -1){
break;
}
}while (hId != vih_first(vnId));
vertices_[i].vcopy(vertices_[vnId]);
vertices_[i].setVId(i);
}
vertices_.pop_back();
}
}
return true;
}
// Delete edges that marked to be deleted from the list.
bool Mesh::delete_edges(){
vector<int> vIds(2);
int j;
for (int i=edges_.size()-1; i>=0; i--){
if (edges_[i].del() == true){
//assert(IcId_from_hId(hId_from_eId(i,0)) == -1);
//assert(IcId_from_hId(hId_from_eId(i,1)) == -1);
if (i!=edges_.size()-1){
int enId = edges_.size()-1;
// relink last edge in the edge list
// this edge will be moved to to position i
vIds = vIds_from_eId(enId);
for (j=0; j<2; j++){
int hnj = hId_from_eId(enId,j);
int hij = hId_from_eId(i,j);
// resolve OhIds of endpoints
if (OhId_from_vId(vIds[j]) == hnj){
vertex(vIds[j]).setOhId(hij);
}
// resolve PhIds and NhIds
if (!is_b_h(hnj)){
halfedge(prev_hId(hnj)).setNhId(hij);
halfedge(next_hId(hnj)).setPhId(hij);
}
// resolve LhId of the incident cell
if (IcId_from_hId(hnj) != -1 &&
LhId_from_cId(IcId_from_hId(hnj))==hnj){
cell(IcId_from_hId(hnj)).setLhId(hij);
}
}// for j
// copy last edge
edges_[i].ecopy(edges_[enId]);
edges_[i].setEId(i);
edges_[i].pair()[0].setHId(i<<1);
edges_[i].pair()[1].setHId((i<<1)+1);
}// if i
// delete last edge
edges_.pop_back();
}
} // for i
return true;
}
// Delete cells that marked to be deleted from the list.
bool Mesh::delete_cells(){
//vector<int> hIds(3);
for (int i=cells_.size()-1; i>=0; i--){
if (cells_[i].del() == true){
// the cell to be deleted is not the last one
if (i!=cells_.size()-1){
int cnId = cells_.size()-1;
// relink last cell in the cell list
// this cell will be moved to cId
vector<int> hIds;
hIds.push_back(LhId_from_cId(cnId));
hIds.push_back(next_hId(LhId_from_cId(cnId)));
hIds.push_back(prev_hId(LhId_from_cId(cnId)));
for(int j=0; j<3; j++){
halfedge(hIds[j]).setIcId(i);
}
// copy last cell
cells_[i].ccopy(cells_[cnId]);
cells_[i].setCId(i);
}
// delete last cell
cells_.pop_back();
}
}
return true;
}
// create a mesh using two input variables.
// One is the coordinates of points
// The other is the vertex list of cells
bool Mesh::create(vector<Point> points, vector<Ids> cells){
int i,j;
int nv = points.size();
int nc = cells.size();
int eId[3];
vector<int> vIds;
for (i=0; i<nv; i++){
// point duplication check
if (!add_vertex(points[i])){
cout << "Duplicate point is detected " <<
"during mesh creatation."<< endl;
return false;
}
}
for (i=0; i<nc; i++){
vIds.clear();
for (j=0; j<3; j++){
// validation check
if (!is_valid_vId(cells[i][j])){
cout << "Invalid id is detected " <<
"during mesh creatation."<< endl;
return false;
}
// find vertices
vIds.push_back(cells[i][j]);
// boundary check
if (!is_b_v(vIds[j])){
cout << "Complex vertex is detected " <<
"during mesh creatation."<< endl;
return false;
}
}
// cell duplication check
if (find_cell(vIds) != -1){
cout << "Duplicate cell is detected " <<
"during mesh creatation."<< endl;
return false;
}
// add edges if necessary
for (j=0; j<3; j++){
eId[j] = find_edge(vIds[j], vIds[(j+1)%3]);
if (eId[j] == -1){
add_edge(vIds[j], vIds[(j+1)%3]);
}
}
// add the cell
add_cell(vIds);
}
}
// display the internal information of a mesh on the screen
void Mesh::display_info(){
vector<int> ids;
cout << endl <<"vertices:" << endl;
for (int i=0; i< vertices_.size(); i++){
cout << "id=" << vertex(i).vId() << " x=" << vertex(i).x() << " y=" << vertex(i).y() <<
" OhId=" << vertex(i).OhId() << endl;
}
cout <<endl << "edges:" << endl;
for (int i=0; i<edges_.size(); i++){
cout << "id=" << edge(i).eId() << " svId=" << vIds_from_eId(i)[0] <<
" tvId=" << vIds_from_eId(i)[1] << endl;
cout << "hid=" << edge(i).pair()[0].hId() << " prev=" << edge(i).pair()[0].PhId() <<
" next=" << edge(i).pair()[0].NhId() << " IcId=" << edge(i).pair()[0].IcId() << endl;
cout << "hid=" << edge(i).pair()[1].hId() << " prev=" << edge(i).pair()[1].PhId() <<
" next=" << edge(i).pair()[1].NhId() << " IcId=" << edge(i).pair()[1].IcId() << endl;
}
cout <<endl << "cells:" << endl;
for (int i=0; i< cells_.size(); i++){
cout << "id=" << cell(i).cId() << " LhId=" << cell(i).LhId() <<
" vIds=" << vIds_from_cId(i)[0] << ","
<< vIds_from_cId(i)[1] << ","
<< vIds_from_cId(i)[2] <<
" mFlag=" << cell(i).mFlag() << endl;
}
}
//}
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/* This file includes classes for the mesh module. */
/*****************************************************************************/
#ifndef MESH
#define MESH
#endif
#ifndef VERTEX
#include "Vertex.h"
#endif
#ifndef EDGE
#include "Edge.h"
#endif
#ifndef CELL
#include "Cell.h"
#endif
namespace PMGT{
//namespace Mesh{
//using namespace Vertex;
//using namespace Edge;
//using namespace Cell;
typedef vector<int> Ids;
class Mesh{
public:
//constructor/destructor
Mesh(){}
// ***** size *****
inline int n_of_v(){ return vertices_.size(); }
inline int n_of_e(){ return edges_.size();}
inline int n_of_c(){ return cells_.size(); }
// ***** Id validation check *****
inline bool is_valid_vId(int vId){
return (vId < vertices_.size()) && (vId >= 0);
}
inline bool is_valid_hId(int hId){
return (hId < (edges_.size()<<1)) && (hId >= 0);
}
inline bool is_valid_eId(int eId){
return eId < edges_.size() && eId >= 0;
}
inline bool is_valid_cId(int cId){
return cId < cells_.size() && cId >= 0;
}
// ***** get entity from id *****
inline Vertex& vertex(int vId){
assert(is_valid_vId(vId));
return vertices_[vId];
}
inline Halfedge& halfedge(int hId){
assert(is_valid_hId(hId));
return edges_[hId>>1].pair()[hId & 1];
}
inline Edge& edge(int eId){
assert(is_valid_eId(eId));
return edges_[eId];
}
inline Cell& cell(int cId){
assert(is_valid_cId(cId));
return cells_[cId];
}
// ***** boundary check *****
inline bool is_b_h(int hId){
assert(is_valid_hId(hId));
return halfedge(hId).IcId() == -1;
}
inline bool is_b_v(int vId){
assert(is_valid_vId(vId));
if(vertex(vId).OhId() == -1) { return true;}
return is_b_h(ops_hId(vertex(vId).OhId()));
}
inline bool is_b_e(int eId){
assert(is_valid_eId(eId));
return is_b_h(eId << 1) || is_b_h((eId << 1) + 1);
}
inline bool is_b_c(int cId){
assert(is_valid_cId(cId));
int hId = cell(cId).LhId();
return is_b_h(ops_hId(hId)) ||
is_b_h(ops_hId(next_hId(hId))) ||
is_b_h(ops_hId(prev_hId(hId)));
}
// ***** connectivity *****
// ----- eId <==> hId -----
inline int eId_from_hId(int hId){
assert(is_valid_hId(hId));
return (hId >> 1);
}
inline int hId_from_eId(int eId, int index){
assert(is_valid_eId(eId));
assert( index < 2 && index >= 0 );
return (eId << 1) + index;
}
// ----- halfedge-halfedge -----
inline int ops_hId(int hId){
assert(is_valid_hId(hId));
return ((hId & 1) ? hId - 1: hId + 1);
}
inline int next_hId(int hId){
assert(is_valid_hId(hId));
return halfedge(hId).NhId();
}
inline int prev_hId(int hId){
assert(is_valid_hId(hId));
return halfedge(hId).PhId();
}
// ccw rotated halfedge
inline int ccw_hId(int hId){
assert(is_valid_hId(hId));
if (is_b_h(hId)) return -1;
return ops_hId(prev_hId(hId));
}
// cw rotated halfedge
inline int cw_hId(int hId){
assert(is_valid_hId(hId));
if (is_b_h(ops_hId(hId))) return -1;
return next_hId(ops_hId(hId));
}
// ----- vertex -----
// first outgoing halfedge
inline int OhId_from_vId(int vId){
assert(is_valid_vId(vId));
return vertex(vId).OhId();
}
// ----- halfedge -----
// targate vertex
inline int tvId_from_hId(int hId){
assert(is_valid_hId(hId));
return halfedge(hId).TvId();
}
// start vertex
inline int svId_from_hId(int hId){
assert(is_valid_hId(hId));
return tvId_from_hId(ops_hId(hId));
}
// its cell
inline int IcId_from_hId(int hId){
assert(is_valid_hId(hId));
return halfedge(hId).IcId();
}
// ----- edge -----
// vertices
inline vector<int> vIds_from_eId(int eId){
assert(is_valid_eId(eId));
vector<int> vIds;
vIds.push_back(svId_from_hId(hId_from_eId(eId, 0)));
vIds.push_back(tvId_from_hId(hId_from_eId(eId, 0)));
return vIds;
}
// cells
inline vector<int> cIds_from_eId(int eId){
assert(is_valid_eId(eId));
vector<int> cIds;
cIds.push_back(IcId_from_hId(hId_from_eId(eId, 0)));
cIds.push_back(IcId_from_hId(hId_from_eId(eId, 1)));
return cIds;
}
// ----- cell -----
// its longest halfedge
inline int LhId_from_cId(int cId){
assert(is_valid_cId(cId));
return cell(cId).LhId();
}
// three vertices
inline vector<int> vIds_from_cId(int cId){
assert(is_valid_cId(cId));
vector<int> vIds;
vIds.push_back(tvId_from_hId(cell(cId).LhId()));
vIds.push_back(tvId_from_hId(next_hId(cell(cId).LhId())));
vIds.push_back(svId_from_hId(cell(cId).LhId()));
return vIds;
}
// ***** isolation test *****
// is the vertex is isolated
inline bool is_isolated_v(int vId){
assert(is_valid_vId(vId));
return !is_valid_hId(OhId_from_vId(vId));
}
// ***** circulators *****
// ----- vertex - vertex (ccw) one ring circulator -----
inline int vv_first(int vId){
assert(is_valid_vId(vId));
return tvId_from_hId(OhId_from_vId(vId));
}
// Returns -1 if there is no next
inline int vv_next(int svId, int tvId){
assert(is_valid_vId(svId));
assert(is_valid_vId(tvId));
int hId = voh_first(svId);
while (tvId_from_hId(hId) != tvId && hId != -1){
hId = voh_next(svId, hId);
}
if (hId != -1){
if (is_b_h(hId)) return -1;
return tvId_from_hId(next_hId(hId));
}
assert(false);
}
// ----- vertex - outgoing-halfedge (ccw) one ring circulator -----
inline int voh_first(int vId){
assert(is_valid_vId(vId));
return OhId_from_vId(vId);
}
// Returns -1 if there is no next
inline int voh_next(int vId, int hId){
assert(is_valid_vId(vId));
assert(is_valid_hId(hId));
assert(vId == svId_from_hId(hId));
return ccw_hId(hId);
}
// ----- vertex - incoming-halfedge (ccw) one ring circulator -----
inline int vih_first(int vId){
assert(is_valid_vId(vId));
if ( is_isolated_v(vId)) return -1;
return ops_hId(voh_first(vId));
}
// Returns -1 if there is no next
inline int vih_next(int vId, int hId){
assert(is_valid_vId(vId));
assert(is_valid_hId(hId));
assert(vId == tvId_from_hId(hId));
int ops = ops_hId(hId);
if (is_b_h(ops)) return -1;
//return prev_hId(ops);
return ops_hId(voh_next(vId, ops));
}
// ----- vertex - edge (ccw) one ring circulator -----
inline int ve_first(int vId){
assert(is_valid_vId(vId));
if (is_isolated_v(vId)) return -1;
return eId_from_hId(voh_first(vId));
}
// Return -1 if there is no next
inline int ve_next(int vId, int eId){
assert(is_valid_vId(vId));
assert(is_valid_eId(eId));
int hId = hId_from_eId(eId,0);
if (vId == svId_from_hId(hId)){ // hId is an outgoing halfedge
int voNext = voh_next(vId, hId);
if (voNext == -1) return -1;
return eId_from_hId(voNext);
}
//hId is an incoming halfedge
assert(vId == tvId_from_hId(hId));
int viNext = vih_next(vId, hId);
if (viNext == -1) return -1;
return eId_from_hId(viNext);
}
// ----- vertex - cell (cww) one ring circulator -----
inline int vc_first(int vId){
assert(is_valid_vId(vId));
if (is_isolated_v(vId)) return -1;
return IcId_from_hId(voh_first(vId));
}
// Returns -1 if there is no next
inline int vc_next(int vId, int cId){
assert(is_valid_vId(vId));
assert(is_valid_cId(cId));
// find the halfedge whose targate vertex is vId
int hId = LhId_from_cId(cId);
if (tvId_from_hId(hId) != vId){
if (tvId_from_hId(prev_hId(hId)) == vId)
hId = prev_hId(hId);
else if (tvId_from_hId(next_hId(hId)) == vId)
hId = next_hId(hId);
else assert(false);
}
if (is_b_h(ops_hId(hId))) return -1;
return IcId_from_hId(ops_hId(hId));
}
// ----- cell - vertex (cww) one ring circulator -----
// The first vertex is the tartage vertex of the longest halfedge
inline int cv_first(int cId){
assert(is_valid_cId(cId));
return tvId_from_hId(LhId_from_cId(cId));
}
inline int cv_next(int cId, int vId){
assert(is_valid_cId(cId));
assert(is_valid_vId(vId));
// find the halfedge whose start vertex is vId
int hId = LhId_from_cId(cId);
if (svId_from_hId(hId) != vId){
if (svId_from_hId(prev_hId(hId)) == vId)
hId = prev_hId(hId);
else if (svId_from_hId(next_hId(hId)) == vId)
hId = next_hId(hId);
else assert(false);
}
return tvId_from_hId(hId);
}
// ----- cell - halfedge (cww) one ring circulator -----
// The first halfedge is the longest halfedge
inline int ch_first(int cId){
assert(is_valid_cId(cId));
return LhId_from_cId(cId);
}
inline int ch_next(int cId, int hId){
assert(is_valid_cId(cId));
assert(is_valid_hId(hId));
assert(IcId_from_hId(hId) == cId);
return next_hId(hId);
}
// ----- cell - edge (cww) one ring circulator -----
// The first edge is the longest edge
inline int ce_first(int cId){
assert(is_valid_cId(cId));
return eId_from_hId(ch_first(cId));
}
// next should change
inline int ce_next(int cId, int eId){
assert(is_valid_cId(cId));
assert(is_valid_eId(eId));
int hId = hId_from_eId(eId, 0);
if (IcId_from_hId(hId) == cId)
return eId_from_hId(ch_next(cId,hId));
else if (IcId_from_hId(ops_hId(hId)) == cId)
return eId_from_hId(ch_next(cId, ops_hId(hId)));
else assert(false);
}
// ----- cell - cell (cww) one ring circulator -----
// The first cell is the cell adjacent the longest edge
// if the given cell is not a boundary cell.
// If one edge is boundary edge, returns the cell adjacent to the next edge (ccw).
// If two edges are boundary edges, refturns the only adjacent cell.
// Returns -1 if there is no adjacent cell.
inline int cc_first(int cId){
assert(is_valid_cId(cId));
int hId = LhId_from_cId(cId);
if (!is_b_c(cId)) return IcId_from_hId(ops_hId(hId));
if (!is_b_h(ops_hId(hId))){
if ( is_b_h(ops_hId(next_hId(hId))) && !is_b_h(ops_hId(prev_hId(hId))) )
return IcId_from_hId(ops_hId(prev_hId(hId)));
else return IcId_from_hId(ops_hId(hId));
}
else {
if ( !is_b_h(ops_hId(next_hId(hId))) )
return IcId_from_hId(ops_hId(next_hId(hId)));
else return IcId_from_hId(ops_hId(prev_hId(hId)));
}
}
// Returns -1 if there is no next
inline int cc_next(int scId, int tcId){
assert(is_valid_cId(tcId));
assert(is_valid_cId(scId));
int hId = LhId_from_cId(scId);
if (IcId_from_hId(ops_hId(hId)) != tcId){
if (IcId_from_hId(ops_hId(next_hId(hId))) == tcId)
hId = next_hId(hId);
else if (IcId_from_hId(ops_hId(prev_hId(hId))) == tcId)
hId = prev_hId(hId);
else assert(false);
}
return IcId_from_hId(ops_hId(next_hId(hId)));
}
// ***** find an entity *****
// Returns the id of the vertex that has given coordinate.
// Returns -1 if the vertex does not exist.
int find_vertex(Point point);
// Returns the id of the edge that has given points.
// Returns -1 if the edge does not exist.
int find_edge(int svId, int tvId);
// Returns the id of the halfedge that has given start and targate points.
// Returns -1 if the halfedge does not exist.
int find_halfedge(int svId, int tvId);
// Returns the id of the cell that has given vertices.
// Returns -1 if the cell does not exist.
int find_cell(vector<int> vIds);
// ***** Geometric properties *****
// Returns the distance of two vertex
inline double dist(int svId, int tvId){
assert(is_valid_vId(svId) && is_valid_vId(tvId));
Point ps = vertex(svId).point(),
pt = vertex(tvId).point();
return sqrt((ps[0]-pt[0])*(ps[0]-pt[0]) +
(ps[1]-pt[1])*(ps[1]-pt[1]));
}
inline double dist(int hId){
assert(is_valid_hId(hId));
return dist(svId_from_hId(hId), tvId_from_hId(hId));
}
// ----- mid point of a halfedge
inline Point mid_point(int hId){
assert(is_valid_hId(hId));
double sx = vertex(svId_from_hId(hId)).x();
double sy = vertex(svId_from_hId(hId)).y();
double tx = vertex(tvId_from_hId(hId)).x();
double ty = vertex(tvId_from_hId(hId)).y();
Point mid;
mid.push_back((sx+tx)/2);
mid.push_back((sy+ty)/2);
return mid;
}
// ----- mid point of two points
inline Point mid_point(int svId, int tvId){
double sx = vertex(svId).x();
double sy = vertex(svId).y();
double tx = vertex(tvId).x();
double ty = vertex(tvId).y();
Point mid;
mid.push_back((sx+tx)/2);
mid.push_back((sy+ty)/2);
return mid;
}
// ----- mid point of the longest halfedge of a cell
inline Point longest_mid(int cId){
assert(is_valid_cId(cId));
return mid_point(LhId_from_cId(cId));
}
// ----- centroid point of a cell -----
inline Point centroid(int cId){
assert(is_valid_cId(cId));
Point point = longest_mid(cId);
// find the opposite point to the longest halfedge
Vertex& v = vertex(tvId_from_hId(next_hId(LhId_from_cId(cId))));
point[0] = point[0]*2/3 + v.x()/3;
point[1] = point[1]*2/3 + v.y()/3;
return point;
}
// ----- size of a cell ----- //
// The size of a cell if the length of longest halfedge of the cell
inline double size(int cId){
assert(is_valid_cId(cId));
return dist(LhId_from_cId(cId));
}
// ----- Test for counter clockwise ----- //
inline bool is_ccw(Point pa, Point pb, Point pc){
double detleft = (pa[0] - pc[0]) * (pb[1] - pc[1]);
double detright = (pa[1] - pc[1]) * (pb[0] - pc[0]);
return detleft - detright > DBL_EPSILON*100;
}
inline bool is_ccw(vector<int> vIds){
assert(vIds.size() == 3);
assert(is_valid_vId(vIds[0]));
assert(is_valid_vId(vIds[1]));
assert(is_valid_vId(vIds[2]));
return is_ccw(vertex(vIds[0]).point(),
vertex(vIds[1]).point(),
vertex(vIds[2]).point());
}
/* // ----- Test for collinear ------ //
inline bool is_collinear(Point pa, Point pb, Point pc){
double detleft = (pa[0] - pc[0]) * (pb[1] - pc[1]);
double detright = (pa[1] - pc[1]) * (pb[0] - pc[0]);
return detleft - detright == 0;
}
*/
// ----- Test for the same side ----- //
inline bool is_same_side(int hId, Point pa, Point pb){
Point ps = vertex(svId_from_hId(hId)).point();
Point pt = vertex(tvId_from_hId(hId)).point();
double deta = (pa[1]-ps[1])*(pt[0]-ps[0]) -
(pa[0]-ps[0])*(pt[1]-ps[1]);
double detb = (pb[1]-ps[1])*(pt[0]-ps[0]) -
(pb[0]-ps[0])*(pt[1]-ps[1]);
return deta*detb > 0;
}
/* inline bool is_in_halfedge(int hId, Point p){
Point ps = vertex(svId_from_hId(hId)).point();
Point pt = vertex(tvId_from_hId(hId)).point();
return is_collinear(ps, pt, p);
}
*/
/** \ Add an entity
*/
// Create a vertex and add it to the end of the vertex list.
// Returns false if the vertex already exists.
bool add_vertex(Point point);
// Create an edge and add it to the end of the edge list.
// Returns false if the edge already exists.
bool add_edge(int svId, int tvId);
// Create a cell and add it to the end of the cell list.
// Returns false if the cell already exists.
bool add_cell(vector<int> vIds);
/** \ Update an entity
*/
// update a cell using three vertices.
// Returns false if the new cell already exists.
bool update_cell(vector<int> vIds, int cId);
// split 2 cells by split their common longest edge
bool longest_ref2(int hId, int o_hId, int next_hId);
// ****** delete an entity *****
// Delete vertices that marked to be deleted from the list.
bool delete_vertices();
// Delete edges that marked to be deleted from the list.
bool delete_edges();
// Delete cells that marked to be deleted from the list.
bool delete_cells();
// ***** create a mesh ******
// create a mesh using two input variables.
// One is the coordinates of points
// The other is the vertex list of cells
bool create(vector<Point>, vector<Ids>);
// ***** write a mesh *****
// write the mesh to two variables
// One is the coordinates of points
// The other is the vertex list of cells
void write_var(vector<Point>&, vector<Ids>&);
// display the internal information of a mesh on the screen
void display_info();
private:
vector<Vertex> vertices_;
vector<Edge> edges_;
vector<Cell> cells_;
};
//}
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/*****************************************************************************/
#include "Output.h"
namespace PMGT{
// write the mesh to two files
// One is the coordinates of points
// The other is the vertex list of cells
bool Output::write_file(Mesh& mesh, char* vertexFile, char* cellFile){
FILE *v;
FILE *c;
int i;
vector<int> vIds(3);
/* Open files. If NULL is returned there was an error */
if((v = fopen(vertexFile, "w")) == NULL) {
printf("Error Opening Vertex File.\n");
exit(1);
}
if((c = fopen(cellFile, "w")) == NULL) {
printf("Error Opening Cell File.\n");
exit(1);
}
// write vertex file
for (i=0; i<mesh.n_of_v(); i++){
fprintf(v, "%.6g %.6g\n",
mesh.vertex(i).x(), mesh.vertex(i).y());
}
// write cell file
for (i=0; i<mesh.n_of_c(); i++){
vIds[0] = mesh.tvId_from_hId(mesh.LhId_from_cId(i));
vIds[1] = mesh.tvId_from_hId(mesh.next_hId(mesh.LhId_from_cId(i)));
vIds[2] = mesh.tvId_from_hId(mesh.prev_hId(mesh.LhId_from_cId(i)));
fprintf(c, "%d %d %d\n", vIds[0], vIds[1], vIds[2]);
}
fclose(v);
fclose(c);
}
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/* This file includes classes for the output module. */
/*****************************************************************************/
#ifndef OUTPUT
#define OUTPUT
#endif
#ifndef MESH
#include "Mesh.h"
#endif
namespace PMGT{
class Output{
public:
// write the mesh to two files
// One is the coordinates of points
// The other is the vertex list of cells
bool write_file(Mesh& mesh, char* vertexFile, char* cellFile);
};
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/*****************************************************************************/
#ifndef REFINING
#include "Refining.h"
#endif
namespace PMGT{
// split cells at their centroid points
void Refining::split(Mesh& mesh){
vector<int> vIds;
vector<int> newIds;
int i,j, newvId;
Point p;
for (i=0; i<mesh.n_of_c(); i++){
if (mesh.cell(i).mFlag() == REFINE){
// get three vertices
vIds.clear();
vIds.push_back(mesh.cv_first(i));
vIds.push_back(mesh.cv_next(i, vIds[0]));
vIds.push_back(mesh.cv_next(i, vIds[1]));
// add the centroid point
Point np = mesh.centroid(i);
mesh.add_vertex(np);
newvId = mesh.find_vertex(np);
assert(newvId !=-1);
// add three new edges
for (j=0; j<3; j++){
mesh.add_edge(newvId, vIds[j]);
}
// add/update three cells
for (j=0; j<3; j++){
newIds.clear();
newIds.push_back(newvId);
newIds.push_back(vIds[j]);
newIds.push_back(vIds[(j+1)%3]);
if (j==0){
mesh.update_cell(newIds, i);
}
else
mesh.add_cell(newIds);
}
}// if
}
}
void Refining::longest_edge(Mesh& mesh){
for(int i=0; i<mesh.n_of_c(); i++){
if (mesh.cell(i).mFlag() == REFINE){
int LhId = mesh.cell(i).LhId();
int ops_LhId = mesh.ops_hId(LhId);
int next_cell = mesh.IcId_from_hId(ops_LhId);
vector<int> lepp;
lepp.clear();
while(1){
lepp.push_back(LhId);
lepp.push_back(ops_LhId);
if (next_cell == -1){
break;
}
if (mesh.LhId_from_cId(next_cell) == ops_LhId){
break;
}
LhId = mesh.cell(next_cell).LhId();;
ops_LhId = mesh.ops_hId(LhId);
next_cell = mesh.IcId_from_hId(ops_LhId);
} // while(1)
assert(lepp.size()%2 == 0);
// refine LEPP
while (lepp.size() > 0){
int hId = lepp[lepp.size()-1];
lepp.pop_back();
assert(lepp.size() > 0);
int ops_hId = lepp[lepp.size()-1];
lepp.pop_back();
assert(ops_hId == mesh.ops_hId(hId));
int next_hId = -1;
if (lepp.size() > 0){
next_hId = lepp[lepp.size()-1];
}
mesh.longest_ref2(hId, ops_hId, next_hId);
}// while
} // if REFINE
}// for i
}
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/* This file contains the class for refine module. */
/* There are two algorithms: */
/* split -- the point insertion algorithm for refining */
/* longest_edge -- the longest side bisection algorithm for refining */
/*****************************************************************************/
#ifndef REFINING
#define REFINING
#endif
#ifndef MESH
#include "Mesh.h"
#endif
namespace PMGT{
class Refining{
public:
// split cells at their centroid points
void split(Mesh& mesh);
// refine cells at their longest edges
void longest_edge(Mesh& mesh);
};
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This program used for correctness test of PMGT. */
/*****************************************************************************/
#include "Service.h"
namespace PMGT{
// auxiliary functions
vector<int> Service::boundary_list(Mesh& mesh){
vector<int> list;
vector<int> b_edges;
vector<int>::iterator tempIterator;
for(int i=0; i<mesh.n_of_e(); i++){
if (mesh.is_b_e(i)){
b_edges.push_back(i);
}
}
vector<int> vIds;
vIds = mesh.vIds_from_eId(b_edges[0]);
list.push_back(vIds[0]);
//list.push_back(vIds[1]);
int first_vId = vIds[0];
int current = vIds[1];
b_edges[0] = b_edges[b_edges.size()-1];
b_edges.pop_back();
bool error = false, found;
int next_vertex, i;
while(b_edges.size()!=0){
found = false;
for( i=0; i<b_edges.size(); i++){
vIds = mesh.vIds_from_eId(b_edges[i]);
for(int j=0; j<2; j++){
if(vIds[j] == current){ // find next boundary edge
list.push_back(vIds[j]);
b_edges[i] = b_edges[b_edges.size()-1];
b_edges.pop_back();
current = vIds[(j+1)%2];
found = true;
break;
}
}
if(found) break;
}
if (!found){ // the boundary is not close
error = true;
break;
}
else if(first_vId==current){// find a close boundary
if(b_edges.size()!=0){ // there are boundary edges left
error = true;
}
break; //find an unique close boundary
}
}
if (error){
list.clear();
}
return list;
}
bool Service::in_boundary(Mesh& mesh1, int vId1, Mesh& mesh2, vector<int> b_list2){
double x = mesh1.vertex(vId1).x();
double y = mesh1.vertex(vId1).x();
for (int i=0; i<b_list2.size()-2; i++){
double xa = mesh2.vertex(b_list2[i]).x();
double ya = mesh2.vertex(b_list2[i]).y();
double xb = mesh2.vertex(b_list2[i+1]).x();
double yb = mesh2.vertex(b_list2[i+1]).y();
double xc = mesh2.vertex(b_list2[i+2]).x();
double yc = mesh2.vertex(b_list2[i+2]).y();
double detAB = (y-ya)*(xb-xa) - (x-xa)*(yb-ya);
double detBC = (y-yb)*(xc-xb) - (x-xb)*(yc-yb);
if (detAB*detBC < 0) return false;
}
return true;
}
double Service::area(Mesh& mesh, int vId1, int vId2, int vId3){
double x1 = mesh.vertex(vId1).x();
double y1 = mesh.vertex(vId1).y();
double x2 = mesh.vertex(vId2).x();
double y2 = mesh.vertex(vId2).y();
double x3 = mesh.vertex(vId3).x();
double y3 = mesh.vertex(vId3).y();
return abs((x1*y2-x2*y1+x1*y3-x3*y1+x2*y3-x3*y2)/2.0);
}
bool Service::inside(Mesh& mesh, int vId, int cId){
double x = mesh.vertex(vId).x();
double y = mesh.vertex(vId).y();
vector<int> vIds = mesh.vIds_from_cId(cId);
double x1 = mesh.vertex(vIds[0]).x();
double y1 = mesh.vertex(vIds[0]).y();
double x2 = mesh.vertex(vIds[1]).x();
double y2 = mesh.vertex(vIds[1]).y();
double x3 = mesh.vertex(vIds[2]).x();
double y3 = mesh.vertex(vIds[2]).y();
double det12 = (y-y1)*(x2-x1) - (x-x1)*(y2-y1);
double det23 = (y-y2)*(x3-x2) - (x-x2)*(y3-y2);
double det31 = (y-y3)*(x1-x3) - (x-x3)*(y1-y3);
//(x,y) in the same side of 12, 23, 31
return (det12*det23>0)&&(det23*det31>0);
}
// http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d
bool Service::across(Mesh& mesh, int eId1, int eId2){
vector<int> vIds1 = mesh.vIds_from_eId(eId1);
double x1,y1,x2,y2,x3,y3,x4,y4;
x1 = mesh.vertex(vIds1[0]).x();
y1 = mesh.vertex(vIds1[0]).y();
x2 = mesh.vertex(vIds1[1]).x();
y2 = mesh.vertex(vIds1[1]).y();
vector<int> vIds2 = mesh.vIds_from_eId(eId2);
x3 = mesh.vertex(vIds2[0]).x();
y3 = mesh.vertex(vIds2[0]).y();
x4 = mesh.vertex(vIds2[1]).x();
y4 = mesh.vertex(vIds2[1]).y();
double det312 = (y3-y1)*(x2-x1) - (x3-x1)*(y2-y1);
double det412 = (y4-y1)*(x2-x1) - (x4-x1)*(y2-y1);
double det134 = (y1-y3)*(x4-x3) - (x1-x3)*(y4-y3);
double det234 = (y2-y3)*(x4-x3) - (x2-x3)*(y4-y3);
// 3 and 4 in the different side of 12 and
// 1 and 2 in the different side of 34
return (det312*det412<0 && det134*det234<0);
}
// functions test correctness
bool Service::length_gt0(Mesh& mesh){
for (int i=0; i<mesh.n_of_e(); i++){
if (mesh.dist(mesh.hId_from_eId(i,0)) < 0){
cout << "length_gt0 is false." << endl;
return false;
}
}
return true;
}
bool Service::areas_gt0(Mesh& mesh){
for (int i=0; i<mesh.n_of_c(); i++){
vector<int> vIds = mesh.vIds_from_cId(i);
if (area(mesh, vIds[0], vIds[1], vIds[2]) <= 0){
cout << "areas_gt0 is false." << endl;
return false;
}
}
return true;
}
bool Service::bounded(Mesh& mesh){
return (boundary_list(mesh).size()!=0);
}
bool Service::no_interior_intersection(Mesh& mesh){
for (int i=0; i<mesh.n_of_v(); i++){
for (int j=0; j<mesh.n_of_c(); j++){
if (inside(mesh, i, j)){
cout << "no_interior_intersection is false." << endl;
return false;
}
}
}
for (int i=0; i<mesh.n_of_e(); i++){
for (int j=0; j<mesh.n_of_e(); j++){
if (across(mesh, i, j)){
cout << "no_interior_intersection is false." << endl;
return false;
}
}
}
return true;
}
bool Service::conformal(Mesh& mesh){
for (int i=0; i<mesh.n_of_v(); i++){
for (int j=0; j<mesh.n_of_e(); j++){
vector<int> vIds = mesh.vIds_from_eId(j);
double x = mesh.vertex(i).x();
double y = mesh.vertex(i).y();
double x1 = mesh.vertex(vIds[0]).x();
double y1 = mesh.vertex(vIds[0]).y();
double x2 = mesh.vertex(vIds[1]).x();
double y2 = mesh.vertex(vIds[1]).y();
if((x<x1&&y<y1 && x>x2&&y>y2) || (x>x1&&y>y1 && x<x2&&y<y2)){
if (area(mesh,i,vIds[0],vIds[1])<10E-10){
cout << "conformal is false." << endl;
return false;
}
}
}
}
return true;
}
bool Service::counterclockwise(Mesh& mesh){
for (int i=0; i<mesh.n_of_c(); i++){
vector<int> vIds = mesh.vIds_from_cId(i);
Vertex v1 = mesh.vertex(vIds[0]);
Vertex v2 = mesh.vertex(vIds[1]);
Vertex v3 = mesh.vertex(vIds[2]);
double detleft = (v1.x()-v3.x())*(v2.y()-v3.y());
double detright = (v1.y()-v3.y())*(v2.x()-v3.x());
//return detleft - detright > DBL_EPSILON*100;
if ( detleft < detright + DBL_EPSILON*100){
cout << "counterclockwise is false."<< endl;
return false;
}
}
return true;
}
bool Service::covering_up(Mesh& mesh1, Mesh& mesh2){
vector<int> b_list = boundary_list(mesh1);
for (int i=0; i<mesh2.n_of_v(); i++){
if (!in_boundary(mesh2, i, mesh1, b_list)){
return false;
}
}
b_list = boundary_list(mesh2);
for (int i=0; i<mesh1.n_of_v(); i++){
if (!in_boundary(mesh1, i, mesh2, b_list)){
return false;
}
}
return true;
}
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This program is used for correctness test of PMGT. */
/* This file includes classes for the service module. */
/*****************************************************************************/
#ifndef SERVICE
#define SERVICE
#endif
#ifndef VERTEX
#include "Vertex.h"
#endif
#ifndef EDGE
#include "Edge.h"
#endif
#ifndef CELL
#include "Cell.h"
#endif
#ifndef MESH
#include "Mesh.h"
#endif
namespace PMGT{
class Service{
public:
// auxiliary functions
vector<int> boundary_list(Mesh& mesh);
bool in_boundary(Mesh& mesh1, int vId1, Mesh& mesh2, vector<int> b_list2);
double area(Mesh& mesh, int vId1, int vId2, int vId3);
bool inside(Mesh& mesh, int vId, int cId);
bool across(Mesh& mesh, int eId1, int eId2);
// functions test correctness
inline bool euler(Mesh& mesh){
return (mesh.n_of_v() +
mesh.n_of_c() -
mesh.n_of_e() == 1);
}
bool length_gt0(Mesh& mesh);
bool areas_gt0(Mesh& mesh);
bool no_interior_intersection(Mesh& mesh);
bool conformal(Mesh& mesh);
bool bounded(Mesh& mesh);
bool counterclockwise(Mesh& mesh);
// functions in the service module
inline bool is_valid_mesh(Mesh& mesh){
return areas_gt0(mesh) && bounded(mesh) &&
conformal(mesh) && no_interior_intersection(mesh) &&
length_gt0(mesh) && counterclockwise(mesh) &&
euler(mesh);
}
bool covering_up(Mesh& mesh1, Mesh& mesh2);
};
}
/*****************************************************************************/
/* PMGT */
/* */
/* January, 2007 */
/* */
/* Copyright 2007 */
/* Wen Yu */
/* Department of Computing and Software */
/* McMaster University */
/* yuw4@mcmaster.ca */
/* */
/* This program may be freely redistributed under the condition that the */
/* copyright notices are not removed. You may distribute modified versions*/
/* of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS */
/* MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL */
/* AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT */
/* CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. */
/* */
/* This is the serial version of PMGT */
/* This file includes classes for the vertex module. */
/*****************************************************************************/
#ifndef VERTEX
#define VERTEX
#endif
#include <vector>
#include <cfloat>
#include <cmath>
#include <iostream>
#include <cstdlib>
using namespace std;
namespace PMGT{
//namespace Vertex{
// type definition
// Point defines a coordinate of a point.
// The first is x coordinate,
// and the second is y coordinate.
typedef vector<double> Point;
// MFLAG is a flag that indicates what should be done to a cell.
enum MFLAG {COARSEN = -1, UNCHANGE = 0, REFINE = 1};
class Vertex{
public:
//constractor
Vertex(Point point, int vId=-1, int OhId=-1, bool del=false){
point_ = point;
vId_= vId;
OhId_= OhId;
del_= del;
}
Vertex(double x=0, double y=0, int vId=-1, int OhId=-1, int del=false){
point_.push_back(x);
point_.push_back(y);
vId_ = vId;
OhId_ = OhId;
del_ = del;
}
inline double x(){ return point_[0]; }
inline double y(){ return point_[1]; }
inline Point& point(){ return point_;}
inline int vId(){ return vId_;}
inline int OhId(){ return OhId_; }
inline bool del(){ return del_; }
inline void setPoint(double x, double y){
point_[0] = x;
point_[1] = y;
}
inline void setPoint(Point point){
point_ = point;
}
inline void setVId(int vId){ vId_ = vId; }
inline void setOhId(int OhId){ OhId_ = OhId; }
inline void setDel(bool del) { del_ = del; }
inline bool is_isolated_v(){ return OhId_ == -1; }
inline void set_isolated_v(){ OhId_ = -1; }
inline bool same(double x, double y){
return (x==point_[0] && y==point_[1]);
}
inline bool same(Point point){
return point_ == point;
}
inline void vcopy(Vertex& other){
point_[0] = other.point_[0];
point_[1] = other.point_[1];
vId_ = other.vId_;
OhId_ = other.OhId_;
del_ = other.del_;
}
inline double distance(Point& p){
return sqrt((p[0]-point_[0])*(p[0]-point_[0])+(p[1]-point_[1])*(p[1]-point_[1]));
}
private:
Point point_; // coordinate
int vId_; // id
int OhId_; // the first (ccw) outgoing halfedge.
bool del_; // a flag to indicate if the vertex
// is marked to be deleted
}; // end of class Vertex
//} // end of namespace Vertex
} // end of namespace PMGT
OBJECTS = Service.o Coarsening.o Refining.o Output.o Input.o Mesh.o
SOURCES = Service.cpp Coarsening.cpp Refining.cpp Output.cpp Input.cpp Mesh.cpp
HEADERS = Service.h Coarsening.h Refining.h Input.h Input.h Mesh.h Cell.h Edge.h Vertex.h
# all testing excutable
all: $(OBJECTS)
# all object files of PMGT
$(OBJECTS): $(SOURCES) $(HEADERS)
g++ -c $(SOURCES)
# remove generated files
clean:
rm -f *.o
\ No newline at end of file
File added