315 MultiVectorPtr_Type d_rep,
316 BlockMatrixPtr_Type &A,
317 BlockMultiVectorPtr_Type &resVec,
318 ParameterListPtr_Type params,
320 std::string assembleMode,
321 bool callFillComplete,
324 ElementsPtr_Type elements = domainVec_.at(0)->getElementsC();
326 int dofsElement = elements->getElement(0).getVectorNodeList().size();
328 vec2D_dbl_ptr_Type pointsRep = domainVec_.at(0)->getPointsRepeated();
330 MapConstPtr_Type mapVel = domainVec_.at(0)->getMapRepeated();
332 vec_dbl_Type solution(0);
333 vec_dbl_Type solution_d;
343 tuple_disk_vec_ptr_Type problemDisk = Teuchos::rcp(
new tuple_disk_vec_Type(0));
344 tuple_ssii_Type displacement (
"Displacement",FEType,dofs,numNodes);
345 problemDisk->push_back(displacement);
347 if(assemblyFEElements_.size()== 0)
348 initAssembleFEElements(
"LinearElasticity",problemDisk,elements, params,pointsRep,domainVec_.at(0)->getElementMap());
349 else if(assemblyFEElements_.size() != elements->numberElements())
350 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
"Number Elements not the same as number assembleFE elements." );
352 MultiVectorPtr_Type resVec_d = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(0)->getMapVecFieldRepeated(), 1 ) );
354 BlockMultiVectorPtr_Type resVecRep = Teuchos::rcp(
new BlockMultiVector_Type( 1) );
355 resVecRep->addBlock(resVec_d,0);
357 SmallMatrixPtr_Type elementMatrix;
358 for (UN T=0; T<assemblyFEElements_.size(); T++) {
359 vec_dbl_Type solution(0);
361 solution_d =
getSolution(elements->getElement(T).getVectorNodeList(), d_rep,dofs);
363 solution.insert( solution.end(), solution_d.begin(), solution_d.end() );
365 assemblyFEElements_[T]->updateSolution(solution);
367 assemblyFEElements_[T]->assembleJacobian();
369 elementMatrix = assemblyFEElements_[T]->getJacobian();
371 assemblyFEElements_[T]->advanceNewtonStep();
374 addFeBlock(A, elementMatrix, elements->getElement(T), mapVel, 0, 0, problemDisk);
377 if (callFillComplete)
378 A->getBlock(0,0)->fillComplete( domainVec_.at(0)->getMapVecFieldUnique(),domainVec_.at(0)->getMapVecFieldUnique());
402 MultiVectorPtr_Type d_rep,
403 BlockMatrixPtr_Type &A,
404 BlockMultiVectorPtr_Type &resVec,
405 ParameterListPtr_Type params,
406 bool callFillComplete,
409 ElementsPtr_Type elements = domainVec_.at(0)->getElementsC();
411 int dofsElement = elements->getElement(0).getVectorNodeList().size();
413 vec2D_dbl_ptr_Type pointsRep = domainVec_.at(0)->getPointsRepeated();
415 MapConstPtr_Type map = domainVec_.at(0)->getMapRepeated();
417 vec_dbl_Type solution(0);
418 vec_dbl_Type solution_d;
420 vec_dbl_ptr_Type rhsVec;
428 tuple_disk_vec_ptr_Type problemDisk = Teuchos::rcp(
new tuple_disk_vec_Type(0));
429 tuple_ssii_Type displacement (
"Displacement",FEType,dofs,numNodes);
430 problemDisk->push_back(displacement);
432 int neoHookeNum = params->sublist(
"Parameter").get(
"Neo-Hooke Modell",1);
434 std::string nonLinElasModell =
"NonLinearElasticity2";
436 nonLinElasModell =
"NonLinearElasticity";
441 if(assemblyFEElements_.size()== 0)
442 initAssembleFEElements(nonLinElasModell,problemDisk,elements, params,pointsRep,domainVec_.at(0)->getElementMap());
443 else if(assemblyFEElements_.size() != elements->numberElements())
444 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
"Number Elements not the same as number assembleFE elements." );
447 SmallMatrixPtr_Type elementMatrix;
448 for (UN T=0; T<assemblyFEElements_.size(); T++) {
449 vec_dbl_Type solution(0);
451 solution_d =
getSolution(elements->getElement(T).getVectorNodeList(), d_rep,dofs);
453 solution.insert( solution.end(), solution_d.begin(), solution_d.end() );
455 assemblyFEElements_[T]->updateSolution(solution);
457 assemblyFEElements_[T]->assembleJacobian();
458 elementMatrix = assemblyFEElements_[T]->getJacobian();
459 addFeBlock(A, elementMatrix, elements->getElement(T), map, 0, 0, problemDisk);
461 assemblyFEElements_[T]->assembleRHS();
462 rhsVec = assemblyFEElements_[T]->getRHS();
463 addFeBlockMv(resVec, rhsVec, elements->getElement(T), dofs);
465 assemblyFEElements_[T]->advanceNewtonStep();
469 if (callFillComplete)
470 A->getBlock(0,0)->fillComplete( domainVec_.at(0)->getMapVecFieldUnique(),domainVec_.at(0)->getMapVecFieldUnique());
491 MultiVectorPtr_Type d_rep,
492 BlockMatrixPtr_Type &A,
493 BlockMultiVectorPtr_Type &resVec,
494 ParameterListPtr_Type params,
495 DomainConstPtr_Type domain,
496 MultiVectorPtr_Type eModVec,
497 bool callFillComplete,
500 ElementsPtr_Type elements = domain->getElementsC();
502 int dofsElement = elements->getElement(0).getVectorNodeList().size();
504 vec2D_dbl_ptr_Type pointsRep = domain->getPointsRepeated();
506 MapConstPtr_Type map = domain->getMapRepeated();
508 vec_dbl_Type solution(0);
509 vec_dbl_Type solution_d;
511 vec_dbl_ptr_Type rhsVec;
519 tuple_disk_vec_ptr_Type problemDisk = Teuchos::rcp(
new tuple_disk_vec_Type(0));
520 tuple_ssii_Type displacement (
"Displacement",FEType,dofs,numNodes);
521 problemDisk->push_back(displacement);
523 int neoHookeNum = params->sublist(
"Parameter").get(
"Neo-Hooke Modell",1);
525 std::string nonLinElasModell =
"NonLinearElasticity2";
527 nonLinElasModell =
"NonLinearElasticity";
531 if(assemblyFEElements_.size()== 0)
532 initAssembleFEElements(nonLinElasModell,problemDisk,elements, params,pointsRep,domain->getElementMap());
533 else if(assemblyFEElements_.size() != elements->numberElements())
534 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
"Number Elements not the same as number assembleFE elements." );
536 Teuchos::ArrayRCP<SC> eModVecA = eModVec->getDataNonConst(0);
538 SmallMatrixPtr_Type elementMatrix;
539 for (UN T=0; T<assemblyFEElements_.size(); T++) {
540 vec_dbl_Type solution(0);
542 solution_d =
getSolution(elements->getElement(T).getVectorNodeList(), d_rep,dofs);
544 solution.insert( solution.end(), solution_d.begin(), solution_d.end() );
546 assemblyFEElements_[T]->updateSolution(solution);
547 assemblyFEElements_[T]->updateParameter(
"E",eModVecA[T]);
548 assemblyFEElements_[T]->assembleJacobian();
549 elementMatrix = assemblyFEElements_[T]->getJacobian();
550 addFeBlock(A, elementMatrix, elements->getElement(T), map, 0, 0, problemDisk);
552 assemblyFEElements_[T]->assembleRHS();
553 rhsVec = assemblyFEElements_[T]->getRHS();
554 addFeBlockMv(resVec, rhsVec, elements->getElement(T), dofs);
556 assemblyFEElements_[T]->advanceNewtonStep();
560 if (callFillComplete)
561 A->getBlock(0,0)->fillComplete( domainVec_.at(0)->getMapVecFieldUnique(),domainVec_.at(0)->getMapVecFieldUnique());
593 std::string FETypeChem,
594 std::string FETypeSolid,
598 MultiVectorPtr_Type c_rep,
599 MultiVectorPtr_Type d_rep,
600 BlockMatrixPtr_Type &A,
601 BlockMultiVectorPtr_Type &resVec,
602 ParameterListPtr_Type params,
603 std::string assembleMode,
604 bool callFillComplete,
607 if((FETypeChem !=
"P2") || (FETypeSolid !=
"P2") || dim != 3)
608 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
"No AceGen Implementation available for Discretization and Dimension." );
614 ElementsPtr_Type elementsChem= domainVec_.at(FElocChem)->getElementsC();
616 ElementsPtr_Type elementsSolid = domainVec_.at(FElocSolid)->getElementsC();
622 vec2D_dbl_ptr_Type pointsRep = domainVec_.at(FElocSolid)->getPointsRepeated();
624 MapConstPtr_Type mapChem = domainVec_.at(FElocChem)->getMapRepeated();
626 MapConstPtr_Type mapSolid = domainVec_.at(FElocSolid)->getMapRepeated();
628 vec_dbl_Type solution_c;
629 vec_dbl_Type solution_d;
631 vec_dbl_ptr_Type rhsVec;
636 if(FETypeChem ==
"P2"){
641 if(FETypeChem ==
"P2")
645 if(FETypeSolid ==
"P2")
650 if(FETypeSolid ==
"P2")
653 tuple_disk_vec_ptr_Type problemDisk = Teuchos::rcp(
new tuple_disk_vec_Type(0));
654 tuple_ssii_Type chem (
"Chemistry",FETypeChem,dofsChem,numChem);
655 tuple_ssii_Type solid (
"Solid",FETypeSolid,dofsSolid,numSolid);
656 problemDisk->push_back(solid);
657 problemDisk->push_back(chem);
659 tuple_disk_vec_ptr_Type problemDiskChem = Teuchos::rcp(
new tuple_disk_vec_Type(0));
660 problemDiskChem->push_back(chem);
662 std::string SCIModel = params->sublist(
"Parameter").get(
"Structure Model",
"SCI_simple");
664 if(assemblyFEElements_.size()== 0){
665 initAssembleFEElements(SCIModel,problemDisk,elementsChem, params,pointsRep,domainVec_.at(FElocSolid)->getElementMap());
667 else if(assemblyFEElements_.size() != elementsChem->numberElements())
668 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
"Number Elements not the same as number assembleFE elements." );
672 MultiVectorPtr_Type resVec_c = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(FElocChem)->getMapRepeated(), 1 ) );
673 MultiVectorPtr_Type resVec_d = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(FElocSolid)->getMapVecFieldRepeated(), 1 ) );
675 BlockMultiVectorPtr_Type resVecRep = Teuchos::rcp(
new BlockMultiVector_Type( 2) );
676 resVecRep->addBlock(resVec_d,0);
677 resVecRep->addBlock(resVec_c,1);
685 for (UN T=0; T<assemblyFEElements_.size(); T++) {
686 vec_dbl_Type solution(0);
688 solution_c =
getSolution(elementsChem->getElement(T).getVectorNodeList(), c_rep,dofsChem);
689 solution_d =
getSolution(elementsSolid->getElement(T).getVectorNodeList(), d_rep,dofsSolid);
692 solution.insert( solution.end(), solution_d.begin(), solution_d.end() );
693 solution.insert( solution.end(), solution_c.begin(), solution_c.end() );
695 assemblyFEElements_[T]->updateSolution(solution);
697 SmallMatrixPtr_Type elementMatrix;
709 if(assembleMode ==
"Jacobian"){
710 assemblyFEElements_[T]->assembleJacobian();
712 elementMatrix = assemblyFEElements_[T]->getJacobian();
714 assemblyFEElements_[T]->advanceNewtonStep();
716 addFeBlockMatrix(A, elementMatrix, elementsSolid->getElement(T), elementsSolid->getElement(T), mapSolid, mapChem, problemDisk);
721 if(assembleMode ==
"Rhs"){
722 assemblyFEElements_[T]->assembleRHS();
723 rhsVec = assemblyFEElements_[T]->getRHS();
724 addFeBlockMv(resVecRep, rhsVec, elementsSolid->getElement(T),elementsChem->getElement(T), dofsSolid,dofsChem);
727 if(assembleMode==
"MassMatrix"){
728 assemblyFEElements_[T]->assembleJacobian();
730 AssembleFE_SCI_SMC_Active_Growth_Reorientation_Ptr_Type elTmp = Teuchos::rcp_dynamic_cast<AssembleFE_SCI_SMC_Active_Growth_Reorientation_Type>(assemblyFEElements_[T] );
731 elTmp->getMassMatrix(elementMatrix);
733 addFeBlock(A, elementMatrix, elementsChem->getElement(T), mapChem, 0, 0, problemDiskChem);
742 if ( assembleMode ==
"Jacobian"){
743 A->getBlock(0,0)->fillComplete();
744 A->getBlock(1,0)->fillComplete(domainVec_.at(FElocSolid)->getMapVecFieldUnique(),domainVec_.at(FElocChem)->getMapUnique());
745 A->getBlock(0,1)->fillComplete(domainVec_.at(FElocChem)->getMapUnique(),domainVec_.at(FElocSolid)->getMapVecFieldUnique());
746 A->getBlock(1,1)->fillComplete();
748 else if(assembleMode ==
"Rhs"){
750 MultiVectorPtr_Type resVecUnique_d = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(FElocSolid)->getMapVecFieldUnique(), 1 ) );
751 MultiVectorPtr_Type resVecUnique_c = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(FElocChem)->getMapUnique(), 1 ) );
753 resVecUnique_d->putScalar(0.);
754 resVecUnique_c->putScalar(0.);
756 resVecUnique_d->exportFromVector( resVec_d,
true,
"Add" );
757 resVecUnique_c->exportFromVector( resVec_c,
true,
"Add" );
759 resVec->addBlock(resVecUnique_d,0);
760 resVec->addBlock(resVecUnique_c,1);
762 else if(assembleMode ==
"MassMatrix"){
763 A->getBlock(0,0)->fillComplete();
771 std::string FETypeChem,
772 std::string FETypeSolid,
776 MultiVectorPtr_Type c_rep,
777 MultiVectorPtr_Type d_rep,
778 BlockMatrixPtr_Type &A,
781 BlockMultiVectorPtr_Type &resVec,
783 ParameterListPtr_Type params,
784 std::string assembleMode,
785 bool callFillComplete,
788 if((FETypeChem !=
"P2") || (FETypeSolid !=
"P2") || dim != 3)
789 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
"No AceGen Implementation available for Discretization and Dimension." );
790 if((blockRow != blockCol) && blockRow != 0)
791 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
"Block assemblyDeformDiffu AceGEN Version only implemented for 0,0 block right now" );
796 ElementsPtr_Type elementsChem= domainVec_.at(FElocSolid)->getElementsC();
798 ElementsPtr_Type elementsSolid = domainVec_.at(FElocSolid)->getElementsC();
804 vec2D_dbl_ptr_Type pointsRep = domainVec_.at(FElocSolid)->getPointsRepeated();
808 MapConstPtr_Type mapSolid = domainVec_.at(FElocSolid)->getMapRepeated();
810 vec_dbl_Type solution_c;
811 vec_dbl_Type solution_d;
813 vec_dbl_ptr_Type rhsVec;
818 if(FETypeChem ==
"P2"){
823 if(FETypeChem ==
"P2")
827 if(FETypeSolid ==
"P2")
832 if(FETypeSolid ==
"P2")
835 tuple_disk_vec_ptr_Type problemDisk = Teuchos::rcp(
new tuple_disk_vec_Type(0));
836 tuple_ssii_Type chem (
"Chemistry",FETypeChem,dofsChem,numChem);
837 tuple_ssii_Type solid (
"Solid",FETypeSolid,dofsSolid,numSolid);
838 problemDisk->push_back(solid);
839 problemDisk->push_back(chem);
841 std::string SCIModel = params->sublist(
"Parameter").get(
"Structure Model",
"SCI_simple");
843 if(assemblyFEElements_.size()== 0){
844 initAssembleFEElements(SCIModel,problemDisk,elementsChem, params,pointsRep,domainVec_.at(FElocSolid)->getElementMap());
846 else if(assemblyFEElements_.size() != elementsChem->numberElements())
847 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
"Number Elements not the same as number assembleFE elements." );
852 MultiVectorPtr_Type resVec_d = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(FElocSolid)->getMapVecFieldRepeated(), 1 ) );
854 BlockMultiVectorPtr_Type resVecRep = Teuchos::rcp(
new BlockMultiVector_Type( 1) );
855 resVecRep->addBlock(resVec_d,0);
858 for (UN T=0; T<assemblyFEElements_.size(); T++) {
859 vec_dbl_Type solution(0);
861 solution_c =
getSolution(elementsChem->getElement(T).getVectorNodeList(), c_rep,dofsChem);
862 solution_d =
getSolution(elementsSolid->getElement(T).getVectorNodeList(), d_rep,dofsSolid);
865 solution.insert( solution.end(), solution_d.begin(), solution_d.end() );
866 solution.insert( solution.end(), solution_c.begin(), solution_c.end() );
868 assemblyFEElements_[T]->updateSolution(solution);
870 SmallMatrixPtr_Type elementMatrix;
872 if(assembleMode ==
"Jacobian"){
873 assemblyFEElements_[T]->assembleJacobian();
875 elementMatrix = assemblyFEElements_[T]->getJacobian();
877 assemblyFEElements_[T]->advanceNewtonStep();
878 addFeBlock(A, elementMatrix, elementsSolid->getElement(T), mapSolid, 0, 0, problemDisk);
881 if(assembleMode ==
"Rhs"){
882 assemblyFEElements_[T]->assembleRHS();
883 rhsVec = assemblyFEElements_[T]->getRHS();
884 addFeBlockMv(resVecRep, rhsVec, elementsSolid->getElement(T), dofsSolid);
893 if ( assembleMode !=
"Rhs"){
894 A->getBlock(0,0)->fillComplete();
900 if(assembleMode ==
"Rhs"){
902 MultiVectorPtr_Type resVecUnique_d = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(FElocSolid)->getMapVecFieldUnique(), 1 ) );
905 resVecUnique_d->putScalar(0.);
908 resVecUnique_d->exportFromVector( resVec_d,
true,
"Add" );
911 resVec->addBlock(resVecUnique_d,0);
1027 std::string FETypeVelocity,
1028 std::string FETypePressure,
1032 MultiVectorPtr_Type u_rep,
1033 MultiVectorPtr_Type p_rep,
1034 BlockMatrixPtr_Type &A,
1035 BlockMultiVectorPtr_Type &resVec,
1036 SmallMatrix_Type coeff,
1037 ParameterListPtr_Type params,
1039 std::string assembleMode,
1040 bool callFillComplete,
1044 UN FElocVel =
checkFE(dim,FETypeVelocity);
1045 UN FElocPres =
checkFE(dim,FETypePressure);
1047 ElementsPtr_Type elements = domainVec_.at(FElocVel)->getElementsC();
1049 ElementsPtr_Type elementsPres = domainVec_.at(FElocPres)->getElementsC();
1051 int dofsElement = elements->getElement(0).getVectorNodeList().size();
1053 vec2D_dbl_ptr_Type pointsRep = domainVec_.at(FElocVel)->getPointsRepeated();
1055 MapConstPtr_Type mapVel = domainVec_.at(FElocVel)->getMapRepeated();
1057 MapConstPtr_Type mapPres = domainVec_.at(FElocPres)->getMapRepeated();
1059 vec_dbl_Type solution(0);
1060 vec_dbl_Type solution_u;
1061 vec_dbl_Type solution_p;
1063 vec_dbl_ptr_Type rhsVec;
1068 if(FETypeVelocity ==
"P2")
1073 if(FETypeVelocity ==
"P2")
1076 tuple_disk_vec_ptr_Type problemDisk = Teuchos::rcp(
new tuple_disk_vec_Type(0));
1077 tuple_ssii_Type vel (
"Velocity",FETypeVelocity,dofsVelocity,numVelo);
1078 tuple_ssii_Type pres (
"Pressure",FETypePressure,dofsPressure,dim+1);
1079 problemDisk->push_back(vel);
1080 problemDisk->push_back(pres);
1082 if(assemblyFEElements_.size()== 0){
1083 if(params->sublist(
"Material").get(
"Newtonian",
true) ==
false)
1084 initAssembleFEElements(
"GeneralizedNewtonian",problemDisk,elements, params,pointsRep,domainVec_.at(FElocVel)->getElementMap());
1086 initAssembleFEElements(
"NavierStokes",problemDisk,elements, params,pointsRep,domainVec_.at(FElocVel)->getElementMap());
1088 else if(assemblyFEElements_.size() != elements->numberElements())
1089 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
"Number Elements not the same as number assembleFE elements." );
1093 MultiVectorPtr_Type resVec_u = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(FElocVel)->getMapVecFieldRepeated(), 1 ) );
1094 MultiVectorPtr_Type resVec_p = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(FElocPres)->getMapRepeated(), 1 ) );
1096 BlockMultiVectorPtr_Type resVecRep = Teuchos::rcp(
new BlockMultiVector_Type( 2) );
1097 resVecRep->addBlock(resVec_u,0);
1098 resVecRep->addBlock(resVec_p,1);
1101 for (UN T=0; T<assemblyFEElements_.size(); T++) {
1102 vec_dbl_Type solution(0);
1104 solution_u =
getSolution(elements->getElement(T).getVectorNodeList(), u_rep,dofsVelocity);
1105 solution_p =
getSolution(elementsPres->getElement(T).getVectorNodeList(), p_rep,dofsPressure);
1107 solution.insert( solution.end(), solution_u.begin(), solution_u.end() );
1108 solution.insert( solution.end(), solution_p.begin(), solution_p.end() );
1110 assemblyFEElements_[T]->updateSolution(solution);
1112 SmallMatrixPtr_Type elementMatrix;
1114 if(assembleMode ==
"Jacobian"){
1115 assemblyFEElements_[T]->assembleJacobian();
1117 elementMatrix = assemblyFEElements_[T]->getJacobian();
1119 assemblyFEElements_[T]->advanceNewtonStep();
1122 addFeBlock(A, elementMatrix, elements->getElement(T), mapVel, 0, 0, problemDisk);
1124 addFeBlockMatrix(A, elementMatrix, elements->getElement(T), elementsPres->getElement(T), mapVel, mapPres, problemDisk);
1126 if(assembleMode ==
"FixedPoint"){
1130 if(params->sublist(
"Material").get(
"Newtonian",
true) ==
false)
1132 AssembleFEGeneralizedNewtonianPtr_Type elTmp = Teuchos::rcp_dynamic_cast<AssembleFEGeneralizedNewtonian_Type>( assemblyFEElements_[T] );
1133 elTmp->assembleFixedPoint();
1134 elementMatrix = elTmp->getFixedPointMatrix();
1138 AssembleFENavierStokesPtr_Type elTmp = Teuchos::rcp_dynamic_cast<AssembleFENavierStokes_Type>( assemblyFEElements_[T] );
1139 elTmp->assembleFixedPoint();
1140 elementMatrix = elTmp->getFixedPointMatrix();
1144 assemblyFEElements_[T]->advanceNewtonStep();
1147 addFeBlock(A, elementMatrix, elements->getElement(T), mapVel, 0, 0, problemDisk);
1149 addFeBlockMatrix(A, elementMatrix, elements->getElement(T), elementsPres->getElement(T),mapVel, mapPres, problemDisk);
1152 if(assembleMode ==
"Rhs"){
1153 AssembleFENavierStokesPtr_Type elTmp = Teuchos::rcp_dynamic_cast<AssembleFENavierStokes_Type>(assemblyFEElements_[T] );
1154 elTmp->setCoeff(coeff);
1155 assemblyFEElements_[T]->assembleRHS();
1156 rhsVec = assemblyFEElements_[T]->getRHS();
1157 addFeBlockMv(resVecRep, rhsVec, elements->getElement(T),elementsPres->getElement(T), dofsVelocity,dofsPressure);
1162 if (callFillComplete && reAssemble && assembleMode !=
"Rhs" )
1163 A->getBlock(0,0)->fillComplete( domainVec_.at(FElocVel)->getMapVecFieldUnique(),domainVec_.at(FElocVel)->getMapVecFieldUnique());
1164 else if(callFillComplete && !reAssemble && assembleMode !=
"Rhs"){
1165 A->getBlock(0,0)->fillComplete();
1166 A->getBlock(1,0)->fillComplete(domainVec_.at(FElocVel)->getMapVecFieldUnique(),domainVec_.at(FElocPres)->getMapUnique());
1167 A->getBlock(0,1)->fillComplete(domainVec_.at(FElocPres)->getMapUnique(),domainVec_.at(FElocVel)->getMapVecFieldUnique());
1170 if(assembleMode ==
"Rhs"){
1172 MultiVectorPtr_Type resVecUnique_u = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(FElocVel)->getMapVecFieldUnique(), 1 ) );
1173 MultiVectorPtr_Type resVecUnique_p = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(FElocPres)->getMapUnique(), 1 ) );
1175 resVecUnique_u->putScalar(0.);
1176 resVecUnique_p->putScalar(0.);
1178 resVecUnique_u->exportFromVector( resVec_u,
true,
"Add" );
1179 resVecUnique_p->exportFromVector( resVec_p,
true,
"Add" );
1181 resVec->addBlock(resVecUnique_u,0);
1182 resVec->addBlock(resVecUnique_p,1);
1215 std::string FETypeVelocity,
1216 std::string FETypePressure,
1219 MultiVectorPtr_Type u_rep,
1220 MultiVectorPtr_Type p_rep,
1221 ParameterListPtr_Type params){
1224 UN FElocVel =
checkFE(dim,FETypeVelocity);
1225 UN FElocPres =
checkFE(dim,FETypePressure);
1227 ElementsPtr_Type elements = domainVec_.at(FElocVel)->getElementsC();
1228 ElementsPtr_Type elementsPres = domainVec_.at(FElocPres)->getElementsC();
1230 vec_dbl_Type solution(0);
1231 vec_dbl_Type solution_u;
1232 vec_dbl_Type solution_p;
1233 vec_dbl_Type solution_viscosity;
1236 MultiVectorPtr_Type Sol_viscosity = Teuchos::rcp(
new MultiVector_Type( domainVec_.at(FElocVel)->getElementMap(), 1 ) );
1237 BlockMultiVectorPtr_Type visco_output = Teuchos::rcp(
new BlockMultiVector_Type(1) );
1238 visco_output->addBlock(Sol_viscosity,0);
1241 for (UN T=0; T<assemblyFEElements_.size(); T++) {
1243 vec_dbl_Type solution(0);
1244 solution_u =
getSolution(elements->getElement(T).getVectorNodeList(), u_rep,dofsVelocity);
1245 solution_p =
getSolution(elementsPres->getElement(T).getVectorNodeList(), p_rep,dofsPressure);
1247 solution.insert( solution.end(), solution_u.begin(), solution_u.end() );
1248 solution.insert( solution.end(), solution_p.begin(), solution_p.end() );
1250 assemblyFEElements_[T]->updateSolution(solution);
1252 assemblyFEElements_[T]->computeLocalconstOutputField();
1253 solution_viscosity = assemblyFEElements_[T]->getLocalconstOutputField();
1255 Teuchos::ArrayRCP<SC> resArray_block = visco_output->getBlockNonConst(0)->getDataNonConst(0);
1256 resArray_block[T] = solution_viscosity[0];
1260 this->const_output_fields= visco_output;