Skip to content

Commit

Permalink
update the user guide and a few other documentation edits
Browse files Browse the repository at this point in the history
  • Loading branch information
stvdwtt committed Aug 23, 2017
1 parent 26031ca commit b88cf52
Show file tree
Hide file tree
Showing 17 changed files with 126 additions and 2 deletions.
3 changes: 3 additions & 0 deletions applications/CHAC_anisotropy/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ set Element degree = 1
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 7
set Min refinement level = 4

Expand Down
3 changes: 3 additions & 0 deletions applications/CHAC_anisotropyRegularized/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ set Element degree = 1
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 7
set Min refinement level = 4

Expand Down
3 changes: 3 additions & 0 deletions applications/anisotropyFacet/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ set Element degree = 1
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 6
set Min refinement level = 4

Expand Down
3 changes: 3 additions & 0 deletions applications/cahnHilliardWithAdaptivity/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ set Element degree = 2
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 6
set Min refinement level = 3

Expand Down
3 changes: 3 additions & 0 deletions applications/coupledCahnHilliardAllenCahn/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ set Element degree = 1
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 6
set Min refinement level = 3

Expand Down
3 changes: 3 additions & 0 deletions applications/dendriticSolidification/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ set Element degree = 3
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 6
set Min refinement level = 0

Expand Down
3 changes: 3 additions & 0 deletions applications/grainGrowth/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ set Element degree = 1
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 7
set Min refinement level = 4

Expand Down
3 changes: 3 additions & 0 deletions applications/nucleationModel/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ set Element degree = 2
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 10
set Min refinement level = 2

Expand Down
3 changes: 3 additions & 0 deletions applications/precipitateEvolution/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ set Element degree = 2
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 5
set Min refinement level = 1

Expand Down
3 changes: 3 additions & 0 deletions applications/precipitateEvolution_pfunction/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ set Element degree = 2
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 5
set Min refinement level = 1

Expand Down
3 changes: 3 additions & 0 deletions applications/preferential_nucleationModel/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ set Element degree = 2
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 9
set Min refinement level = 2

Expand Down
3 changes: 3 additions & 0 deletions applications/singlePrecipitateKKS/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ set Element degree = 2
set Mesh adaptivity = true

# Set the maximum and minimum level of refinement
# When adaptive meshing is enabled, the refine factor set in the block above is
# only used to generate the first pass of the mesh as the initial conditions are
# applied. It should be set somewhere between the max and min levels below.
set Max refinement level = 6
set Min refinement level = 0

Expand Down
Binary file modified prisms_pf_user_guide_files/prismspf_user_guide.pdf
Binary file not shown.
89 changes: 88 additions & 1 deletion prisms_pf_user_guide_files/prismspf_user_guide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ \subsection{The Example Applications}
\item coupledCahnHilliardAllenCahn: An implementation of the coupled Cahn-Hilliard/Allen-Cahn set of equations. (2D)
\item CHAC\_anisotropy: Coupled Cahn-Hilliard/Allen-Cahn equations with weakly anisotropic interfacial energy. (2D)
\item CHAC\_anisotropyRegularized: Like CHAC\_anisotropy, but with a regularization term to permit strongly anisotropic interfacial energy. (2D)
\item anisotropyFacet: A different strong anisotropy formation than in CHAC\_anisotropyRegularized that is easier to specify particular facets in the Wulff shape. (2D)
\item fickianDiffusion: An implementation of the diffusion equation with a time-dependent source term. (2D)
\item mechanics: An implementation of linear elasticity for a material in uniaxial tension. (3D)
\item CHiMaD\_benchmark1a: An implementation of the CHiMaD spinodal decomposition benchmark problem. (2D)
Expand Down Expand Up @@ -594,6 +595,7 @@ \section{The Input File: parameters.in} \label{parameters}
Load initial conditions & Comma-separated list of booleans & no & false & One true/false flag for each variable for whether the initial condition should be loaded from a vtk file. Currently, only scalar fields can be read in. SSee Note 2 below for details. \\ \hline
Load parallel file & Comma-separated list of booleans & no & false & One true/false flag for each variable for whether each processor should read the initial conditions from a seperate file. See Note 2 below for details. \\ \hline
File names & Comma-separated list of strings & no & & The name of the vtk file to be read for each variable, ignored for variables where the initial conditions isn't read in from a file. Often, all of the variables will read from the same vtk file. See Note 2 below for details. \\ \hline
Variable names in the files & Comma-separated list of strings & no & & What each variable is named in the file being loaded. See Note 2 below for details. \\ \hline
\end{tabular}
\end{center}
Expand All @@ -609,7 +611,6 @@ \section{The Input File: parameters.in} \label{parameters}
Freeze time following nucleation & Any non-negative real number & no & 0 & The amount of time the nucleus is frozen after seeding. See Note 3 below for details. \\ \hline
Nucleation-free border thickness & Any non-negative real number & no & 0 & The size of the buffer region where nucleation is not allowed unless the boundary conditions are periodic. See Note 3 below for details. \\ \hline
Minimum allowed distance between nuclei & Any non-negative real number & no & 2$\times$ the largest nucleus semiaxis & The minimum allowed distance between nuclei centers during a single nucleation attempt. See Note 3 below for details. \\ \hline
Minimum allowed distance between nuclei & Any non-negative real number & no & 2$\times$ the largest nucleus semiaxis & The minimum allowed distance between nuclei centers during a single nucleation attempt. See Note 3 below for details. \\ \hline
Order parameter cutoff value & Any non-negative real number & no & 0.01 & The minimum allowed value of the sum of all nucleating variable fields where nucleation is allowed to occur. Implemented to prevent nucleation inside existing particles. See Note 3 below for details. \\ \hline
Time steps between nucleation attempts & Any positive integer & no & 100 & The number of time steps between nucleation attempts. See Note 3 below for details. \\ \hline
\end{tabular}
Expand Down Expand Up @@ -690,6 +691,8 @@ \section{The Application Files: equations.h, ICs\_and\_BCs.h, postprocess.h, nuc
\item main.cc: Main C++ function that controls the flow of the simulation. Identical for all the example applications and it is unlikely that users will need to modify it.
\end{itemize}
In all of these files, the user can access user inputs from parameters.in via the ``userInputs'' object (e.g. the domain size, the time step size). See Appendix I for a table of variable names inside ``userInputs''.
\subsection{equations.h} \label{equations}
The file ``equations.h'' contains a list of the variables in the model equations and their attributes as well as the residuals for the model equations. The file contains three functions: \emph{loadVariableAttributes}, \emph{residualRHS}, and \emph{residualLHS}.
Expand Down Expand Up @@ -1307,4 +1310,88 @@ \section{Creating Custom Applications}
Once your have your own applications running, we'd love to help you share them with the community. Please contact us at [email protected] if you need help using GitHub to generate a pull request so that we can add your work to the public repository.
\section{Appendix I: The userInputs Object}
In all of the application files, the user has access to an object called ``userInputs''. This object contains all of the input parameters from parameters.in and the variable attributes from the top of equations.h and postprocess.h. The following table lists the member variable names to access these parameters (excluding a few that are only useful in the core code). Using standard C++ syntax, all of these can be accessed using the following syntax: userInputs.exampleVariable, where ``exampleVariable'' is the member variable name.
\begin{center}
\begin{tabular}{ | p{0.25\textwidth} | p{0.22\textwidth} |p{0.23\textwidth} | p{0.3\textwidth} |}
\hline
\multicolumn{4}{|c|}{\textbf{userInputs Member Variables}} \\
\hline
\hline
\emph{Variable Name} & \emph{Type} & \emph{parameters.in Text} & \emph{Description} \\ \hline
domain\_size & std::vector$<$double$>$ & Domain size X, Domain size Y, Domain size Z & A vector containing the dimensions of the domain. \\ \hline
subdivisions & std::vector$<$unsigned int$>$ & Subdivisions X, Subdivisions Y, Subdivisions Z & A vector containing the number of subdivisions of the domain. \\ \hline
refine\_factor & unsigned int & Refine factor & Directly from parameters.in. \\ \hline
degree & unsigned int & Element degree & Directly from parameters.in. \\ \hline
h\_adaptivity & bool & Mesh adaptivity & Directly from parameters.in. \\ \hline
max\_refinement\_level & unsigned int & Max refinement level & Directly from parameters.in. \\ \hline
min\_refinement\_level & unsigned int & Min refinement level & Directly from parameters.in. \\ \hline
refine\_criterion\_fields & std::vector$<$unsigned int$>$ & Refinement criteria fields & Converts variable names to their variable index. \\ \hline
refine\_window\_max & std::vector$<$double$>$ & Refinement window max & Directly from parameters.in. \\ \hline
refine\_window\_min & std::vector$<$double$>$ & Refinement window min & Directly from parameters.in. \\ \hline
skip\_remeshing\_steps & unsigned int & Steps between remeshing operations & Directly from parameters.in. \\ \hline
dtValue & double & Time step & Directly from parameters.in. \\ \hline
finalTime & double & Simulation end time, Number of time steps & End time for the simulation, set based whichever will happen first, the specified time or number of time steps. \\ \hline
totalIncrements & double & Simulation end time, Number of time steps & Number of time steps for the simulation, set based whichever will happen first, the specified time or number of time steps. \\ \hline
output\_file\_type & std::string & Output file type & Directly from parameters.in. \\ \hline
output\_file\_name & std::string & Output file name & Directly from parameters.in. \\ \hline
outputTimeStepList & std::vector$<$unsigned int$>$ & List of time steps to output & Holds the list of time steps to output for all output conditions, not just LIST. \\ \hline
skip\_print\_steps & unsigned int & Skip print steps & Directly from parameters.in. \\ \hline
\end{tabular}
\end{center}
\begin{center}
\begin{tabular}{ | p{0.25\textwidth} | p{0.25\textwidth} |p{0.2\textwidth} | p{0.3\textwidth} |}
\hline
\multicolumn{4}{|c|}{\textbf{userInputs Member Variables}} \\
\hline
\hline
\emph{Variable Name} & \emph{Type} & \emph{parameters.in Text} & \emph{Description} \\ \hline
solverType & std::string & Linear solver & Directly from parameters.in. \\ \hline
abs\_tol & bool & Use absolute convergence tolerance & Directly from parameters.in. \\ \hline
solver\_tolerance & double & Solver tolerance value & Directly from parameters.in. \\ \hline
max\_solver\_iterations & unsigned int & Maximum allowed solver iterations & Directly from parameters.in. \\ \hline
load\_ICs & std::vector$<$bool$>$ & Load intial conditions & Directly from parameters.in. \\ \hline
load\_parallel\_file & std::vector$<$bool$>$ & Load parallel file & Directly from parameters.in. \\ \hline
load\_file\_name & std::vector$<$std::string$>$ & File names & Directly from parameters.in. \\ \hline
load\_field\_name & std::vector$<$std::string$>$ & Variable names in the files & Directly from parameters.in. \\ \hline
BC\_list & std::vector$<$ varBCs$<$dim$>>$ & Boundary conditions for variable [variable name] & Vector of one object per component of each variable that stores the BCs. \\ \hline
nucleus\_semiaxes & std::vector$<$double$>$ & Nucleus semiaxes (x,y,z) & Directly from parameters.in. \\ \hline
order\_parameter \_freeze\_semiaxes & std::vector$<$double$>$ & Freeze zone semiaxes (x,y,z) & Directly from parameters.in. \\ \hline
no\_nucleation \_border\_thickness & double & Nucleation-free border thickness & Directly from parameters.in. \\ \hline
nucleus\_hold \_time & double & Freeze time following nucleation & Directly from parameters.in. \\ \hline
min\_distance\_between \_nuclei & double & Minimum allowed distance between nuclei & Directly from parameters.in. \\ \hline
nucleation\_order \_parameter\_cutoff & double & Order parameter cutoff value & Directly from parameters.in. \\ \hline
steps\_between \_nucleation\_attempts & double & Time steps between nucleation attempts & Directly from parameters.in. \\ \hline
\end{tabular}
\end{center}
\begin{center}
\begin{tabular}{ | p{0.25\textwidth} | p{0.25\textwidth} |p{0.15\textwidth} | p{0.35\textwidth} |}
\hline
\multicolumn{4}{|c|}{\textbf{userInputs Member Variables}} \\
\hline
\hline
\emph{Variable Name} & \emph{Type} & \emph{parameters.in Text} & \emph{Description} \\ \hline
number\_of\_variables & unsigned int & & Counts the number of variables in loadVariableAttributes in equations.h. \\ \hline
var\_name & std::vector$<$std::string$>$ & & Vector of the variable names from loadVariableAttributes in equations.h. \\ \hline
var\_type & std::vector$<$fieldType$>$ & & Vector of the variable types from loadVariableAttributes in equations.h. \\ \hline
var\_eq\_type & std::vector$<$PDEType$>$ & & Vector of the variable equation types from loadVariableAttributes in equations.h. \\ \hline
nucleation\_occurs & bool & & Set true if any variables are set to nucleate in loadVariableAttributes in equations.h. \\ \hline
nucleating \_variable\_indices & std::vector$<$unsigned int$>$ & & Vector of the variable indices for variables that are set to nucleate in loadVariableAttributes in equations.h. \\ \hline
nucleation \_need\_value & std::vector$<$unsigned int$>$ & & Vector of the variable indices for variables that are set to be needed in the nucleation calculation in loadVariableAttributes in equations.h. \\ \hline
pp\_number\_of\_variables & unsigned int & & Counts the number of variables in loadPostProcessorVariableAttributes in postprocess.h. \\ \hline
num\_integrated\_fields & unsigned int & & Counts the number of variables marked to be integrated in loadPostProcessorVariableAttributes in postprocess.h. \\ \hline
pp\_var\_name & std::vector$<$std::string$>$ & & Vector of the variable names from loadPostProcessorVariableAttributes in postprocess.h. \\ \hline
pp\_var\_type & std::vector$<$fieldType$>$ & & Vector of the variable types from loadPostProcessorVariableAttributes in postprocess.h. \\ \hline
\end{tabular}
\end{center}
\end{document}
Binary file modified prismspf_user_guide.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/inputFileReader/inputFileReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ void inputFileReader::declare_parameters(dealii::ParameterHandler & parameter_ha
parameter_handler.declare_entry("Load initial conditions","void",dealii::Patterns::Anything(),"Whether to load the initial conditions for each variable from file.");
parameter_handler.declare_entry("Load parallel file","void",dealii::Patterns::Anything(),"Whether all processors should read from a single file (versus each reading from separate files).");
parameter_handler.declare_entry("File names","void",dealii::Patterns::Anything(),"The file name to load from for each variable.");
parameter_handler.declare_entry("Variable names in the files","void",dealii::Patterns::Anything(),"What each variable is named in the field being loaded.");
parameter_handler.declare_entry("Variable names in the files","void",dealii::Patterns::Anything(),"What each variable is named in the file being loaded.");

// Declare the boundary condition variables
for (unsigned int i=0; i<var_types.size(); i++){
Expand Down
1 change: 1 addition & 0 deletions version_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Added functionality:
- Non-rectangular meshes (implemented in the new application CHiMaD_benchmark6b)

Changes to the example applications:
- New application: dendriticSolidification, solidification of a pure material, accounting for temperature evolution
- New application: anisotropyFacet, demonstrates a simple way to specify facets for strong interfacial energy anisotropy
- New applications: CHiMaD_benchmark6a and CHiMaD_benchmark6b, the new CHiMaD electrochemistry benchmark problems, with a coupled Cahn-Hilliard-Poisson system of equations

Expand Down

0 comments on commit b88cf52

Please sign in to comment.