Exemple #1
0
template<> void dataStore(std::ostream & stream, GrainTracker::BoundingSphereInfo * & bound_sphere_info, void * context)
{
  mooseAssert(bound_sphere_info, "Sphere pointer is NULL");
  storeHelper(stream, bound_sphere_info->member_node_id, context);
  storeHelper(stream, bound_sphere_info->b_sphere.center(), context);
  storeHelper(stream, bound_sphere_info->b_sphere.radius(), context);
}
Exemple #2
0
template<> void dataStore(std::ostream & stream, GrainTracker::UniqueGrain * & unique_grain, void * context)
{
  mooseAssert(unique_grain, "Unique Grain Pointer is NULL");

  storeHelper(stream, unique_grain->variable_idx, context);
  storeHelper(stream, unique_grain->status, context);
  storeHelper(stream, unique_grain->sphere_ptrs, context);

  // We do not need to store the entities_ptrs structure. This information is not necessary for restart.
}
Exemple #3
0
void
dataStore(std::ostream & stream, FormattedTable & table, void * context)
{
  storeHelper(stream, table._data, context);
  storeHelper(stream, table._column_names, context);

  // Don't store these
  // _output_file
  // _stream_open

  storeHelper(stream, table._last_key, context);
}
Exemple #4
0
void dataStore(std::ostream & stream, FeatureFloodCount::FeatureData & feature, void * context)
{
  storeHelper(stream, feature._ghosted_ids, context);
  storeHelper(stream, feature._halo_ids, context);
  storeHelper(stream, feature._periodic_nodes, context);
  storeHelper(stream, feature._var_idx, context);
  storeHelper(stream, feature._bboxes, context);
  storeHelper(stream, feature._min_entity_id, context);
  storeHelper(stream, feature._status, context);
  storeHelper(stream, feature._merged, context);
  storeHelper(stream, feature._intersects_boundary, context);
}
Exemple #5
0
void
SlopeLimitingBase::serialize(std::string & serialized_buffer)
{
  std::ostringstream oss;

  // First store the number of elements to send
  unsigned int size = _interface_elem_ids.size();
  oss.write((char *)&size, sizeof(size));

  for (auto it = _interface_elem_ids.begin(); it != _interface_elem_ids.end(); ++it)
  {
    storeHelper(oss, *it, this);
    storeHelper(oss, _lslope[*it], this);
  }

  // Populate the passed in string pointer with the string stream's buffer contents
  serialized_buffer.assign(oss.str());
}
Exemple #6
0
void dataStore(std::ostream & stream, FeatureFloodCount::FeatureData & feature, void * context)
{
  /**
   * Not that _local_ids is not stored here. It's not needed for restart, and not needed
   * during the parallel merge operation
   */
  storeHelper(stream, feature._ghosted_ids, context);
  storeHelper(stream, feature._halo_ids, context);
  storeHelper(stream, feature._periodic_nodes, context);
  storeHelper(stream, feature._var_idx, context);
  storeHelper(stream, feature._bboxes, context);
  storeHelper(stream, feature._min_entity_id, context);
  storeHelper(stream, feature._status, context);
  storeHelper(stream, feature._intersects_boundary, context);
}
Exemple #7
0
void
dataStore(std::ostream & stream, Node * & n, void * context)
{
  // TODO: Write out the unique ID of this node
  dof_id_type id = libMesh::DofObject::invalid_id;

  if (n)
  {
    id = n->id();
    if (id == libMesh::DofObject::invalid_id)
      mooseError("Can't output Nodes with invalid ids!");
  }

  storeHelper(stream, id, context);
}
Exemple #8
0
void
dataStore(std::ostream & stream, Elem * & e, void * context)
{
  // TODO: Write out the unique ID of this elem
  dof_id_type id = libMesh::DofObject::invalid_id;

  if (e)
  {
    id = e->id();
    if (id == libMesh::DofObject::invalid_id)
      mooseError("Can't output Elems with invalid ids!");
  }

  storeHelper(stream, id, context);
}
Exemple #9
0
void
dataStore(std::ostream & stream, const Elem * & e, void * context)
{
  // Moose::out<<"const Elem pointer store"<<std::endl;


  // TODO: Write out the unique ID of this elem
  dof_id_type id = libMesh::DofObject::invalid_id;

  if (e)
  {
    id = e->id();
    // Moose::out<<"Storing Elem id: "<<id<<std::endl;
    if (id == libMesh::DofObject::invalid_id)
      mooseError("Can't output Elems with invalid ids!");
  }
  else
  {
    // Moose::out<<"Outputting NULL Elem pointer"<<std::endl;
  }

  storeHelper(stream, id, context);
}
Exemple #10
0
void
dataStore(std::ostream & stream, Node * & n, void * context)
{
  // Moose::out<<"const Node pointer store"<<std::endl;


  // TODO: Write out the unique ID of this node
  dof_id_type id = libMesh::DofObject::invalid_id;

  if (n)
  {
    id = n->id();
    // Moose::out<<"Storing Node id: "<<id<<std::endl;
    if (id == libMesh::DofObject::invalid_id)
      mooseError("Can't output Nodes with invalid ids!");
  }
  else
  {
    // Moose::out<<"Outputting NULL Node pointer"<<std::endl;
  }

  storeHelper(stream, id, context);
}
Exemple #11
0
void
dataStore(std::ostream & stream, PenetrationInfo * & pinfo, void * context)
{
  if (!context)
    mooseError("Can only store PenetrationInfo objects using a MooseMesh context!");

  if (pinfo)
  {
    // Store 1 so that we know that this pinfo really exists!
    unsigned int i = 1;
    storeHelper(stream, i, context);

    // _console<<"dataStore<PInfo> Node ptr: "<<pinfo->_node<<std::endl;
    // _console<<"dataStore<PInfo> Node id: "<<pinfo->_node->id()<<std::endl;
    // _console<<"dataStore<PInfo> Elem ptr: "<<pinfo->_elem<<std::endl;
    // _console<<"dataStore<PInfo> Elem id: "<<pinfo->_elem->id()<<std::endl;
    // _console<<"dataStore<PInfo> Side: "<<pinfo->_side_num<<std::endl;

    storeHelper(stream, pinfo->_node, context);
    storeHelper(stream, pinfo->_elem, context);

    // Not storing the side element as we will need to recreate it on load
    storeHelper(stream, pinfo->_side_num, context);
    storeHelper(stream, pinfo->_normal, context);
    storeHelper(stream, pinfo->_distance, context);
    storeHelper(stream, pinfo->_tangential_distance, context);
    storeHelper(stream, pinfo->_closest_point, context);
    storeHelper(stream, pinfo->_closest_point_ref, context);
    storeHelper(stream, pinfo->_closest_point_on_face_ref, context);


    storeHelper(stream, pinfo->_off_edge_nodes, context);
    storeHelper(stream, pinfo->_side_phi, context);
    storeHelper(stream, pinfo->_dxyzdxi, context);
    storeHelper(stream, pinfo->_dxyzdeta, context);
    storeHelper(stream, pinfo->_d2xyzdxideta, context);
    storeHelper(stream, pinfo->_starting_elem, context);
    storeHelper(stream, pinfo->_starting_side_num, context);
    storeHelper(stream, pinfo->_starting_closest_point_ref, context);
    storeHelper(stream, pinfo->_incremental_slip, context);
    storeHelper(stream, pinfo->_accumulated_slip, context);
    storeHelper(stream, pinfo->_accumulated_slip_old, context);
    storeHelper(stream, pinfo->_frictional_energy, context);
    storeHelper(stream, pinfo->_frictional_energy_old, context);
    storeHelper(stream, pinfo->_contact_force, context);
    storeHelper(stream, pinfo->_contact_force_old, context);
    storeHelper(stream, pinfo->_update, context);
    storeHelper(stream, pinfo->_penetrated_at_beginning_of_step, context);
    storeHelper(stream, pinfo->_mech_status, context);
  }
  else
  {
    // Store 0 so that we know that this pinfo is NULL
    unsigned int i = 0;
    storeHelper(stream, i, context);
  }
}
Exemple #12
0
void
dataStore(std::ostream & stream, PenetrationInfo *& pinfo, void * context)
{
  if (!context)
    mooseError("Can only store PenetrationInfo objects using a MooseMesh context!");

  if (pinfo)
  {
    // Store 1 so that we know that this pinfo really exists!
    unsigned int i = 1;
    storeHelper(stream, i, context);

    storeHelper(stream, pinfo->_node, context);
    storeHelper(stream, pinfo->_elem, context);
    // Not storing the side element as we will need to recreate it on load
    storeHelper(stream, pinfo->_side_num, context);
    storeHelper(stream, pinfo->_normal, context);
    storeHelper(stream, pinfo->_distance, context);
    storeHelper(stream, pinfo->_tangential_distance, context);
    storeHelper(stream, pinfo->_closest_point, context);
    storeHelper(stream, pinfo->_closest_point_ref, context);
    storeHelper(stream, pinfo->_closest_point_on_face_ref, context);
    storeHelper(stream, pinfo->_off_edge_nodes, context);
    storeHelper(stream, pinfo->_side_phi, context);
    storeHelper(stream, pinfo->_side_grad_phi, context);
    storeHelper(stream, pinfo->_dxyzdxi, context);
    storeHelper(stream, pinfo->_dxyzdeta, context);
    storeHelper(stream, pinfo->_d2xyzdxideta, context);
    storeHelper(stream, pinfo->_starting_elem, context);
    storeHelper(stream, pinfo->_starting_side_num, context);
    storeHelper(stream, pinfo->_starting_closest_point_ref, context);
    storeHelper(stream, pinfo->_incremental_slip, context);
    storeHelper(stream, pinfo->_accumulated_slip, context);
    storeHelper(stream, pinfo->_frictional_energy, context);
    storeHelper(stream, pinfo->_contact_force, context);
    storeHelper(stream, pinfo->_lagrange_multiplier, context);
    storeHelper(stream, pinfo->_mech_status, context);
    storeHelper(stream, pinfo->_mech_status_old, context);

    // Don't need frictional_energy_old, accumulated_slip_old, contact_force_old, or
    // locked_this_step
    // because they are always set by the constraints at the beginning of a new time step.
  }
  else
  {
    // Store 0 so that we know that this pinfo is NULL
    unsigned int i = 0;
    storeHelper(stream, i, context);
  }
}
Exemple #13
0
void
RestartableDataIO::serializeSystems(std::ostream & stream)
{
  storeHelper(stream, static_cast<SystemBase &>(_fe_problem.getNonlinearSystem()), NULL);
  storeHelper(stream, static_cast<SystemBase &>(_fe_problem.getAuxiliarySystem()), NULL);
}
Exemple #14
0
void dataStore(std::ostream & stream, MeshTools::BoundingBox & bbox, void * context)
{
  storeHelper(stream, bbox.min(), context);
  storeHelper(stream, bbox.max(), context);
}