/[escript]/branches/diaplayground/finley/src/CPPAdapter/MeshAdapter.cpp
ViewVC logotype

Diff of /branches/diaplayground/finley/src/CPPAdapter/MeshAdapter.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1366 by gross, Tue Dec 18 05:49:17 2007 UTC revision 1367 by gross, Wed Dec 19 02:45:07 2007 UTC
# Line 809  void MeshAdapter::addPDEToRHS( escript:: Line 809  void MeshAdapter::addPDEToRHS( escript::
809     Finley_Assemble_PDE(mesh->Nodes,mesh->ContactElements, 0, &_rhs , 0, 0, 0, 0, 0, &_y_contact );     Finley_Assemble_PDE(mesh->Nodes,mesh->ContactElements, 0, &_rhs , 0, 0, 0, 0, 0, &_y_contact );
810     checkFinleyError();     checkFinleyError();
811  }  }
812    //
813    // adds PDE of second order into a transport problem
814    //
815    void MeshAdapter::addPDEToTransportProblem(
816                         TransportProblemAdapter& tp, escript::Data& source, const escript::Data& M,
817                         const escript::Data& A, const escript::Data& B, const escript::Data& C,const  escript::Data& D,const  escript::Data& X,const  escript::Data& Y,
818                         const escript::Data& d, const escript::Data& y,
819                         const escript::Data& d_contact,const escript::Data& y_contact) const
820    {
821       DataArrayView::ShapeType shape;
822       escript:: Data tmp(0.0,M.getDataPointShape(),tp.getFunctionSpace(),true);
823       escriptDataC _source=source.getDataC();
824       escriptDataC _tmp=tmp.getDataC();
825       escriptDataC _M=M.getDataC();
826       escriptDataC _A=A.getDataC();
827       escriptDataC _B=B.getDataC();
828       escriptDataC _C=C.getDataC();
829       escriptDataC _D=D.getDataC();
830       escriptDataC _X=X.getDataC();
831       escriptDataC _Y=Y.getDataC();
832       escriptDataC _d=d.getDataC();
833       escriptDataC _y=y.getDataC();
834       escriptDataC _d_contact=d_contact.getDataC();
835       escriptDataC _y_contact=y_contact.getDataC();
836    
837       Finley_Mesh* mesh=m_finleyMesh.get();
838       Paso_FCTransportProblem* _tp = tp.getPaso_FCTransportProblem();
839      
840    
841       Finley_Assemble_LumpedSystem(mesh->Nodes,mesh->Elements,&_tmp, &_M);
842       checkFinleyError();
843       /* add mass matix to lumped mass matrix of transport problem */
844       double* tmp_prt=getSampleData(&_tmp,0);
845       int i;
846       int n=Paso_FCTransportProblem_getTotalNumRows(_tp);
847       #pragma omp parallel for private(i) schedule(static)
848       for (i=0;i<n ;++i) _tp->lumped_mass_matrix[i]+=tmp_prt[i];
849    
850       Finley_Assemble_PDE(mesh->Nodes,mesh->Elements,_tp->transport_matrix, &_source, &_A, 0, 0, &_D, &_X, &_Y );
851       checkFinleyError();
852    
853       Finley_Assemble_PDE(mesh->Nodes,mesh->Elements,_tp->flux_matrix, &_source, 0, &_B, &_C, 0, 0, 0 );
854       checkFinleyError();
855    
856       Finley_Assemble_PDE(mesh->Nodes,mesh->FaceElements, _tp->transport_matrix, &_source, 0, 0, 0, &_d, 0, &_y );
857       checkFinleyError();
858    
859       Finley_Assemble_PDE(mesh->Nodes,mesh->ContactElements, _tp->transport_matrix, &_source , 0, 0, 0, &_d_contact, 0, &_y_contact );
860       checkFinleyError();
861    }
862    
863  //  //
864  // interpolates data between different function spaces:  // interpolates data between different function spaces:

Legend:
Removed from v.1366  
changed lines
  Added in v.1367

  ViewVC Help
Powered by ViewVC 1.1.26