MCPcopy Create free account
hub / github.com/IBAMR/IBAMR / buildIBGhostedVector

Method buildIBGhostedVector

ibtk/src/lagrangian/FEDataManager.cpp:738–763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

736} // buildGhostedSolutionVector
737
738std::unique_ptr<PetscVector<double>>
739FEDataManager::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
765NumericVector<double>*
766FEDataManager::getCoordsVector() const

Callers 5

interpolateVariablesMethod · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 4

findMethod · 0.80
releaseMethod · 0.80
endMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected