|
PSCF v1.4.0
|
A container of fields stored in both basis and r-grid format. More...
#include <WFields.h>
Public Types | |
| using | RpWFields = Rp::WFields<D, RField<D>, FieldIo<D> > |
| Alias for base class. | |
Public Member Functions | |
| void | setRGrid (DeviceArray< cudaReal > &fields) |
| Set new w fields, in unfolded real-space (r-grid) format. | |
| void | setRGrid (DArray< RField< D > > const &fields, bool isSymmetric=false) |
| Set fields values in real-space (r-grid) format. | |
| Public Member Functions inherited from Pscf::Rp::WFields< D, RField< D >, FieldIo< D > > | |
| void | setFieldIo (FieldIo< D > const &fieldIo) |
| Create association with FIT (store pointer). | |
| void | setReadUnitCell (UnitCell< D > &cell) |
| Set unit cell used when reading field files. | |
| void | setWriteUnitCell (UnitCell< D > const &cell) |
| Set unit cell used when writing field files. | |
| void | setNMonomer (int nMonomer) |
| Set stored value of nMonomer. | |
| void | allocateRGrid (IntVec< D > const &dimensions) |
| Allocate or re-allocate memory for fields in rgrid format. | |
| void | allocateBasis (int nBasis) |
| Allocate or re-allocate memory for fields in basis format. | |
| void | allocate (int nMonomer, int nBasis, IntVec< D > const &dimensions) |
| Allocate memory for all fields. | |
| void | setBasis (DArray< DArray< double > > const &fields) |
| Set field component values, in symmetrized Fourier format. | |
| void | setRGrid (DArray< RField< D > > const &fields, bool isSymmetric=false) |
| Set fields values in real-space (r-grid) format. | |
| void | readBasis (std::istream &in) |
| Read fields from an input stream in symmetrized basis format. | |
| void | readBasis (std::string filename) |
| Read fields from a named file, in symmetrized basis format. | |
| void | readRGrid (std::istream &in, bool isSymmetric=false) |
| Reads fields from an input stream in real-space (r-grid) format. | |
| void | readRGrid (std::string filename, bool isSymmetric=false) |
| Reads fields from a named file in real-space (r-grid) format. | |
| void | symmetrize () |
| Symmetrize r-grid fields, compute corresponding basis components. | |
| void | clear () |
| Clear data stored in this object without deallocating. | |
| Signal< void > & | signal () |
| Get a signal that notifies observers of field modification. | |
| void | writeBasis (std::ostream &out) const |
| Write fields to an input stream in symmetrized basis format. | |
| void | writeBasis (std::string filename) const |
| Write fields to a named file, in symmetrized basis format. | |
| void | writeRGrid (std::ostream &out) const |
| Writes fields to an input stream in real-space (r-grid) format. | |
| void | writeRGrid (std::string filename) const |
| Writes fields to a named file in real-space (r-grid) format. | |
| DArray< DArray< double > > const & | basis () const |
| Get array of all fields in basis format. | |
| DArray< double > const & | basis (int monomerId) const |
| Get the field for one monomer type in basis format. | |
| DArray< RField< D > > const & | rgrid () const |
| Get array of all fields in r-space grid format. | |
| RField< D > const & | rgrid (int monomerId) const |
| Get the field for one monomer type in r-space grid format. | |
| bool | isAllocatedRGrid () const |
| Has memory been allocated for fields in r-grid format? | |
| bool | isAllocatedBasis () const |
| Has memory been allocated for fields in basis format? | |
| bool | hasData () const |
| Has field data been set in either format? | |
| bool | isSymmetric () const |
| Are fields symmetric under all elements of the space group? | |
Additional Inherited Members | |
| Protected Member Functions inherited from Pscf::Rp::WFields< D, RField< D >, FieldIo< D > > | |
| WFields () | |
| Constructor. | |
| ~WFields () | |
| Destructor. | |
| IntVec< D > const & | meshDimensions () const |
| Get mesh dimensions in each direction, set on r-grid allocation. | |
| int | meshSize () const |
| Get mesh size (number of grid points), set on r-grid allocation. | |
| int | nBasis () const |
| Get number of basis functions, set on basis allocation. | |
| int | nMonomer () const |
| Get number of monomer types. | |
| FieldIo< D > const & | fieldIo () const |
| Get associated FIT object (const reference). | |
A container of fields stored in both basis and r-grid format.
Specializations of this template with D=1, 2, and 3 are derived from corresponding specializations of base class template Rp::Class, and inherit their public interface and almost all of their source code from this base class.
Definition at line 36 of file rpg/field/WFields.h.
| using Pscf::Rpg::WFields< D >::RpWFields = Rp::WFields<D, RField<D>, FieldIo<D> > |
Alias for base class.
Definition at line 56 of file rpg/field/WFields.h.
| void Pscf::Rpg::WFields< D >::setRGrid | ( | DeviceArray< cudaReal > & | fields | ) |
Set new w fields, in unfolded real-space (r-grid) format.
The input array fields is an unfolded array that contains fields for all monomer types, with the field for monomer 0 first, etc.
| fields | unfolded array of new w fields (input) |
Definition at line 27 of file WFields.cu.
References Util::DArray< Data >::allocate(), Pscf::Rp::WFields< D, RField< D >, FieldIo< D > >::isSymmetric(), Pscf::Rp::WFields< D, RField< D >, FieldIo< D > >::meshDimensions(), Pscf::Rp::WFields< D, RField< D >, FieldIo< D > >::meshSize(), Pscf::Rp::WFields< D, RField< D >, FieldIo< D > >::nMonomer(), and Pscf::Rp::WFields< D, RField< D >, FieldIo< D > >::setRGrid().
| void Pscf::Rp::WFields< D, RField< D >, FieldIo< D > >::setRGrid | ( | DArray< RField< D > > const & | fields, |
| bool | isSymmetric = false ) |
Set fields values in real-space (r-grid) format.
If the isSymmetric parameter is true, this function assumes that the fields are known to be symmetric and so computes and stores the corresponding basis components. If isSymmetric is false, it only sets the values in the r-grid format.
On return, hasData is true and the persistent isSymmetric flag defined by the class is set to the value of the isSymmetric input parameter.
As needed, r-grid and/or basis fields may be allocated within this function. If the isSymmetric parameter is true, the a basis must be initialized prior to entry.
| fields | array of new fields in r-grid format |
| isSymmetric | is this field symmetric under the space group? |