NetDEM v1.0
Loading...
Searching...
No Matches
peridigm_block.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "utils_io.hpp"
4#include <fstream>
5#include <sstream>
6
7namespace netdem {
8
17public:
22
27
32
36 double horizon;
37
49 void WriteInputFile(std::ostream &os, int block_id) {
50 os << " My Block " + std::to_string(block_id + 1) + ": " << std::endl;
51 os << " Block Names: \"block_" + std::to_string(block_id + 1) + "\""
52 << std::endl;
53 os << " Material: \"My Material " + std::to_string(material_id + 1) +
54 "\""
55 << std::endl;
56 os << " Damage Model: \"My Damage Model " +
57 std::to_string(damage_model_id + 1) + "\""
58 << std::endl;
59 os << " Horizon: " + IO::ToString(horizon) << std::endl;
60 os << std::endl;
61 }
62};
63
64} // namespace netdem
static std::string ToString(int value)
Definition utils_io.cpp:27
A class that represents a Peridigm block.
Definition peridigm_block.hpp:16
int material_id
The ID of the material associated with the block.
Definition peridigm_block.hpp:26
void WriteInputFile(std::ostream &os, int block_id)
Writes the input file for the block to the given output stream.
Definition peridigm_block.hpp:49
int damage_model_id
The ID of the damage model associated with the block.
Definition peridigm_block.hpp:31
VecXT< int > node_indices
The indices of the nodes in the block.
Definition peridigm_block.hpp:21
double horizon
The horizon used for neighbor search in the block.
Definition peridigm_block.hpp:36
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31