![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
User-input data for particle neighbor search. More...
#include <bcBaseDeck.h>
Public Member Functions | |
| BCBaseDeck (const json &j=json({}), std::string type="Force_BC") | |
| Constructor. | |
| BCBaseDeck (bool isRegionActive, geom::GeomData regionGeomData=geom::GeomData(), std::vector< size_t > pList=std::vector< size_t >(), std::vector< size_t > pNotList=std::vector< size_t >(), std::string timeFnType="", std::vector< double > timeFnParams=std::vector< double >(), std::string spatialFnType="", std::vector< double > spatialFnParams=std::vector< double >(), std::vector< size_t > direction=std::vector< size_t >(), bool isDisplacementZero=false) | |
| Constructor. | |
| void | readFromJson (const json &j, std::string type) |
| Reads from json object. | |
| std::string | printStr (int nt=0, int lvl=0) const |
| Returns the string containing printable information about the object. | |
| void | print (int nt=0, int lvl=0) const |
| Prints the information about the object. | |
Static Public Member Functions | |
| static const std::vector< Field< BCBaseDeck > > & | fields () |
| The fields of the block itself. | |
| static const std::vector< Field< BCBaseDeck > > & | timeFunctionFields () |
| The fields of the Time_Function sub-block. | |
| static const std::vector< Field< BCBaseDeck > > & | spatialFunctionFields () |
| The fields of the Spatial_Function sub-block. | |
| static json | getExampleJson (const json &given=json::object(), const geom::GeomData *region=nullptr) |
| Returns example JSON object for ModelDeck configuration. | |
| static json | getExampleJson (const std::string &)=delete |
| Rejects a value given where a set of named values is expected. | |
| static json | getExampleJson (const char *)=delete |
| Rejects a value given where a set of named values is expected. | |
Data Fields | |
| std::string | d_type |
| Method for applying force. E.g., Force_BC, Displacement_BC, IC. | |
| std::string | d_selectionType |
| Method for applying force e.g. | |
| bool | d_isRegionActive |
| Flag that indicates if region-based application of boundary condition is active. So cases of 'region', 'region_with_include_list', 'region_with_exclude_list', and 'region_with_include_list_with_exclude_list' will have region-based application of boundary condition. | |
| geom::GeomData | d_regionGeomData |
| Region geometry (if any) | |
| std::vector< size_t > | d_pList |
| List of particles (if any) | |
| std::vector< size_t > | d_pNotList |
| List of particles to not include (if any) | |
| std::string | d_timeFnType |
| Name of the formula with respect to time. | |
| std::string | d_spatialFnType |
| Name of the formula of with respect to spatial coordinate. | |
| std::vector< size_t > | d_direction |
| List of dofs on which this bc will be applied. | |
| std::vector< double > | d_timeFnParams |
| List of parameters for function wrt time. | |
| std::vector< double > | d_spatialFnParams |
| List of parameters for function wrt spatial coordinate. | |
| bool | d_isDisplacementZero |
| Specify if this bc corresponds to zero displacement condition. | |
| std::string | d_icType |
| Type. | |
| util::Point | d_icVec |
| Initial velocity vector. | |
User-input data for particle neighbor search.
Definition at line 26 of file bcBaseDeck.h.
Constructor.
Definition at line 110 of file bcBaseDeck.h.
|
inline |
Constructor.
Definition at line 118 of file bcBaseDeck.h.
References geom::createGeomObject(), d_isRegionActive, d_pList, d_pNotList, d_regionGeomData, and d_selectionType.
|
inlinestatic |
The fields of the block itself.
A list that is empty and a displacement that is not held are left out of the block, which is how the decks in the repository are written.
Definition at line 162 of file bcBaseDeck.h.
References d_direction, d_isDisplacementZero, d_pList, d_pNotList, and inp::field().
Referenced by getExampleJson(), and readFromJson().
|
staticdelete |
Rejects a value given where a set of named values is expected.
A type passed on its own would convert to a JSON string and be read as a block with no keys, so such a call is rejected when compiling.
|
inlinestatic |
Returns example JSON object for ModelDeck configuration.
Returns the block with the given fields set
Type selects what the block may carry rather than appearing in it: a set of initial conditions takes IC_Type and IC_Vector, any other takes Direction and Zero_Displacement. A region is given as a geometry rather than as a key, so it is a parameter of its own; leaving it out means the set applies everywhere.
| given | Field names and values to set, checked against the table |
| region | Geometry the set is restricted to, or nothing |
Definition at line 233 of file bcBaseDeck.h.
References inp::applyGiven(), inp::checkKeys(), fields(), spatialFunctionFields(), timeFunctionFields(), and geom::writeGeometry().
Referenced by anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), getInputJson(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck().
|
staticdelete |
Rejects a value given where a set of named values is expected.
A type passed on its own would convert to a JSON string and be read as a block with no keys, so such a call is rejected when compiling.
|
inline |
Prints the information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Definition at line 384 of file bcBaseDeck.h.
References printStr().
|
inline |
Returns the string containing printable information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Definition at line 347 of file bcBaseDeck.h.
References d_direction, geom::GeomData::d_geom_p, d_isDisplacementZero, d_isRegionActive, d_pList, d_pNotList, d_regionGeomData, d_selectionType, d_spatialFnParams, d_spatialFnType, d_timeFnParams, d_timeFnType, util::io::getTabS(), and geom::GeomData::printStr().
Referenced by print().
|
inline |
Reads from json object.
Definition at line 294 of file bcBaseDeck.h.
References geom::createGeomObject(), d_icType, d_icVec, d_isRegionActive, d_regionGeomData, d_selectionType, fields(), inp::readFields(), geom::readGeometry(), spatialFunctionFields(), and timeFunctionFields().
Referenced by inp::BCDeck::readFromJson(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck().
|
inlinestatic |
The fields of the Spatial_Function sub-block.
Definition at line 204 of file bcBaseDeck.h.
References d_spatialFnParams, d_spatialFnType, and inp::field().
Referenced by getExampleJson(), and readFromJson().
|
inlinestatic |
The fields of the Time_Function sub-block.
Definition at line 188 of file bcBaseDeck.h.
References d_timeFnParams, d_timeFnType, and inp::field().
Referenced by getExampleJson(), and readFromJson().
| std::vector<size_t> inp::BCBaseDeck::d_direction |
List of dofs on which this bc will be applied.
E.g. if bc is only applied on x-component, d_direction will be 1. If bc is applied on x- and y-component, d_direction will be vector with elements 1 and 2.
Definition at line 90 of file bcBaseDeck.h.
Referenced by fields(), printStr(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck().
| std::string inp::BCBaseDeck::d_icType |
Type.
Definition at line 102 of file bcBaseDeck.h.
Referenced by readFromJson(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck().
| util::Point inp::BCBaseDeck::d_icVec |
Initial velocity vector.
Definition at line 105 of file bcBaseDeck.h.
Referenced by readFromJson(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck().
| bool inp::BCBaseDeck::d_isDisplacementZero |
Specify if this bc corresponds to zero displacement condition.
Definition at line 99 of file bcBaseDeck.h.
Referenced by fields(), printStr(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck().
| bool inp::BCBaseDeck::d_isRegionActive |
Flag that indicates if region-based application of boundary condition is active. So cases of 'region', 'region_with_include_list', 'region_with_exclude_list', and 'region_with_include_list_with_exclude_list' will have region-based application of boundary condition.
Definition at line 46 of file bcBaseDeck.h.
Referenced by BCBaseDeck(), loading::needToComputeDof(), printStr(), readFromJson(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck().
| std::vector<size_t> inp::BCBaseDeck::d_pList |
List of particles (if any)
Definition at line 52 of file bcBaseDeck.h.
Referenced by BCBaseDeck(), fields(), loading::needToComputeDof(), loading::needToProcessParticle(), printStr(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck().
| std::vector<size_t> inp::BCBaseDeck::d_pNotList |
List of particles to not include (if any)
Definition at line 55 of file bcBaseDeck.h.
Referenced by BCBaseDeck(), fields(), loading::needToComputeDof(), loading::needToProcessParticle(), printStr(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck().
| geom::GeomData inp::BCBaseDeck::d_regionGeomData |
Region geometry (if any)
Definition at line 49 of file bcBaseDeck.h.
Referenced by BCBaseDeck(), loading::needToComputeDof(), printStr(), readFromJson(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck().
| std::string inp::BCBaseDeck::d_selectionType |
Method for applying force e.g.
Definition at line 39 of file bcBaseDeck.h.
Referenced by BCBaseDeck(), loading::needToComputeDof(), loading::needToProcessParticle(), printStr(), and readFromJson().
| std::vector<double> inp::BCBaseDeck::d_spatialFnParams |
List of parameters for function wrt spatial coordinate.
Definition at line 96 of file bcBaseDeck.h.
Referenced by printStr(), and spatialFunctionFields().
| std::string inp::BCBaseDeck::d_spatialFnType |
Name of the formula of with respect to spatial coordinate.
List of allowed values are:
Definition at line 81 of file bcBaseDeck.h.
Referenced by printStr(), spatialFunctionFields(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck().
| std::vector<double> inp::BCBaseDeck::d_timeFnParams |
List of parameters for function wrt time.
Definition at line 93 of file bcBaseDeck.h.
Referenced by printStr(), anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck(), and timeFunctionFields().
| std::string inp::BCBaseDeck::d_timeFnType |
Name of the formula with respect to time.
List of allowed values are:
Definition at line 68 of file bcBaseDeck.h.
Referenced by printStr(), anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck(), and timeFunctionFields().
| std::string inp::BCBaseDeck::d_type |
Method for applying force. E.g., Force_BC, Displacement_BC, IC.
Definition at line 28 of file bcBaseDeck.h.