1#ifndef LaplaceBlocks_def_hpp
2#define LaplaceBlocks_def_hpp
3#include "LaplaceBlocks_decl.hpp"
15template<
class SC,
class LO,
class GO,
class NO>
16LaplaceBlocks<SC,LO,GO,NO>::LaplaceBlocks(
const DomainConstPtr_Type &domain1,
const DomainConstPtr_Type &domain2, std::string FEType1, std::string FEType2, ParameterListPtr_Type parameterList ):
17Problem<SC,LO,GO,NO>(parameterList, domain1->getComm())
20 this->addVariable( domain1 , FEType1 ,
"u1" , 1);
21 this->addVariable( domain2 , FEType2 ,
"u2" , 1);
22 this->dim_ = this->getDomain(0)->getDimension();
25template<
class SC,
class LO,
class GO,
class NO>
26LaplaceBlocks<SC,LO,GO,NO>::~LaplaceBlocks(){
30template<
class SC,
class LO,
class GO,
class NO>
31void LaplaceBlocks<SC,LO,GO,NO>::info(){
35template<
class SC,
class LO,
class GO,
class NO>
36void LaplaceBlocks<SC,LO,GO,NO>::assemble( std::string type )
const{
39 std::cout <<
"-- Assembly LaplaceBlocks ... " << std::flush;
45 A1 = Teuchos::rcp(
new Matrix_Type( this->domainPtr_vec_.at(0)->getMapUnique(), this->getDomain(0)->getApproxEntriesPerRow() ) );
46 this->feFactory_->assemblyLaplace(this->dim_, this->domain_FEType_vec_.at(0), 2, A1,
true, 0);
48 A2 = Teuchos::rcp(
new Matrix_Type( this->domainPtr_vec_.at(1)->getMapUnique(), this->getDomain(0)->getApproxEntriesPerRow() ) );
49 this->feFactory_->assemblyLaplace(this->dim_, this->domain_FEType_vec_.at(1), 2, A2,
true , 1);
51 this->system_->addBlock( A1, 0, 0 );
52 this->system_->addBlock( A2, 1, 1 );
54 this->assembleSourceTerm( 0. );
56 this->addToRhs( this->sourceTerm_ );
59 std::cout <<
"done -- " << std::endl;
Definition Problem_decl.hpp:38
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5