diff --git a/doxygen/initialConditions_8h_source.html b/doxygen/initialConditions_8h_source.html index 109d6073..4e708364 100644 --- a/doxygen/initialConditions_8h_source.html +++ b/doxygen/initialConditions_8h_source.html @@ -171,7 +171,7 @@
81 #endif /* INCLUDE_INITIALCONDITIONS_H_ */
InitialConditionVector
Definition: initialConditions.h:50
InitialCondition
Definition: initialConditions.h:16
-
MatrixFreePDE
This is the abstract base class for the matrix free implementation of parabolic and elliptic BVP's,...
Definition: matrixFreePDE.h:68
+
MatrixFreePDE
This is the abstract base class for the matrix free implementation of parabolic and elliptic BVP's,...
Definition: matrixFreePDE.h:66
userInputParameters
Definition: userInputParameters.h:39
diff --git a/doxygen/inputFileReader_8h_source.html b/doxygen/inputFileReader_8h_source.html index 060c5418..ccdffc7a 100644 --- a/doxygen/inputFileReader_8h_source.html +++ b/doxygen/inputFileReader_8h_source.html @@ -149,14 +149,14 @@
88 
89 #endif /* INCLUDE_INPUTFILEREADER_H_ */
inputFileReader
Input file reader.
Definition: inputFileReader.h:16
-
inputFileReader::get_entry_name_ending_list
static std::vector< std::string > get_entry_name_ending_list(const std::string &parameters_file_name, const std::string &keyword, const std::string &entry_name_begining)
Get the trailing part of the entry name after a specified string (used to extract the model constant ...
Definition: inputFileReader.cc:244
-
inputFileReader::declare_parameters
void declare_parameters(dealii::ParameterHandler &parameter_handler, const unsigned int num_of_constants) const
Method to declare the parameters to be read from an input file.
Definition: inputFileReader.cc:296
-
inputFileReader::get_subsection_entry_list
static std::vector< std::string > get_subsection_entry_list(const std::string &parameters_file_name, const std::string &subsec_name, const std::string &entry_name, const std::string &default_entry)
Method to get a list of entry values from multiple subsections in an input file.
Definition: inputFileReader.cc:140
-
inputFileReader::parse_line
static bool parse_line(std::string line, const std::string &keyword, const std::string &entry_name, std::string &out_string, bool expect_equals_sign)
Method to check if a line has the desired contents and if so, extract it.
Definition: inputFileReader.cc:72
-
inputFileReader::strip_spaces
static void strip_spaces(std::string &line)
Strip spaces from the front and back of a string.
Definition: inputFileReader.cc:37
+
inputFileReader::get_entry_name_ending_list
static std::vector< std::string > get_entry_name_ending_list(const std::string &parameters_file_name, const std::string &keyword, const std::string &entry_name_begining)
Get the trailing part of the entry name after a specified string (used to extract the model constant ...
Definition: inputFileReader.cc:240
+
inputFileReader::declare_parameters
void declare_parameters(dealii::ParameterHandler &parameter_handler, const unsigned int num_of_constants) const
Method to declare the parameters to be read from an input file.
Definition: inputFileReader.cc:292
+
inputFileReader::get_subsection_entry_list
static std::vector< std::string > get_subsection_entry_list(const std::string &parameters_file_name, const std::string &subsec_name, const std::string &entry_name, const std::string &default_entry)
Method to get a list of entry values from multiple subsections in an input file.
Definition: inputFileReader.cc:136
+
inputFileReader::parse_line
static bool parse_line(std::string line, const std::string &keyword, const std::string &entry_name, std::string &out_string, bool expect_equals_sign)
Method to check if a line has the desired contents and if so, extract it.
Definition: inputFileReader.cc:68
+
inputFileReader::strip_spaces
static void strip_spaces(std::string &line)
Strip spaces from the front and back of a string.
Definition: inputFileReader.cc:33
inputFileReader::inputFileReader
inputFileReader(const std::string &input_file_name, const AttributesList &_var_attributes, const AttributesList &_pp_attributes)
Constructor.
Definition: inputFileReader.cc:8
-
inputFileReader::get_number_of_entries
static unsigned int get_number_of_entries(const std::string &parameters_file_name, const std::string &keyword, const std::string &entry_name)
Method to count the number of related entries in an input file.
Definition: inputFileReader.cc:216
-
inputFileReader::check_keyword_match
static bool check_keyword_match(std::string &line, const std::string &keyword)
Check whether a string starts with a keyword.
Definition: inputFileReader.cc:51
+
inputFileReader::get_number_of_entries
static unsigned int get_number_of_entries(const std::string &parameters_file_name, const std::string &keyword, const std::string &entry_name)
Method to count the number of related entries in an input file.
Definition: inputFileReader.cc:212
+
inputFileReader::check_keyword_match
static bool check_keyword_match(std::string &line, const std::string &keyword)
Check whether a string starts with a keyword.
Definition: inputFileReader.cc:47
diff --git a/doxygen/matrixFreePDE_8h_source.html b/doxygen/matrixFreePDE_8h_source.html index 5b20e7fd..b1dc2180 100644 --- a/doxygen/matrixFreePDE_8h_source.html +++ b/doxygen/matrixFreePDE_8h_source.html @@ -93,460 +93,458 @@
3 #define MATRIXFREEPDE_H
4 
5 // dealii headers
-
6 #include <deal.II/base/quadrature.h>
-
7 #include <deal.II/base/timer.h>
-
8 #include <deal.II/fe/fe_q.h>
-
9 #include <deal.II/fe/fe_system.h>
-
10 #include <deal.II/fe/fe_values.h>
-
11 #include <deal.II/lac/affine_constraints.h>
-
12 #include <deal.II/lac/vector.h>
-
13 #if (DEAL_II_VERSION_MAJOR == 9 && DEAL_II_VERSION_MINOR > 3)
-
14 # include <deal.II/fe/mapping_fe.h>
-
15 #endif
-
16 #include <deal.II/base/config.h>
-
17 #include <deal.II/base/exceptions.h>
-
18 #include <deal.II/distributed/solution_transfer.h>
-
19 #include <deal.II/distributed/tria.h>
-
20 #include <deal.II/dofs/dof_handler.h>
-
21 #include <deal.II/dofs/dof_tools.h>
-
22 #include <deal.II/grid/grid_tools.h>
-
23 #include <deal.II/grid/manifold_lib.h>
-
24 #include <deal.II/grid/tria.h>
-
25 #include <deal.II/grid/tria_accessor.h>
-
26 #include <deal.II/grid/tria_iterator.h>
-
27 #include <deal.II/lac/la_parallel_vector.h>
-
28 #include <deal.II/matrix_free/fe_evaluation.h>
-
29 #include <deal.II/matrix_free/matrix_free.h>
-
30 #include <deal.II/numerics/vector_tools.h>
-
31 
-
32 // PRISMS headers
-
33 #include <core/fields.h>
-
34 #include <core/refinement/AdaptiveRefinement.h>
-
35 #include <core/userInputParameters.h>
-
36 #include <core/variableContainer.h>
-
37 #include <core/variableValueContainer.h>
-
38 #include <grains/SimplifiedGrainRepresentation.h>
-
39 #include <nucleation/nucleus.h>
-
40 #include <utilities/computeStress.h>
+
6 #include <deal.II/base/config.h>
+
7 #include <deal.II/base/exceptions.h>
+
8 #include <deal.II/base/quadrature.h>
+
9 #include <deal.II/base/timer.h>
+
10 #include <deal.II/distributed/solution_transfer.h>
+
11 #include <deal.II/distributed/tria.h>
+
12 #include <deal.II/dofs/dof_handler.h>
+
13 #include <deal.II/dofs/dof_tools.h>
+
14 #include <deal.II/fe/fe_q.h>
+
15 #include <deal.II/fe/fe_system.h>
+
16 #include <deal.II/fe/fe_values.h>
+
17 #include <deal.II/fe/mapping_fe.h>
+
18 #include <deal.II/grid/grid_tools.h>
+
19 #include <deal.II/grid/manifold_lib.h>
+
20 #include <deal.II/grid/tria.h>
+
21 #include <deal.II/grid/tria_accessor.h>
+
22 #include <deal.II/grid/tria_iterator.h>
+
23 #include <deal.II/lac/affine_constraints.h>
+
24 #include <deal.II/lac/la_parallel_vector.h>
+
25 #include <deal.II/lac/vector.h>
+
26 #include <deal.II/matrix_free/fe_evaluation.h>
+
27 #include <deal.II/matrix_free/matrix_free.h>
+
28 #include <deal.II/numerics/vector_tools.h>
+
29 
+
30 // PRISMS headers
+
31 #include <core/fields.h>
+
32 #include <core/refinement/AdaptiveRefinement.h>
+
33 #include <core/userInputParameters.h>
+
34 #include <core/variableContainer.h>
+
35 #include <core/variableValueContainer.h>
+
36 #include <grains/SimplifiedGrainRepresentation.h>
+
37 #include <nucleation/nucleus.h>
+
38 #include <utilities/computeStress.h>
+
39 
+
40 using namespace dealii;
41 
-
42 using namespace dealii;
-
43 
-
44 // define data types
-
45 #ifndef scalarType
-
46 using scalarType = VectorizedArray<double>;
-
47 #endif
-
48 #ifndef vectorType
-
49 using vectorType = LinearAlgebra::distributed::Vector<double>;
-
50 #endif
-
51 
-
52 // macro for constants
-
53 #define constV(a) make_vectorized_array(a)
-
54 
-
66 template <int dim, int degree>
-
67 class MatrixFreePDE : public Subscriptor
-
68 {
-
69 public:
-
73  MatrixFreePDE(userInputParameters<dim>);
-
74 
-
78  ~MatrixFreePDE() override;
-
79 
-
84  virtual void
-
85  init();
-
86 
-
92  virtual void
-
93  create_triangulation(parallel::distributed::Triangulation<dim> &tria) const;
-
94 
-
104  void
-
105  initForTests(std::vector<Field<dim>> _fields);
-
106 
-
111  void
-
112  solve();
-
113 
-
122  void
-
123  vmult(vectorType &dst, const vectorType &src) const;
-
124 
-
131  std::vector<Field<dim>> fields;
-
132 
-
136  void
-
137  buildFields();
-
138 
-
142  ConditionalOStream pcout;
-
143 
-
153  virtual void
-
154  setInitialCondition([[maybe_unused]] const Point<dim> &p,
-
155  [[maybe_unused]] const unsigned int index,
-
156  [[maybe_unused]] double &scalar_IC,
-
157  [[maybe_unused]] Vector<double> &vector_IC) = 0;
-
158 
-
170  virtual void
-
171  setNonUniformDirichletBCs([[maybe_unused]] const Point<dim> &p,
-
172  [[maybe_unused]] const unsigned int index,
-
173  [[maybe_unused]] const unsigned int direction,
-
174  [[maybe_unused]] const double time,
-
175  [[maybe_unused]] double &scalar_BC,
-
176  [[maybe_unused]] Vector<double> &vector_BC) = 0;
-
177 
-
178 protected:
-
179  userInputParameters<dim> userInputs;
+
42 // define data types
+
43 #ifndef scalarType
+
44 using scalarType = VectorizedArray<double>;
+
45 #endif
+
46 #ifndef vectorType
+
47 using vectorType = LinearAlgebra::distributed::Vector<double>;
+
48 #endif
+
49 
+
50 // macro for constants
+
51 #define constV(a) make_vectorized_array(a)
+
52 
+
64 template <int dim, int degree>
+
65 class MatrixFreePDE : public Subscriptor
+
66 {
+
67 public:
+
71  MatrixFreePDE(userInputParameters<dim>);
+
72 
+
76  ~MatrixFreePDE() override;
+
77 
+
82  virtual void
+
83  init();
+
84 
+
90  virtual void
+
91  create_triangulation(parallel::distributed::Triangulation<dim> &tria) const;
+
92 
+
102  void
+
103  initForTests(std::vector<Field<dim>> _fields);
+
104 
+
109  void
+
110  solve();
+
111 
+
120  void
+
121  vmult(vectorType &dst, const vectorType &src) const;
+
122 
+
129  std::vector<Field<dim>> fields;
+
130 
+
134  void
+
135  buildFields();
+
136 
+
140  ConditionalOStream pcout;
+
141 
+
151  virtual void
+
152  setInitialCondition([[maybe_unused]] const Point<dim> &p,
+
153  [[maybe_unused]] const unsigned int index,
+
154  [[maybe_unused]] double &scalar_IC,
+
155  [[maybe_unused]] Vector<double> &vector_IC) = 0;
+
156 
+
168  virtual void
+
169  setNonUniformDirichletBCs([[maybe_unused]] const Point<dim> &p,
+
170  [[maybe_unused]] const unsigned int index,
+
171  [[maybe_unused]] const unsigned int direction,
+
172  [[maybe_unused]] const double time,
+
173  [[maybe_unused]] double &scalar_BC,
+
174  [[maybe_unused]] Vector<double> &vector_BC) = 0;
+
175 
+
176 protected:
+
177  userInputParameters<dim> userInputs;
+
178 
+
179  unsigned int totalDOFs;
180 
-
181  unsigned int totalDOFs;
-
182 
-
183  // The attributes of the primary field variables and
-
184  // the postprocessing field variables
-
185  const AttributesList &var_attributes;
-
186  const AttributesList &pp_attributes;
-
187 
-
188  // Elasticity matrix variables
-
189  const static unsigned int CIJ_tensor_size = 2 * dim - 1 + dim / 3;
-
190 
-
191  // Method to reinitialize the mesh, degrees of freedom, constraints and data
-
192  // structures when the mesh is adapted
-
193  void
-
194  reinit();
-
195 
-
200  void
-
201  reassignGrains();
+
181  // The attributes of the primary field variables and
+
182  // the postprocessing field variables
+
183  const AttributesList &var_attributes;
+
184  const AttributesList &pp_attributes;
+
185 
+
186  // Elasticity matrix variables
+
187  const static unsigned int CIJ_tensor_size = 2 * dim - 1 + dim / 3;
+
188 
+
189  // Method to reinitialize the mesh, degrees of freedom, constraints and data
+
190  // structures when the mesh is adapted
+
191  void
+
192  reinit();
+
193 
+
198  void
+
199  reassignGrains();
+
200 
+
201  std::vector<SimplifiedGrainRepresentation<dim>> simplified_grain_representations;
202 
-
203  std::vector<SimplifiedGrainRepresentation<dim>> simplified_grain_representations;
-
204 
-
212  virtual void
-
213  solveIncrement(bool skip_time_dependent);
-
214  /* Method to write solution fields to vtu and pvtu (parallel) files.
-
215  *
-
216  * This method can be enabled/disabled by setting the flag writeOutput to
-
217  * true/false. Also, the user can select how often the solution files are
-
218  * written by setting the flag skipOutputSteps in the parameters file.
-
219  */
-
220  void
-
221  outputResults();
-
222 
-
223  /*Parallel mesh object which holds information about the FE nodes, elements
-
224  * and parallel domain decomposition
-
225  */
-
226  parallel::distributed::Triangulation<dim> triangulation;
-
227  /*A vector of finite element objects used in a model. For problems with only
-
228  *one primal field, the size of this vector is one,otherwise the size is the
-
229  *number of primal fields in the problem.
-
230  */
-
231  std::vector<FESystem<dim> *> FESet;
-
232  /*A vector of all the constraint sets in the problem. A constraint set is a
-
233  *map which holds the mapping between the degrees of freedom and the
-
234  *corresponding degree of freedom constraints. Currently the type of
-
235  *constraints stored are either Dirichlet boundary conditions or hanging node
-
236  *constraints for adaptive meshes.
-
237  */
-
238  std::vector<const AffineConstraints<double> *> constraintsDirichletSet,
-
239  constraintsOtherSet;
-
240  /*A vector of all the degree of freedom objects is the problem. A degree of
-
241  *freedom object handles the serial/parallel distribution of the degrees of
-
242  *freedom for all the primal fields in the problem.*/
-
243  std::vector<const DoFHandler<dim> *> dofHandlersSet;
-
244 
-
245  /*A vector of the locally relevant degrees of freedom. Locally relevant degrees of
-
246  *freedom in a parallel implementation is a collection of the degrees of freedom owned
-
247  *by the current processor and the surrounding ghost nodes which are required for the
-
248  *field computations in this processor.
-
249  */
-
250  std::vector<const IndexSet *> locally_relevant_dofsSet;
-
251  /*Copies of constraintSet elements, but stored as non-const to enable application of
-
252  * constraints.*/
-
253  std::vector<AffineConstraints<double> *> constraintsDirichletSet_nonconst,
-
254  constraintsOtherSet_nonconst;
-
255  /*Copies of dofHandlerSet elements, but stored as non-const.*/
-
256  std::vector<DoFHandler<dim> *> dofHandlersSet_nonconst;
-
257  /*Copies of locally_relevant_dofsSet elements, but stored as non-const.*/
-
258  std::vector<IndexSet *> locally_relevant_dofsSet_nonconst;
-
259  /*Vector all the solution vectors in the problem. In a multi-field problem, each primal
-
260  * field has a solution vector associated with it.*/
-
261  std::vector<vectorType *> solutionSet;
-
262  /*Vector all the residual (RHS) vectors in the problem. In a multi-field problem, each
-
263  * primal field has a residual vector associated with it.*/
-
264  std::vector<vectorType *> residualSet;
-
265  /*Vector of parallel solution transfer objects. This is used only when adaptive meshing
-
266  * is enabled.*/
-
267  std::vector<parallel::distributed::SolutionTransfer<dim, vectorType> *> soltransSet;
-
268 
-
269  // matrix free objects
-
270  /*Object of class MatrixFree<dim>. This is primarily responsible for all the
-
271  *base matrix free functionality of this MatrixFreePDE<dim> class. Refer to
-
272  *deal.ii documentation of MatrixFree<dim> class for details.
-
273  */
-
274  MatrixFree<dim, double> matrixFreeObject;
-
275  /*Vector to store the inverse of the mass matrix diagonal for scalar fields.
-
276  * Due to the choice of spectral elements with Guass-Lobatto quadrature, the
-
277  * mass matrix is diagonal.*/
-
278  vectorType invMscalar;
-
279  /*Vector to store the inverse of the mass matrix diagonal for vector fields.
-
280  * Due to the choice of spectral elements with Guass-Lobatto quadrature, the
-
281  * mass matrix is diagonal.*/
-
282  vectorType invMvector;
-
283  /*Vector to store the solution increment. This is a temporary vector used
-
284  * during implicit solves of the Elliptic fields.*/
-
285  vectorType dU_vector, dU_scalar;
-
286 
-
287  // matrix free methods
-
288  /*Current field index*/
-
289  unsigned int currentFieldIndex;
-
290  /*Method to compute the inverse of the mass matrix*/
-
291  void
-
292  computeInvM();
-
293 
-
294  /*Method to compute an explicit timestep*/
-
295  void
-
296  updateExplicitSolution(unsigned int fieldIndex);
-
297 
-
298  /*Method to compute an implicit timestep*/
-
299  bool
-
300  updateImplicitSolution(unsigned int fieldIndex, unsigned int nonlinear_it_index);
-
301 
-
302  /*Method to apply boundary conditions*/
-
303  void
-
304  applyBCs(unsigned int fieldIndex);
-
305 
-
309  void
-
310  compute_element_volume();
-
311 
-
315  dealii::AlignedVector<dealii::VectorizedArray<double>> element_volume;
-
316 
-
317  /*Method to compute the right hand side (RHS) residual vectors*/
+
210  virtual void
+
211  solveIncrement(bool skip_time_dependent);
+
212  /* Method to write solution fields to vtu and pvtu (parallel) files.
+
213  *
+
214  * This method can be enabled/disabled by setting the flag writeOutput to
+
215  * true/false. Also, the user can select how often the solution files are
+
216  * written by setting the flag skipOutputSteps in the parameters file.
+
217  */
+
218  void
+
219  outputResults();
+
220 
+
221  /*Parallel mesh object which holds information about the FE nodes, elements
+
222  * and parallel domain decomposition
+
223  */
+
224  parallel::distributed::Triangulation<dim> triangulation;
+
225  /*A vector of finite element objects used in a model. For problems with only
+
226  *one primal field, the size of this vector is one,otherwise the size is the
+
227  *number of primal fields in the problem.
+
228  */
+
229  std::vector<FESystem<dim> *> FESet;
+
230  /*A vector of all the constraint sets in the problem. A constraint set is a
+
231  *map which holds the mapping between the degrees of freedom and the
+
232  *corresponding degree of freedom constraints. Currently the type of
+
233  *constraints stored are either Dirichlet boundary conditions or hanging node
+
234  *constraints for adaptive meshes.
+
235  */
+
236  std::vector<const AffineConstraints<double> *> constraintsDirichletSet,
+
237  constraintsOtherSet;
+
238  /*A vector of all the degree of freedom objects is the problem. A degree of
+
239  *freedom object handles the serial/parallel distribution of the degrees of
+
240  *freedom for all the primal fields in the problem.*/
+
241  std::vector<const DoFHandler<dim> *> dofHandlersSet;
+
242 
+
243  /*A vector of the locally relevant degrees of freedom. Locally relevant degrees of
+
244  *freedom in a parallel implementation is a collection of the degrees of freedom owned
+
245  *by the current processor and the surrounding ghost nodes which are required for the
+
246  *field computations in this processor.
+
247  */
+
248  std::vector<const IndexSet *> locally_relevant_dofsSet;
+
249  /*Copies of constraintSet elements, but stored as non-const to enable application of
+
250  * constraints.*/
+
251  std::vector<AffineConstraints<double> *> constraintsDirichletSet_nonconst,
+
252  constraintsOtherSet_nonconst;
+
253  /*Copies of dofHandlerSet elements, but stored as non-const.*/
+
254  std::vector<DoFHandler<dim> *> dofHandlersSet_nonconst;
+
255  /*Copies of locally_relevant_dofsSet elements, but stored as non-const.*/
+
256  std::vector<IndexSet *> locally_relevant_dofsSet_nonconst;
+
257  /*Vector all the solution vectors in the problem. In a multi-field problem, each primal
+
258  * field has a solution vector associated with it.*/
+
259  std::vector<vectorType *> solutionSet;
+
260  /*Vector all the residual (RHS) vectors in the problem. In a multi-field problem, each
+
261  * primal field has a residual vector associated with it.*/
+
262  std::vector<vectorType *> residualSet;
+
263  /*Vector of parallel solution transfer objects. This is used only when adaptive meshing
+
264  * is enabled.*/
+
265  std::vector<parallel::distributed::SolutionTransfer<dim, vectorType> *> soltransSet;
+
266 
+
267  // matrix free objects
+
268  /*Object of class MatrixFree<dim>. This is primarily responsible for all the
+
269  *base matrix free functionality of this MatrixFreePDE<dim> class. Refer to
+
270  *deal.ii documentation of MatrixFree<dim> class for details.
+
271  */
+
272  MatrixFree<dim, double> matrixFreeObject;
+
273  /*Vector to store the inverse of the mass matrix diagonal for scalar fields.
+
274  * Due to the choice of spectral elements with Guass-Lobatto quadrature, the
+
275  * mass matrix is diagonal.*/
+
276  vectorType invMscalar;
+
277  /*Vector to store the inverse of the mass matrix diagonal for vector fields.
+
278  * Due to the choice of spectral elements with Guass-Lobatto quadrature, the
+
279  * mass matrix is diagonal.*/
+
280  vectorType invMvector;
+
281  /*Vector to store the solution increment. This is a temporary vector used
+
282  * during implicit solves of the Elliptic fields.*/
+
283  vectorType dU_vector, dU_scalar;
+
284 
+
285  // matrix free methods
+
286  /*Current field index*/
+
287  unsigned int currentFieldIndex;
+
288  /*Method to compute the inverse of the mass matrix*/
+
289  void
+
290  computeInvM();
+
291 
+
292  /*Method to compute an explicit timestep*/
+
293  void
+
294  updateExplicitSolution(unsigned int fieldIndex);
+
295 
+
296  /*Method to compute an implicit timestep*/
+
297  bool
+
298  updateImplicitSolution(unsigned int fieldIndex, unsigned int nonlinear_it_index);
+
299 
+
300  /*Method to apply boundary conditions*/
+
301  void
+
302  applyBCs(unsigned int fieldIndex);
+
303 
+
307  void
+
308  compute_element_volume();
+
309 
+
313  dealii::AlignedVector<dealii::VectorizedArray<double>> element_volume;
+
314 
+
315  /*Method to compute the right hand side (RHS) residual vectors*/
+
316  void
+
317  computeExplicitRHS();
318  void
-
319  computeExplicitRHS();
-
320  void
-
321  computeNonexplicitRHS();
-
322 
-
323  // virtual methods to be implemented in the derived class
-
324  /*Method to calculate LHS(implicit solve)*/
-
325  void
-
326  getLHS(const MatrixFree<dim, double> &data,
-
327  vectorType &dst,
-
328  const vectorType &src,
-
329  const std::pair<unsigned int, unsigned int> &cell_range) const;
-
330 
-
331  bool generatingInitialGuess;
-
332  void
-
333  getLaplaceLHS(const MatrixFree<dim, double> &data,
-
334  vectorType &dst,
-
335  const vectorType &src,
-
336  const std::pair<unsigned int, unsigned int> &cell_range) const;
-
337 
+
319  computeNonexplicitRHS();
+
320 
+
321  // virtual methods to be implemented in the derived class
+
322  /*Method to calculate LHS(implicit solve)*/
+
323  void
+
324  getLHS(const MatrixFree<dim, double> &data,
+
325  vectorType &dst,
+
326  const vectorType &src,
+
327  const std::pair<unsigned int, unsigned int> &cell_range) const;
+
328 
+
329  bool generatingInitialGuess;
+
330  void
+
331  getLaplaceLHS(const MatrixFree<dim, double> &data,
+
332  vectorType &dst,
+
333  const vectorType &src,
+
334  const std::pair<unsigned int, unsigned int> &cell_range) const;
+
335 
+
336  void
+
337  setNonlinearEqInitialGuess();
338  void
-
339  setNonlinearEqInitialGuess();
+
339  computeLaplaceRHS(unsigned int fieldIndex);
340  void
-
341  computeLaplaceRHS(unsigned int fieldIndex);
-
342  void
-
343  getLaplaceRHS(const MatrixFree<dim, double> &data,
-
344  vectorType &dst,
-
345  const vectorType &src,
-
346  const std::pair<unsigned int, unsigned int> &cell_range) const;
-
347 
-
348  /*Method to calculate RHS (implicit/explicit). This is an abstract method, so
-
349  * every model which inherits MatrixFreePDE<dim> has to implement this
-
350  * method.*/
-
351  void
-
352  getExplicitRHS(const MatrixFree<dim, double> &data,
-
353  std::vector<vectorType *> &dst,
-
354  const std::vector<vectorType *> &src,
-
355  const std::pair<unsigned int, unsigned int> &cell_range) const;
-
356 
-
357  void
-
358  getNonexplicitRHS(const MatrixFree<dim, double> &data,
-
359  std::vector<vectorType *> &dst,
-
360  const std::vector<vectorType *> &src,
-
361  const std::pair<unsigned int, unsigned int> &cell_range) const;
-
362 
-
363  virtual void
-
364  explicitEquationRHS(
-
365  [[maybe_unused]] variableContainer<dim, degree, VectorizedArray<double>>
-
366  &variable_list,
-
367  [[maybe_unused]] const Point<dim, VectorizedArray<double>> q_point_loc,
-
368  [[maybe_unused]] const VectorizedArray<double> element_volume) const = 0;
-
369 
-
370  virtual void
-
371  nonExplicitEquationRHS(
-
372  [[maybe_unused]] variableContainer<dim, degree, VectorizedArray<double>>
-
373  &variable_list,
-
374  [[maybe_unused]] const Point<dim, VectorizedArray<double>> q_point_loc,
-
375  [[maybe_unused]] const VectorizedArray<double> element_volume) const = 0;
-
376 
-
377  virtual void
-
378  equationLHS([[maybe_unused]] variableContainer<dim, degree, VectorizedArray<double>>
-
379  &variable_list,
-
380  [[maybe_unused]] const Point<dim, VectorizedArray<double>> q_point_loc,
-
381  [[maybe_unused]] const VectorizedArray<double> element_volume) const = 0;
-
382 
-
383  virtual void
-
384  postProcessedFields(
-
385  [[maybe_unused]] const variableContainer<dim, degree, VectorizedArray<double>>
-
386  &variable_list,
-
387  [[maybe_unused]] variableContainer<dim, degree, VectorizedArray<double>>
-
388  &pp_variable_list,
-
389  [[maybe_unused]] const Point<dim, VectorizedArray<double>> q_point_loc,
-
390  [[maybe_unused]] const VectorizedArray<double> element_volume) const {};
-
391  void
-
392  computePostProcessedFields(std::vector<vectorType *> &postProcessedSet);
-
393 
-
394  void
-
395  getPostProcessedFields(const MatrixFree<dim, double> &data,
-
396  std::vector<vectorType *> &dst,
-
397  const std::vector<vectorType *> &src,
-
398  const std::pair<unsigned int, unsigned int> &cell_range);
-
399 
-
400  // methods to apply dirichlet BC's
-
401  /*Map of degrees of freedom to the corresponding Dirichlet boundary
-
402  * conditions, if any.*/
-
403  std::vector<std::map<types::global_dof_index, double> *> valuesDirichletSet;
-
404  /*Virtual method to mark the boundaries for applying Dirichlet boundary
-
405  * conditions. This is usually expected to be provided by the user.*/
-
406  void
-
407  markBoundaries(parallel::distributed::Triangulation<dim> &) const;
-
409  void
-
410  applyDirichletBCs();
-
411 
-
413  void
-
414  applyNeumannBCs();
-
415 
-
416  // Methods to apply periodic BCs
+
341  getLaplaceRHS(const MatrixFree<dim, double> &data,
+
342  vectorType &dst,
+
343  const vectorType &src,
+
344  const std::pair<unsigned int, unsigned int> &cell_range) const;
+
345 
+
346  /*Method to calculate RHS (implicit/explicit). This is an abstract method, so
+
347  * every model which inherits MatrixFreePDE<dim> has to implement this
+
348  * method.*/
+
349  void
+
350  getExplicitRHS(const MatrixFree<dim, double> &data,
+
351  std::vector<vectorType *> &dst,
+
352  const std::vector<vectorType *> &src,
+
353  const std::pair<unsigned int, unsigned int> &cell_range) const;
+
354 
+
355  void
+
356  getNonexplicitRHS(const MatrixFree<dim, double> &data,
+
357  std::vector<vectorType *> &dst,
+
358  const std::vector<vectorType *> &src,
+
359  const std::pair<unsigned int, unsigned int> &cell_range) const;
+
360 
+
361  virtual void
+
362  explicitEquationRHS(
+
363  [[maybe_unused]] variableContainer<dim, degree, VectorizedArray<double>>
+
364  &variable_list,
+
365  [[maybe_unused]] const Point<dim, VectorizedArray<double>> q_point_loc,
+
366  [[maybe_unused]] const VectorizedArray<double> element_volume) const = 0;
+
367 
+
368  virtual void
+
369  nonExplicitEquationRHS(
+
370  [[maybe_unused]] variableContainer<dim, degree, VectorizedArray<double>>
+
371  &variable_list,
+
372  [[maybe_unused]] const Point<dim, VectorizedArray<double>> q_point_loc,
+
373  [[maybe_unused]] const VectorizedArray<double> element_volume) const = 0;
+
374 
+
375  virtual void
+
376  equationLHS([[maybe_unused]] variableContainer<dim, degree, VectorizedArray<double>>
+
377  &variable_list,
+
378  [[maybe_unused]] const Point<dim, VectorizedArray<double>> q_point_loc,
+
379  [[maybe_unused]] const VectorizedArray<double> element_volume) const = 0;
+
380 
+
381  virtual void
+
382  postProcessedFields(
+
383  [[maybe_unused]] const variableContainer<dim, degree, VectorizedArray<double>>
+
384  &variable_list,
+
385  [[maybe_unused]] variableContainer<dim, degree, VectorizedArray<double>>
+
386  &pp_variable_list,
+
387  [[maybe_unused]] const Point<dim, VectorizedArray<double>> q_point_loc,
+
388  [[maybe_unused]] const VectorizedArray<double> element_volume) const {};
+
389  void
+
390  computePostProcessedFields(std::vector<vectorType *> &postProcessedSet);
+
391 
+
392  void
+
393  getPostProcessedFields(const MatrixFree<dim, double> &data,
+
394  std::vector<vectorType *> &dst,
+
395  const std::vector<vectorType *> &src,
+
396  const std::pair<unsigned int, unsigned int> &cell_range);
+
397 
+
398  // methods to apply dirichlet BC's
+
399  /*Map of degrees of freedom to the corresponding Dirichlet boundary
+
400  * conditions, if any.*/
+
401  std::vector<std::map<types::global_dof_index, double> *> valuesDirichletSet;
+
402  /*Virtual method to mark the boundaries for applying Dirichlet boundary
+
403  * conditions. This is usually expected to be provided by the user.*/
+
404  void
+
405  markBoundaries(parallel::distributed::Triangulation<dim> &) const;
+
407  void
+
408  applyDirichletBCs();
+
409 
+
411  void
+
412  applyNeumannBCs();
+
413 
+
414  // Methods to apply periodic BCs
+
415  void
+
416  setPeriodicity();
417  void
-
418  setPeriodicity();
-
419  void
-
420  setPeriodicityConstraints(AffineConstraints<double> *, const DoFHandler<dim> *) const;
-
421 
-
432  void
-
433  set_rigid_body_mode_constraints(AffineConstraints<double> *constraints,
-
434  const DoFHandler<dim> *dof_handler,
-
435  const Point<dim> target_point = Point<dim>()) const;
-
436 
-
437  // methods to apply initial conditions
-
438  /*Virtual method to apply initial conditions. This is usually expected to be
-
439  * provided by the user in IBVP (Initial Boundary Value Problems).*/
-
440 
-
441  void
-
442  applyInitialConditions();
-
443 
+
418  setPeriodicityConstraints(AffineConstraints<double> *, const DoFHandler<dim> *) const;
+
419 
+
430  void
+
431  set_rigid_body_mode_constraints(AffineConstraints<double> *constraints,
+
432  const DoFHandler<dim> *dof_handler,
+
433  const Point<dim> target_point = Point<dim>()) const;
+
434 
+
435  // methods to apply initial conditions
+
436  /*Virtual method to apply initial conditions. This is usually expected to be
+
437  * provided by the user in IBVP (Initial Boundary Value Problems).*/
+
438 
+
439  void
+
440  applyInitialConditions();
+
441 
+
442  // --------------------------------------------------------------------------
+
443  // Methods for saving and loading checkpoints
444  // --------------------------------------------------------------------------
-
445  // Methods for saving and loading checkpoints
-
446  // --------------------------------------------------------------------------
-
447 
-
448  void
-
449  save_checkpoint();
-
450 
+
445 
+
446  void
+
447  save_checkpoint();
+
448 
+
449  void
+
450  load_checkpoint_triangulation();
451  void
-
452  load_checkpoint_triangulation();
+
452  load_checkpoint_fields();
453  void
-
454  load_checkpoint_fields();
-
455  void
-
456  load_checkpoint_time_info();
-
457 
-
458  void
-
459  move_file(const std::string &, const std::string &);
-
460 
-
461  void
-
462  verify_checkpoint_file_exists(const std::string &filename);
-
463 
+
454  load_checkpoint_time_info();
+
455 
+
456  void
+
457  move_file(const std::string &, const std::string &);
+
458 
+
459  void
+
460  verify_checkpoint_file_exists(const std::string &filename);
+
461 
+
462  // --------------------------------------------------------------------------
+
463  // Nucleation methods and variables
464  // --------------------------------------------------------------------------
-
465  // Nucleation methods and variables
-
466  // --------------------------------------------------------------------------
-
467  // Vector of all the nuclei seeded in the problem
-
468  std::vector<nucleus<dim>> nuclei;
-
469 
-
470  // Method to get a list of new nuclei to be seeded
-
471  void
-
472  updateNucleiList();
-
473  std::vector<nucleus<dim>>
-
474  getNewNuclei();
+
465  // Vector of all the nuclei seeded in the problem
+
466  std::vector<nucleus<dim>> nuclei;
+
467 
+
468  // Method to get a list of new nuclei to be seeded
+
469  void
+
470  updateNucleiList();
+
471  std::vector<nucleus<dim>>
+
472  getNewNuclei();
+
473  void
+
474  getLocalNucleiList(std::vector<nucleus<dim>> &newnuclei) const;
475  void
-
476  getLocalNucleiList(std::vector<nucleus<dim>> &newnuclei) const;
-
477  void
-
478  safetyCheckNewNuclei(std::vector<nucleus<dim>> newnuclei,
-
479  std::vector<unsigned int> &conflict_ids);
-
480  void
-
481  refineMeshNearNuclei(std::vector<nucleus<dim>> newnuclei);
-
482  double
-
483  weightedDistanceFromNucleusCenter(const Point<dim, double> center,
-
484  const std::vector<double> &semiaxes,
-
485  const Point<dim, double> q_point_loc,
-
486  const unsigned int var_index) const;
-
487  VectorizedArray<double>
-
488  weightedDistanceFromNucleusCenter(const Point<dim, double> center,
-
489  const std::vector<double> &semiaxes,
-
490  const Point<dim, VectorizedArray<double>> q_point_loc,
-
491  const unsigned int var_index) const;
-
492 
-
493  // Method to obtain the nucleation probability for an element, nontrival case
-
494  // must be implemented in the subsclass
-
495  [[nodiscard]] virtual double
-
496  getNucleationProbability(variableValueContainer,
-
497  double,
-
498  Point<dim>,
-
499  [[maybe_unused]] unsigned int variable_index) const
-
500  {
-
501  return 0.0;
-
502  };
-
503 
-
504  // utility functions
-
505  /*Returns index of given field name if exists, else throw error.*/
-
506  unsigned int
-
507  getFieldIndex(std::string _name);
-
508 
-
509  /*Method to compute the integral of a field.*/
-
510  void
-
511  computeIntegral(double &integratedField,
-
512  int index,
-
513  std::vector<vectorType *> variableSet);
-
514 
-
515  // variables for time dependent problems
-
516  /*Flag used to see if invM, time stepping in run(), etc are necessary*/
-
517  bool isTimeDependentBVP;
-
518  /*Flag used to mark problems with Elliptic fields.*/
-
519  bool isEllipticBVP;
-
520 
-
521  bool hasExplicitEquation;
-
522  bool hasNonExplicitEquation;
-
523  //
-
524  double currentTime;
-
525  unsigned int currentIncrement, currentOutput, currentCheckpoint,
-
526  current_grain_reassignment;
-
527 
-
528  /*Timer and logging object*/
-
529  mutable TimerOutput computing_timer;
+
476  safetyCheckNewNuclei(std::vector<nucleus<dim>> newnuclei,
+
477  std::vector<unsigned int> &conflict_ids);
+
478  void
+
479  refineMeshNearNuclei(std::vector<nucleus<dim>> newnuclei);
+
480  double
+
481  weightedDistanceFromNucleusCenter(const Point<dim, double> center,
+
482  const std::vector<double> &semiaxes,
+
483  const Point<dim, double> q_point_loc,
+
484  const unsigned int var_index) const;
+
485  VectorizedArray<double>
+
486  weightedDistanceFromNucleusCenter(const Point<dim, double> center,
+
487  const std::vector<double> &semiaxes,
+
488  const Point<dim, VectorizedArray<double>> q_point_loc,
+
489  const unsigned int var_index) const;
+
490 
+
491  // Method to obtain the nucleation probability for an element, nontrival case
+
492  // must be implemented in the subsclass
+
493  [[nodiscard]] virtual double
+
494  getNucleationProbability(variableValueContainer,
+
495  double,
+
496  Point<dim>,
+
497  [[maybe_unused]] unsigned int variable_index) const
+
498  {
+
499  return 0.0;
+
500  };
+
501 
+
502  // utility functions
+
503  /*Returns index of given field name if exists, else throw error.*/
+
504  unsigned int
+
505  getFieldIndex(std::string _name);
+
506 
+
507  /*Method to compute the integral of a field.*/
+
508  void
+
509  computeIntegral(double &integratedField,
+
510  int index,
+
511  std::vector<vectorType *> variableSet);
+
512 
+
513  // variables for time dependent problems
+
514  /*Flag used to see if invM, time stepping in run(), etc are necessary*/
+
515  bool isTimeDependentBVP;
+
516  /*Flag used to mark problems with Elliptic fields.*/
+
517  bool isEllipticBVP;
+
518 
+
519  bool hasExplicitEquation;
+
520  bool hasNonExplicitEquation;
+
521  //
+
522  double currentTime;
+
523  unsigned int currentIncrement, currentOutput, currentCheckpoint,
+
524  current_grain_reassignment;
+
525 
+
526  /*Timer and logging object*/
+
527  mutable TimerOutput computing_timer;
+
528 
+
529  bool first_integrated_var_output_complete;
530 
-
531  bool first_integrated_var_output_complete;
-
532 
-
533  // Methods and variables for integration
-
534  double integrated_var;
-
535  unsigned int integral_index;
-
536  std::mutex assembler_lock;
-
537 
-
538  /*AMR methods*/
-
539  AdaptiveRefinement<dim, degree> AMR;
-
540 };
-
541 
-
542 template class MatrixFreePDE<2, 1>;
-
543 template class MatrixFreePDE<3, 1>;
-
544 
-
545 template class MatrixFreePDE<2, 2>;
-
546 template class MatrixFreePDE<3, 2>;
-
547 
-
548 template class MatrixFreePDE<3, 3>;
-
549 template class MatrixFreePDE<2, 3>;
-
550 
-
551 template class MatrixFreePDE<3, 4>;
-
552 template class MatrixFreePDE<2, 4>;
-
553 
-
554 template class MatrixFreePDE<3, 5>;
-
555 template class MatrixFreePDE<2, 5>;
-
556 
-
557 template class MatrixFreePDE<3, 6>;
-
558 template class MatrixFreePDE<2, 6>;
-
559 
-
560 #endif
+
531  // Methods and variables for integration
+
532  double integrated_var;
+
533  unsigned int integral_index;
+
534  std::mutex assembler_lock;
+
535 
+
536  /*AMR methods*/
+
537  AdaptiveRefinement<dim, degree> AMR;
+
538 };
+
539 
+
540 template class MatrixFreePDE<2, 1>;
+
541 template class MatrixFreePDE<3, 1>;
+
542 
+
543 template class MatrixFreePDE<2, 2>;
+
544 template class MatrixFreePDE<3, 2>;
+
545 
+
546 template class MatrixFreePDE<3, 3>;
+
547 template class MatrixFreePDE<2, 3>;
+
548 
+
549 template class MatrixFreePDE<3, 4>;
+
550 template class MatrixFreePDE<2, 4>;
+
551 
+
552 template class MatrixFreePDE<3, 5>;
+
553 template class MatrixFreePDE<2, 5>;
+
554 
+
555 template class MatrixFreePDE<3, 6>;
+
556 template class MatrixFreePDE<2, 6>;
+
557 
+
558 #endif
AdaptiveRefinement
Definition: AdaptiveRefinement.h:23
Field
Field class that handles the attributes of each field.
Definition: fields.h:16
-
MatrixFreePDE
This is the abstract base class for the matrix free implementation of parabolic and elliptic BVP's,...
Definition: matrixFreePDE.h:68
+
MatrixFreePDE
This is the abstract base class for the matrix free implementation of parabolic and elliptic BVP's,...
Definition: matrixFreePDE.h:66
MatrixFreePDE::setNonUniformDirichletBCs
virtual void setNonUniformDirichletBCs([[maybe_unused]] const Point< dim > &p, [[maybe_unused]] const unsigned int index, [[maybe_unused]] const unsigned int direction, [[maybe_unused]] const double time, [[maybe_unused]] double &scalar_BC, [[maybe_unused]] Vector< double > &vector_BC)=0
Set the spatially or temporally non-uniform boundary conditions. This function is overriden in each a...
-
MatrixFreePDE::pcout
ConditionalOStream pcout
Parallel message stream.
Definition: matrixFreePDE.h:142
-
MatrixFreePDE::fields
std::vector< Field< dim > > fields
Vector of all the physical fields in the problem. Fields are identified by dimentionality (SCALAR/VEC...
Definition: matrixFreePDE.h:131
-
MatrixFreePDE::element_volume
dealii::AlignedVector< dealii::VectorizedArray< double > > element_volume
Vector that stores element volumes.
Definition: matrixFreePDE.h:315
+
MatrixFreePDE::pcout
ConditionalOStream pcout
Parallel message stream.
Definition: matrixFreePDE.h:140
+
MatrixFreePDE::fields
std::vector< Field< dim > > fields
Vector of all the physical fields in the problem. Fields are identified by dimentionality (SCALAR/VEC...
Definition: matrixFreePDE.h:129
+
MatrixFreePDE::element_volume
dealii::AlignedVector< dealii::VectorizedArray< double > > element_volume
Vector that stores element volumes.
Definition: matrixFreePDE.h:313
MatrixFreePDE::setInitialCondition
virtual void setInitialCondition([[maybe_unused]] const Point< dim > &p, [[maybe_unused]] const unsigned int index, [[maybe_unused]] double &scalar_IC, [[maybe_unused]] Vector< double > &vector_IC)=0
Set the initial condition for all fields. This function is overriden in each application.
MatrixFreePDE::initForTests
void initForTests(std::vector< Field< dim >> _fields)
Initializes the data structures for enabling unit tests.
userInputParameters
Definition: userInputParameters.h:39
diff --git a/doxygen/nonUniformDirichletBC_8h_source.html b/doxygen/nonUniformDirichletBC_8h_source.html index 399f0ccf..886fef84 100644 --- a/doxygen/nonUniformDirichletBC_8h_source.html +++ b/doxygen/nonUniformDirichletBC_8h_source.html @@ -171,7 +171,7 @@
81 };
82 
83 #endif // INCLUDE_NONUNIFORMDIRICHLETBCS_H_
-
MatrixFreePDE
This is the abstract base class for the matrix free implementation of parabolic and elliptic BVP's,...
Definition: matrixFreePDE.h:68
+
MatrixFreePDE
This is the abstract base class for the matrix free implementation of parabolic and elliptic BVP's,...
Definition: matrixFreePDE.h:66
NonUniformDirichletBCVector
Definition: nonUniformDirichletBC.h:47
NonUniformDirichletBC
Definition: nonUniformDirichletBC.h:8