1#ifndef PRDC_MASK_GEN_FILM_BASE_TPP
2#define PRDC_MASK_GEN_FILM_BASE_TPP
11#include "FilmFieldGenMaskBase.h"
12#include "prdc/crystal/SpaceGroup.h"
13#include "util/param/ScalarParam.h"
31 interfaceThickness_(-1.0),
32 excludedThickness_(-1.0),
53 read(in,
"normalVecId", normalVecId_);
54 read(in,
"interfaceThickness", interfaceThickness_);
55 read(in,
"excludedThickness", excludedThickness_);
62 if (normalVecId_ > D || normalVecId_ < 0) {
63 UTIL_THROW(
"bad value for normalVecId, must be in [0,D)");
65 if (interfaceThickness_ > excludedThickness_) {
66 UTIL_THROW(
"excludedThickness must be larger than interfaceThickness");
68 if ((excludedThickness_ <= 0) || (interfaceThickness_ <= 0)) {
69 UTIL_THROW(
"excludedThickness and interfaceThickness must be >0");
130 readGroup(groupName, group);
134 std::string msg =
"Space group contains forbidden symmetry operations";
135 for (
int i = 0; i < group.
size(); i++) {
136 for (
int j = 0; j < D; j++) {
137 int r = group[i].R(nv,j);
139 if ((r != 1) && (r != -1)) {
148 if (group[i].t(nv) != 0) {
Type type_
Type of field (Mask, External, or None).
FieldGenerator()
Constructor.
RealVec< D > normalVecCurrent_
The lattice vector normal to the film used to generate these fields.
virtual std::string systemSpaceGroup() const =0
Get the space group name for this system.
int normalVecId() const
Get value of normalVecId.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
double fBulk_
Reference free energy used to calculate stress normal to the film.
void checkSpaceGroup() const
Check that space group is compatible with the mask.
void readParameters(std::istream &in)
Read parameter file block and initialize.
~FilmFieldGenMaskBase()
Destructor.
ScalarParam< Type > & readOptional(std::istream &in, const char *label, Type &value)
Add and read a new optional ScalarParam < Type > object.
void checkCompatibility()
Check that the system is compatible with this field.
FilmFieldGenMaskBase()
Constructor.
bool needsUpdate() const
Check whether system has changed such that the field needs updating.
virtual RealVec< D > systemLatticeVector(int id) const =0
Get one of the lattice vectors for this system.
void checkLatticeVectors() const
Check that lattice vectors are compatible with thin film constraint.
virtual void setFlexibleParams() const =0
Sets iterator's flexibleParams array to be compatible with the mask.
Crystallographic space group.
int size() const
Return number of elements in group (i.e., the order of the group).
A RealVec<D, T> is D-component vector with elements of floating type T.
Vec< D, T > & setToZero()
Set all elements to zero.
bool isActive() const
Is this parameter active?
Template for a Parameter object associated with a scalar variable.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Periodic fields and crystallography.
PSCF package top-level namespace.