/[escript]/branches/trilinos_from_5897/dudley/src/Mesh_getPattern.cpp
ViewVC logotype

Contents of /branches/trilinos_from_5897/dudley/src/Mesh_getPattern.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6079 - (show annotations)
Mon Mar 21 12:22:38 2016 UTC (2 years, 10 months ago) by caltinay
File size: 2415 byte(s)
Big commit - making dudley much more like finley to make it more
managable. Fixed quite a few issues that had been fixed in finley.
Disposed of all ReducedNode/ReducedDOF entities that dudley never supported.
Compiles and passes tests.

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2016 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16
17 #include "Mesh.h"
18 #include "IndexList.h"
19
20 #include <boost/scoped_array.hpp>
21
22 namespace dudley {
23
24 paso::SystemMatrixPattern_ptr Mesh::getPasoPattern()
25 {
26 // make sure that the pattern is available
27 if (!pasoPattern)
28 pasoPattern = makePasoPattern();
29
30 return pasoPattern;
31 }
32
33 paso::SystemMatrixPattern_ptr Mesh::makePasoPattern() const
34 {
35 const dim_t myNumTargets = Nodes->getNumDegreesOfFreedom();
36 const dim_t numTargets = Nodes->getNumDegreesOfFreedomTargets();
37 const index_t* target = Nodes->borrowTargetDegreesOfFreedom();
38 boost::scoped_array<IndexList> index_list(new IndexList[numTargets]);
39
40 #pragma omp parallel
41 {
42 // insert contributions from element matrices into columns in indexlist
43 IndexList_insertElements(index_list.get(), Elements, target);
44 IndexList_insertElements(index_list.get(), FaceElements, target);
45 IndexList_insertElements(index_list.get(), Points, target);
46 }
47
48 // create pattern
49 paso::Pattern_ptr mainPattern(paso::Pattern::fromIndexListArray(0,
50 myNumTargets, index_list.get(), 0, myNumTargets, 0));
51 paso::Pattern_ptr colCouplePattern(paso::Pattern::fromIndexListArray(0,
52 myNumTargets, index_list.get(), myNumTargets, numTargets,
53 -myNumTargets));
54 paso::Pattern_ptr rowCouplePattern(paso::Pattern::fromIndexListArray(
55 myNumTargets, numTargets, index_list.get(), 0, myNumTargets, 0));
56
57 paso::Connector_ptr connector(Nodes->degreesOfFreedomConnector);
58 paso::SystemMatrixPattern_ptr out(new paso::SystemMatrixPattern(
59 MATRIX_FORMAT_DEFAULT, Nodes->dofDistribution,
60 Nodes->dofDistribution, mainPattern, colCouplePattern,
61 rowCouplePattern, connector, connector));
62 return out;
63 }
64
65 } // namespace dudley
66

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision
svn:mergeinfo /branches/4.0fordebian/dudley/src/Mesh_getPattern.cpp:5567-5588 /branches/diaplayground/dudley/src/Mesh_getPattern.cpp:4940-5147 /branches/lapack2681/finley/src/Mesh_getPattern.cpp:2682-2741 /branches/pasowrap/dudley/src/Mesh_getPattern.cpp:3661-3674 /branches/py3_attempt2/dudley/src/Mesh_getPattern.cpp:3871-3891 /branches/restext/finley/src/Mesh_getPattern.cpp:2610-2624 /branches/ripleygmg_from_3668/dudley/src/Mesh_getPattern.cpp:3669-3791 /branches/stage3.0/finley/src/Mesh_getPattern.cpp:2569-2590 /branches/symbolic_from_3470/dudley/src/Mesh_getPattern.cpp:3471-3974 /branches/symbolic_from_3470/ripley/test/python/dudley/src/Mesh_getPattern.cpp:3517-3974 /release/3.0/finley/src/Mesh_getPattern.cpp:2591-2601 /release/4.0/dudley/src/Mesh_getPattern.cpp:5380-5406 /trunk/dudley/src/Mesh_getPattern.cpp:4257-4344,5898-6007 /trunk/ripley/test/python/dudley/src/Mesh_getPattern.cpp:3480-3515

  ViewVC Help
Powered by ViewVC 1.1.26