Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include "SundanceOut.hpp"
00043 #include "PlayaTabs.hpp"
00044 #include "SundanceVectorAssemblyKernel.hpp"
00045 #include "Teuchos_Time.hpp"
00046 #include "Teuchos_TimeMonitor.hpp"
00047
00048
00049 using namespace Sundance;
00050 using namespace Sundance;
00051 using namespace Sundance;
00052 using namespace Teuchos;
00053 using namespace Playa;
00054 using std::setw;
00055 using std::endl;
00056
00057 VectorAssemblyKernel::VectorAssemblyKernel(
00058 const Array<RCP<DOFMapBase> >& dofMap,
00059 const Array<RCP<Array<int> > >& isBCIndex,
00060 const Array<int>& lowestLocalIndex,
00061 Array<Vector<double> >& b,
00062 bool partitionBCs,
00063 int verb
00064 )
00065 : VectorFillingAssemblyKernel(dofMap, isBCIndex, lowestLocalIndex,
00066 b, partitionBCs, verb)
00067 {}
00068
00069
00070 void VectorAssemblyKernel::fill(
00071 bool isBC,
00072 const IntegralGroup& group,
00073 const RCP<Array<double> >& localValues)
00074 {
00075 Tabs tab0;
00076 SUNDANCE_MSG1(verb(), tab0 << "in VectorAssemblyKernel::fill()");
00077
00078 TEUCHOS_TEST_FOR_EXCEPT(!group.isOneForm());
00079
00080 bool useCofacets = group.usesMaximalCofacets();
00081
00082 if (group.isOneForm())
00083 {
00084 insertLocalVectorBatch(isBC, useCofacets,
00085 group.testID(), group.testBlock(), group.mvIndices(),
00086 *localValues);
00087 }
00088
00089 SUNDANCE_MSG1(verb(), tab0 << "done VectorAssemblyKernel::fill()");
00090 }
00091
00092
00093 void VectorAssemblyKernel:: prepareForWorkSet(
00094 const Array<Set<int> >& requiredTests,
00095 const Array<Set<int> >& ,
00096 RCP<StdFwkEvalMediator> mediator)
00097 {
00098 Tabs tab0;
00099 SUNDANCE_MSG1(verb(), tab0
00100 << "in VectorAssemblyKernel::prepareForWorkSet()");
00101 IntegrationCellSpecifier intCellSpec = mediator->integrationCellSpec();
00102 buildLocalDOFMaps(mediator, intCellSpec, requiredTests);
00103 SUNDANCE_MSG1(verb(), tab0 << "done VectorAssemblyKernel::prepareForWorkSet()");
00104 }