PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
geomObjectsUtil.h File Reference
#include "geomObjects.h"
#include "util/io.h"
#include "util/point.h"
#include <nlohmann_json/json.hpp>
Include dependency graph for geomObjectsUtil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  geom::GeomData
 Input data for geometrical objects. More...
 

Namespaces

namespace  geom
 

Typedefs

using json = nlohmann::ordered_json
 

Functions

const std::vector< std::string > & geom::getAcceptableGeometries ()
 Returns list of acceptable geometries for PeriDEM simulation.
 
std::vector< size_t > geom::getNumParamsRequired (std::string geom_type)
 Get num params required for creation of object.
 
bool geom::checkParamForGeometry (size_t n, std::string geom_type)
 Check parameter data for validity.
 
bool geom::isNumberOfParamForGeometryValid (size_t n, std::string geom_type)
 Ascertain if number of parameters are correct for the given geometry.
 
bool geom::checkParamForComplexGeometry (size_t n, std::string geom_type, std::vector< std::string > vec_type)
 Check parameter data for validity.
 
bool geom::isNumberOfParamForComplexGeometryValid (size_t n, std::string geom_type, std::vector< std::string > vec_type)
 Ascertain if number of parameters are correct for the given geometry.
 
void geom::createGeomObjectOld (const std::string &type, const std::vector< double > &params, const std::vector< std::string > &vec_type, const std::vector< std::string > &vec_flag, std::shared_ptr< geom::GeomObject > &obj, bool perform_check=true)
 Create geometrical object from the given data.
 
void geom::createGeomObject (const std::string &geom_type, const std::vector< double > &params, const std::vector< std::string > &vec_type, const std::vector< std::string > &vec_flag, std::shared_ptr< geom::GeomObject > &obj, bool perform_check)
 
std::vector< double > geom::exampleGeomParams (const std::string &geom_type, const util::Point &c=util::Point(0., 0., 0.), double s=0.001)
 Canonical parameter vector for examples, mesh generation tests, and demos.
 
std::shared_ptr< GeomObject > geom::makeExampleGeomObject (const std::string &geom_type, const util::Point &c=util::Point(0., 0., 0.), double s=0.001)
 One-liner: createGeomObject(exampleGeomParams(...)). Prefer this over per-class static factories so annulus and composite types stay in one place.
 
void geom::createGeomObject (GeomData &geomData, bool perform_check)
 
void geom::readGeometry (const json &j, geom::GeomData &geomData)
 
void geom::writeGeometry (json &j, const geom::GeomData &geomData)
 
GeomObject * geom::createGeomDeepCopy (GeomObject *obj)
 Creates a deep copy of a geometric object.
 

Variables

const std::vector< std::string > geom::acceptable_geometries
 List of acceptable geometries for particles in PeriDEM.
 

Typedef Documentation

◆ json

using json = nlohmann::ordered_json

Definition at line 17 of file geomObjectsUtil.h.