37 #ifndef RBFLOCALLYRESCALEDVECTORIAL_H 38 #define RBFLOCALLYRESCALEDVECTORIAL_H 1
40 #include <lifev/core/interpolation/RBFInterpolation.hpp> 44 template <
typename mesh_Type>
99 double rbf (
double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double radius);
182 template <
typename mesh_Type>
186 template <
typename mesh_Type>
190 template <
typename mesh_Type>
200 template <
typename mesh_Type>
203 M_knownField.reset(
new vector_Type ( *KnownField ) );
204 M_unknownField.reset(
new vector_Type ( *UnknownField ) );
205 M_datafile = datafile;
207 M_links = M_datafile(
"interpolation/n_links",1);
210 template <
typename Mesh>
213 this->interpolationOperator();
214 this->projectionOperator();
216 this->interpolateCostantField();
219 template <
typename Mesh>
222 std::vector<
int> dofKnown;
223 dofKnown.reserve ( M_GIdsKnownMesh.size() );
225 std::set<ID>::const_iterator i;
227 for (UInt dim = 0; dim < nDimensions; ++dim)
228 for ( i = M_GIdsKnownMesh.begin(); i != M_GIdsKnownMesh.end(); ++i )
230 dofKnown.push_back ( *i + dim * M_knownField->size()/nDimensions );
233 int* pointerToDofs (0);
234 if (dofKnown.size() > 0)
236 pointerToDofs = &dofKnown[0];
239 M_knownInterfaceMap.reset (
new MapEpetra ( -1,
static_cast<
int> (dofKnown.size() ), pointerToDofs, M_knownField->mapPtr()->commPtr() ) );
242 template <
typename Mesh>
245 std::vector<
int> dofUnknown;
246 dofUnknown.reserve ( M_GIdsUnknownMesh.size() );
248 std::set<ID>::const_iterator i;
250 for (UInt dim = 0; dim < nDimensions; ++dim)
251 for ( i = M_GIdsUnknownMesh.begin(); i != M_GIdsUnknownMesh.end(); ++i )
253 dofUnknown.push_back ( *i + dim * M_unknownField->size()/nDimensions );
256 int* pointerToDofs (0);
257 if (dofUnknown.size() > 0)
259 pointerToDofs = &dofUnknown[0];
262 M_unknownInterfaceMap.reset (
new MapEpetra ( -1,
static_cast<
int> (dofUnknown.size() ), pointerToDofs, M_unknownField->mapPtr()->commPtr() ) );
265 template <
typename Mesh>
268 std::set<ID>::const_iterator ITrow;
270 Int numtasks = M_knownField->mapPtr()->commPtr()->NumProc();
271 int* numInterfaceDof (
new int[numtasks]);
272 int pid = M_knownField->mapPtr()->commPtr()->MyPID();
276 numMyElements = M_knownInterfaceMap->map (Unique)->NumMyElements();
277 numInterfaceDof[pid] = numMyElements;
280 subMap.reset (
new map_Type ( *M_knownInterfaceMap->map (Unique), (UInt) 0, M_knownField->size()/nDimensions) );
282 M_numerationInterfaceKnown.reset (
new VectorEpetra (*subMap, Unique) );
284 for (
int j = 0; j < numtasks; ++j)
286 M_knownField->mapPtr()->commPtr()->Broadcast ( &numInterfaceDof[j], 1, j);
289 for (
int j = numtasks - 1; j > 0 ; --j)
291 numInterfaceDof[j] = numInterfaceDof[j - 1];
293 numInterfaceDof[0] = 0;
294 for (
int j = 1; j < numtasks ; ++j)
296 numInterfaceDof[j] += numInterfaceDof[j - 1];
301 Real M_interface = (UInt) M_knownInterfaceMap->map (Unique)->NumGlobalElements() / nDimensions;
302 for (l = 0, ITrow = M_GIdsKnownMesh.begin(); ITrow != M_GIdsKnownMesh.end() ; ++ITrow)
304 if (M_knownInterfaceMap->map (Unique)->LID (
static_cast<EpetraInt_Type> (*ITrow) ) >= 0)
306 (*M_numerationInterfaceKnown) [*ITrow ] = l + (
int) (numInterfaceDof[pid] / nDimensions);
307 if ( (
int) (*M_numerationInterfaceKnown) (*ITrow ) != floor (l + numInterfaceDof[pid] / nDimensions + 0.2) )
309 std::cout <<
"ERROR! the numeration of the coupling map is not correct" << std::endl;
315 M_numerationInterfaceKnownColumns.resize(numtasks);
317 for (
int j = 0; j < numtasks ; ++j)
318 (M_numerationInterfaceKnownColumns[j]).reset(
new vector_Type ( *M_numerationInterfaceKnown, j ) );
320 std::vector<
int> couplingVector;
321 couplingVector.reserve ( (
int) (M_knownInterfaceMap->map (Unique)->NumMyElements() ) );
323 for ( ITrow = M_GIdsKnownMesh.begin(); ITrow != M_GIdsKnownMesh.end() ; ++ITrow)
325 if (M_knownInterfaceMap->map (Unique)->LID (
static_cast<EpetraInt_Type> (*ITrow) ) >= 0)
327 couplingVector.push_back ( (*M_numerationInterfaceKnown) (*ITrow ) );
331 M_interpolationOperatorMap.reset (
new MapEpetra (-1,
static_cast< Int> ( couplingVector.size() ), &couplingVector[0], M_knownField->mapPtr()->commPtr() ) );
333 M_interpolationOperatorMapVectorial.reset (
new MapEpetra ( *M_interpolationOperatorMap ) );
334 *M_interpolationOperatorMapVectorial += *M_interpolationOperatorMap;
335 *M_interpolationOperatorMapVectorial += *M_interpolationOperatorMap;
337 delete [] numInterfaceDof;
340 template <
typename Mesh>
343 std::set<ID>::const_iterator ITrow;
345 Int numtasks = M_unknownField->mapPtr()->commPtr()->NumProc();
346 int* numInterfaceDof (
new int[numtasks]);
347 int pid = M_unknownField->mapPtr()->commPtr()->MyPID();
350 numMyElements = M_unknownInterfaceMap->map (Unique)->NumMyElements();
351 numInterfaceDof[pid] = numMyElements;
354 subMap.reset (
new map_Type ( *M_unknownInterfaceMap->map (Unique), (UInt) 0, M_unknownField->size()/nDimensions) );
356 M_numerationInterfaceUnknown.reset (
new VectorEpetra (*subMap, Unique) );
358 for (
int j = 0; j < numtasks; ++j)
360 M_unknownField->mapPtr()->commPtr()->Broadcast ( &numInterfaceDof[j], 1, j);
363 for (
int j = numtasks - 1; j > 0 ; --j)
365 numInterfaceDof[j] = numInterfaceDof[j - 1];
367 numInterfaceDof[0] = 0;
368 for (
int j = 1; j < numtasks ; ++j)
370 numInterfaceDof[j] += numInterfaceDof[j - 1];
375 Real M_interface = (UInt) M_unknownInterfaceMap->map (Unique)->NumGlobalElements() / nDimensions;
376 for (l = 0, ITrow = M_GIdsUnknownMesh.begin(); ITrow != M_GIdsUnknownMesh.end() ; ++ITrow)
378 if (M_unknownInterfaceMap->map (Unique)->LID (
static_cast<EpetraInt_Type> (*ITrow) ) >= 0)
380 (*M_numerationInterfaceUnknown) [*ITrow ] = l + (
int) (numInterfaceDof[pid] / nDimensions);
381 if ( (
int) (*M_numerationInterfaceUnknown) (*ITrow ) != floor (l + numInterfaceDof[pid] / nDimensions + 0.2) )
383 std::cout <<
"ERROR! the numeration of the coupling map is not correct" << std::endl;
389 std::vector<
int> couplingVector;
390 couplingVector.reserve ( (
int) (M_unknownInterfaceMap->map (Unique)->NumMyElements() ) );
392 for ( ITrow = M_GIdsUnknownMesh.begin(); ITrow != M_GIdsUnknownMesh.end() ; ++ITrow)
394 if (M_unknownInterfaceMap->map (Unique)->LID (
static_cast<EpetraInt_Type> (*ITrow) ) >= 0)
396 couplingVector.push_back ( (*M_numerationInterfaceUnknown) (*ITrow ) );
400 M_projectionOperatorMap.reset (
new MapEpetra (-1,
static_cast< Int> ( couplingVector.size() ), &couplingVector[0], M_unknownField->mapPtr()->commPtr() ) );
402 M_projectionOperatorMapVectorial.reset (
new MapEpetra ( *M_projectionOperatorMap ) );
403 *M_projectionOperatorMapVectorial += *M_projectionOperatorMap;
404 *M_projectionOperatorMapVectorial += *M_projectionOperatorMap;
406 delete [] numInterfaceDof;
409 template <
typename Mesh>
413 this->identifyNodes (M_localMeshKnown, M_GIdsKnownMesh, M_knownField);
423 M_neighbors.reset (
new neighboring_Type ( M_fullMeshKnown, M_localMeshKnown, M_knownField->mapPtr(), M_knownField->mapPtr()->commPtr() ) );
426 M_neighbors->setUpNeighbors ();
431 M_neighbors->createPointPointNeighborsList (M_flags);
434 int LocalNodesNumber = M_GIdsKnownMesh.size();
436 std::vector<
double> RBF_radius (LocalNodesNumber);
437 std::vector<std::unordered_set<ID> > MatrixGraph (LocalNodesNumber);
438 int* GlobalID =
new int[LocalNodesNumber];
443 for (std::set<ID>::iterator it = M_GIdsKnownMesh.begin(); it != M_GIdsKnownMesh.end(); ++it)
449 neighbors_Type Neighbors;
450 Neighbors = M_neighbors->circleNeighbors ( *it, M_links );
451 Neighbors.insert ( *it );
452 MatrixGraph[k] = Neighbors;
454 RBF_radius[k] = computeRBFradius ( M_fullMeshKnown, M_fullMeshKnown, Neighbors, GlobalID[k]);
455 neighbors_Type NeighborsR;
456 NeighborsR = M_neighbors->neighborsWithinRadius ( GlobalID[k], RBF_radius[k] );
457 NeighborsR.insert ( GlobalID[k] );
458 MatrixGraph[k] = NeighborsR;
464 M_interpolationOperator.reset (
new matrix_Type (*M_interpolationOperatorMap, 100) );
467 M_interpolationOperator->zero();
470 for (
int i = 0 ; i < LocalNodesNumber; ++i )
473 for ( std::unordered_set<ID>::iterator it = MatrixGraph[i].begin(); it != MatrixGraph[i].end(); ++it)
475 Values = rbf ( M_fullMeshKnown->point (GlobalID[i]).x(),
476 M_fullMeshKnown->point (GlobalID[i]).y(),
477 M_fullMeshKnown->point (GlobalID[i]).z(),
478 M_fullMeshKnown->point (*it).x(),
479 M_fullMeshKnown->point (*it).y(),
480 M_fullMeshKnown->point (*it).z(),
483 M_interpolationOperator->addToCoefficient( (*M_numerationInterfaceKnown)( GlobalID[i] ),
484 (*(M_numerationInterfaceKnownColumns[M_pid]))(*it),
489 M_interpolationOperator->globalAssemble();
495 template <
typename mesh_Type>
499 this->identifyNodes (M_localMeshUnknown, M_GIdsUnknownMesh, M_unknownField);
506 int LocalNodesNumber = M_GIdsUnknownMesh.size();
508 std::vector<
double> RBF_radius (LocalNodesNumber);
509 std::vector<std::unordered_set<ID> > MatrixGraph (LocalNodesNumber);
510 int* GlobalID =
new int[LocalNodesNumber];
518 for (std::set<ID>::iterator it = M_GIdsUnknownMesh.begin(); it != M_GIdsUnknownMesh.end(); ++it)
522 for (
int j = 0; j < M_fullMeshKnown->numVertices(); ++j)
524 if ( M_flags[0] == -1 ||
this->isInside (M_fullMeshKnown->point (j).markerID(), M_flags) )
526 d = std::sqrt ( ( M_fullMeshKnown->point (j).x() - M_fullMeshUnknown->point (GlobalID[k]).x() ) *
527 ( M_fullMeshKnown->point (j).x() - M_fullMeshUnknown->point (GlobalID[k]).x() ) +
528 ( M_fullMeshKnown->point (j).y() - M_fullMeshUnknown->point (GlobalID[k]).y() ) *
529 ( M_fullMeshKnown->point (j).y() - M_fullMeshUnknown->point (GlobalID[k]).y() ) +
530 ( M_fullMeshKnown->point (j).z() - M_fullMeshUnknown->point (GlobalID[k]).z() ) *
531 ( M_fullMeshKnown->point (j).z() - M_fullMeshUnknown->point (GlobalID[k]).z() ) );
535 nearestPoint = M_fullMeshKnown->point (j).id();
541 neighbors_Type Neighbors;
542 Neighbors = M_neighbors->circleNeighbors ( nearestPoint, M_links );
543 Neighbors.insert ( nearestPoint );
545 RBF_radius[k] = computeRBFradius ( M_fullMeshKnown, M_fullMeshUnknown, Neighbors, GlobalID[k]);
546 neighbors_Type NeighborsR;
547 NeighborsR = M_neighbors->neighborsWithinRadius ( nearestPoint, RBF_radius[k] );
548 NeighborsR.insert ( nearestPoint );
549 MatrixGraph[k] = NeighborsR;
553 M_projectionOperator.reset (
new matrix_Type (*M_projectionOperatorMap, 100) );
557 for (
int i = 0 ; i < LocalNodesNumber; ++i )
559 for ( std::unordered_set<ID>::iterator it = MatrixGraph[i].begin(); it != MatrixGraph[i].end(); ++it)
561 Values = rbf ( M_fullMeshUnknown->point (GlobalID[i]).x(),
562 M_fullMeshUnknown->point (GlobalID[i]).y(),
563 M_fullMeshUnknown->point (GlobalID[i]).z(),
564 M_fullMeshKnown->point (*it).x(),
565 M_fullMeshKnown->point (*it).y(),
566 M_fullMeshKnown->point (*it).z(),
569 M_projectionOperator->addToCoefficient( (*M_numerationInterfaceUnknown)( GlobalID[i] ),
570 (*(M_numerationInterfaceKnownColumns[M_pid]))(*it),
574 M_projectionOperator->globalAssemble (M_interpolationOperatorMap, M_projectionOperatorMap);
579 template <
typename mesh_Type>
584 for (idContainer_Type::iterator it = Neighbors.begin(); it != Neighbors.end(); ++it)
586 r = std::sqrt ( ( MeshGID->point ( GlobalID ).x() - MeshNeighbors->point ( *it ).x() ) *
587 ( MeshGID->point ( GlobalID ).x() - MeshNeighbors->point ( *it ).x() ) +
588 ( MeshGID->point ( GlobalID ).y() - MeshNeighbors->point ( *it ).y() ) *
589 ( MeshGID->point ( GlobalID ).y() - MeshNeighbors->point ( *it ).y() ) +
590 ( MeshGID->point ( GlobalID ).z() - MeshNeighbors->point ( *it ).z() ) *
591 ( MeshGID->point ( GlobalID ).z() - MeshNeighbors->point ( *it ).z() ) );
592 r_max = ( r > r_max ) ? r : r_max;
597 template <
typename mesh_Type>
600 M_RhsOne.reset (
new vector_Type (*M_interpolationOperatorMap) );
603 M_RhsF1.reset (
new vector_Type (*M_interpolationOperatorMap) );
604 M_RhsF2.reset (
new vector_Type (*M_interpolationOperatorMap) );
605 M_RhsF3.reset (
new vector_Type (*M_interpolationOperatorMap) );
607 UInt offset = M_knownField->size()/3;
609 for(
int i = 0; i < M_numerationInterfaceKnown->epetraVector().MyLength(); ++i)
611 (*M_RhsF1)[(*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)]]
612 = (*M_knownField)(M_numerationInterfaceKnown->blockMap().GID(i));
614 (*M_RhsF2)[(*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)]]
615 = (*M_knownField)(M_numerationInterfaceKnown->blockMap().GID(i) + offset);
617 (*M_RhsF3)[(*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)]]
618 = (*M_knownField)(M_numerationInterfaceKnown->blockMap().GID(i) + 2*offset);
625 template <
typename mesh_Type>
629 gamma_one.reset (
new vector_Type (*M_interpolationOperatorMap) );
635 precRawPtr->setDataFromGetPot ( M_datafile,
"prec" );
636 precPtr.reset ( precRawPtr );
638 LinearSolver solverOne;
639 solverOne.setCommunicator ( M_knownField->mapPtr()->commPtr() );
640 solverOne.setParameters ( *M_belosList );
641 solverOne.setPreconditioner ( precPtr );
644 solverOne.setRightHandSide (
M_RhsOne );
645 solverOne.solve ( gamma_one );
647 M_rbf_one.reset (
new vector_Type (*M_projectionOperatorMap) );
648 M_projectionOperator->multiply (
false, *gamma_one, *M_rbf_one);
651 template <
typename mesh_Type>
655 gamma_f1.reset (
new vector_Type (*M_interpolationOperatorMap) );
658 gamma_f2.reset (
new vector_Type (*M_interpolationOperatorMap) );
661 gamma_f3.reset (
new vector_Type (*M_interpolationOperatorMap) );
667 precRawPtr->setDataFromGetPot ( M_datafile,
"prec" );
668 precPtr.reset ( precRawPtr );
671 LinearSolver solverRBF1;
672 solverRBF1.setCommunicator ( M_knownField->mapPtr()->commPtr() );
673 solverRBF1.setParameters ( *M_belosList );
674 solverRBF1.setPreconditioner ( precPtr );
677 solverRBF1.setRightHandSide (
M_RhsF1);
678 solverRBF1.solve (gamma_f1);
681 LinearSolver solverRBF2;
682 solverRBF2.setCommunicator ( M_knownField->mapPtr()->commPtr() );
683 solverRBF2.setParameters ( *M_belosList );
684 solverRBF2.setPreconditioner ( precPtr );
687 solverRBF2.setRightHandSide (
M_RhsF2);
688 solverRBF2.solve (gamma_f2);
691 LinearSolver solverRBF3;
692 solverRBF3.setCommunicator ( M_knownField->mapPtr()->commPtr() );
693 solverRBF3.setParameters ( *M_belosList );
694 solverRBF3.setPreconditioner ( precPtr );
697 solverRBF3.setRightHandSide (
M_RhsF3);
698 solverRBF3.solve (gamma_f3);
701 rbf_f1.reset (
new vector_Type (*M_projectionOperatorMap) );
704 solution1.reset (
new vector_Type (*M_projectionOperatorMap) );
706 M_projectionOperator->multiply (
false, *gamma_f1, *rbf_f1);
709 *solution1 = *rbf_f1;
710 *solution1 /= *M_rbf_one;
713 rbf_f2.reset (
new vector_Type (*M_projectionOperatorMap) );
716 solution2.reset (
new vector_Type (*M_projectionOperatorMap) );
718 M_projectionOperator->multiply (
false, *gamma_f2, *rbf_f2);
721 *solution2 = *rbf_f2;
722 *solution2 /= *M_rbf_one;
725 rbf_f3.reset (
new vector_Type (*M_projectionOperatorMap) );
728 solution3.reset (
new vector_Type (*M_projectionOperatorMap) );
730 M_projectionOperator->multiply (
false, *gamma_f3, *rbf_f3);
733 *solution3 = *rbf_f3;
734 *solution3 /= *M_rbf_one;
738 UInt offset = M_unknownField->size()/3;
740 for(
int i = 0; i < M_numerationInterfaceUnknown->epetraVector().MyLength(); ++i)
742 (*M_unknownField)[M_numerationInterfaceUnknown->blockMap().GID(i)]
743 = (*solution1)((*M_numerationInterfaceUnknown)[M_numerationInterfaceUnknown->blockMap().GID(i)]);
745 (*M_unknownField)[M_numerationInterfaceUnknown->blockMap().GID(i) + offset]
746 = (*solution2)((*M_numerationInterfaceUnknown)[M_numerationInterfaceUnknown->blockMap().GID(i)]);
748 (*M_unknownField)[M_numerationInterfaceUnknown->blockMap().GID(i) + 2*offset]
749 = (*solution3)((*M_numerationInterfaceUnknown)[M_numerationInterfaceUnknown->blockMap().GID(i)]);
757 M_solutionOnGamma.reset (
new vector_Type ( *M_projectionOperatorMapVectorial ) );
758 M_solutionOnGamma->zero();
760 UInt offsetScalar = M_solutionOnGamma->size()/3;
762 M_solutionOnGamma->subset(*solution1, *M_projectionOperatorMap, 0, 0);
763 M_solutionOnGamma->subset(*solution2, *M_projectionOperatorMap, 0, offsetScalar );
764 M_solutionOnGamma->subset(*solution3, *M_projectionOperatorMap, 0, 2*offsetScalar);
768 template <
typename mesh_Type>
796 template <
typename mesh_Type>
801 for ( UInt i = 0; i < LocalMesh->numVertices(); ++i )
802 if (CheckVector->blockMap().LID (
static_cast<EpetraInt_Type> ( LocalMesh->point (i).id() ) ) != -1)
804 GID_nodes.insert (LocalMesh->point (i).id() );
817 for ( UInt i = 0; i < LocalMesh->numVertices(); ++i )
818 if (
this->isInside (LocalMesh->point (i).markerID(), M_flags) )
819 if (CheckVector->blockMap().LID (
static_cast<EpetraInt_Type> (LocalMesh->point (i).id()) ) != -1)
821 GID_nodes.insert (LocalMesh->point (i).id() );
826 template <
typename mesh_Type>
830 for (UInt i = 0; i < flags.size(); ++i)
831 if (pointMarker == flags[i])
839 template <
typename mesh_Type>
842 double distance = std::sqrt ( (x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2) + (z1 - z2)*(z1 - z2) );
843 return (1 - distance / radius) * (1 - distance / radius) * (1 - distance / radius) * (1 - distance / radius) * (4 * distance / radius + 1);
846 template <
typename mesh_Type>
853 UInt offset = M_knownField->size()/3;
855 for(
int i = 0; i < M_numerationInterfaceKnown->epetraVector().MyLength(); ++i)
857 (*M_RhsF1)[(*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)]]
858 = (*newRhs)(M_numerationInterfaceKnown->blockMap().GID(i));
860 (*M_RhsF2)[(*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)]]
861 = (*newRhs)(M_numerationInterfaceKnown->blockMap().GID(i) + offset);
863 (*M_RhsF3)[(*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)]]
864 = (*newRhs)(M_numerationInterfaceKnown->blockMap().GID(i) + 2*offset);
871 template <
typename mesh_Type>
874 vectorOnOmega.reset (
new vector_Type ( M_knownField->map() ) );
875 vectorOnOmega->zero();
877 UInt offset = vectorOnOmega->size()/3;
878 UInt offsetGamma = vectorOnGamma->size()/3;
880 for(
int i = 0; i < M_numerationInterfaceKnown->epetraVector().MyLength(); ++i)
882 (*vectorOnOmega)[M_numerationInterfaceKnown->blockMap().GID(i)]
883 = (*vectorOnGamma)((*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)]);
885 (*vectorOnOmega)[M_numerationInterfaceKnown->blockMap().GID(i) + offset]
886 = (*vectorOnGamma)((*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)] + offsetGamma );
888 (*vectorOnOmega)[M_numerationInterfaceKnown->blockMap().GID(i) + 2*offset]
889 = (*vectorOnGamma)((*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)] + 2*offsetGamma);
896 template <
typename mesh_Type>
899 vectorOnGamma.reset (
new vector_Type ( *M_interpolationOperatorMapVectorial ) );
900 vectorOnGamma->zero();
902 UInt offset = vectorOnOmega->size()/3;
903 UInt offsetGamma = vectorOnGamma->size()/3;
905 for(
int i = 0; i < M_numerationInterfaceKnown->epetraVector().MyLength(); ++i)
907 (*vectorOnGamma)[(*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)]]
908 = (*vectorOnOmega)(M_numerationInterfaceKnown->blockMap().GID(i));
910 (*vectorOnGamma)[(*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)] + offsetGamma ]
911 = (*vectorOnOmega)(M_numerationInterfaceKnown->blockMap().GID(i) + offset);
913 (*vectorOnGamma)[(*M_numerationInterfaceKnown)[M_numerationInterfaceKnown->blockMap().GID(i)] + 2*offsetGamma ]
914 = (*vectorOnOmega)(M_numerationInterfaceKnown->blockMap().GID(i) + 2*offset);
922 template <
typename mesh_Type>
926 *Solution += *M_unknownField;
929 template <
typename mesh_Type>
938 template <
typename mesh_Type>
std::vector< vectorPtr_Type > M_numerationInterfaceKnownColumns
virtual ~RBFlocallyRescaledVectorial()
std::shared_ptr< matrix_Type > matrixPtr_Type
meshPtr_Type M_fullMeshKnown
meshPtr_Type M_fullMeshUnknown
void solutionrbf(vectorPtr_Type &Solution_rbf)
static bool S_registerTetLRV
vectorPtr_Type M_unknownField
void solution(vectorPtr_Type &Solution)
mapPtr_Type M_interpolationOperatorMapVectorial
mapPtr_Type M_knownInterfaceMap
bool isInside(ID pointMarker, flagContainer_Type Flags)
meshPtr_Type M_localMeshUnknown
std::shared_ptr< MapEpetra > mapPtr_Type
void getKnownInterfaceMap(mapPtr_Type &map)
std::shared_ptr< prec_Type > precPtr_Type
void projectionOperator()
flagContainer_Type M_flags
int32_type Int
Generic integer data.
void getVectorialInterpolationMap(mapPtr_Type &map)
MatrixEpetra< double > matrix_Type
neighboringPtr_Type M_neighbors
void identifyNodes(meshPtr_Type LocalMesh, std::set< ID > &GID_nodes, vectorPtr_Type CheckVector)
static const LifeV::UInt elm_nodes_num[]
parameterList_Type M_belosList
matrixPtr_Type M_projectionOperator
std::unordered_set< ID > idContainer_Type
void setup(meshPtr_Type fullMeshKnown, meshPtr_Type localMeshKnown, meshPtr_Type fullMeshUnknown, meshPtr_Type localMeshUnknown, flagContainer_Type flags)
std::vector< int > flagContainer_Type
Teuchos::RCP< Teuchos::ParameterList > parameterList_Type
std::shared_ptr< basePrec_Type > basePrecPtr_Type
void buildUnknownVectorialInterfaceMap()
Epetra_Import const & importer()
Getter for the Epetra_Import.
LifeV::Preconditioner basePrec_Type
vectorPtr_Type M_numerationInterfaceUnknown
void expandGammaToOmega_Known(const vectorPtr_Type &vectorOnGamma, vectorPtr_Type &vectorOnOmega)
void getNumerationInterfaceKnown(vectorPtr_Type &vector)
LifeV::PreconditionerIfpack prec_Type
double computeRBFradius(meshPtr_Type MeshNeighbors, meshPtr_Type MeshGID, idContainer_Type Neighbors, ID GlobalID)
void getprojectionOperatorMap(mapPtr_Type &map)
std::shared_ptr< mesh_Type > meshPtr_Type
void buildProjectionOperatorMap()
mapPtr_Type M_projectionOperatorMap
void buildKnownInterfaceMap()
std::shared_ptr< neighboring_Type > neighboringPtr_Type
mapPtr_Type M_interpolationOperatorMap
mapPtr_Type M_projectionOperatorMapVectorial
void setupRBFData(vectorPtr_Type KnownField, vectorPtr_Type UnknownField, GetPot datafile, parameterList_Type belosList)
vectorPtr_Type M_solutionOnGamma
matrixPtr_Type M_interpolationOperatorVecMap
void getSolutionOnGamma(vectorPtr_Type &GammaSolution)
double Real
Generic real data.
vectorPtr_Type M_numerationInterfaceKnown
void interpolateCostantField()
RBFInterpolation< mesh_Type > * createRBFlocallyRescaledVectorial()
Factory create function.
std::shared_ptr< vector_Type > vectorPtr_Type
void getInterpolationOperatorMap(mapPtr_Type &map)
static bool S_registerTriLRV
double rbf(double x1, double y1, double z1, double x2, double y2, double z2, double radius)
mapPtr_Type M_gammaMapUnknownVectorial
void restrictOmegaToGamma_Known(const vectorPtr_Type &vectorOnOmega, vectorPtr_Type &vectorOnGamma)
std::set< ID > M_GIdsKnownMesh
meshPtr_Type M_localMeshKnown
vectorPtr_Type M_unknownField_rbf
RBFlocallyRescaledVectorial()
vectorPtr_Type M_knownField
matrixPtr_Type M_interpolationOperator
void buildInterpolationOperatorMap()
void buildUnknownInterfaceMap()
void interpolationOperator()
void importFromHDF5(std::string const &fileName="ghostmap")
Import neighbor lists to an hdf5 file.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
void updateRhs(const vectorPtr_Type &newRhs)
GhostHandler< mesh_Type > neighboring_Type
mapPtr_Type M_unknownInterfaceMap
std::set< ID > M_GIdsUnknownMesh
matrixPtr_Type M_projectionOperatorVecMap