![]() |
OGS
|
#include <tclap/CmdLine.h>
#include <vtkXMLUnstructuredGridWriter.h>
#include <fstream>
#include <nlohmann/json.hpp>
#include "BaseLib/FileTools.h"
#include "BaseLib/Logging.h"
#include "BaseLib/MPI.h"
#include "BaseLib/TCLAPArguments.h"
#include "ComputeIntersections.h"
#include "ComputeNaturalCoordsAlgorithm.h"
#include "InfoLib/GitInfo.h"
#include "MeshLib/IO/VtkIO/VtuInterface.h"
Go to the source code of this file.
Functions | |
vtkSmartPointer< vtkUnstructuredGrid > | readGrid (std::string const &input_filename) |
void | writeGrid (vtkUnstructuredGrid *grid, std::string const &output_filename) |
void | checkJSONEntries (nlohmann::json const &data, size_t number_of_anchors) |
std::tuple< AU::ComputeNaturalCoordsResult, Eigen::VectorXd > | readJSON (TCLAP::ValueArg< std::string > const &input_filename) |
int | main (int argc, char **argv) |
void checkJSONEntries | ( | nlohmann::json const & | data, |
size_t | number_of_anchors ) |
Definition at line 51 of file CreateAnchors.cpp.
References OGS_FATAL.
Referenced by readJSON().
int main | ( | int | argc, |
char ** | argv ) |
Definition at line 239 of file CreateAnchors.cpp.
References ApplicationUtils::computeNaturalCoords(), getOrderedAnchorCoords(), BaseLib::initOGSLogger(), BaseLib::makeLogLevelArg(), OGS_FATAL, GitInfoLib::GitInfo::ogs_version, readGrid(), readJSON(), setPhysicalPropertiesForIntersectionPoints(), ApplicationUtils::ComputeNaturalCoordsResult::success, ApplicationUtils::toVTKGrid(), and writeGrid().
vtkSmartPointer< vtkUnstructuredGrid > readGrid | ( | std::string const & | input_filename | ) |
Definition at line 27 of file CreateAnchors.cpp.
References OGS_FATAL, and MeshLib::IO::VtuInterface::readVtuFileToVtkUnstructuredGrid().
Referenced by main().
std::tuple< AU::ComputeNaturalCoordsResult, Eigen::VectorXd > readJSON | ( | TCLAP::ValueArg< std::string > const & | input_filename | ) |
Reads a JSON file containing anchor start and end points and physical properties of the anchors. Also returns the free fraction of each anchor. If the free fraction is not given, it is set to 1.0 for all anchors.
Definition at line 123 of file CreateAnchors.cpp.
References ApplicationUtils::ComputeNaturalCoordsResult::anchor_cross_sectional_area, ApplicationUtils::ComputeNaturalCoordsResult::anchor_stiffness, checkJSONEntries(), ApplicationUtils::ComputeNaturalCoordsResult::initial_anchor_stress, ApplicationUtils::ComputeNaturalCoordsResult::maximum_anchor_stress, OGS_FATAL, ApplicationUtils::ComputeNaturalCoordsResult::real_coords, ApplicationUtils::ComputeNaturalCoordsResult::residual_anchor_stress, and ApplicationUtils::ComputeNaturalCoordsResult::success.
Referenced by main().
void writeGrid | ( | vtkUnstructuredGrid * | grid, |
std::string const & | output_filename ) |
Definition at line 43 of file CreateAnchors.cpp.
Referenced by main().