Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F76445742
cohesive_element_inserter_parallel.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 8, 00:35
Size
2 KB
Mime Type
text/x-c
Expires
Sat, Aug 10, 00:35 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19652615
Attached To
rAKA akantu
cohesive_element_inserter_parallel.cc
View Options
/**
* @file cohesive_element_inserter_parallel.cc
*
* @author Marco Vocialta <marco.vocialta@epfl.ch>
*
*
* @brief Parallel functions for the cohesive element inserter
*
* @section LICENSE
*
* Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
*/
/* -------------------------------------------------------------------------- */
#include "cohesive_element_inserter.hh"
#include "global_ids_updater.hh"
/* -------------------------------------------------------------------------- */
namespace akantu {
/* -------------------------------------------------------------------------- */
void CohesiveElementInserter::initParallel(ElementSynchronizer & synchronizer) {
global_ids_updater = std::make_unique<GlobalIdsUpdater>(mesh, synchronizer);
}
/* -------------------------------------------------------------------------- */
void CohesiveElementInserter::updateNodesType(Mesh & /*mesh*/,
NewNodesEvent & /*node_event*/) {
AKANTU_DEBUG_IN();
// Array<UInt> & doubled_nodes = node_event.getList();
// UInt local_nb_new_nodes = doubled_nodes.getSizeSize();
// Array<Int> & nodes_type = mesh.getNodesType();
// UInt nb_old_nodes = nodes_type.getSize();
// nodes_type.resize(nb_old_nodes + local_nb_new_nodes);
// for (UInt n = 0; n < local_nb_new_nodes; ++n) {
// UInt old_node = doubled_nodes(n, 0);
// UInt new_node = doubled_nodes(n, 1);
// nodes_type(new_node) = nodes_type(old_node);
// }
AKANTU_DEBUG_OUT();
}
/* -------------------------------------------------------------------------- */
UInt CohesiveElementInserter::updateGlobalIDs(NewNodesEvent & node_event) {
AKANTU_DEBUG_IN();
Array<UInt> & doubled_nodes = node_event.getList();
UInt total_nb_new_nodes
= global_ids_updater->updateGlobalIDsLocally(doubled_nodes.size());
AKANTU_DEBUG_OUT();
return total_nb_new_nodes;
}
void CohesiveElementInserter::synchronizeGlobalIDs(NewNodesEvent & /*node_event*/) {
AKANTU_DEBUG_IN();
global_ids_updater->synchronizeGlobalIDs();
AKANTU_DEBUG_OUT();
}
} // namespace akantu
Event Timeline
Log In to Comment