1#ifndef WMFUNCTIONAPPLICATOR_H
2#define WMFUNCTIONAPPLICATOR_H
7#include "variable/distributed_variable.h"
143 const int component_index)
145 return _components[component_index].patch_array(patch_index);
154 const int component_index)
const
156 return _components[component_index].patch_array(patch_index);
163 if (!component._variable->on_subdomain(subdomain_name))
Opaque Pointer object that carries the referenced data type, but does not expose this payload type as...
Definition: wmopaqueptr.h:81
Definition: wmdomain.h:35
Definition: wmfunctionapplicator.h:60
const wxm::array::patch_array_t & patch_array(const int patch_index) const
Get array associated with variable.
Definition: wmfunctionapplicator.h:84
wxm::variable::distributed_variable_t * _variable
Pointer to variable.
Definition: wmfunctionapplicator.h:97
std::string _variable_name
Name of variable.
Definition: wmfunctionapplicator.h:94
wxm::array::patch_array_t & patch_array(const int patch_index)
Get array associated with variable.
Definition: wmfunctionapplicator.h:75
int _component_index
Component index in variable.
Definition: wmfunctionapplicator.h:91
component_t()
Definition: wmfunctionapplicator.h:65
Definition: wmfunctionapplicator.h:57
int num_components() const
Definition: wmfunctionapplicator.h:125
void setup(const WxCryptSet &wxc, const std::string &field_name)
Parse the input to find the variables.
~components_t()
Destructor.
Definition: wmfunctionapplicator.h:111
bool exists_on(const std::string &subdomain_name) const
Definition: wmfunctionapplicator.h:159
components_t()
Default constructor.
Definition: wmfunctionapplicator.h:106
component_list_t _components
List of components that make up components_t.
Definition: wmfunctionapplicator.h:178
std::vector< component_t > component_list_t
Used to store variables.
Definition: wmfunctionapplicator.h:101
wxm::array::patch_array_t & patch_array(const int patch_index, const int component_index)
Grab an array for a variable.
Definition: wmfunctionapplicator.h:142
const wxm::array::patch_array_t & patch_array(const int patch_index, const int component_index) const
Grab an array for a variable.
Definition: wmfunctionapplicator.h:153
void parse_variable_name(const std::string &variable_name_set)
void set_parent_solver(const WmSolverBase &solver)
Assign the parent solver to allow variable parsing.
Definition: wmfunctionapplicator.h:120
const WmSolverBase * _parent_solver
Parent solver.
Definition: wmfunctionapplicator.h:175
Definition: wmfunctionapplicator.h:54
std::string _basisSetName
Name of the basis set.
Definition: wmfunctionapplicator.h:247
components_t _components
List of variables - TODO: move variables_t out of WmTimeIntegration.
Definition: wmfunctionapplicator.h:250
applicator_t(WmFunctionApplicator *parent)
Create new applicator_t.
int _spatialScheme
Spatial scheme.
Definition: wmfunctionapplicator.h:241
int _spatialOrder
Spatial order.
Definition: wmfunctionapplicator.h:244
void setup(const WxCryptSet &wxc)
Setup the applicator_t from a cryptset and an application index.
@ WMFUNCTIONAPPLICATOR_NODAL
Definition: wmfunctionapplicator.h:189
@ WMFUNCTIONAPPLICATOR_FV
Definition: wmfunctionapplicator.h:190
@ WMFUNCTIONAPPLICATOR_NODAL_KINETIC
Definition: wmfunctionapplicator.h:191
@ WMFUNCTIONAPPLICATOR_MODAL
Definition: wmfunctionapplicator.h:188
void apply(const WmUnstructuredPatch &patch)
Applies the initial condition to the variable for a given patch TODO: needs to work with any patch (s...
WmFunctionApplicator * _parent
Parent function applicator.
Definition: wmfunctionapplicator.h:238
int _vspace_dims
Definition: wmfunctionapplicator.h:262
std::vector< real > _vspace_dv
Definition: wmfunctionapplicator.h:268
std::vector< real > _vspace_minimums
Definition: wmfunctionapplicator.h:265
std::vector< int > _vspace_nelems
Definition: wmfunctionapplicator.h:259
std::string _phase_space_order
Definition: wmfunctionapplicator.h:256
WmICFunction * _function
Function to apply.
Definition: wmfunctionapplicator.h:253
~applicator_t()
Destroy applicator_t.
The WmFunctionApplicator class generates initial conditions.
Definition: wmfunctionapplicator.h:44
~WmFunctionApplicator()
Destroy WmFunctionApplicator host action.
WxStepperStatus step()
Step the solver by assigned time step.
std::vector< applicator_t * > applicators_t
Definition: wmfunctionapplicator.h:272
bool needsDomain() const
Return false because icGenerator is not yet setup for structured grids.
Definition: wmfunctionapplicator.h:318
WmFunctionApplicator(const WmConstOpaquePtr &parent_solver)
Create new WmFunctionApplicator host action.
virtual void typeCheck()
check that variable types are appropriate for this HostAction.
std::vector< WmICFunction * > functions_t
Definition: wmfunctionapplicator.h:271
void setup(const WxCryptSet &wxc)
Setup HostAction object using supplied cryptset.
The WmHostAction class is a base class for sub-solvers in the WARPXM system.
Definition: wmhostaction.h:35
Base class for functions used in generating initial conditions.
Definition: wmicfunction.h:25
A base class for solvers in WARPM.
Definition: wmsolverbase.h:35
Definition: wmunstructuredpatch.h:22
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
virtual std::string name() const
Get name of object.
Represents important parameters for the efficacy of a completing simulation step.
Definition: wxstepperstatus.h:19
Defines an interface for variables that exits over distributed memory.
Definition: distributed_variable.h:28
virtual wxm::array::patch_array_t & patch_array(const int component_index, const int patch_index)=0
Aquire a patch array for a specified component.