71LatticeNeumannCouplingNode :: LatticeNeumannCouplingNode(
int n,
Domain *aDomain) :
75LatticeNeumannCouplingNode :: ~LatticeNeumannCouplingNode()
80LatticeNeumannCouplingNode :: initializeFrom(
InputRecord &ir,
int priority)
85 Node :: initializeFrom(ir, priority);
101LatticeNeumannCouplingNode :: computeLoadVectorAt(
FloatArray &answer,
TimeStep *stepN, ValueModeType mode)
111 for (
int i = 1; i <= nLoads; i++ ) {
115 answer.
add(contribution);
120 answer.
add(contribution);
123void LatticeNeumannCouplingNode :: printYourself()
131 printf(
"LatticeNeumannCouplingNode %d coord : x %f y %f\n",
number, x, y);
136 printf(
"dof %d is nil \n", i + 1);
152 double waterPressureNew = 0., waterPressureOld = 0.;
154 if (
domain->giveEngngModel()->giveMasterEngngModel() ) {
155 (
static_cast< StaggeredProblem *
>(
domain->giveEngngModel()->giveMasterEngngModel() ) )->giveCoupledModels(coupledModels);
156 if ( coupledModels.
at(2) != 0 && !( stepN->
giveNumber() <=
domain->giveEngngModel()->giveNumberOfFirstStep() ) ) {
157 for (
int k = 0; k < nCouplingNodes; k++ ) {
158 Node *coupledNode =
domain->giveEngngModel()->giveMasterEngngModel()->giveSlaveProblem(coupledModels.
at(2) )->giveDomain(1)->giveNode(
couplingNodes(k) );
160 TimeStep *previousStep =
domain->giveEngngModel()->giveMasterEngngModel()->givePreviousStep();
166 waterPressureOld = 0.;
169 double waterPressure = waterPressureNew - waterPressureOld;
171 double factor = waterPressure * dist;
173 contribution.
times(factor);
174 answer.
add(contribution);
#define REGISTER_DofManager(class)
int giveNumberOfDofs() const
IntArray loadArray
List of applied loads.
double giveCoordinate(int i) const
const FloatArray & giveCoordinates() const
void postInitialize() override
Performs post initialization steps. Called after all components are created and initialized.
std::vector< Dof * > dofArray
Array of DOFs.
Dof * giveDofWithID(int dofID) const
IntArray * giveLoadArray()
FloatArray coordinates
Array storing nodal coordinates.
virtual double giveUnknown(ValueModeType mode, TimeStep *tStep)=0
Domain * giveDomain() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
int number
Component number.
void add(const FloatArray &src)
static ParamKey IPK_LatticeNeumannCouplingNode_couplingnodes
static ParamKey IPK_LatticeNeumannCouplingNode_direction
FloatArray directionVector
Array storing nodal coordinates.
void postInitialize() override
Performs post initialization steps. Called after all components are created and initialized.
void computeLoadCouplingContribution(FloatArray &answer, TimeStep *stepN)
Node(int n, Domain *aDomain)
void computeLoadVector(FloatArray &answer, Load *load, CharType type, TimeStep *tStep, ValueModeType mode) override
int giveNumber()
Returns receiver's number.
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
double distance(const FloatArray &x, const FloatArray &y)
#define PM_ELEMENT_ERROR_IFNOTSET(_pm, _componentnum, _paramkey)
#define PM_UPDATE_PARAMETER(_val, _pm, _ir, _componentnum, _paramkey, _prio)