1919//
2020// Device sample runs:
2121// mpirun -np 4 ex9p -pa
22+ // mpirun -np 4 ex9p -ea
2223// mpirun -np 4 ex9p -pa -m ../data/periodic-cube.mesh
2324// mpirun -np 4 ex9p -pa -m ../data/periodic-cube.mesh -d cuda
2425//
@@ -161,6 +162,7 @@ int main(int argc, char *argv[])
161162 int par_ref_levels = 0 ;
162163 int order = 3 ;
163164 bool pa = false ;
165+ bool ea = false ;
164166 const char *device_config = " cpu" ;
165167 int ode_solver_type = 4 ;
166168 double t_final = 10.0 ;
@@ -188,6 +190,8 @@ int main(int argc, char *argv[])
188190 " Order (degree) of the finite elements." );
189191 args.AddOption (&pa, " -pa" , " --partial-assembly" , " -no-pa" ,
190192 " --no-partial-assembly" , " Enable Partial Assembly." );
193+ args.AddOption (&ea, " -ea" , " --element-assembly" , " -no-ea" ,
194+ " --no-element-assembly" , " Enable Element Assembly." );
191195 args.AddOption (&device_config, " -d" , " --device" ,
192196 " Device configuration string, see Device::Configure()." );
193197 args.AddOption (&ode_solver_type, " -s" , " --ode-solver" ,
@@ -319,6 +323,11 @@ int main(int argc, char *argv[])
319323 m->SetAssemblyLevel (AssemblyLevel::PARTIAL);
320324 k->SetAssemblyLevel (AssemblyLevel::PARTIAL);
321325 }
326+ else if (ea)
327+ {
328+ m->SetAssemblyLevel (AssemblyLevel::ELEMENT);
329+ k->SetAssemblyLevel (AssemblyLevel::ELEMENT);
330+ }
322331 m->AddDomainIntegrator (new MassIntegrator);
323332 k->AddDomainIntegrator (new ConvectionIntegrator (velocity, -1.0 ));
324333 k->AddInteriorFaceIntegrator (
@@ -556,8 +565,9 @@ FE_Evolution::FE_Evolution(ParBilinearForm &_M, ParBilinearForm &_K,
556565 z(_M.Height())
557566{
558567 bool pa = _M.GetAssemblyLevel ()==AssemblyLevel::PARTIAL;
568+ bool ea = _M.GetAssemblyLevel ()==AssemblyLevel::ELEMENT;
559569
560- if (pa)
570+ if (pa || ea )
561571 {
562572 M.Reset (&_M, false );
563573 K.Reset (&_K, false );
@@ -571,7 +581,7 @@ FE_Evolution::FE_Evolution(ParBilinearForm &_M, ParBilinearForm &_K,
571581 M_solver.SetOperator (*M);
572582
573583 Array<int > ess_tdof_list;
574- if (pa)
584+ if (pa || ea )
575585 {
576586 M_prec = new OperatorJacobiSmoother (_M, ess_tdof_list);
577587 dg_solver = NULL ;
0 commit comments