NetDEM v1.0
Loading...
Searching...
No Matches
peridigm_boundary_condition.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "utils_io.hpp"
4#include "utils_math.hpp"
5#include <fstream>
6#include <sstream>
7#include <string>
8
9namespace netdem {
10
21public:
26
31
36
41 VecNT<bool, 3> dim_activated{true, true, true};
42
47 bool time_depedent{true};
48
53 Vec3d disp_rate{0, 0, 0};
54
60
65 Vec3d disp{0, 0, 0};
66
71 Vec3d loading{0, 0, 0};
72
77 double mech_time{0};
78
89 void InsertNode(int node_set_id);
90
102 void SetActivatedDimensions(bool x, bool y, bool z);
103
115 void SetByDisplacementRate(double x, double y, double z);
116
129 void SetByUltimateDisplacement(double x, double y, double z, double t);
130
142 void SetByLoadingRate(double x, double y, double z);
143
156 void SetByUltimateLoading(double x, double y, double z, double t);
157
170 void WriteInputFile(std::ostream &os, int node_set_id);
171
179 void WriteNodeSetFile(std::string const &result_dir, int node_set_id);
180
181private:
192 std::string GetNodeSetFileName(int node_set_id);
193
205 std::string GetDisplacementString(int dim);
206
218 std::string GetLoadingString(int dim);
219};
220} // namespace netdem
A class that represents a boundary condition for Peridigm.
Definition peridigm_boundary_condition.hpp:20
VecXT< int > node_indices
The indices of the nodes that are subject to the boundary condition.
Definition peridigm_boundary_condition.hpp:35
void SetByLoadingRate(double x, double y, double z)
Sets the boundary condition by specifying the rate of loading.
Definition peridigm_boundary_condition.cpp:36
Type type
The type of the boundary condition.
Definition peridigm_boundary_condition.hpp:30
VecNT< bool, 3 > dim_activated
A boolean vector that indicates which dimensions are activated by the boundary condition.
Definition peridigm_boundary_condition.hpp:41
Vec3d disp
The ultimate displacement if the boundary condition is defined by ultimate displacement.
Definition peridigm_boundary_condition.hpp:65
void SetByUltimateLoading(double x, double y, double z, double t)
Sets the boundary condition by specifying the ultimate loading.
Definition peridigm_boundary_condition.cpp:44
void SetActivatedDimensions(bool x, bool y, bool z)
Sets the dimensions that are activated by the boundary condition.
Definition peridigm_boundary_condition.cpp:10
void SetByUltimateDisplacement(double x, double y, double z, double t)
Sets the boundary condition by specifying the ultimate displacement.
Definition peridigm_boundary_condition.cpp:25
Vec3d loading_rate
The rate of loading if the boundary condition is defined by loading rate.
Definition peridigm_boundary_condition.hpp:59
void InsertNode(int node_set_id)
Adds a node to the set of nodes that are subject to the boundary condition.
Definition peridigm_boundary_condition.cpp:6
Vec3d disp_rate
The rate of displacement if the boundary condition is defined by displacement rate.
Definition peridigm_boundary_condition.hpp:53
Type
An enumeration that lists the types of boundary conditions.
Definition peridigm_boundary_condition.hpp:25
@ Prescribed_Displacement
Definition peridigm_boundary_condition.hpp:25
@ Body_Force
Definition peridigm_boundary_condition.hpp:25
Vec3d loading
The ultimate loading if the boundary condition is defined by ultimate loading.
Definition peridigm_boundary_condition.hpp:71
bool time_depedent
A boolean flag that indicates whether the boundary condition is time-dependent or not.
Definition peridigm_boundary_condition.hpp:47
double mech_time
The mechanical time if the boundary condition is defined by ultimate displacement or ultimate loading...
Definition peridigm_boundary_condition.hpp:77
void SetByDisplacementRate(double x, double y, double z)
Sets the boundary condition by specifying the rate of displacement.
Definition peridigm_boundary_condition.cpp:16
void WriteInputFile(std::ostream &os, int node_set_id)
Writes the boundary condition to an input file.
Definition peridigm_boundary_condition.cpp:55
void WriteNodeSetFile(std::string const &result_dir, int node_set_id)
Writes the node set to a directory.
Definition peridigm_boundary_condition.cpp:133
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18
std::array< T, N > VecNT
Definition utils_macros.hpp:32