parallelization-howto
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
parallelization-howto [2010/03/20 17:26] – bp | parallelization-howto [2012/12/17 19:39] (current) – [Example] mikael.ohman | ||
---|---|---|---|
Line 98: | Line 98: | ||
#ifdef __PARALLEL_MODE | #ifdef __PARALLEL_MODE | ||
- | // parallel section (compiles only when --enable-poofem configure option used | + | // parallel section (compiles only when parallel support is configured) |
// pack all data, need to pass pointer to engngModel, local vector, and packing method | // pack all data, need to pass pointer to engngModel, local vector, and packing method | ||
// this will call pack method for each remote partition | // this will call pack method for each remote partition | ||
Line 202: | Line 202: | ||
</ | </ | ||
+ | Provided that the suitable sparse matrix representation is used (SMT_PetscMtrx, | ||
+ | <code cpp> | ||
+ | void | ||
+ | MyEngngModel :: solveYourselfAt(TimeStep *tStep) { | ||
+ | |||
+ | // create components of characteristic equation | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | // initialize profile of stiffness matrix | ||
+ | | ||
+ | |||
+ | // assemble stiffness and load vector | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | // get numerical method to solve the problem | ||
+ | | ||
+ | // solve the problem (yes, this solves linear system in parallel!) | ||
+ | | ||
+ | // postprocess results update nodes, elements, compute strains, stresses, etc | ||
+ | | ||
+ | // and we are done! | ||
+ | } | ||
+ | </ | ||
====== Further reading ====== | ====== Further reading ====== |
parallelization-howto.txt · Last modified: 2012/12/17 19:39 by mikael.ohman