Chi-Tech
|
#include <fieldfunction_gridbased.h>
Public Types | |
typedef std::pair< chi_mesh::Vector3, chi_mesh::Vector3 > | BoundingBox |
typedef std::vector< std::shared_ptr< const FieldFunctionGridBased > > | FFList |
Public Member Functions | |
FieldFunctionGridBased (const chi::InputParameters ¶ms) | |
FieldFunctionGridBased (const std::string &text_name, chi_math::SDMPtr &discretization_ptr, chi_math::Unknown unknown) | |
FieldFunctionGridBased (const std::string &text_name, chi_math::SDMPtr &sdm_ptr, chi_math::Unknown unknown, const std::vector< double > &field_vector) | |
FieldFunctionGridBased (const std::string &text_name, chi_math::SDMPtr &sdm_ptr, chi_math::Unknown unknown, double field_value) | |
virtual | ~FieldFunctionGridBased ()=default |
const chi_math::SpatialDiscretization & | GetSpatialDiscretization () const |
const std::vector< double > & | FieldVectorRead () const |
std::vector< double > & | FieldVector () |
void | UpdateFieldVector (const std::vector< double > &field_vector) |
void | UpdateFieldVector (const Vec &field_vector) |
std::vector< double > | GetGhostedFieldVector () const |
virtual std::vector< double > | GetPointValue (const chi_mesh::Vector3 &point) const |
Returns the component values at requested point. More... | |
double | Evaluate (const chi_mesh::Cell &cell, const chi_mesh::Vector3 &position, unsigned int component) const override |
Public Member Functions inherited from chi_physics::FieldFunction | |
FieldFunction (const chi::InputParameters ¶ms) | |
FieldFunction (const std::string &text_name, chi_math::Unknown unknown) | |
virtual | ~FieldFunction ()=default |
const std::string & | TextName () const |
const chi_math::Unknown & | Unknown () const |
const chi_math::UnknownManager & | GetUnknownManager () const |
void | PushOntoStack (std::shared_ptr< ChiObject > &new_object) override |
Overrides the stack placement so that FieldFunctions go to the field function stack. More... | |
virtual double | Evaluate (const chi_mesh::Cell &cell, const chi_mesh::Vector3 &position, unsigned int component) const |
Public Member Functions inherited from ChiObject | |
ChiObject () | |
ChiObject (const chi::InputParameters ¶ms) | |
void | SetStackID (size_t stack_id) |
size_t | StackID () const |
virtual void | PushOntoStack (std::shared_ptr< ChiObject > &new_object) |
virtual | ~ChiObject ()=default |
Static Public Member Functions | |
static chi::InputParameters | GetInputParameters () |
static void | ExportMultipleToVTK (const std::string &file_base_name, const FFList &ff_list) |
Static Public Member Functions inherited from chi_physics::FieldFunction | |
static chi::InputParameters | GetInputParameters () |
Static Public Member Functions inherited from ChiObject | |
static chi::InputParameters | GetInputParameters () |
Protected Attributes | |
chi_math::SDMPtr | sdm_ |
std::unique_ptr< chi_math::GhostedParallelSTLVector > | ghosted_field_vector_ |
Static Private Member Functions | |
static chi_math::SDMPtr | MakeSpatialDiscretization (const chi::InputParameters ¶ms) |
static std::unique_ptr< chi_math::GhostedParallelSTLVector > | MakeFieldVector (const chi_math::SpatialDiscretization &discretization, const chi_math::UnknownManager &uk_man) |
Private Attributes | |
const BoundingBox | local_grid_bounding_box_ |
Definition at line 29 of file fieldfunction_gridbased.h.
typedef std::pair<chi_mesh::Vector3, chi_mesh::Vector3> chi_physics::FieldFunctionGridBased::BoundingBox |
Definition at line 32 of file fieldfunction_gridbased.h.
typedef std::vector<std::shared_ptr<const FieldFunctionGridBased> > chi_physics::FieldFunctionGridBased::FFList |
Static method to export multiple grid-based field functions.
Definition at line 78 of file fieldfunction_gridbased.h.
|
explicit |
ObjectMaker based constructor.
Definition at line 54 of file ff_gridbased_00_constrdestr.cc.
chi_physics::FieldFunctionGridBased::FieldFunctionGridBased | ( | const std::string & | text_name, |
chi_math::SDMPtr & | discretization_ptr, | ||
chi_math::Unknown | unknown | ||
) |
Creates a field function, filling it with zeros.
Definition at line 66 of file ff_gridbased_00_constrdestr.cc.
chi_physics::FieldFunctionGridBased::FieldFunctionGridBased | ( | const std::string & | text_name, |
chi_math::SDMPtr & | sdm_ptr, | ||
chi_math::Unknown | unknown, | ||
const std::vector< double > & | field_vector | ||
) |
Creates a field function with an associated field vector. The field's data vector is set to the incoming field vector.
Definition at line 78 of file ff_gridbased_00_constrdestr.cc.
chi_physics::FieldFunctionGridBased::FieldFunctionGridBased | ( | const std::string & | text_name, |
chi_math::SDMPtr & | sdm_ptr, | ||
chi_math::Unknown | unknown, | ||
double | field_value | ||
) |
Creates a field function where all the values are assigned to the single supplied value.
Definition at line 96 of file ff_gridbased_00_constrdestr.cc.
|
virtualdefault |
|
overridevirtual |
Evaluates the field function, on a cell, at the specified point.
Reimplemented from chi_physics::FieldFunction.
Definition at line 92 of file ff_gridbased_05_values.cc.
|
static |
Export multiple field functions to VTK.
Definition at line 18 of file ff_gridbased_03b_exportvtkwithappend.cc.
std::vector< double > & chi_physics::FieldFunctionGridBased::FieldVector | ( | ) |
Returns a reference to the locally stored field data.
Definition at line 123 of file ff_gridbased_00_constrdestr.cc.
const std::vector< double > & chi_physics::FieldFunctionGridBased::FieldVectorRead | ( | ) | const |
Returns a read-only reference to the locally stored field data.
Definition at line 118 of file ff_gridbased_00_constrdestr.cc.
std::vector< double > chi_physics::FieldFunctionGridBased::GetGhostedFieldVector | ( | ) | const |
Makes a copy of the locally stored data with ghost access.
Makes a ghosted version of the field vector.
Definition at line 6 of file ff_gridbased_04_utils.cc.
|
static |
Returns required input parameters.
Definition at line 19 of file ff_gridbased_00_constrdestr.cc.
|
virtual |
Returns the component values at requested point.
Not necessarily an optimal routine to use when repeatedly querying a field function.
Definition at line 16 of file ff_gridbased_05_values.cc.
const chi_math::SpatialDiscretization & chi_physics::FieldFunctionGridBased::GetSpatialDiscretization | ( | ) | const |
Returns the spatial discretization method.
Definition at line 111 of file ff_gridbased_00_constrdestr.cc.
|
staticprivate |
Static method for making the ghosted vector for the constructors.
Private method for creating the field vector.
Definition at line 192 of file ff_gridbased_00_constrdestr.cc.
|
staticprivate |
Static method for making the GetSpatialDiscretization for the constructors.
Private method for creating the spatial discretization method.
Definition at line 130 of file ff_gridbased_00_constrdestr.cc.
void chi_physics::FieldFunctionGridBased::UpdateFieldVector | ( | const std::vector< double > & | field_vector | ) |
Updates the field vector with a local STL vector.
Updates the field data with a STL vector.
Definition at line 9 of file ff_gridbased_01_updates.cc.
void chi_physics::FieldFunctionGridBased::UpdateFieldVector | ( | const Vec & | field_vector | ) |
Updates the field vector with a PETSc vector. This only operates locally.
Updates the field data with a PETSc vector.
Definition at line 22 of file ff_gridbased_01_updates.cc.
|
protected |
Definition at line 98 of file fieldfunction_gridbased.h.
|
private |
Definition at line 110 of file fieldfunction_gridbased.h.
|
protected |
Definition at line 97 of file fieldfunction_gridbased.h.