Luca Heltai [email protected]
Starter code documentation can be accessed here:
https://dealii-courses.github.io/sissa-mhpc-lab-08/
For each of the point below, extend the Poisson class with functions that
perform the indicated tasks, trying to minimize the amount of code you copy and
paste, possibly restructuring existing code by adding arguments to existing
functions, and generating wrappers similar to the run method (e.g.,
run_exercise_3).
Once you created a function that performs the given task, add it to the
poisson-tester.cc file, and make sure all the exercises are run through the
gtest executable, e.g., adding a test for each exercise, as in the following
snippet:
TEST_F(PoissonTester, Exercise3) {
run_exercise_3();
}By the end of this laboratory, you will have modified your Poisson code to run in parallel using shared memory parallelization on multiple threads, and you will have some knowledge of Task based parallelization
-
Transform your
PoissonProblemcode to aLinearElasticityProblemclass (create a copy of thePoissonProblemclass, and modify your copy) -
Add a
n_components=dimargument to theLinearElasticityProblemclass, and make sure that all members that need to know the number of components of the problem (e.g., all classes derived from thedealii::Functionclass) throw an assertion in Debug mode if the number of components is wrong. -
Create the finite element space from the parameter file using
FETools::get_fe_by_name, and check with an assertion that the number of components is correct (removingfe_degreefrom the parameters). -
Add the parameters
muandlambdato the parameter file, and assemble the problem(mu eps u, eps v) + (lambda div u, div v) = (f,v)whereuandvare in$H^1_0(\Omega)^{dim}$ , andeps u = 0.5((grad u) + (grad u)^T). Make sure you addmuandlambdato the problem constants map, so you can use them in the functions and in the exact soluion. -
Make sure the output of your code is vector based, by instructing
DataOutto output a vector based solution. -
Create a common class
BaseProblem, that contains everything that is shared betweenPoissonProblemandLinearElasticity, and make sure bothPoissonProblemandLinearElasticityProblemare derived from the base class. Make sure you initialize theParameterAcceptorclass explicitly in theBaseProblem, and then in the derived classes. -
Make sure you create a
LinearElasticityProblemTesterclass to test your problem using gtest, and create pure shear and pure compression/dilation test cases.