From be78f3bd89ed89484b27af9f08bb17aaac105611 Mon Sep 17 00:00:00 2001 From: Karthik Menon Date: Tue, 25 Jun 2024 15:50:41 -0600 Subject: [PATCH] test_spacing --- docs/pages/add_block.md | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/docs/pages/add_block.md b/docs/pages/add_block.md index c984356cc..c45ee62a8 100644 --- a/docs/pages/add_block.md +++ b/docs/pages/add_block.md @@ -15,42 +15,6 @@ Below are details on the steps required to implement a new block in svZeroDSolve # 2. Create a class for the new block -## The new class will be inherited from `Block`. - -## Define a constructor of the form: -``` - GenericBlock(int id, Model *model) - : Block(id, model, BlockType::block_type, BlockClass::block_class, - {{Param_1, InputParameter()}, - {Param_2, InputParameter()}, - ..., - {Param_N, InputParameter()}}) {} -``` - * `GenericBlock` is the name of the new class - * `block_type` and `block_class` are the same as what was added in Step 1 above. - * The names of the input parameters of the block are `Param_1`, ... , `Param_N`. - * The properties of each parameter are defined by `InputParameter`, which specifies whether it is optional, an array, a scalar, a function, and its default value. - * The names `Param_1`, ... , `Param_N` should be the same as the parameter names within the block definition in the `.json` configuration/input file. - -## The class should have a `setup_dofs(DOFHandler &dofhandler)` function. - * This function typically only includes a call to the following function: - ``` - Block::setup_dofs_(DOFHandler &dofhandler, int num_equations, const std::list &internal_var_names) - ``` - * In the above function, `num_equations` is the number of governing equations for the new block. - * `internal_var_names` is a list of strings that specify names for variables that are internal to the block, i.e. all variables for the block apart from the flow and pressure at the block's inlets and outlets. - -## The class should have a `TripletsContributions num_triplets{*, *, *}` object. - * This specifies how many elements the governing equations of the block contribute to the global `F`, `E` and `dC_dy` matrices respectively. Details are in Step 3 below. - -## The class should have an `update_constant` function and may also contain `update_time` and `update_solution` functions. These functions implement the governing equations for the block. Details are in Step 4 below. - -## *(Optional)* The class can have an `enum ParamId` object that relates the parameter indices to their names. - * This makes it easier to reference the parameters while implementing the governing equations of the block (discussed below). - * The order of parameters in the `ParamId` object should match the order in the constructor. - -# 2. Create a class for the new block - * The new class will be inherited from `Block`.


* Define a constructor of the form: @@ -75,10 +39,12 @@ Below are details on the steps required to implement a new block in svZeroDSolve ``` * In the above function, `num_equations` is the number of governing equations for the new block. * `internal_var_names` is a list of strings that specify names for variables that are internal to the block, i.e. all variables for the block apart from the flow and pressure at the block's inlets and outlets. - +
* The class should have a `TripletsContributions num_triplets{*, *, *}` object. * This specifies how many elements the governing equations of the block contribute to the global `F`, `E` and `dC_dy` matrices respectively. Details are in Step 3 below. +


+ * The class should have an `update_constant` function and may also contain `update_time` and `update_solution` functions. These functions implement the governing equations for the block. Details are in Step 4 below. * *(Optional)* The class can have an `enum ParamId` object that relates the parameter indices to their names.