| 736 | } // buildGhostedSolutionVector |
| 737 | |
| 738 | std::unique_ptr<PetscVector<double>> |
| 739 | FEDataManager::buildIBGhostedVector(const std::string& system_name) |
| 740 | { |
| 741 | IBTK_TIMER_START(t_build_ghosted_vector); |
| 742 | |
| 743 | reinitializeIBGhostedDOFs(system_name); |
| 744 | TBOX_ASSERT(d_system_ib_ghost_vec.find(system_name) != d_system_ib_ghost_vec.end()); |
| 745 | const std::unique_ptr<PetscVector<double>>& exemplar_ib_vector = d_system_ib_ghost_vec.at(system_name); |
| 746 | TBOX_ASSERT(exemplar_ib_vector); |
| 747 | // Sanity check: |
| 748 | const System& system = d_fe_data->d_es->get_system(system_name); |
| 749 | if (system.solution->local_size() != exemplar_ib_vector->local_size()) |
| 750 | { |
| 751 | TBOX_ERROR( |
| 752 | "The locally stored example IB vector does not have the same local size as the relevant system's solution " |
| 753 | "vector. This usually occurs when the finite element data has been modified (e.g., the mesh has been " |
| 754 | "refined) outside of one of IBAMR's classes (like FEDataManager or IBFEMethod)."); |
| 755 | } |
| 756 | |
| 757 | std::unique_ptr<NumericVector<double>> clone = exemplar_ib_vector->zero_clone(); |
| 758 | auto ptr = dynamic_cast<PetscVector<double>*>(clone.release()); |
| 759 | TBOX_ASSERT(ptr); |
| 760 | |
| 761 | IBTK_TIMER_STOP(t_build_ghosted_vector); |
| 762 | return std::unique_ptr<PetscVector<double>>(ptr); |
| 763 | } |
| 764 | |
| 765 | NumericVector<double>* |
| 766 | FEDataManager::getCoordsVector() const |
no test coverage detected